|
| Random (const double do_something_fraction, const size_t maximum_refinement_level) |
|
template<typename ArrayIndex , typename Metavariables > |
auto | operator() (Parallel::GlobalCache< Metavariables > &, const ArrayIndex &array_index) const |
|
void | pup (PUP::er &p) override |
|
| Criterion (CkMigrateMessage *msg) |
|
| WRAPPED_PUPable_abstract (Criterion) |
|
template<typename ComputeTagsList , typename DataBoxType , typename Metavariables , typename ArrayIndex > |
auto | evaluate (const ObservationBox< ComputeTagsList, DataBoxType > &box, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index) const |
|
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::Domain::Flags::DoNothing. If \(r_d < f L_d / L_{max}\) the refinement flag is set to amr::Domain::Flags::Join. Otherwise the refinement flag is set to amr::Domain::Flag::Split.
- Note
- This criterion is primarily useful for testing the mechanics of h-refinement