Field distributed over a level: decomposition (BoxArray) + distribution (DistributionMapping) + ncomp components + ngrow ghosts.
More...
#include <multifab.hpp>
|
| | MultiFab ()=default |
| |
| | MultiFab (BoxArray ba, DistributionMapping dm, int ncomp, int ngrow) |
| | Builds the field: allocates one Fab2D (ncomp components, ngrow ghosts) for EACH box that this rank owns according to dm.
|
| |
| const BoxArray & | box_array () const |
| | GLOBAL decomposition of the level (all boxes, all ranks).
|
| |
| const DistributionMapping & | dmap () const |
| | GLOBAL distribution (owner rank per box).
|
| |
| int | ncomp () const |
| | Number of components.
|
| |
| int | n_grow () const |
| | Number of ghost layers.
|
| |
| int | local_size () const |
| | Number of fabs OWNED by this rank (bound on local indices).
|
| |
| Fab2D & | fab (int li) |
| | Local fab at index li (0 <= li < local_size()), for writing.
|
| |
| const Fab2D & | fab (int li) const |
| | Local fab at index li, for reading.
|
| |
| const Box2D & | box (int li) const |
| | VALID box of local fab li.
|
| |
| int | global_index (int li) const |
| | GLOBAL index (in box_array) of local fab li.
|
| |
| int | local_index_of (int global) const |
| | LOCAL index of the global box global, or -1 if it is not owned by this rank.
|
| |
| void | sync_host () |
| | Makes the HOST residence valid (before a host access: operator(), loop, set_val).
|
| |
| void | sync_device () |
| | Marks a DEVICE residence (before a kernel). No-op under unified memory.
|
| |
| void | set_val (Real v) |
| | Fills all cells (valid + ghosts) of every local fab with v.
|
| |
| HaloScheduleCache & | halo_cache () const |
| | Internal (ADC-260): memoized halo-exchange schedule used by fill_boundary.
|
| |
Field distributed over a level: decomposition (BoxArray) + distribution (DistributionMapping) + ncomp components + ngrow ghosts.
Allocates only the fabs owned by THIS rank; iteration runs over local_size() (LOCAL indices). global_index/local_index_of bridge local <-> global.
◆ MultiFab() [1/2]
| pops::MultiFab::MultiFab |
( |
| ) |
|
|
default |
◆ MultiFab() [2/2]
Builds the field: allocates one Fab2D (ncomp components, ngrow ghosts) for EACH box that this rank owns according to dm.
Boxes belonging to other ranks are not allocated here.
◆ box()
| const Box2D & pops::MultiFab::box |
( |
int |
li | ) |
const |
|
inline |
VALID box of local fab li.
◆ box_array()
| const BoxArray & pops::MultiFab::box_array |
( |
| ) |
const |
|
inline |
GLOBAL decomposition of the level (all boxes, all ranks).
◆ dmap()
GLOBAL distribution (owner rank per box).
◆ fab() [1/2]
| Fab2D & pops::MultiFab::fab |
( |
int |
li | ) |
|
|
inline |
Local fab at index li (0 <= li < local_size()), for writing.
◆ fab() [2/2]
| const Fab2D & pops::MultiFab::fab |
( |
int |
li | ) |
const |
|
inline |
Local fab at index li, for reading.
◆ global_index()
| int pops::MultiFab::global_index |
( |
int |
li | ) |
const |
|
inline |
GLOBAL index (in box_array) of local fab li.
◆ halo_cache()
Internal (ADC-260): memoized halo-exchange schedule used by fill_boundary.
Lazily created on first use. The schedule is a pure function of (box_array, dmap, n_grow) for a given (Periodicity, domain); since none of ba_/dm_/ngrow_ has an in-place setter, the cache can only go stale through whole-object (re)assignment (e.g. AMR regrid builds a fresh MultiFab and move-assigns it over the level slot), which drops the cache with the object. It is shared on copy (a copy has the same layout), which keeps copies consistent. Not part of the public numerical API. Returned by reference so fill_boundary can populate it.
◆ local_index_of()
| int pops::MultiFab::local_index_of |
( |
int |
global | ) |
const |
|
inline |
LOCAL index of the global box global, or -1 if it is not owned by this rank.
◆ local_size()
| int pops::MultiFab::local_size |
( |
| ) |
const |
|
inline |
Number of fabs OWNED by this rank (bound on local indices).
◆ n_grow()
| int pops::MultiFab::n_grow |
( |
| ) |
const |
|
inline |
◆ ncomp()
| int pops::MultiFab::ncomp |
( |
| ) |
const |
|
inline |
◆ set_val()
| void pops::MultiFab::set_val |
( |
Real |
v | ) |
|
|
inline |
Fills all cells (valid + ghosts) of every local fab with v.
Synchronizes host residence first (a kernel may have written these fabs).
◆ sync_device()
| void pops::MultiFab::sync_device |
( |
| ) |
|
|
inline |
Marks a DEVICE residence (before a kernel). No-op under unified memory.
◆ sync_host()
| void pops::MultiFab::sync_host |
( |
| ) |
|
|
inline |
Makes the HOST residence valid (before a host access: operator(), loop, set_val).
Under unified memory = a targeted device_fence().
The documentation for this class was generated from the following file: