WARPXM v1.10.0
Loading...
Searching...
No Matches
WmUnstructuredSubdomainArray< T > Class Template Reference

#include <wmunstructuredsubdomainarray.h>

Inheritance diagram for WmUnstructuredSubdomainArray< T >:
WmUnstructuredSubdomainArrayBase

Public Types

typedef std::map< int, WmUnstructuredPatchArray< T > * > patchArrays_t
 Holds the references to the patch arrays Unstructured arrays have separate dataspaces for each patch.
 

Public Member Functions

 WmUnstructuredSubdomainArray (const std::string &arrayName, std::string &variableName, int componentIndex, int numSubComponents, std::string &subdomainName, const WmDomain &domain, const std::string &basisArraySetName="")
 Constructor for WmUnstructuredSubdomainArray.
 
 ~WmUnstructuredSubdomainArray ()
 
bool hasPatch (const int patchIndex) const
 Check if subdomain array contains patch.
 
void fill (const WxAny &fillValue)
 Fill all of the Global Array with a specified fill value.
 
void fill (const std::vector< WxAny > &fillValuesVector)
 Fill all of the Global Array with a specified fill values.
 
virtual bool checkCompatible (const WmUnstructuredSubdomainArrayBase &other) const
 Checks the supplied global array is compatible with this one for swap.
 
virtual const std::type_info & getElementType () const
 Returns the element type stored by the array.
 
virtual void dump (WxIoBase &io, WxIoNodeType &grpNode, bool writeGhostCellsToo=false) const
 Write out the array to file.
 
virtual void load (WxIoBase &io, const WxIoNodeType &grpNode, bool includeGhosts)
 Load object from file.
 
virtual WmUnstructuredPatchArray< T > & getPatchArray (int patchIndex)
 Get patch array.
 
virtual const WmUnstructuredPatchArray< T > & getPatchArray (int patchIndex) const
 Get patch array.
 
virtual WmTypeOpaqueArray< _WX_ROW_MAJOR_ORDER > * getPatchArrayData (int patchIndex)
 Get a pointer to the locally held array for a patch.
 
virtual const WmTypeOpaqueArray< _WX_ROW_MAJOR_ORDER > * getPatchArrayData (int patchIndex) const
 Get a pointer to the locally held array for a patch.
 
const WxAny min () const
 Returns the minimum value in global array.
 
const WxAny absoluteMin () const
 Returns the absolute minimum value in global array Absolute min is the closest value to zero Value will be negative if any negative values were found.
 
void print () const
 Prints what is in host memory.
 
- Public Member Functions inherited from WmUnstructuredSubdomainArrayBase
virtual ~WmUnstructuredSubdomainArrayBase ()
 
virtual const WxAny min () const =0
 
virtual const WxAny absoluteMin () const =0
 
virtual void fill (const WxAny &fillValue)=0
 
virtual void fill (const std::vector< WxAny > &fillValuesVector)=0
 
virtual void dump (WxIoBase &io, WxIoNodeType &grpNode, bool writeGhostCellsToo=false) const =0
 
virtual void load (WxIoBase &io, const WxIoNodeType &grpNode, bool loadGhostCellsToo)=0
 
virtual bool checkCompatible (const WmUnstructuredSubdomainArrayBase &other) const =0
 
virtual const std::type_info & getElementType () const =0
 
virtual void uploadInternalElementsToBuffers ()=0
 
virtual void downloadInternalElementsFromBuffers () const =0
 
virtual void downloadImportExportElementsFromBuffers () const =0
 
virtual void uploadImportElementsToBuffers ()=0
 
virtual WmTypeOpaqueArray< _WX_ROW_MAJOR_ORDER > * getPatchArrayData (int patchIndex)
 
virtual const WmTypeOpaqueArray< _WX_ROW_MAJOR_ORDER > * getPatchArrayData (int patchIndex) const
 
virtual void print () const =0
 

Protected Attributes

