8#ifndef WMUNSTRUCTUREDARRAY_H_
9#define WMUNSTRUCTUREDARRAY_H_
33class sendRemoteTransfer_t;
34class recvRemoteTransfer_t;
86 const std::string& subdomainName)
const;
181 throw WxExcept(
"WmUnstructuredArray::updateGhostsComponents: Not implemented for "
182 "unstructured arrays");
192 virtual void fill(
const std::vector<WxAny>& fillVector);
193 virtual void fill(
const std::map<std::string, WxAny>& fillMap);
212 virtual const std::type_info&
284 const int patchIndex)
const
288 const subdomainArrayMap_t& sam = (*_componentArrays)[componentIndex];
289 for (subdomainArrayMap_t::const_iterator itr0 = sam.begin(); itr0 != sam.end();
300 "WmUnstructuredArray::getPatchArray : Patch does not exist for component.\n");
378 typedef std::pair<std::string, globalArray_t> subdomainArrayPair_t;
379 typedef std::map<std::string, globalArray_t> subdomainArrayMap_t;
380 typedef std::vector<subdomainArrayMap_t>
382 componentVector_t* _componentArrays;
Opaque Pointer object that carries the referenced data type, but does not expose this payload type as...
Definition: wmopaqueptr.h:81
Defines an interface for variables that exits over distributed memory.
Definition: wmvariable.h:290
Defines common interface for arrays of elements.
Definition: wmsimplearrays.h:23
Class for handling unstructured arrays.
Definition: wmunstructuredarray.h:44
virtual const WmTypeOpaqueArray< _WX_ROW_MAJOR_ORDER > & accessLocalArrayReadOnly(const unsigned int component, const std::string &subdomainName) const
Get the read-only array storage starting address without type specifics.
const WmUnstructuredPatchArray< T > & getPatchArray(const int componentIndex, const int patchIndex) const
Returns a patch array for a given component index and patch index.
Definition: wmunstructuredarray.h:283
virtual void fill(const std::map< std::string, WxAny > &fillMap)
bool onSubdomain(const std::string &subdomainName) const
Query if variable exists on subdomain.
virtual void updatePatchGhosts(const int patchIndex)
Update values in the extended regions from neighbor processes.
virtual void load(WxIoBase &io, const WxIoNodeType &grpNode)
Load object from file.
virtual void updateGhostsComponents()
Update values in the extended regions from neighbor processes.
Definition: wmunstructuredarray.h:179
void downloadInternalElementsFromBuffers()
Downloads internal element data from OpenCL buffer to global array.
virtual void updateGhosts_wait(const int key)
This is a registered sync wait call.
recvMap_t _recvTransfers
Definition: wmunstructuredarray.h:315
virtual WmTypeOpaqueArray< _WX_ROW_MAJOR_ORDER > & accessPatchArray(const unsigned int component, int patchIndex)
Get the array storage at patch starting address without type specifics.
std::vector< localTransfer_t * > localTransferList_t
Definition: wmunstructuredarray.h:309
const std::vector< std::string > & getSubdomainNames() const
Returns a list of subdomain names on which the variable exists.
Definition: wmunstructuredarray.h:265
const WxAny min(const int componentIndex) const
Returns the minimum value in global array.
~WmUnstructuredArray()
Destroy the WmDistributedArrays, including the member global arrays.
virtual void updateGhosts_register(const int key)
This is a registered sync call register.
virtual void fill(const std::vector< WxAny > &fillVector)
For each component, apply a fill value to all elements of the global array.
void synchronizeArrays()
Synchornizes the arrays for ghost sharing.
bool is_alloc() const
Has array allocated any data?
unsigned getNumGhostCells()
Returns number of ghost cells.
Definition: wmunstructuredarray.h:110
virtual const WmTypeOpaqueArray< _WX_ROW_MAJOR_ORDER > & accessPatchArrayReadOnly(const unsigned int component, int patchIndex) const
Get the read-only array at patch storage starting address without type specifics.
virtual void setup(const WxCryptSet &wxc)
Setup an array from input file block.
virtual void dump(WxIoBase &io, WxIoNodeType &grpNode) const
Write out the array to file.
localTransferList_t _localTransfers
Definition: wmunstructuredarray.h:313
rsyncMap_t _rsync
Definition: wmunstructuredarray.h:340
std::map< int, sendRemoteTransfer_t * > sendMap_t
Definition: wmunstructuredarray.h:310
void uploadInternalElementsToBuffers()
Uploads internal element data in global array to OpenCL buffer.
std::vector< std::string > _onSubdomains
Definition: wmunstructuredarray.h:306
virtual const std::type_info & getElementTypeForComponent(unsigned int componentIndex) const
Returns the element type stored by the component matching the name supplied.
virtual WmTypeOpaqueArray< _WX_ROW_MAJOR_ORDER > & accessLocalArray(const unsigned int component, const std::string &subdomainName)
Get the array storage starting address without type specifics.
virtual void updateGhosts()
Update values in the extended regions from neighbor processes.
std::vector< int > _localPatchIndexes
Definition: wmunstructuredarray.h:318
int _numPatchesSignedIn
Definition: wmunstructuredarray.h:317
sendMap_t _sendTransfers
Definition: wmunstructuredarray.h:314
WmUnstructuredArray(const WmConstOpaquePtr &parentPointer)
Create a new parallel array object but does not do any allocations or set dimensions.
std::map< int, syncRegistry_t > rsyncMap_t
Definition: wmunstructuredarray.h:339
std::map< int, recvRemoteTransfer_t * > recvMap_t
Definition: wmunstructuredarray.h:311
const WxAny absoluteMin(const int componentIndex) const
Returns the absolute minimum value in global array Absolute min is the closest value to zero Value wi...
virtual void updateGhosts_nb(const int key)
This is a registered sync call - non blocking.
Definition: wmunstructuredpatcharray.h:23
Definition: wmunstructuredsubdomainarray.h:27
Definition: wmunstructuredsubdomainarray.h:76
bool hasPatch(const int patchIndex) const
Check if subdomain array contains patch.
virtual WmUnstructuredPatchArray< T > & getPatchArray(int patchIndex)
Get patch array.
Base class for variables that store one or more components of data.
Definition: wmvariable.h:31
Class WxAny is based on the "any" class described in "Valued Conversion", Kevlin Henney,...
Definition: wxany.h:139
WxCryptSet extends WxCrypt by providing, in addition to name-value pairs, an set of named WxCryptSets...
Definition: wxcryptset.h:35
Provides an abstract interface for access to hierachical datasets.
Definition: wxiobase.h:25
Definition: wmunstructuredarray.h:343
virtual void swap_impl(WmVariable &varA, WmVariable &varB) const
Swap the internal data storage of varA and varB leaving the outer shell the same, given both have sam...
virtual bool checkCompatible_impl(const WmVariable &varA, const WmVariable &varB) const
Check the types and structure of varA and varB are compatible for swap.
Definition: wmunstructuredarray.h:321
int _numRegistered
Definition: wmunstructuredarray.h:335
int _numCalledIn
Definition: wmunstructuredarray.h:336
syncRegistry_t(const syncRegistry_t &other)
Definition: wmunstructuredarray.h:327
int _key
Definition: wmunstructuredarray.h:334
syncRegistry_t()
Definition: wmunstructuredarray.h:323
Definition: wmvariable.h:267
Provides a means for derived messengers to return implimentation specific message status flags and da...
Definition: wxiotmpl.h:23
wxm::lib::Except WxExcept
Definition: wxexcept.h:120