Chombo + EB
3.2
|
Data holder for AMR hierarchy data to interact with SUNDIALS. More...
#include <AmrAdaptor.H>
Public Attributes | |
Vector< LevelData< FArrayBox > * > | m_amrData |
Pointers to AMR hierarchy data. More... | |
Vector< int > | m_refRatio |
AMR hierarchy refinement ratios between levels More... | |
size_t | m_finestLevel |
finest active AMR level More... | |
Vector< LevelData< FArrayBox > * > | m_amrMask |
AMR mask, 1 for uncovered values, 0 for covered values More... | |
unsigned long | m_length = -1 |
Cached nvector length, sum of all unmasked values, across all ranks. More... | |
int | m_comp = -1 |
Number of components in the LevelData<FArrayBox>'s. More... | |
bool | m_ownData = false |
If true, will call delete in destructor. More... | |
Data holder for AMR hierarchy data to interact with SUNDIALS.
This class supports most of the operations needed by SUNDIALS nvector, mapped onto an AMR hierarchy of LevelData<FArrayBox>. It works in parallel and serial, and uses masks to make sure covered cells on coarse levels don't contribute to calculations needed by SUNDIALS. It is dumb, in that if any of the AMR hierarchy is regridded or redefined, this must be redefined as well.
Note that many of the SUNDIALS NVector operations allow the object itself to be passed for an in-place update, check each function.
|
inline |
Constructor.
|
inlinevirtual |
Destructor.
References define(), m_amrData, m_amrMask, m_ownData, newAdaptor(), and Vector< T >::size().
|
virtual |
void AmrAdaptor::define | ( | Vector< LevelData< FArrayBox > *> | amrData, |
Vector< int > | refRatio, | ||
int | finestLevel, | ||
bool | ownData | ||
) |
Define from an existing AMR hierarchy.
Redefines and calculates masks. Calls delete on amrData and masks pointers in destructor.
Referenced by ~AmrAdaptor().
Get the AMR data pointers.
References m_amrData.
|
inline |
Get the refinement ratios.
References m_refRatio.
|
inline |
Get the finest active AMR level
References m_finestLevel.
|
inline |
Get the flag for owning data deallocation
References abs(), addConst(), compare(), constrMask(), copyTo(), div(), dotProd(), exchange(), getLength(), inv(), invTest(), l1Norm(), linearSum(), m_ownData, maxNorm(), min(), minQuotient(), print(), printFile(), printFileHDF(), prod(), scale(), setConst(), wL2Norm(), wRMSNorm(), and wRMSNormMask().
|
virtual |
SUNDIALS operation - calculates a*x+b*y and puts in this instance's data
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - sets this instance's data to c
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - sets this instance's data to x*y
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - sets this instance's data to x/y
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - sets this instance's data to c*x
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - sets this instance's data to abs(x)
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - sets this instance's data to 1/x
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - sets this instance's data to x+b
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - returns MPI-sum dot product across all ranks, sum(data^T * input), masked for covered cells
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - returns MPI-reduce across all ranks' data max norm, masked for covered cells
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - returns MPI-reduce across all ranks' data weighted RMS (root mean square) norm, masked for covered cells
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - not implemented, Aborts
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - returns MPI-reduce across all ranks' data min, masked for covered cells
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - not implemented, Aborts
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - not implemented, Aborts
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - not implemented, Aborts
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - not implemented, Aborts
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - not implemented, Aborts
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - returns the total number of uncovered AMR cells multiplied by the number of components
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
SUNDIALS operation - returns MPI-reduce across all ranks' data L1 norm (sum abs values), no dx or refinement ratio, masked for covered cells
Implements ChomboSundialsAdaptor.
Referenced by getOwnData().
|
virtual |
|
virtual |
|
virtual |
Not implemented, Aborts
Referenced by getOwnData().
|
virtual |
|
virtual |
Pointers to AMR hierarchy data.
Referenced by getData(), and ~AmrAdaptor().
Vector<int> AmrAdaptor::m_refRatio |
AMR hierarchy refinement ratios between levels
Referenced by getRefRatio().
size_t AmrAdaptor::m_finestLevel |
finest active AMR level
Referenced by getFinestLevel().
AMR mask, 1 for uncovered values, 0 for covered values
Referenced by ~AmrAdaptor().
unsigned long AmrAdaptor::m_length = -1 |
Cached nvector length, sum of all unmasked values, across all ranks.
int AmrAdaptor::m_comp = -1 |
Number of components in the LevelData<FArrayBox>'s.
bool AmrAdaptor::m_ownData = false |
If true, will call delete in destructor.
Referenced by getOwnData(), and ~AmrAdaptor().