bool _gatherListSet
 
unsigned _ndims
 
WxRange _globalRange
 
const WmSolverBase_parentSolver
 
std::string _arrayName
 
std::string _variableName
 
int _componentIndex
 
std::string _subdomainName
 
WmBasisArraySet _basisSet
 
int _numSubComponents
 
bool _existsOnProcess
 
patchArrays_t _patchArrays
 
int _meshID
 

Member Typedef Documentation

◆ patchArrays_t

template<typename T >
typedef std::map<int, WmUnstructuredPatchArray<T>*> WmUnstructuredSubdomainArray< T >::patchArrays_t

Holds the references to the patch arrays Unstructured arrays have separate dataspaces for each patch.

Constructor & Destructor Documentation

◆ WmUnstructuredSubdomainArray()

template<typename T >
WmUnstructuredSubdomainArray< T >::WmUnstructuredSubdomainArray ( const std::string &  arrayName,
std::string &  variableName,
int  componentIndex,
int  numSubComponents,
std::string &  subdomainName,
const WmDomain domain,
const std::string &  basisArraySetName = "" 
)

Constructor for WmUnstructuredSubdomainArray.

Collective Call!

◆ ~WmUnstructuredSubdomainArray()

Member Function Documentation

◆ absoluteMin()

template<typename T >
const WxAny WmUnstructuredSubdomainArray< T >::absoluteMin ( ) const
virtual

Returns the absolute minimum value in global array Absolute min is the closest value to zero Value will be negative if any negative values were found.

Blocking Call

Collective Call

Returns
Absolute minimum value of component with array

Implements WmUnstructuredSubdomainArrayBase.

◆ checkCompatible()

template<typename T >
virtual bool WmUnstructuredSubdomainArray< T >::checkCompatible ( const WmUnstructuredSubdomainArrayBase other) const
virtual

Checks the supplied global array is compatible with this one for swap.

Check ensures that array size and element types match.

Returns
true if compatible, false otherwise

Implements WmUnstructuredSubdomainArrayBase.

◆ dump()

template<typename T >
virtual void WmUnstructuredSubdomainArray< T >::dump ( WxIoBase io,
WxIoNodeType grpNode,
bool  writeGhostCellsToo = false 
) const
virtual

Write out the array to file.

Parameters
ioI/O object to use for writing
grpNodegroup node to write to
writeGhostCellsToowrite external elements

Implements WmUnstructuredSubdomainArrayBase.

◆ fill() [1/2]

template<typename T >
void WmUnstructuredSubdomainArray< T >::fill ( const std::vector< WxAny > &  fillValuesVector)
virtual

Fill all of the Global Array with a specified fill values.

Blocking Call

Non-collective Call

Parameters
fillValueto be applied to set in all elements in the local ext box.

Implements WmUnstructuredSubdomainArrayBase.

◆ fill() [2/2]

template<typename T >
void WmUnstructuredSubdomainArray< T >::fill ( const WxAny fillValue)
virtual

Fill all of the Global Array with a specified fill value.

Blocking Call

Non-collective Call

Parameters
fillValueto be applied to set in all elements in the local portion of global array.

Implements WmUnstructuredSubdomainArrayBase.

◆ getElementType()

template<typename T >
virtual const std::type_info & WmUnstructuredSubdomainArray< T >::getElementType ( ) const
virtual

Returns the element type stored by the array.

Returns
Element type for this array.

Implements WmUnstructuredSubdomainArrayBase.

◆ getPatchArray() [1/2]

template<typename T >
virtual WmUnstructuredPatchArray< T > & WmUnstructuredSubdomainArray< T >::getPatchArray ( int  patchIndex)
virtual

Get patch array.

Parameters
patchIndexPatch to get array for
Returns
unstructured patch array

◆ getPatchArray() [2/2]

template<typename T >
virtual const WmUnstructuredPatchArray< T > & WmUnstructuredSubdomainArray< T >::getPatchArray ( int  patchIndex) const
virtual

