GRTLCollaboration / GRTeclyn

Port of GRChombo to AMReX - under development!
BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link

Refactor handling of derived variables #41

Open mirenradia opened 6 months ago

mirenradia commented 6 months ago

Currently, (e.g. in GRAMRLevel::variableSetUp()), the derived variables are hardcoded to being the constraint ones (i.e. Ham, Mom1, Mom2 and Mom3).

Since we don't want to specialise to GR/CCZ4 examples at the level of GRAMRLevel, we should move this code to the relevant examples and also add an interface so that it is simple for developers of new examples to add their own derived variables.

We should also remove any references to the GRChombo concept of "diagnostic variables" and replace them with derived variables.

Resolving this issue is a dependency of #2.

mirenradia commented 1 month ago

I've decided to rename UserVariables to StateVariables for consistency with AMReX terminology. I hope that's OK.