WARPXM v1.10.0
Loading...
Searching...
No Matches
wmunstructuredpatcharray.h
Go to the documentation of this file.
1#ifndef __wmunstructuredpatcharray__h__
2#define __wmunstructuredpatcharray__h__
3
4// STL includes
5#include <limits>
6#include <algorithm>
7
8// WarpM includes
9#include "lib/wxany.h"
12
13class WmComputeMachine;
14
19// forward declarations
20
21template<typename T>
22class WmUnstructuredPatchArray : public WmTypedArray<_WX_ROW_MAJOR_ORDER, T>
23{
24public:
30 int numSubComponents,
31 const std::string& basisArraySetName = "");
32
34
40 void fill(const WxAny& fillValue);
41
49 void dump(WxIoBase& io, WxIoNodeType& grpNode, bool writeGhostCellsToo = false) const;
50
59 void load(WxIoBase& io, const WxIoNodeType& grpNode, bool includeGhosts = false);
60
68 T min() const;
69
75 T max() const;
76
84 T absoluteMin() const;
85
93 {
94 return static_cast<const WmTypeOpaqueArray<_WX_ROW_MAJOR_ORDER>*>(this);
95 }
96
104 {
105 return static_cast<WmTypeOpaqueArray<_WX_ROW_MAJOR_ORDER>*>(this);
106 }
107
114 {
115 return _numSubComponents;
116 }
117
124 {
125 return _patch;
126 }
127
132 void print() const;
133
140 {
141 return _numSubComponents;
142 }
143
144protected:
146
151
155
156private:
157 // Default constructor blocked.
159
160 // Default copy constructor blocked.
162
163 // Default equate blocked.
165};
166
169#endif // __wmunstructuredpatcharray__h__
Defines common interface for arrays of elements.
Definition: wmsimplearrays.h:23
Defines common interface for arrays of type T elements.
Definition: wmsimplearrays.h:319
Definition: wmunstructuredpatcharray.h:23
void dump(WxIoBase &io, WxIoNodeType &grpNode, bool writeGhostCellsToo=false) const
Write out the array to file.
const WmUnstructuredPatch & _patch
Definition: wmunstructuredpatcharray.h:145
const WmUnstructuredPatch & getPatch() const
Get the patch this array is setup for.
Definition: wmunstructuredpatcharray.h:123
WxRange _globalRange
Definition: wmunstructuredpatcharray.h:152
T absoluteMin() const
Returns the absolute minimum value in patch array Absolute min is the closest value to zero Value wil...
const WmTypeOpaqueArray< _WX_ROW_MAJOR_ORDER > * getArray() const
Get a pointer to the patch array.
Definition: wmunstructuredpatcharray.h:92
void load(WxIoBase &io, const WxIoNodeType &grpNode, bool includeGhosts=false)
Load object from file.
T max() const
Returns the maximum value in patch array.
void print() const
Print patch.
int _numSubComponents
Definition: wmunstructuredpatcharray.h:147
void fill(const WxAny &fillValue)
Fill all of the patch array with a specified fill value.
int getNumSubcomponents() const
Get the number of subcomponents.
Definition: wmunstructuredpatcharray.h:139
T min() const
Returns the minimum value in patch array.
int _numExportDatapoints
Definition: wmunstructuredpatcharray.h:149
WmUnstructuredPatchArray(const WmUnstructuredPatch &patch, int numSubComponents, const std::string &basisArraySetName="")
Constructor for WmUnstructuredGlobalArray.
int _numInternalDatapoints
Definition: wmunstructuredpatcharray.h:150
int _numImportDatapoints
Definition: wmunstructuredpatcharray.h:148
int getNumSubComponents() const
The number of subcomponents per element.
Definition: wmunstructuredpatcharray.h:113
WxRange _interiorDataRange
Definition: wmunstructuredpatcharray.h:154
WmTypeOpaqueArray< _WX_ROW_MAJOR_ORDER > * getArray()
Get a pointer to the patch array.
Definition: wmunstructuredpatcharray.h:103
WxRange _localRange
Definition: wmunstructuredpatcharray.h:153
Definition: wmunstructuredpatch.h:22
Class WxAny is based on the "any" class described in "Valued Conversion", Kevlin Henney,...
Definition: wxany.h:139
Provides an abstract interface for access to hierachical datasets.
Definition: wxiobase.h:25
WxRange represents a hyper-rectangular domain of an n-dimensional space of integers.
Definition: wxrange.h:23
Provides a means for derived messengers to return implimentation specific message status flags and da...
Definition: wxiotmpl.h:23