Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should the sub-dag be valid as soon as an evaluator is required? #167

Closed
ecoon opened this issue Nov 2, 2022 · 2 comments · Fixed by #270
Closed

should the sub-dag be valid as soon as an evaluator is required? #167

ecoon opened this issue Nov 2, 2022 · 2 comments · Fixed by #270

Comments

@ecoon
Copy link
Collaborator

ecoon commented Nov 2, 2022

There are some important usages of the sub-dag rooted at an evaluator as soon as that evaluator is required. For instance, in a PK, one might wish to do:

S->RequireEvaluator("my source");
if (S->GetEvaluator("my source")->IsDifferentiableWRT("my primary")) {
  S->RequireDerivative<>("my source", "my primary");
}

to determine if we need derivatives in the preconditioner.

This would be accomplished by calling Evaluator::EnsureEvaluators(); immediately after construction of the evaluator via Require in State.

The downside of this is that we no longer then have options to alter the evaluator list. For instance, if a PK that goes before Richards requires a field that depends on saturation, this will currently fail because the saturation WRM info gets moved into the state evaluators list only in the Richards PK.

@ecoon
Copy link
Collaborator Author

ecoon commented Nov 2, 2022

Possible fixes -- require that all changes to the "state"->"evaluators" list to be made during PK construction, not during Setup?

@ecoon
Copy link
Collaborator Author

ecoon commented Nov 2, 2022

Note that once this is fixed, can remove the "source term is differentiable" option in conservation equation PKs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant