Proto
|
#include <Proto_LevelBoxData.H>
Public Member Functions | |
LevelBoxData () | |
Default constructor. More... | |
LevelBoxData (const DisjointBoxLayout &a_dbl, const Point &a_ghost) | |
Layout Constructor. More... | |
void | define (const DisjointBoxLayout &a_dbl, const Point &a_ghost) |
Define. More... | |
unsigned int | size () const |
Size. More... | |
void | setToZero () |
Initialize To Zero. More... | |
template<typename Func , typename... Srcs> | |
void | initialize (Func &a_func, Srcs... a_srcs) |
Function Initialization. More... | |
void | exchange () |
Exchange. More... | |
void | copyTo (LevelBoxData &a_dest) const |
Copy To. More... | |
unsigned int | offset (int a_proc) const |
Linear Offset. More... | |
unsigned int | patchSize () const |
Patch Size. More... | |
void | linearIn (void *a_buffer, const Box &a_box, const DataIndex &a_index) |
Linear In (Patch, Box) More... | |
void | linearOut (void *a_buffer, const Box &a_box, const DataIndex &a_index) const |
Linear Out (Patch, Box) More... | |
size_t | linearSize (const Box &a_box, const DataIndex &a_index) const |
Serial Size (Patch, Box) More... | |
void | linearIn (void *a_buffer, const DataIndex &a_index) |
Linear In (Patch) More... | |
void | linearOut (void *a_buffer, const DataIndex &a_index) const |
Linear Out (Patch) More... | |
size_t | linearSize (const DataIndex &a_index) const |
Size (Patch) More... | |
void | linearIn (void *a_buffer) |
Linear In (All Local Data) More... | |
void | linearOut (void *a_buffer) const |
Linear Out (All Local Data) More... | |
size_t | linearSize () const |
Size (All Local Data) More... | |
DisjointBoxLayout | layout () const |
Get Box Layout. | |
DisjointBoxLayout | getDBL () const |
Get Box Layout (Overload) | |
Point | ghost () const |
Get Ghost Size. | |
Point | getGhostVector () const |
Get Ghost Size (Overload) | |
BoxData< T, C, MEM > & | operator[] (const DataIndex &a_index) |
Get Patch. | |
const BoxData< T, C, MEM > & | operator[] (const DataIndex &a_index) const |
Get Const Patch. | |
DataIterator | begin () const |
Get Iterator. | |
Data Fields | |
int | s_verbosity = 0 |
For debugging purposes. | |
Level Box Data.
A distributed data holder implementing the abstraction of a union of logically rectangular patches.
|
inline |
Default constructor.
Constructs an undefined LevelBoxData. Can be initialized through define(...)
|
inline |
Layout Constructor.
Constructs a non-trivial LevelBoxData by calling define.
|
inline |
Copy To.
Copies data from the valid regions of this into the valid regions of another LevelBoxData. This function only operates on VALID data. To fill ghost regions, use exchange().
|
inline |
Define.
Lazily constructs a non-trivial LevelBoxData
|
inline |
Exchange.
Copies data from the valid regions of *this into ghost regions. When MPI is enabled, this function also takes care of any necessary communication between patches on different processes.
|
inline |
Function Initialization.
Initializes *this using a function with a signature similar to that used by Proto::forallInPlace_p. This function is purely for convenience.
Func signature: void a_func(Point& a_point, Var<T, C, MEM>& a_thisData, ... )
Unlike Proto::forall and its variants, this function cannot manage additional data holders (e.g. Srcs should not include a LevelBoxData or similar complex object). Elements of a_srcs should be plain-old-data such as single values, Points, or Boxes.
|
inline |
Linear In (Patch, Box)
Reads data from a serial buffer, populating the patch associated with a_index within the subset specified by a_box.
a_buffer | The read buffer |
a_box | A box defining the subset to read into |
a_index | The index defining the patch to read into |
|
inline |
Linear In (Patch)
Overload of LinearIn that always reads in a full patch
|
inline |
Linear In (All Local Data)
Overload of LinearIn that reads all local data
|
inline |
Linear Out (Patch, Box)
Writes data to a serial buffer, from the patch associated with a_index within the subset specified by a_box.
a_buffer | The write buffer |
a_box | A box defining the subset to write from |
a_index | The index defining the patch to write from |
|
inline |
Linear Out (Patch)
Overload of LinearOut that always writes out a full patch
|
inline |
Linear Out (All Local Data)
Overload of LinearOut that writes out all local data
|
inline |
Serial Size (Patch, Box)
Computes the size in bytes of the serial data buffer needed to hold the patch associated with a_index within the subset specified by a_box.
a_box | A box defining the subset of a patch |
a_index | The index defining the patch |
|
inline |
Size (Patch)
Overload of Size that always computes the size of a full patch
|
inline |
Size (All Local Data)
Overload of Size that computes the full local size of the data in *this
|
inline |
Linear Offset.
Returns the serial index of the first data element of this stored on this a_proc.
|
inline |
Patch Size.
Computes the size (in data cells) of a single patch in *this. The resulting patch ACCOUNTS FOR GHOST CELLS
|
inline |
Initialize To Zero.
Sets all values in all patches equal to zero. This function is mostly for debugging purposes and should be used sparingly if at all in production code.
|
inline |
Size.
Returns the number of boxes in the union across all processes.