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

Caching of Ad evalutaions #1272

Open
keileg opened this issue Nov 24, 2024 · 0 comments
Open

Caching of Ad evalutaions #1272

keileg opened this issue Nov 24, 2024 · 0 comments

Comments

@keileg
Copy link
Contributor

keileg commented Nov 24, 2024

This issue is a coordinating issue for improvements of the planned AdParser class to be implemented in #1181 and is downstream from that issue. Right now, this is just a bank of ideas.

Caching and recomputations

Part of the motivation for introducing the AdParser is to be able to cache evaluations of Ad operator trees, or subtrees. A key step will be to identify which subtrees can be regarded as static between non-linear iterations, time steps etc.; for clarity the decision on how and whether to do caching for specific terms is a different matter. Some rules of thumb will clearly apply:

  1. Variables change between non-linear iterations (with a possible exception if we implement splitting schemes on the non-linear level, but that would require the introduction of a notion of active/passive variables or similar).
  2. Discretizations change if the term is non-linear. The model will know about this.
  3. Time-dependent dense arrays can change between time steps, but not inside the non-linear solver.
  4. Grid-related quantities change if the grid changes, e.g. for AMR, fracture propagation, or large deformation. The user setting up the model should know about this.

A pragmatic approach to detecting changed and unaltered Ad operator trees could be to define a tagging system (an Enum?) which describes the above classification scheme, or similar, and assign tags to individual operators.

TBC.

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

No branches or pull requests

1 participant