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

ParameterModifier feature on CPU, and other small changes #178

Closed benmagruder closed 3 weeks ago

benmagruder commented 3 weeks ago

This pull request contains a new feature in the Sweep family of classes called ParameterModifier. Any object whose class is determined at run time (i.e., an object created by a Factory) will have parameters that are also not known until run time, and it may be useful to be able to perform a Sweep on these parameters. Therefore, any such class should be a subclass of ParameterModifier, which acts as an interface that allows these classes to have "specialized" sweepable parameters. Currently, the only object for which this is relevant is the Iterator, and the only type of Iterator with sweepable parameters is a FilmIterator, but the code is now general enough that it should be easy to add new specialized sweep parameters as needed. Currently, the feature has only been added to rpc, not rpg or r1d. Note that, as of now, there are no specialized sweep parameters in rpg or r1d.

Some unit tests have been modified so that they work properly with this new feature, and several new unit tests have been added to ensure that this feature works correctly. All unit tests pass.

A few other small changes have been made as well. The parameter wallThickness has been renamed excludedThickness. Internally, this parameter was named T, and it has been changed to excludedThickness for consistency with the rest of the code. interfaceThickness was internally defined as t, and has been renamed to interfaceThickness. Finally, a small change to Sweep was made to allow zeroth-order extrapolation (historyCapacity = 1), which only required the adjustment of one UTIL_CHECK command.