|
REMORA
Regional Modeling of Oceans Refined Adaptively
|
#include <REMORA_ErrorTag.H>


Public Member Functions | |
| void | SetTimeWindow (double min_elapsed, double max_elapsed, double min_total, double max_total) noexcept |
| bool | ActiveAt (double elapsed, double total) const noexcept |
| Whether this criterion applies at the given elapsed and total times. | |
| void | operator() (amrex::TagBoxArray &tba, const amrex::MultiFab *mf, const amrex::MultiFab *mskr3d, char clearval, char tagval, amrex::Real time, int level, const amrex::Geometry &geom, const amrex::IntVect &mask_lo=amrex::IntVect::TheZeroVector(), const amrex::IntVect &mask_hi=amrex::IntVect::TheZeroVector()) const |
Private Attributes | |
| double | m_min_elapsed = std::numeric_limits<double>::lowest() |
| double | m_max_elapsed = std::numeric_limits<double>::max() |
| double | m_min_total = std::numeric_limits<double>::lowest() |
| double | m_max_total = std::numeric_limits<double>::max() |
An amrex::AMRErrorTag that does not let the coastline drive refinement.
AMReX writes each data-dependent test twice: a plain form, and an embedded-boundary form that skips a covered cell and differences only across a face EBCellFlag reports as open. REMORA's land/sea mask plays the part of that connectivity – tracers on the land side are zeroed every step, so a difference taken across a coast measures the coast, not the flow. This class is that EB form with mskr in place of the flags.
Guarding each criterion as it is evaluated, rather than clearing land-adjacent tags afterwards, leaves every other criterion's tags alone – including a static in_box_lo/in_box_hi region drawn across a coast.
The inheritance is private on purpose: AMRErrorTag::operator() is not virtual, so converting a criterion back to the base would compile and quietly run the unguarded test on masked data. Private inheritance makes that ill-formed while still granting access to the protected m_test, m_value and m_info. Only the constructors and Field() are re-exported; the base's seven-argument operator() deliberately is not, so a call that forgets the mask will not compile.
Definition at line 30 of file REMORA_ErrorTag.H.
|
inlinenoexcept |
Whether this criterion applies at the given elapsed and total times.
Definition at line 56 of file REMORA_ErrorTag.H.

| void REMORAErrorTag::operator() | ( | amrex::TagBoxArray & | tba, |
| const amrex::MultiFab * | mf, | ||
| const amrex::MultiFab * | mskr3d, | ||
| char | clearval, | ||
| char | tagval, | ||
| amrex::Real | time, | ||
| int | level, | ||
| const amrex::Geometry & | geom, | ||
| const amrex::IntVect & | mask_lo = amrex::IntVect::TheZeroVector(), |
||
| const amrex::IntVect & | mask_hi = amrex::IntVect::TheZeroVector() |
||
| ) | const |
Apply this criterion to tba, skipping land.
Only GRAD, LESS and GREATER consult the mask. BOX and PARSER tag on position alone, USER hands the whole decision to a functor, and VORT and RELGRAD are unreachable from REMORA's inputs; all of those go to amrex::AMRErrorTag::operator() unchanged.
| [in,out] | tba | tags to update |
| [in] | mf | single-component field this criterion tests, with one ghost cell when the test is GRAD |
| [in] | mskr3d | land/sea mask on mf's BoxArray and DistributionMap, with enough lateral ghost cells for mask_lo/mask_hi plus one more for GRAD. nullptr evaluates exactly as amrex::AMRErrorTag would, which is what a criterion keyed on the mask itself wants, and what a run with no mask wants since every value is then clean anyway. |
| [in] | clearval | value marking an untagged cell |
| [in] | tagval | value marking a tagged cell |
| [in] | time | current time |
| [in] | level | level being tagged |
| [in] | geom | geometry of that level |
| [in] | mask_lo | lowest offset, in rho-cells relative to a value's own index, of the cells whose wet/dry state that value depends on – not always the cell it is stored in, since a face velocity is masked by both cells sharing its face and vorticity by a 3x3 block. Testing a value where it is not clean tags the coast just as differencing across the coast would. ErrorEst sets these per field and says why. Zero, the default, means the value is its own cell alone; the vertical component must be zero, the mask being column-constant. |
| [in] | mask_hi | highest such offset; see mask_lo. |
Apply this criterion to tba, skipping values the land/sea mask makes meaningless. The parameters are documented on the declaration in REMORA_ErrorTag.H.
The one thing to know when reading the body: a cell this declines to test is left exactly as it was found, not cleared. That is what lets a static box keep the tags it set over a coast, and it is the whole difference from the derefine criteria this replaced.
Definition at line 97 of file REMORA_Tagging.cpp.

|
inlinenoexcept |
Restrict this criterion to a time window, given as elapsed time (seconds since remora.start_time), as total time (seconds on the model clock), or both, in which case both must hold. Held here in double rather than in AMRErrorTagInfo, whose Real would round a calendar-scale total time in a single-precision build.
Definition at line 46 of file REMORA_ErrorTag.H.

|
private |
Definition at line 106 of file REMORA_ErrorTag.H.
Referenced by ActiveAt(), and SetTimeWindow().
|
private |
Definition at line 108 of file REMORA_ErrorTag.H.
Referenced by ActiveAt(), and SetTimeWindow().
|
private |
Definition at line 105 of file REMORA_ErrorTag.H.
Referenced by ActiveAt(), and SetTimeWindow().
|
private |
Definition at line 107 of file REMORA_ErrorTag.H.
Referenced by ActiveAt(), and SetTimeWindow().