|
SpECTRE
v2025.08.19
|
Compile-time information for AMR projectors. More...
#include <AmrMetavariables.hpp>
Classes | |
| struct | test |
Compile-time information for AMR projectors.
A class conforming to this protocol is placed in the metavariables to provide the following:
element_array: The array component on which AMR is performed.projectors: A type list of AMR projectors (each of which must conform to amr::protocols::Projector) that will be applied by:domain::Tags::Element, domain::Tags::Mesh, and domain::Tags::NeighborMesh are handled by AMR). See amr::protocols::Projector for details.p_refine_only_in_event: A boolean indicating that only h-refinement criteria should be evaluated in amr::Actions::EvaluateRefinementCriteria. Only h-refinement will be done in Phase::AdjustDomain; p-refinement will only be done via amr::Events::RefineMesh.keep_coarse_grids: A boolean indicating that AMR should create a completely new grid at each AMR step with an incremented grid index, and keep the old grid around. This is useful for multigrid solvers. If this is true, then the element_array must include amr::Actions::RegisterElement in the registration phase action list and in Metavariables::registration::element_registrars. You must also ensure to visit Phase::UpdateSections in the default phase order after registration, and in each AMR step after Phase::EvaluateRefinementCriteria and Phase::AdjustDomain. When this is enabled, you can use amr::Tags::ParentId and amr::Tags::ChildIds to traverse the grid hierarchy. However, you cannot rely on these tags to be up-to-date in the AMR projectors, as they are sometime updated after the projectors are run.Here is an example for a class conforming to this protocol: