![]() |
Block-Structured AMR Software Framework
|
Virtual base class for managing individual levels. AmrLevel functions both as a container for state data on a level and also manages the advancement of data in time. More...
#include <AMReX_AmrLevel.H>
Public Types | |
| enum | TimeLevel { AmrOldTime , AmrHalfTime , AmrNewTime , Amr1QtrTime , Amr3QtrTime , AmrOtherTime } |
| What time are we at? More... | |
Public Member Functions | |
| virtual | ~AmrLevel () |
| The destructor. | |
| AmrLevel (const AmrLevel &)=delete | |
| Disable copying because AmrLevel owns state data and geometry caches. | |
| AmrLevel (AmrLevel &&)=delete | |
| Disable moving; derived classes manage non-movable FillPatch caches. | |
| AmrLevel & | operator= (const AmrLevel &)=delete |
| Copy assignment is undefined for the same ownership reasons. | |
| AmrLevel & | operator= (AmrLevel &&)=delete |
| Move assignment is also disabled—use factory methods instead. | |
| void | LevelDirectoryNames (const std::string &dir, std::string &LevelDir, std::string &FullPath) const |
| Derive the directory name for this level inside a plot/checkpoint tree. | |
| virtual void | CreateLevelDirectory (const std::string &dir) |
Create the Level_* directory inside dir (if needed) before writing plots/checkpoints. | |
| void | SetLevelDirectoryCreated (bool ldc) noexcept |
| Record whether CreateLevelDirectory() has already created the folder. | |
| virtual std::string | thePlotFileType () const |
| A string written as the first item in writePlotFile() at level zero. It is so we can distinguish between different types of plot files. This default "HyperCLaw-V1.1" is for VisIt software and some of our internal postprocessing routines. | |
| virtual void | writePlotFile (const std::string &dir, std::ostream &os, VisMF::How how=VisMF::NFiles) |
Write plot file data for this level into directory dir. | |
| virtual void | writePlotFilePre (const std::string &dir, std::ostream &os) |
Perform pre-plotfile operations (e.g., gather metadata) for directory dir using os. | |
| virtual void | writePlotFilePost (const std::string &dir, std::ostream &os) |
Perform post-plotfile cleanup for directory dir once writes complete. | |
| virtual void | writeSmallPlotFile (const std::string &dir, std::ostream &os, VisMF::How how=VisMF::NFiles) |
Write a reduced plot file (same parameters as writePlotFile()) to dir. | |
| virtual void | checkPoint (const std::string &dir, std::ostream &os, VisMF::How how=VisMF::NFiles, bool dump_old=true) |
| Write current state to a checkpoint directory. | |
| virtual void | checkPointPre (const std::string &dir, std::ostream &os) |
Do pre-checkpoint work (e.g., directory creation) for dir using os. | |
| virtual void | checkPointPost (const std::string &dir, std::ostream &os) |
Do post-checkpoint cleanup for dir once writes complete. | |
| virtual void | restart (Amr &papa, std::istream &is, bool bReadSpecial=false) |
Populate this level from checkpoint input stream is. | |
| virtual void | set_state_in_checkpoint (Vector< int > &state_in_checkpoint) |
| Hook to adjust which state descriptors are expected in checkpoint streams. | |
| virtual void | computeInitialDt (int finest_level, int sub_cycle, Vector< int > &n_cycle, const Vector< IntVect > &ref_ratio, Vector< Real > &dt_level, Real stop_time)=0 |
| Compute the initial time step size for each level. | |
| virtual void | computeNewDt (int finest_level, int sub_cycle, Vector< int > &n_cycle, const Vector< IntVect > &ref_ratio, Vector< Real > &dt_min, Vector< Real > &dt_level, Real stop_time, int post_regrid_flag)=0 |
| Compute the next time step sizes after an advance. | |
| virtual Real | advance (Real time, Real dt, int iteration, int ncycle)=0 |
Advance solution on this level by dt and return the next stable dt. | |
| virtual void | post_timestep (int iteration) |
| Perform level-specific updates after each subcycle. | |
| virtual void | postCoarseTimeStep (Real time) |
| Called once per coarse step after fine levels finish refluxing. | |
| virtual void | post_restart () |
| Override to perform any fixups immediately after restart (default: no-op). | |
| virtual void | post_regrid (int lbase, int new_finest)=0 |
| Operations to be performed immediately after regridding completes. | |
| virtual void | post_init (Real stop_time)=0 |
| Operations to run after initialization finishes. | |
| virtual int | okToContinue () |
| Return nonzero to continue advancing; zero to halt the run. | |
| virtual int | okToRegrid () |
| Return nonzero if refinement starting from this level is allowed this cycle. | |
| virtual void | initData ()=0 |
| Init grid data at problem start-up. This is a pure virtual function and hence MUST be implemented by derived classes. | |
| virtual void | setTimeLevel (Real time, Real dt_old, Real dt_new) |
| Set the time metadata stored in the state data arrays (old/new). | |
| virtual void | allocOldData () |
| Allocate storage for "old" time slices before an advance. | |
| virtual void | removeOldData () |
| Delete the old-time slots once they are no longer needed. | |
| virtual void | init (AmrLevel &old)=0 |
| Init data on this level from another AmrLevel (during regrid). This is a pure virtual function and hence MUST be implemented by derived classes. | |
| virtual void | init ()=0 |
| void | reset () |
| Reset data to initial time by swapping new and old time slots. | |
| int | Level () const noexcept |
| Returns this AmrLevel index (0 = coarsest). | |
| const BoxArray & | boxArray () const noexcept |
| List of grids at this level. | |
| const BoxArray & | getEdgeBoxArray (int dir) const noexcept |
Return the edge-centered grid layout for direction dir (cached). | |
| const BoxArray & | getNodalBoxArray () const noexcept |
| Return the nodal grid layout for this level (cached). | |
| const DistributionMapping & | DistributionMap () const noexcept |
| const FabFactory< FArrayBox > & | Factory () const noexcept |
| const EBFArrayBoxFactory & | EBFactory () const noexcept |
| int | numGrids () const noexcept |
| Number of grids at this level. | |
| int | numStates () const noexcept |
| Number of states at this level. | |
| const Box & | Domain () const noexcept |
| Returns the indices defining physical domain. | |
| int | nStep () const noexcept |
| Timestep n at this level. | |
| const Geometry & | Geom () const noexcept |
| Returns the geometry object. | |
| const IntVect & | fineRatio () const noexcept |
| Long | countCells () const noexcept |
| Returns number of valid cells on this level. | |
| const BoxArray & | getAreaNotToTag () noexcept |
| Get the cached BoxArray describing regions that should not be tagged. | |
| const Box & | getAreaToTag () noexcept |
| Get the Box (single region) that is permitted to be tagged. | |
| void | constructAreaNotToTag () |
| Build internal data structures defining the area not to tag. | |
| void | setAreaNotToTag (BoxArray &ba) noexcept |
Override the area-not-to-tag cache with user-supplied BoxArray ba. | |
| void | resetFillPatcher () |
| Clear cached FillPatcher objects (call after reflux/averaging). | |
| virtual void | errorEst (TagBoxArray &tb, int clearval, int tagval, Real time, int n_error_buf=0, int ngrow=0)=0 |
| Error estimation for regridding. This is a pure virtual function and hence MUST be implemented by derived classes. | |
| void | FillCoarsePatch (MultiFab &mf, int dcomp, Real time, int state_idx, int scomp, int ncomp, int nghost=0) |
| Interpolate from coarse level to the valid area in mf. | |
| virtual void | setPhysBoundaryValues (FArrayBox &dest, int state_indx, Real time, int dest_comp, int src_comp, int num_comp) |
| Apply physical boundary conditions to cell-centered data. | |
| virtual std::unique_ptr< MultiFab > | derive (const std::string &name, Real time, int ngrow) |
| Returns a MultiFab containing the derived data for this level. If ngrow>0 the MultiFab is built on the appropriately grown BoxArray. | |
| virtual void | derive (const std::string &name, Real time, MultiFab &mf, int dcomp) |
This version of derive() fills the dcomp'th component of mf with the derived quantity. | |
| StateData & | get_state_data (int state_indx) noexcept |
State data object accessor for descriptor state_indx. | |
| MultiFab & | get_old_data (int state_indx) noexcept |
Mutable access to the MultiFab at the old time slot for state state_indx. | |
| const MultiFab & | get_old_data (int state_indx) const noexcept |
Const access to the MultiFab at the old time slot for state state_indx. | |
| MultiFab & | get_new_data (int state_indx) noexcept |
Mutable access to the MultiFab at the new time slot for state state_indx. | |
| const MultiFab & | get_new_data (int state_indx) const noexcept |
Const access to the MultiFab at the new time slot for state state_indx. | |
| int | postStepRegrid () const noexcept |
| Returns whether a post-timestep regrid is currently requested (nonzero for true). | |
| void | setPostStepRegrid (int new_val) noexcept |
| Set the post-timestep regrid trigger (nonzero requests a regrid). | |
| void | UpdateDistributionMaps (DistributionMapping &dmap) |
Update every StateData's DistributionMapping to match dmap (e.g., after rebalancing). | |
| Vector< int > | getBCArray (int State_Type, int gridno, int strt_comp, int ncomp) |
| Return an array describing boundary types for components [strt_comp,strt_comp+ncomp). | |
| MultiFab & | get_data (int state_indx, Real time) noexcept |
Fetch the MultiFab (old or new) that best matches time for state state_indx. | |
| virtual void | set_preferred_boundary_values (MultiFab &S, int state_index, int scomp, int dcomp, int ncomp, Real time) const |
| Hook to override fillpatched boundary values before applying physical BCs (default no-op). | |
| virtual void | manual_tags_placement (TagBoxArray &tags, const Vector< IntVect > &bf_lev) |
| Adjust tags after core tagging routines run (default: no-op). | |
| virtual void | setPlotVariables () |
| Override to customize which variables appear in full plotfiles on this level (default uses global list). | |
| virtual void | setSmallPlotVariables () |
| Override to customize which variables appear in small plotfiles on this level. | |
| virtual Real | estimateWork () |
| Estimate the amount of work required to advance just this level, typically based on cell counts. | |
| virtual int | WorkEstType () |
| Select which state descriptor drives work estimates. | |
| TimeLevel | which_time (int state_indx, Real time) const noexcept |
| Returns one the TimeLevel enums. Asserts that time is between AmrOldTime and AmrNewTime. | |
| virtual bool | checkPointNow () |
| Return true if this level requests an immediate checkpoint (default false). | |
| virtual bool | writePlotNow () |
| Return true if this level requests an immediate plotfile (default false). | |
| virtual bool | writeSmallPlotNow () |
| Return true if this level requests an immediate small-plot file (default false). | |
| virtual void | particle_redistribute (int lbase=0, bool a_init=false) |
| Optional particle redistribution hook called by the parent Amr object. | |
| void | FillPatcherFill (amrex::MultiFab &mf, int dcomp, int ncomp, int nghost, amrex::Real time, int state_index, int scomp) |
| Fill ghost cells using cached FillPatcher (level>0) or FillPatch (level 0). | |
| template<typename F , typename P = RungeKutta::PostStageNoOp> | |
| void | RK (int order, int state_type, Real time, Real dt, int iteration, int ncycle, F &&f, P &&p=RungeKutta::PostStageNoOp()) |
| Evolve one step with Runge-Kutta (2, 3, or 4) | |
Static Public Member Functions | |
| static bool | isStateVariable (const std::string &name, int &state_indx, int &ncomp) |
Return true if name matches a registered state variable, also providing descriptor info. | |
| static void | FlushFPICache () |
| Resize/clear cached FillPatchIterator state in preparation for new fill operations. | |
| static const DescriptorList & | get_desc_lst () noexcept |
| Returns list of Descriptors. | |
| static DeriveList & | get_derive_lst () noexcept |
| Returns list of derived variables. | |
| static void | FillPatch (AmrLevel &amrlevel, MultiFab &leveldata, int boxGrow, Real time, int index, int scomp, int ncomp, int dcomp=0) |
| Convenience wrapper around FillPatchSingleLevel/TwoLevels. | |
| static void | FillPatchAdd (AmrLevel &amrlevel, MultiFab &leveldata, int boxGrow, Real time, int index, int scomp, int ncomp, int dcomp=0) |
Same as FillPatch(), but adds into leveldata instead of overwriting. | |
| static void | SetEBMaxGrowCells (int nbasic, int nvolume, int nfull) noexcept |
| Configure the ghost-cell requirements (basic/volume/full) for EB FillPatch operations. | |
| static void | SetEBSupportLevel (EBSupport ebs) |
Select which level of EB data to build (basic, volume, full) via ebs. | |
| static IntVect | ProperBlockingFactor (AmrLevel const &amr_level, int boxGrow, IndexType const &boxType, StateDescriptor const &desc, int SComp) |
| Recommendation of a proper blocking factor for filling. | |
Static Public Attributes | |
| static int | m_eb_basic_grow_cells = 5 |
| static int | m_eb_volume_grow_cells = 4 |
| static int | m_eb_full_grow_cells = 2 |
| static EBSupport | m_eb_support_level = EBSupport::volume |
Protected Member Functions | |
| AmrLevel () noexcept | |
| The constructors – for derived classes. | |
| AmrLevel (Amr &papa, int lev, const Geometry &level_geom, const BoxArray &ba, const DistributionMapping &dm, Real time) | |
| void | finishConstructor () |
| Common code used by all constructors. | |
Protected Attributes | |
| int | level {-1} |
| Geometry | geom |
| BoxArray | grids |
| DistributionMapping | dmap |
| Amr * | parent {nullptr} |
| IntVect | crse_ratio |
| IntVect | fine_ratio |
| Vector< StateData > | state |
| BoxArray | m_AreaNotToTag |
| Box | m_AreaToTag |
| int | post_step_regrid {0} |
| bool | levelDirectoryCreated {false} |
| std::unique_ptr< FabFactory< FArrayBox > > | m_factory |
| Vector< std::unique_ptr< FillPatcher< MultiFab > > > | m_fillpatcher |
Static Protected Attributes | |
| static DeriveList | derive_lst |
| static DescriptorList | desc_lst |
Friends | |
| class | Amr |
| class | FillPatchIterator |
| class | FillPatchIteratorHelper |
Virtual base class for managing individual levels. AmrLevel functions both as a container for state data on a level and also manages the advancement of data in time.
|
virtual |
The destructor.
|
delete |
Disable copying because AmrLevel owns state data and geometry caches.
|
delete |
Disable moving; derived classes manage non-movable FillPatch caches.
|
inlineprotectednoexcept |
The constructors – for derived classes.
|
protected |
|
pure virtual |
Advance solution on this level by dt and return the next stable dt.
| time | Start time of the advance. |
| dt | Step size to take. |
| iteration | Sub-step counter within the coarse step. |
| ncycle | Number of fine subcycles per coarse step. |
|
virtual |
Allocate storage for "old" time slices before an advance.
|
inlinenoexcept |
List of grids at this level.
|
virtual |
Write current state to a checkpoint directory.
| dir | Destination directory (e.g., chk00010). |
| os | Metadata stream shared across levels. |
| how | VisMF write mode. |
| dump_old | Whether to include the "old" state data. |
|
virtual |
Return true if this level requests an immediate checkpoint (default false).
Overrides can trigger checkpointing after conditional events.
|
virtual |
Do post-checkpoint cleanup for dir once writes complete.
| dir | Checkpoint directory that was just written. |
| os | Metadata stream used during writing. |
|
virtual |
Do pre-checkpoint work (e.g., directory creation) for dir using os.
| dir | Checkpoint directory being created. |
| os | Metadata stream for header output. |
|
pure virtual |
Compute the initial time step size for each level.
| finest_level | Finest AMR level existing so far. |
| sub_cycle | Whether subcycling is enabled. |
| n_cycle | In/out: number of subcycles per level. |
| ref_ratio | Level-to-level refinement ratios. |
| dt_level | Output per-level dt. |
| stop_time | Simulation stop time (used to clamp dt if needed). |
|
pure virtual |
Compute the next time step sizes after an advance.
| finest_level | Finest AMR level existing. |
| sub_cycle | Whether subcycling is enabled. |
| n_cycle | In/out: number of subcycles per level. |
| ref_ratio | Level-to-level refinement ratios. |
| dt_min | Output per-level dt upper bounds (physics-limited). |
| dt_level | Output per-level dt to use. |
| stop_time | Simulation stop time (used to clamp dt). |
| post_regrid_flag | Flag describing regrid state (0 normal, 1 immediate post-regrid). |
| void amrex::AmrLevel::constructAreaNotToTag | ( | ) |
Build internal data structures defining the area not to tag.
|
noexcept |
Returns number of valid cells on this level.
|
virtual |
Create the Level_* directory inside dir (if needed) before writing plots/checkpoints.
| dir | Base output directory (plot or checkpoint root). |
|
virtual |
Returns a MultiFab containing the derived data for this level. If ngrow>0 the MultiFab is built on the appropriately grown BoxArray.
| name | Derived quantity identifier. |
| time | Physical time at which to evaluate the quantity. |
| ngrow | How many ghost cells to include. |
|
inlinenoexcept |
|
inlinenoexcept |
Returns the indices defining physical domain.
|
inlinenoexcept |
|
pure virtual |
Error estimation for regridding. This is a pure virtual function and hence MUST be implemented by derived classes.
| tb | Tag array to mark for refinement (output). |
| clearval | Value that clears a tag entry. |
| tagval | Value that marks a cell for refinement. |
| time | Physical time at which tagging occurs. |
| n_error_buf | Number of grow cells added around tagged features (default 0). |
| ngrow | Number of ghost layers available in tb (default 0). |
|
virtual |
Estimate the amount of work required to advance just this level, typically based on cell counts.
|
inlinenoexcept |
| void amrex::AmrLevel::FillCoarsePatch | ( | MultiFab & | mf, |
| int | dcomp, | ||
| Real | time, | ||
| int | state_idx, | ||
| int | scomp, | ||
| int | ncomp, | ||
| int | nghost = 0 |
||
| ) |
Interpolate from coarse level to the valid area in mf.
Fill mf on this level using data interpolated from the coarser level.
| mf | Destination MultiFab. |
| dcomp | Destination component offset in mf. |
| time | Time at which to sample coarse data. |
| state_idx | State descriptor index selecting which state to fill. |
| scomp | Source component index within the coarse state. |
| ncomp | Number of components to fill. |
| nghost | Number of ghost cells to fill (default 0). |
|
static |
Convenience wrapper around FillPatchSingleLevel/TwoLevels.
| amrlevel | Level providing state data. |
| leveldata | Destination MultiFab to fill. |
| boxGrow | Number of grow cells to request. |
| time | Time at which to sample. |
| index | State descriptor index. |
| scomp | Source component. |
| ncomp | Number of components. |
| dcomp | Destination component (default 0). |
|
static |
Same as FillPatch(), but adds into leveldata instead of overwriting.
| amrlevel | Level providing state data. |
| leveldata | Destination MultiFab to accumulate into. |
| boxGrow | Number of grow cells to request. |
| time | Time at which to sample. |
| index | State descriptor index. |
| scomp | Source component. |
| ncomp | Number of components. |
| dcomp | Destination component (default 0). |
| void amrex::AmrLevel::FillPatcherFill | ( | amrex::MultiFab & | mf, |
| int | dcomp, | ||
| int | ncomp, | ||
| int | nghost, | ||
| amrex::Real | time, | ||
| int | state_index, | ||
| int | scomp | ||
| ) |
Fill ghost cells using cached FillPatcher (level>0) or FillPatch (level 0).
| mf | Destination MultiFab. |
| dcomp | Destination component offset. |
| ncomp | Number of components to fill. |
| nghost | Number of ghost cells to fill. |
| time | Time at which to sample data. |
| state_index | State descriptor index to pull from. |
| scomp | Source component offset within the state. |
|
inlinenoexcept |
|
protected |
Common code used by all constructors.
|
static |
Resize/clear cached FillPatchIterator state in preparation for new fill operations.
|
inlinenoexcept |
Returns the geometry object.
|
staticnoexcept |
Returns list of derived variables.
|
inlinestaticnoexcept |
Returns list of Descriptors.
Const access to the MultiFab at the new time slot for state state_indx.
Mutable access to the MultiFab at the new time slot for state state_indx.
Const access to the MultiFab at the old time slot for state state_indx.
Mutable access to the MultiFab at the old time slot for state state_indx.
State data object accessor for descriptor state_indx.
|
noexcept |
Get the cached BoxArray describing regions that should not be tagged.
|
noexcept |
Get the Box (single region) that is permitted to be tagged.
Return an array describing boundary types for components [strt_comp,strt_comp+ncomp).
| State_Type | State descriptor index. |
| gridno | Grid index on this level. |
| strt_comp | Starting component. |
| ncomp | Number of components. |
Return the edge-centered grid layout for direction dir (cached).
|
noexcept |
Return the nodal grid layout for this level (cached).
|
pure virtual |
Init data on this level after regridding if old AmrLevel did not previously exist. This is a pure virtual function and hence MUST be implemented by derived classes.
|
pure virtual |
Init data on this level from another AmrLevel (during regrid). This is a pure virtual function and hence MUST be implemented by derived classes.
| old | Source level to interpolate from. |
|
pure virtual |
Init grid data at problem start-up. This is a pure virtual function and hence MUST be implemented by derived classes.
|
static |
Return true if name matches a registered state variable, also providing descriptor info.
| name | State variable identifier. |
| state_indx | Output: descriptor index when found. |
| ncomp | Output: number of components associated with that state. |
| void amrex::AmrLevel::LevelDirectoryNames | ( | const std::string & | dir, |
| std::string & | LevelDir, | ||
| std::string & | FullPath | ||
| ) | const |
Derive the directory name for this level inside a plot/checkpoint tree.
| dir | Root directory (typically plot or checkpoint folder). |
| LevelDir | Output: relative level directory (e.g., Level_3). |
| FullPath | Output: absolute path combining dir and LevelDir. |
|
virtual |
Adjust tags after core tagging routines run (default: no-op).
| tags | Tag arrays built on this level. |
| bf_lev | Buffer sizes per level from Amr. |
|
inlinenoexcept |
Timestep n at this level.
|
inlinenoexcept |
Number of grids at this level.
|
inlinenoexcept |
Number of states at this level.
|
inlinevirtual |
Return nonzero to continue advancing; zero to halt the run.
|
virtual |
Return nonzero if refinement starting from this level is allowed this cycle.
Only evaluated when regrid_int > 0 and level_count >= regrid_int. Default returns true.
Move assignment is also disabled—use factory methods instead.
Copy assignment is undefined for the same ownership reasons.
|
inlinevirtual |
Optional particle redistribution hook called by the parent Amr object.
| lbase | Coarsest level whose particles should be considered. |
| a_init | Whether the call happens during initialization. |
|
pure virtual |
Operations to run after initialization finishes.
| stop_time | Simulation stop time (useful for multi-stage inits). |
Operations to be performed immediately after regridding completes.
| lbase | Coarsest level that triggered the regrid. |
| new_finest | New finest level index after regridding. |
|
inlinevirtual |
Override to perform any fixups immediately after restart (default: no-op).
|
virtual |
Perform level-specific updates after each subcycle.
| iteration | Sub-step index within the coarse step. |
|
virtual |
Called once per coarse step after fine levels finish refluxing.
| time | Current coarse-level time. |
|
inlinenoexcept |
Returns whether a post-timestep regrid is currently requested (nonzero for true).
|
static |
Recommendation of a proper blocking factor for filling.
| amr_level | Owning level supplying geometry. |
| boxGrow | Grow cells requested by the caller. |
| boxType | Index type (cell-centered, nodal, etc.). |
| desc | State descriptor tied to the data. |
| SComp | Starting component index. |
|
virtual |
Delete the old-time slots once they are no longer needed.
| void amrex::AmrLevel::reset | ( | ) |
Reset data to initial time by swapping new and old time slots.
| void amrex::AmrLevel::resetFillPatcher | ( | ) |
Clear cached FillPatcher objects (call after reflux/averaging).
|
virtual |
Populate this level from checkpoint input stream is.
| papa | Owning Amr driver (provides geometry and config). |
| is | Input stream pointing at the level's checkpoint data. |
| bReadSpecial | Whether to parse additional application-specific fields. |
| void amrex::AmrLevel::RK | ( | int | order, |
| int | state_type, | ||
| Real | time, | ||
| Real | dt, | ||
| int | iteration, | ||
| int | ncycle, | ||
| F && | f, | ||
| P && | p = RungeKutta::PostStageNoOp() |
||
| ) |
Evolve one step with Runge-Kutta (2, 3, or 4)
To use RK, the StateData must have all the ghost cells needed. See namespace RungeKutta for expected function signatures of the callable parameters.
| order | order of RK |
| state_type | index of StateData |
| time | time at the beginning of the step. |
| dt | time step |
| iteration | iteration number on fine level during a coarse time step. For an AMR simulation with subcycling and a refinement ratio of 2, the number is either 1 or 2, denoting the first and second substep, respectively. |
| ncycle | number of subcyling steps. It's usually 2 or 4. Without subcycling, this will be 1. |
| f | computing right-hand side for evolving the StateData. One can also register data for flux registers in this. |
| p | optionally post-processing RK stage results |
|
virtual |
Hook to override fillpatched boundary values before applying physical BCs (default no-op).
| S | MultiFab to edit. |
| state_index | State descriptor index. |
| scomp | Source component offset. |
| dcomp | Destination component offset. |
| ncomp | Number of components to adjust. |
| time | Physical time at which BCs are evaluated. |
Hook to adjust which state descriptors are expected in checkpoint streams.
| state_in_checkpoint | Array of flags (one per descriptor) that this level may modify. |
|
noexcept |
Override the area-not-to-tag cache with user-supplied BoxArray ba.
|
inlinestaticnoexcept |
Configure the ghost-cell requirements (basic/volume/full) for EB FillPatch operations.
|
inlinestatic |
Select which level of EB data to build (basic, volume, full) via ebs.
|
inlinenoexcept |
Record whether CreateLevelDirectory() has already created the folder.
| ldc | True if the level directory exists; false to clear the flag. |
|
virtual |
Apply physical boundary conditions to cell-centered data.
| dest | Destination FArrayBox. |
| state_indx | State descriptor index associated with dest. |
| time | Physical time at which BCs should be evaluated. |
| dest_comp | Destination component offset in dest. |
| src_comp | Component offset in the state data. |
| num_comp | Number of components to update. |
|
virtual |
Override to customize which variables appear in full plotfiles on this level (default uses global list).
|
inlinenoexcept |
Set the post-timestep regrid trigger (nonzero requests a regrid).
| new_val | Trigger value applied after each step. |
|
virtual |
Override to customize which variables appear in small plotfiles on this level.
Set the time metadata stored in the state data arrays (old/new).
| time | New-time value to record. |
| dt_old | Dt associated with the old slot. |
| dt_new | Dt associated with the new slot. |
|
inlinevirtual |
A string written as the first item in writePlotFile() at level zero. It is so we can distinguish between different types of plot files. This default "HyperCLaw-V1.1" is for VisIt software and some of our internal postprocessing routines.
< Default identifier consumed by VisIt and AMReX tools.
| void amrex::AmrLevel::UpdateDistributionMaps | ( | DistributionMapping & | dmap | ) |
Update every StateData's DistributionMapping to match dmap (e.g., after rebalancing).
Update the distribution maps in StateData based on the size of the map.
| dmap | Distribution mapping describing the new ownership. |
|
noexcept |
Returns one the TimeLevel enums. Asserts that time is between AmrOldTime and AmrNewTime.
| state_indx | State descriptor index providing time metadata. |
| time | Target physical time. |
|
inlinevirtual |
Select which state descriptor drives work estimates.
|
virtual |
Write plot file data for this level into directory dir.
| dir | Output root (e.g., plt00010). |
| os | Metadata stream shared across levels. |
| how | VisMF write mode (NFiles or OneFilePerCPU). |
|
virtual |
Perform post-plotfile cleanup for directory dir once writes complete.
| dir | Plotfile directory that was just written. |
| os | Metadata stream (same one passed to writePlotFilePre()). |
|
virtual |
Perform pre-plotfile operations (e.g., gather metadata) for directory dir using os.
| dir | Plotfile directory about to be written. |
| os | Stream receiving metadata (often the Header). |
|
virtual |
Return true if this level requests an immediate plotfile (default false).
|
inlinevirtual |
Write a reduced plot file (same parameters as writePlotFile()) to dir.
| dir | Target directory. |
| os | Metadata stream. |
| how | VisMF write mode. |
|
virtual |
Return true if this level requests an immediate small-plot file (default false).
|
friend |
|
friend |
|
friend |
|
protected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |
|
static |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |