dmorse / pscfpp

Polymer Self-Consistent Field Theory (C++/CUDA version)
https://pscf-home.cems.umn.edu
GNU General Public License v3.0
25 stars 20 forks source link

Explicit instantiations and renaming of expandRGridDimension #179

Closed benmagruder closed 3 weeks ago

benmagruder commented 3 weeks ago

This pull request contains modifications to FieldIo::expandFieldsDimension, now renamed to expandRGridDimension, in order to correct the issue that was resulting in a compiler warning. Specifically, the 1D and 2D implementations of the method have been separated into individual explicit instantiations, rather than being combined into the same template method. The method was also amended slightly when converting a 2D field to 3D, so that fields in the Oblique and Rhombic lattice systems will be able to be extended to 3D, which was not the case previously. Finally, I also combed through FieldIo.tpp and added quite a few spaces to create more consistent code formatting.

benmagruder commented 3 weeks ago

Forgot to mention this in the initial pull request: all unit tests still pass. However, there is not a unit test for the expandFieldsDimension method, so I double-checked that it works as expected and it does. At some point it would be a good idea to make a unit test for this and other related methods in FieldIo that do not currently have unit tests.