Get patch array.

Parameters
patchIndexPatch to get array for
Returns
unstructured patch array

◆ getPatchArrayData() [1/2]

template<typename T >
virtual WmTypeOpaqueArray< _WX_ROW_MAJOR_ORDER > * WmUnstructuredSubdomainArray< T >::getPatchArrayData ( int  patchIndex)
virtual

Get a pointer to the locally held array for a patch.

Returns
an array object representing the local array storage, element type is obscured.

Reimplemented from WmUnstructuredSubdomainArrayBase.

◆ getPatchArrayData() [2/2]

template<typename T >
virtual const WmTypeOpaqueArray< _WX_ROW_MAJOR_ORDER > * WmUnstructuredSubdomainArray< T >::getPatchArrayData ( int  patchIndex) const
virtual

Get a pointer to the locally held array for a patch.

Returns
an array object representing the local array storage, element type is obscured.

Reimplemented from WmUnstructuredSubdomainArrayBase.

◆ hasPatch()

template<typename T >
bool WmUnstructuredSubdomainArray< T >::hasPatch ( const int  patchIndex) const

Check if subdomain array contains patch.

Parameters
patchIndexPatch that may be in subdomain.
Returns
If the patch exists in this subdomain

◆ load()

template<typename T >
virtual void WmUnstructuredSubdomainArray< T >::load ( WxIoBase io,
const WxIoNodeType grpNode,
bool  includeGhosts 
)
virtual

Load object from file.

This method is passed a group node from which its data should be read and then constructed.

Parameters
ioI/O object to use for writing
grpNodegroup node to read from
includeGhostsread external elements

Implements WmUnstructuredSubdomainArrayBase.

◆ min()

template<typename T >
const WxAny WmUnstructuredSubdomainArray< T >::min ( ) const
virtual

Returns the minimum value in global array.

Blocking Call

Collective Call

Returns
Minimum value of component with array

Implements WmUnstructuredSubdomainArrayBase.

◆ print()

template<typename T >
void WmUnstructuredSubdomainArray< T >::print ( ) const
virtual

Prints what is in host memory.

Non-collective Call

Implements WmUnstructuredSubdomainArrayBase.

Member Data Documentation

◆ _arrayName

template<typename T >
std::string WmUnstructuredSubdomainArray< T >::_arrayName
protected

◆ _basisSet

template<typename T >
WmBasisArraySet WmUnstructuredSubdomainArray< T >::_basisSet
protected

◆ _componentIndex

template<typename T >
int WmUnstructuredSubdomainArray< T >::_componentIndex
protected

◆ _existsOnProcess

template<typename T >
bool WmUnstructuredSubdomainArray< T >::_existsOnProcess
protected

◆ _gatherListSet

template<typename T >
bool WmUnstructuredSubdomainArray< T >::_gatherListSet
protected

◆ _globalRange

template<typename T >
WxRange WmUnstructuredSubdomainArray< T >::_globalRange
protected

◆ _meshID

template<typename T >
int WmUnstructuredSubdomainArray< T >::_meshID
protected

◆ _ndims

template<typename T >
unsigned WmUnstructuredSubdomainArray< T >::_ndims
protected

◆ _numSubComponents

template<typename T >
int WmUnstructuredSubdomainArray< T >::_numSubComponents
protected

◆ _parentSolver

template<typename T >
const WmSolverBase* WmUnstructuredSubdomainArray< T >::_parentSolver
protected

◆ _patchArrays

template<typename T >
patchArrays_t WmUnstructuredSubdomainArray< T >::_patchArrays
protected

◆ _subdomainName

template<typename T >
std::string WmUnstructuredSubdomainArray< T >::_subdomainName
protected

◆ _variableName

template<typename T >
std::string WmUnstructuredSubdomainArray< T >::_variableName
protected

The documentation for this class was generated from the following file: