prisms-center / phaseField

PRISMS-PF: An Open-Source Phase-Field Modeling Framework
https://prisms-center.github.io/phaseField/
Other
229 stars 119 forks source link

Refactored variableAttributeLoader #303

Closed fractalsbyx closed 8 hours ago

fractalsbyx commented 1 week ago

Previously, for every variable attribute, several copies of vectors of information were used in several places in the code. Now, attributes are stored in a single map that maps the field index to an attributes instance. In several places in the code, fields were looped by index, using the size of various different vectors, or the number of fields. Now, in most places, we loop by value. With a little more work, we can remove the requirement for field numbers to be concurrent and start at 0.

Known issues:

Need some checks in place to make sure that the user inputs are well-formatted (no two fields with the same name, 'change()' dependencies correct, dependencies make sense, etc). Some unit tests became deprecated. May want replacements. Not well-tested yet

Certain simplifications may be possible (postprocess fields may not need to be treated so differently, others...)

Closes #281 ?