Stack of refined levels (domain + BoxArray + MultiFab per level), level 0 the coarsest.
More...
#include <amr_hierarchy.hpp>
|
| | AmrHierarchy (const Box2D &coarse_domain, int max_grid_size, int ncomp, int ngrow, int ref_ratio=kAmrRefRatio) |
| | Builds the hierarchy with only its level 0 (coarse).
|
| |
| void | add_level (const BoxArray &fine_ba) |
| | Adds a fine level defined by its BoxArray (in fine index space).
|
| |
| void | install_level (int lev, const BoxArray &fine_ba, MultiFab data) |
| | Installs (adds or replaces) a fine level at index lev.
|
| |
| void | clear_above (int lev) |
| | Removes all levels strictly finer than lev (no-op if lev is already the finest).
|
| |
| int | num_levels () const |
| | Number of levels present (>= 1: level 0 always exists).
|
| |
| int | ref_ratio () const |
| | Integer refinement ratio between consecutive levels.
|
| |
| int | ncomp () const |
| | Number of field components per cell.
|
| |
| int | n_grow () const |
| | Number of ghost layers of the MultiFab.
|
| |
| const Box2D & | domain (int lev) const |
| | Domain of level lev in index space (INCLUSIVE lo/hi corners).
|
| |
| const BoxArray & | boxes (int lev) const |
| | BoxArray (split into boxes) of level lev.
|
| |
| MultiFab & | data (int lev) |
| | Field of level lev (mutable access).
|
| |
| const MultiFab & | data (int lev) const |
| | Field of level lev (const access).
|
| |
Stack of refined levels (domain + BoxArray + MultiFab per level), level 0 the coarsest.
Usage: built with only level 0 (coarse), then expanded by add_level / install_level (static) or by regrid_level (dynamic). Contract: fixed integer ref_ratio; domain(lev) follows from domain(lev-1) by refine(ref_ratio). Invariants: domain_, ba_ and data_ stay of length num_levels(); install/clear truncate the finer levels to keep the stack consistent.
◆ AmrHierarchy()
| pops::AmrHierarchy::AmrHierarchy |
( |
const Box2D & |
coarse_domain, |
|
|
int |
max_grid_size, |
|
|
int |
ncomp, |
|
|
int |
ngrow, |
|
|
int |
ref_ratio = kAmrRefRatio |
|
) |
| |
|
inline |
Builds the hierarchy with only its level 0 (coarse).
- Parameters
-
| coarse_domain | domain of level 0 in index space (INCLUSIVE lo/hi corners). |
| max_grid_size | max box size for the split into BoxArray. |
| ncomp | number of field components per cell. |
| ngrow | number of ghost layers of the MultiFab. |
| ref_ratio | integer refinement ratio; only kAmrRefRatio (2) is supported today and any other value is rejected at construction (see refinement_ratio.hpp). |
◆ add_level()
| void pops::AmrHierarchy::add_level |
( |
const BoxArray & |
fine_ba | ) |
|
|
inline |
Adds a fine level defined by its BoxArray (in fine index space).
- Parameters
-
| fine_ba | boxes of the new level, expressed in the refined index space. The level domain is deduced by refine(ref_ratio) from the previous level domain. |
◆ boxes()
| const BoxArray & pops::AmrHierarchy::boxes |
( |
int |
lev | ) |
const |
|
inline |
BoxArray (split into boxes) of level lev.
◆ clear_above()
| void pops::AmrHierarchy::clear_above |
( |
int |
lev | ) |
|
|
inline |
Removes all levels strictly finer than lev (no-op if lev is already the finest).
◆ data() [1/2]
| MultiFab & pops::AmrHierarchy::data |
( |
int |
lev | ) |
|
|
inline |
Field of level lev (mutable access).
◆ data() [2/2]
| const MultiFab & pops::AmrHierarchy::data |
( |
int |
lev | ) |
const |
|
inline |
Field of level lev (const access).
◆ domain()
| const Box2D & pops::AmrHierarchy::domain |
( |
int |
lev | ) |
const |
|
inline |
Domain of level lev in index space (INCLUSIVE lo/hi corners).
◆ install_level()
| void pops::AmrHierarchy::install_level |
( |
int |
lev, |
|
|
const BoxArray & |
fine_ba, |
|
|
MultiFab |
data |
|
) |
| |
|
inline |
Installs (adds or replaces) a fine level at index lev.
Used by the regrid.
- Parameters
-
| lev | index of the level to install; must satisfy 1 <= lev <= num_levels(). |
| fine_ba | boxes of the level in the refined index space. |
| data | MultiFab already built for this level (transferred by move). Replacing an existing level INVALIDATES and removes all finer levels. |
◆ n_grow()
| int pops::AmrHierarchy::n_grow |
( |
| ) |
const |
|
inline |
◆ ncomp()
| int pops::AmrHierarchy::ncomp |
( |
| ) |
const |
|
inline |
Number of field components per cell.
◆ num_levels()
| int pops::AmrHierarchy::num_levels |
( |
| ) |
const |
|
inline |
Number of levels present (>= 1: level 0 always exists).
◆ ref_ratio()
| int pops::AmrHierarchy::ref_ratio |
( |
| ) |
const |
|
inline |
Integer refinement ratio between consecutive levels.
The documentation for this class was generated from the following file: