amanzi / ats

Advanced Terrestrial Simulator (ATS) development
Other
47 stars 35 forks source link

Rework of PKs to split out parseParameterList, make RequireEvaluator() call EnsureEvaluators() #270

Closed ecoon closed 3 months ago

ecoon commented 3 months ago

This creates another level of setup, called parseParameterList(), that occurs after PK construction but before Setup. Most ATS PKs constructor contents are now moved into parseParameterList(), and all PKs are modified to have them set their primary variables in this call. This allows the key advancement that calling State::SetEvaluator(key, tag, eval) (the function that is called inside of RequireEvaluator(...) after construction) can now call eval->EnsureEvaluators(). This means that the DAG is now valid as soon as the evaluator is set. This allows some important changes to the use of the dag, e.g. calling Evaluator::IsDifferentiableWRT() immediately after calling RequireEvaluator().

This PR closes #167

ecoon commented 3 months ago

This blocks #186 -- progress can now begin on that on a transport branch