Closed ecoon closed 2 years ago
This work is being done on the branch: https://github.com/amanzi/ats/tree/konstantin/state
As of 78771dc the Richards and OverlandPressure PKs and associated evaluators were completed, with all tests in ats-regression-tests on a branch of the same name passing.
@dasvyat Could you start to look at how Richards has changed, and see what you need to do for sediment transport and any other ATS PKs that you would need to update?
@jbeisman Could you start in on the energy PK and evaluators in src/pks/energy/constitutive_relations?
I will look at surface energy balance and MPCs, and whoever finishes first can take on transport.
I'd be happy to set up a meeting to walk through the main changes, as I think things are pretty stable now on both the Amanzi side and in the ATS flow PKs. If they would be helpful, I can send some emacs macros that do a lot of the heavy lifting with search-and-replace.
PKs to do:
this is done, or very nearly so. will be closed shortly
This is to support Amanzi PR, amanzi/amanzi#640
Currently ATS uses 3, copy-constructed, identical states in all PKs:
S_
,S_inter_
andS_next_
. Each has its own time, and correspond to the "old" time, an "intermediate" time for subcycling PKs, and the "new" time, respectively.This is to be refactored to a single state model, where time tags are used to indicate "old", "intermediate", and "next." See discussions in the above PR. Each PK is assigned two tags, a
tag_current_
and atag_next_
, and is expected to AdvanceTime() between those two tags. Note that subcycling PKs may be given intermediate tags that are NOT the defaults, e.g.Amanzi::Tags::CURRENT
andAmanzi::Tags::NEXT
, respectively.To do this refactor is quite intrusive on ATS code. It requires:
In PKs:
S->RequireField(field_name);
-->S->Require<CompositeVector,CompositeVectorSpace>(field_name, field_tag);
S->RequireFieldEvaluator(field_name)
-->S->RequireEvaluator(field_name, field_tag);
PK::CommitStep()
and from new time --> old time onPK::FailStep()
.In evaluators:
Keys::readKey()
is used everywhere, there no hard-coded domains, and domain sets are used everywhere instead of magic "column" string searching.EnsureCompatibility()
is being complete reworked to make it easier to overload this method and get it right. This method is now split into a bunch of "hooks" that are virtual, and most secondary evaluators only need to update theEnsureCompatibility_ToDeps_()
hook, which passes CompositeVector structure (e.g. faces, cells, ndofs, mesh, etc) to its dependencies. See extensive developer documentation in https://github.com/amanzi/amanzi/blob/konstantin/state/src/state/evaluators/EvaluatorSecondaryMonotype.hh and please ask if you have questions!In addition, code is generally being cleaned up, and after this PR is ready, the entire code will get run through clang-format to standardize styles!