SpECTRE  v2024.03.19
amr::Criteria::DriveToTarget< Dim > Class Template Reference

Refine the grid towards the target number of grid points and refinement levels in each dimension and then oscillate about the target. More...

#include <DriveToTarget.hpp>

Classes

struct  OscillationAtTarget
 The AMR flags chosen when the target number of grid points and refinement levels are reached. More...
 
struct  TargetNumberOfGridPoints
 The target number of grid point in each dimension. More...
 
struct  TargetRefinementLevels
 The target refinement level in each dimension. More...
 

Public Types

using options = tmpl::list< TargetNumberOfGridPoints, TargetRefinementLevels, OscillationAtTarget >
 
using compute_tags_for_observation_box = tmpl::list<>
 
using argument_tags = tmpl::list<::domain::Tags::Mesh< Dim > >
 

Public Member Functions

 DriveToTarget (const std::array< size_t, Dim > &target_number_of_grid_points, const std::array< size_t, Dim > &target_refinement_levels, const std::array< Flag, Dim > &flags_at_target)
 
template<typename Metavariables >
auto operator() (const Mesh< Dim > &current_mesh, Parallel::GlobalCache< Metavariables > &, const ElementId< Dim > &element_id) const
 
void pup (PUP::er &p) override
 
- Public Member Functions inherited from amr::Criterion
 Criterion (CkMigrateMessage *msg)
 
 WRAPPED_PUPable_abstract (Criterion)
 
template<typename ComputeTagsList , typename DataBoxType , typename Metavariables >
auto evaluate (const ObservationBox< ComputeTagsList, DataBoxType > &box, Parallel::GlobalCache< Metavariables > &cache, const ElementId< Metavariables::volume_dim > &element_id) const
 Evaluates the AMR criteria by selecting the appropriate derived class and forwarding its argument_tags from the ObservationBox (along with the GlobalCache and ArrayIndex) to the call operator of the derived class. More...
 

Static Public Attributes

static constexpr Options::String help
 

Detailed Description

template<size_t Dim>
class amr::Criteria::DriveToTarget< Dim >

Refine the grid towards the target number of grid points and refinement levels in each dimension and then oscillate about the target.

Details

If the grid is at neither target in a given dimension, the flag chosen will be in the priority order Split, IncreaseResolution, DecreaseResolution, Join.

Note
To remain at the target, set the OscillationAtTarget Flags to DoNothing.
This criterion is primarily for testing the mechanics of refinement.

Member Data Documentation

◆ help

template<size_t Dim>
constexpr Options::String amr::Criteria::DriveToTarget< Dim >::help
staticconstexpr
Initial value:
= {
"Refine the grid towards the TargetNumberOfGridPoints and "
"TargetRefinementLevels, and then oscillate about them by applying "
"OscillationAtTarget."}

The documentation for this class was generated from the following file: