Proto
3.2
|
#include <Proto_HDF5.H>
Public Member Functions | |
LevelBoxData () | |
LevelBoxData (const DisjointBoxLayout &a_layout, const Point &a_ghostRegionSizes) | |
template<unsigned int DST_DATA_COMPONENTS> | |
LevelBoxData (const LevelBoxData< T, DST_DATA_COMPONENTS, MEM, CTR > &a_srcData, unsigned int a_firstComponent) | |
void | define (const DisjointBoxLayout &a_layout, const Point &a_ghostRegionSizes) |
unsigned int | numBoxes () const |
void | setToZero (int a_comp=-1) |
void | setVal (T a_value, int a_comp=-1) |
void | setRandom (T a_low, T a_high) |
void | setDomainBoundary (T a_value, int a_comp=-1) |
void | iota (Array< T, DIM > a_dx, Array< T, DIM > a_offset=Array< T, DIM >::Zeros()) |
template<typename Func , typename... Srcs> | |
void | initialize (Func &a_func, Srcs &... a_srcs) |
Function Initialization. More... | |
void | exchange () |
Exchange. More... | |
template<template< typename, unsigned int, MemType, Centering > class E_COPIER, typename... Args> | |
void | defineExchange (Args... a_args) |
template<MemType DST_MEM> | |
void | copyTo (LevelBoxData< T, C, DST_MEM, CTR > &a_dest) const |
Copy To. More... | |
template<MemType DST_MEM> | |
void | copyToSimple (LevelBoxData< T, C, DST_MEM, CTR > &a_dest) const |
void | coarsenTo (LevelBoxData &a_dest, Point a_refRatio) const |
Copy With Coarsen. More... | |
unsigned int | offset (int a_proc) const |
Linear Offset. More... | |
unsigned int | offset () const |
unsigned int | patchSize () const |
Patch Size. More... | |
Box | patchBox (const DataIndex< BoxPartition > &a_index) const |
Patch Box. More... | |
void | linearIn (void *a_buffer, const Box &a_box, const DataIndex< BoxPartition > &a_index) |
Linear In (Patch, Box) More... | |
void | linearOut (void *a_buffer, const Box &a_box, const DataIndex< BoxPartition > &a_index) const |
Linear Out (Patch, Box) More... | |
size_t | linearSize (const Box &a_box, const DataIndex< BoxPartition > &a_index) const |
Serial Size (Patch, Box) More... | |
void | linearIn (void *a_buffer, const DataIndex< BoxPartition > &a_index) |
Linear In (Patch) More... | |
void | linearOut (void *a_buffer, const DataIndex< BoxPartition > &a_index) const |
Linear Out (Patch) More... | |
size_t | linearSize (const DataIndex< BoxPartition > &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. More... | |
Point | ghost () const |
Get Ghost Size. More... | |
void | increment (LevelBoxData< T, C, MEM, CTR > &a_data, T a_scale=1.0) |
Increment. More... | |
void | operator*= (T a_scale) |
Multiply By Scalar. More... | |
void | operator+= (T a_scale) |
Add a Constant. More... | |
template<Proto::Operation OP> | |
double | reduce (unsigned int a_comp=0) const |
Reduction. More... | |
double | absMax (unsigned int a_comp=0) const |
Maximum Absolute Value. More... | |
double | sum (unsigned int a_comp=0) const |
Sum. More... | |
double | max (unsigned int a_comp=0) const |
Max. More... | |
double | min (unsigned int a_comp=0) const |
Min. More... | |
double | integrate (double a_dx, unsigned int a_comp=0) const |
Integral. More... | |
double | integrate (Array< double, DIM > a_dx, unsigned int a_comp=0) const |
Integral (Anisotropic) More... | |
double | integrateAbs (double a_dx, unsigned int a_comp=0) const |
Integral of Absolute Value. More... | |
double | integrateAbs (Array< double, DIM > a_dx, unsigned int a_comp=0) const |
Integral of Absolute Value (Anisotropic) More... | |
template<typename _T , unsigned int _C, MemType _MEM, Centering _CTR> | |
bool | compatible (const LevelBoxData< _T, _C, _MEM, _CTR > &a_data) const |
Query Layout Compatibility. More... | |
bool | compatible (const DisjointBoxLayout &a_layout) const |
Query Layout Compatibility. More... | |
bool | compatible (const DataIterator< BoxPartition > &a_iter) const |
Query Layout Compatibility. More... | |
bool | compatible (const DataIndex< BoxPartition > &a_index) const |
Query Layout Compatibility. More... | |
BoxData< T, C, MEM > & | operator[] (const DataIndex< BoxPartition > &a_index) |
Get Patch. More... | |
const BoxData< T, C, MEM > & | operator[] (const DataIndex< BoxPartition > &a_index) const |
Get Const Patch. More... | |
BoxData< T, C, MEM > & | operator() (const DataIndex< BoxPartition > &a_index, unsigned int a_dir=0) |
Get Patch (Face / Edge Centering) More... | |
const BoxData< T, C, MEM > & | operator() (const DataIndex< BoxPartition > &a_index, unsigned int a_dir=0) const |
Get Const Patch (Face / Edge Centering) More... | |
DataIterator< BoxPartition > | begin () const |
Get Iterator. More... | |
DataIterator< BoxPartition > | end () const |
DataIterator< BoxPartition > | dataIterator () const |
deprecated but useful More... | |
Public Attributes | |
int | s_verbosity = 0 |
For debugging purposes. More... | |
Private Member Functions | |
LevelBoxData< T, C, MEM, CTR > & | operator= (const LevelBoxData< T, C, MEM, CTR > &a_rhs) |
LevelBoxData (const LevelBoxData< T, C, MEM, CTR > &a_rhs) | |
Private Attributes | |
std::vector< std::vector< shared_ptr< BoxData< T, C, MEM > > > > | m_data |
Point | m_ghost |
DisjointBoxLayout | m_layout |
bool | m_isDefined |
std::shared_ptr< LevelExchangeCopier< T, C, MEM, CTR > > | m_exchangeCopier |
Level Box Data.
A distributed data holder implementing the abstraction of a union of logically rectangular patches.
|
inline |
|
inline |
|
inline |
|
private |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Set data to random noise between two values
|
inline |
Periodic boundaries are not considered domain boundaries
|
inline |
|
inline |
Function Initialization.
Initializes *this using a function with a signature similar to that used by Proto::forallInPlace_p.
Func signature: void a_func(Point& a_point, Var<T, C, MEM>& a_thisData, ... )
Like Proto::forall and its variants, this function can accept additional data holders (e.g. other LevelBoxData instances) so long as all inputs are compatible in the sense of LevelBoxData::compatible(...).
|
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 |
|
inline |
Copy To.
Copies data from the valid regions of this into the valid regions of another LevelBoxData. This function copies both valid data and ghost regions if applicable. If a_dest
has a larger ghost region then *this
, the user is expected to call exchange
to correctly fill the extra ghost cells.
a_dest | The destination to which data in *this will be copied. |
|
inline |
|
inline |
Copy With Coarsen.
Coarsen's the data in *this by applying a geometric average before copying into the destination.
|
inline |
Linear Offset.
Returns the serial index of the first data element of this stored on this a_proc.
|
inline |
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::offset().
|
inline |
Patch Size.
Computes the size (in data cells) of a single patch in *this. The output accounts for both ghost cells and centering.
|
inline |
|
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 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 |
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 |
Linear In (Patch)
Overload of LinearIn that always reads in a full patch
|
inline |
Linear Out (Patch)
Overload of LinearOut that always writes out a full patch
|
inline |
Size (Patch)
Overload of Size that always computes the size of a full patch
|
inline |
Linear In (All Local Data)
Overload of LinearIn that reads all local data
|
inline |
Linear Out (All Local Data)
Overload of LinearOut that writes out all local data
|
inline |
Size (All Local Data)
Overload of Size that computes the full local size of the data in *this
|
inline |
Get Box Layout.
|
inline |
Get Ghost Size.
|
inline |
Increment.
Add a scaled multiple of another LevelBoxData.
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::ghost().
|
inline |
Multiply By Scalar.
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::ghost().
|
inline |
Add a Constant.
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::ghost().
|
inline |
Computes a reduction for a component over all valid cells (ghost region is ignored)
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::ghost().
|
inline |
Maximum Absolute Value.
Computes the maximum absolute value for a component over all valid cells (ghost region is ignored)
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::ghost().
|
inline |
Sum.
Computes the sum of a component over all valid cells (ghost region is ignored)
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::ghost().
|
inline |
Max.
Computes the max value of a component over all valid cells (ghost region is ignored)
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::ghost().
|
inline |
Min.
Computes the min value of a component over all valid cells (ghost region is ignored)
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::ghost().
|
inline |
Integral.
Compute the integral over this using an isotropic grid spacing.
a_dx | Isotropic grid spacing |
a_comp | A component to integrate over |
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::ghost().
|
inline |
Integral (Anisotropic)
Compute the integral over this using an isotropic grid spacing.
a_dx | Isotropic grid spacing |
a_comp | A component to integrate over |
|
inline |
Integral of Absolute Value.
Compute the integral of the absolute value over this using an isotropic grid spacing.
a_dx | Isotropic grid spacing |
a_comp | A component to integrate over |
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::ghost().
|
inline |
Integral of Absolute Value (Anisotropic)
Compute the integral of the absolute value over this using an isotropic grid spacing.
a_dx | Isotropic grid spacing |
a_comp | A component to integrate over |
|
inline |
Query Layout Compatibility.
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::ghost().
|
inline |
Query Layout Compatibility.
|
inline |
Query Layout Compatibility.
|
inline |
Query Layout Compatibility.
|
inline |
Get Patch.
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::ghost().
|
inline |
Get Const Patch.
|
inline |
Get Patch (Face / Edge Centering)
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::ghost().
|
inline |
Get Const Patch (Face / Edge Centering)
|
inline |
Get Iterator.
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::dataIterator(), and Proto::LevelBoxData< T, C, SRC_MEM, CTR >::ghost().
|
inline |
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::ghost().
|
inline |
deprecated but useful
|
private |
int Proto::LevelBoxData< T, C, MEM, CTR >::s_verbosity = 0 |
For debugging purposes.
|
private |
|
private |
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::ghost().
|
private |
Referenced by Proto::LevelBoxData< T, C, SRC_MEM, CTR >::layout().
|
private |
|
private |