WARPXM v1.10.0
Loading...
Searching...
No Matches
wmunstructuredreconstruction.h
Go to the documentation of this file.
1
2#ifndef WMUNSTRUCTUREDRECONSTRUCTION_H_
3#define WMUNSTRUCTUREDRECONSTRUCTION_H_
4
5// Wm includes
8
9class WmUnstructuredStencilConstructor;
10
19{
20public:
34 int numReconstructionElements,
35 int numInternalElements,
36 int spatialOrder,
37 int stencilSize = -1,
38 int weightOrder = 1);
39
45
52 int getSpatialOrder() const
53 {
54 return _spatialOrder;
55 }
56
65 int getLSize() const
66 {
67 return _lSize;
68 }
69
78 int getLInverseSize() const
79 {
80 return _lSize;
81 }
82
91 int getBSize() const
92 {
93 return _bSize;
94 }
95
105 int getStencilSize() const
106 {
107 return _stencilSize;
108 }
109
118 int getWeightsSize() const
119 {
120 return _wSize;
121 }
122
133 {
134 return _numDifferentials;
135 }
136
143 const real* getB() const
144 {
145 return _b;
146 }
147
154 const int* getStencils() const
155 {
156 return _stencils;
157 }
158
165 const real* getStencilsDxs() const
166 {
167 return _stencildxs;
168 }
169
176 const real* getWeights() const
177 {
178 return _w;
179 }
180
187 const real* getLInverse() const
188 {
189 return _lInverse;
190 }
191
192protected:
202 void generateStencils(const int startIndex, const int endIndex);
203
213 void generateB(const int startIndex, const int endIndex);
214
224 void generateWeights(const int startIndex, const int endIndex);
225
236 void generateL(const int startIndex, const int endIndex);
237
248 void invertL(const int startIndex, const int endIndex);
249
261 void setBComponent(const int elementIndex, const int* index, const real& val);
262
275 real getBComponent(const int elementIndex, const int* index) const;
276
288 void setLComponent(const int elementIndex, const int* index, const real& val);
289
302 real getLComponent(const int elementIndex, const int* index) const;
303
315 void setLInverseComponent(const int elementIndex, const int* index, const real& val);
316
329 real getLInverseComponent(const int elementIndex, const int* index) const;
330
342 void constructStencil(const int elementIndex,
343 const int stencilLength,
344 int* stencil,
345 real* stencildxs);
346
353 int convertIndices(const int* indices) const;
354
360
368
374
380
386
394
400
406
412
420
428
436
441 WmUnstructuredStencilConstructor* _usc;
442
448
454
460
466
472
478
479private:
480};
481
482#endif // WMUNSTRUCTUREDRECONSTRUCTION_H_
Definition: wmunstructuredpatch.h:22
Class used for generating reconstruction arrays for the high-order finite volume method.
Definition: wmunstructuredreconstruction.h:19
int * _stencils
Host storage for stencils arrays.
Definition: wmunstructuredreconstruction.h:471
int getNumDifferentials() const
Get the number of differential coefficients generated by reconstruction.
Definition: wmunstructuredreconstruction.h:132
int _weightOrder
Weight order.
Definition: wmunstructuredreconstruction.h:367
WmUnstructuredReconstruction(const WmUnstructuredPatch &patch, int numReconstructionElements, int numInternalElements, int spatialOrder, int stencilSize=-1, int weightOrder=1)
Constructor for WmUnstructuredReconstruction.
const real * getB() const
Get the host 'B' reconstruction array buffer.
Definition: wmunstructuredreconstruction.h:143
int _wSize
Number of weights per element.
Definition: wmunstructuredreconstruction.h:399
WmUnstructuredStencilConstructor * _usc
Used to generate element stencils.
Definition: wmunstructuredreconstruction.h:441
void setLComponent(const int elementIndex, const int *index, const real &val)
Set a component of the 'L' reconstruction array.
int _lSize
Size of 'L' reconstruction array per element.
Definition: wmunstructuredreconstruction.h:411
int _bSize
Size of 'B' reconstruction array per element.
Definition: wmunstructuredreconstruction.h:405
int getBSize() const
Get the size of the 'B' reconstruction array.
Definition: wmunstructuredreconstruction.h:91
const real * getWeights() const
Get the host weights array.
Definition: wmunstructuredreconstruction.h:176
int _numInternalElements
Number of internal elements.
Definition: wmunstructuredreconstruction.h:393
real * _l
Host storage for 'L' reconstruction arrays.
Definition: wmunstructuredreconstruction.h:453
const WmUnstructuredPatch & _patch
Patch associated with reconstruction.
Definition: wmunstructuredreconstruction.h:359
real getBComponent(const int elementIndex, const int *index) const
Get a component of the 'B' reconstruction array.
int getLSize() const
Get the size of the 'L' reconstruction array.
Definition: wmunstructuredreconstruction.h:65
void generateStencils(const int startIndex, const int endIndex)
Generates stencils for reconstruction.
~WmUnstructuredReconstruction()
Destroy WmUnstructuredReconstruction.
int _numDimsPerPrimitive
Number of dimensions for a given primitive - important to minimize array sizes.
Definition: wmunstructuredreconstruction.h:373
int _numReconstructionElements
Number of elements to generate reconstruction arrays for.
Definition: wmunstructuredreconstruction.h:385
real * _lInverse
Host storage for 'L inverse' reconstruction arrays.
Definition: wmunstructuredreconstruction.h:447
const real * getStencilsDxs() const
Get the host stencils dxs array.
Definition: wmunstructuredreconstruction.h:165
void generateL(const int startIndex, const int endIndex)
Generates the 'L' reconstruction array.
const real * getLInverse() const
Get the host Inverse L array.
Definition: wmunstructuredreconstruction.h:187
real * _w
Host storage for weights arrays.
Definition: wmunstructuredreconstruction.h:465
int getWeightsSize() const
Get the size of the weights array.
Definition: wmunstructuredreconstruction.h:118
const int * getStencils() const
Get the host stencils array.
Definition: wmunstructuredreconstruction.h:154
real getLInverseComponent(const int elementIndex, const int *index) const
Get a component of the 'L inverse' reconstruction array.
real * _b
Host storage for 'B' reconstruction arrays.
Definition: wmunstructuredreconstruction.h:459
void constructStencil(const int elementIndex, const int stencilLength, int *stencil, real *stencildxs)
Construct a stencil of stencilLength elements around a given element.
int getSpatialOrder() const
Get the spatial accuracy order of the reconstruction.
Definition: wmunstructuredreconstruction.h:52
void generateWeights(const int startIndex, const int endIndex)
Generates the 'B' reconstruction array.
int _spatialOrder
Spatial accuracy order of reconstruction.
Definition: wmunstructuredreconstruction.h:419
int _stencilSize
Number of elements in stencil.
Definition: wmunstructuredreconstruction.h:427
int _numDifferentials
Number of differential coefficeints.
Definition: wmunstructuredreconstruction.h:435
void invertL(const int startIndex, const int endIndex)
Generates the 'L inverse' reconstruction array.
int _numDimsPerNode
Number of dimensions used to represent nodes - usually 3.
Definition: wmunstructuredreconstruction.h:379
int getLInverseSize() const
Get the size of the 'L inverse' reconstruction array.
Definition: wmunstructuredreconstruction.h:78
void setBComponent(const int elementIndex, const int *index, const real &val)
Set a component of the 'B' reconstruction array.
real * _stencildxs
Host storage for stencil dxs arrays.
Definition: wmunstructuredreconstruction.h:477
int getStencilSize() const
Get the size of the stencil array.
Definition: wmunstructuredreconstruction.h:105
void generateB(const int startIndex, const int endIndex)
Generates the 'B' reconstruction array.
real getLComponent(const int elementIndex, const int *index) const
Get a component of the 'L' reconstruction array.
void setLInverseComponent(const int elementIndex, const int *index, const real &val)
Set a component of the 'L inverse' reconstruction array.
int convertIndices(const int *indices) const
Converts from ijk indices to 'hyper-tetrahedral array' indexes.
#define real
Definition: wmoclunstructuredreconstruction.h:11