This pull request contains a variety of new classes that allow greatly increased flexibility for future add-ons that impose geometric confinement (via a mask) and/or external fields on the SCF calculation.
In this new design, an iterator that is able to impose masks and external fields should contain an ImposedFieldsGenerator object that generates the mask and/or external field. A block of the param file for the ImposedFieldsGenerator allows the user to input the necessary parameters to define the mask and/or external field.
The ImposedFieldsGenerator contains two pointers to FieldGenerator objects (one of which may optionally be left empty). FieldGenerator is a base class, and the actual objects that these pointers refer to should be subclasses that define which type of imposed field(s) it will generate, what parameters it needs to generate them, and provides methods that actually create the field(s) and provides the system with access to them.
Currently, this new hierarchy of classes is only used for one type of imposed fields: those that model thin-film confinement. New classes rpc::MaskGenFilm and rpc::ExtGenFilm (which inherit from prdc::MaskGenFilmBase and prdc::ExtGenFilmBase) are implemented to replace the old rpc::FilmIterator class. For the five examples in examples/pc/scf/films/, the new classes provide identical results to the old class, indicating that the implementation here is functional.
New unit tests have not yet been developed for this feature, but all other unit tests still pass. These unit tests will be included in a future pull request. A similar set of classes will be generated to impose thin film confinement in the rpg namespace, which will also be included in a future pull request.
Thanks for the feedback. I've made changes to address all of your comments, and will add the changes to this pull request as an additional commit. The changes I made are as follows:
change method names that begin with "get" to be more descriptive, e.g. systemSpaceGroup() and maskNormalVecId(). These methods cannot be deleted and replaced with a call to system().____ because they are defined as virtual methods in the prdc namespace and then redefined by subclasses, so that methods in the prdc namespace can use the space group, lattice parameters, etc. without needing to know how to actually get those variables.
Fixing include commands so they are in the right order.
Renaming parameters array to parametersCurrent, and writing extended comments for parametersCurrent, chiBottomCurrent, and chiTopCurrent_ to explain why they are necessary and how they are used.
move "using" statements in ExtGenFilm and MaskGenFilm from private to protected. There is no reason they need to be moved to private, it makes more sense for them to remain protected as they were in the parent class.
Other small corrections (delete erroneous comment "base class", add space in "System &"
This pull request contains a variety of new classes that allow greatly increased flexibility for future add-ons that impose geometric confinement (via a mask) and/or external fields on the SCF calculation.
In this new design, an iterator that is able to impose masks and external fields should contain an
ImposedFieldsGenerator
object that generates the mask and/or external field. A block of the param file for theImposedFieldsGenerator
allows the user to input the necessary parameters to define the mask and/or external field.The
ImposedFieldsGenerator
contains two pointers toFieldGenerator
objects (one of which may optionally be left empty).FieldGenerator
is a base class, and the actual objects that these pointers refer to should be subclasses that define which type of imposed field(s) it will generate, what parameters it needs to generate them, and provides methods that actually create the field(s) and provides the system with access to them.Currently, this new hierarchy of classes is only used for one type of imposed fields: those that model thin-film confinement. New classes
rpc::MaskGenFilm
andrpc::ExtGenFilm
(which inherit fromprdc::MaskGenFilmBase
andprdc::ExtGenFilmBase
) are implemented to replace the oldrpc::FilmIterator
class. For the five examples inexamples/pc/scf/films/
, the new classes provide identical results to the old class, indicating that the implementation here is functional.New unit tests have not yet been developed for this feature, but all other unit tests still pass. These unit tests will be included in a future pull request. A similar set of classes will be generated to impose thin film confinement in the
rpg
namespace, which will also be included in a future pull request.