dmorse / pscfpp

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

Fix filmIterator to work delayed basis construction #98

Closed benmagruder closed 1 year ago

benmagruder commented 1 year ago

FilmIterator now works with the delayed basis construction. This mostly involved rearranging the calls to setup(), generateWallFields(), and setFlexibleParams() to occur at appropriate times. Unit tests are all fixed as well; all this really required was to manually input lattice parameters when needed, since the lattice parameters were no longer being provided from the param file.

The FilmIteratorBase::setup() function no longer generates the mask and external fields; this is because we need to have lattice parameters accessible in order to correctly generate these fields, and I am leaving us the option to call setup() before we have lattice parameters (although that isn't the case currently). Instead, the mask and external fields are now generated at the beginning of the solve() function.

All unit tests now pass. I ran the thin film examples and everything looked like it was functioning properly.