|
| Random (const double do_something_fraction, const size_t maximum_refinement_level) |
|
template<typename Metavariables > |
auto | operator() (Parallel::GlobalCache< Metavariables > &, const ElementId< Metavariables::volume_dim > &element_id) const |
|
void | pup (PUP::er &p) override |
|
| 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...
|
|
Randomly h-refine (or coarsen) an Element in each dimension.
Details
Let \(f\) be ChangeRefinementFraction
, \(L_{max}\) be MaximumRefinementLevel
, and \(L_d\) be the current refinement level of an Element in a particular dimension. In each dimension, a random number \(r_d \in [0, 1]\) is generated. If \(r_d > f\) the refinement flag is set to amr::Flags::DoNothing. If \(r_d < f L_d / L_{max}\) the refinement flag is set to amr::Flags::Join. Otherwise the refinement flag is set to amr::Flag::Split.
- Note
- This criterion is primarily useful for testing the mechanics of h-refinement