WARPXM v1.10.0
Loading...
Searching...
No Matches
WmUnstructuredReconstruction Class Reference

Class used for generating reconstruction arrays for the high-order finite volume method. More...

#include <wmunstructuredreconstruction.h>

Detailed Description

Class used for generating reconstruction arrays for the high-order finite volume method.

Class shared type with WmUnstructuredGeometry's type

Public Member Functions

 WmUnstructuredReconstruction (const WmUnstructuredPatch &patch, int numReconstructionElements, int numInternalElements, int spatialOrder, int stencilSize=-1, int weightOrder=1)
 Constructor for WmUnstructuredReconstruction.
 
 ~WmUnstructuredReconstruction ()
 Destroy WmUnstructuredReconstruction.
 
int getSpatialOrder () const
 Get the spatial accuracy order of the reconstruction.
 
int getLSize () const
 Get the size of the 'L' reconstruction array.
 
int getLInverseSize () const
 Get the size of the 'L inverse' reconstruction array.
 
int getBSize () const
 Get the size of the 'B' reconstruction array.
 
int getStencilSize () const
 Get the size of the stencil array.
 
int getWeightsSize () const
 Get the size of the weights array.
 
int getNumDifferentials () const
 Get the number of differential coefficients generated by reconstruction.
 
const realgetB () const
 Get the host 'B' reconstruction array buffer.
 
const int * getStencils () const
 Get the host stencils array.
 
const realgetStencilsDxs () const
 Get the host stencils dxs array.
 
const realgetWeights () const
 Get the host weights array.
 
const realgetLInverse () const
 Get the host Inverse L array.
 

Protected Member Functions

void generateStencils (const int startIndex, const int endIndex)
 Generates stencils for reconstruction.
 
void generateB (const int startIndex, const int endIndex)
 Generates the 'B' reconstruction array.
 
void generateWeights (const int startIndex, const int endIndex)
 Generates the 'B' reconstruction array.
 
void generateL (const int startIndex, const int endIndex)
 Generates the 'L' reconstruction array.
 
void invertL (const int startIndex, const int endIndex)
 Generates the 'L inverse' reconstruction array.
 
void setBComponent (const int elementIndex, const int *index, const real &val)
 Set a component of the 'B' reconstruction array.
 
real getBComponent (const int elementIndex, const int *index) const
 Get a component of the 'B' reconstruction array.
 
void setLComponent (const int elementIndex, const int *index, const real &val)
 Set a component of the 'L' 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.
 
real getLInverseComponent (const int elementIndex, const int *index) const
 Get a component of the 'L inverse' reconstruction array.
 
void constructStencil (const int elementIndex, const int stencilLength, int *stencil, real *stencildxs)
 Construct a stencil of stencilLength elements around a given element.
 
int convertIndices (const int *indices) const
 Converts from ijk indices to 'hyper-tetrahedral array' indexes.
 

Protected Attributes

const WmUnstructuredPatch_patch
 Patch associated with reconstruction.
 
int _weightOrder
 Weight order.
 
int _numDimsPerPrimitive
 Number of dimensions for a given primitive - important to minimize array sizes.
 
int _numDimsPerNode
 Number of dimensions used to represent nodes - usually 3.
 
int _numReconstructionElements
 Number of elements to generate reconstruction arrays for.
 
int _numInternalElements
 Number of internal elements.
 
int _wSize
 Number of weights per element.
 
int _bSize
 Size of 'B' reconstruction array per element.
 
int _lSize
 Size of 'L' reconstruction array per element.
 
int _spatialOrder
 Spatial accuracy order of reconstruction.
 
int _stencilSize
 Number of elements in stencil.
 
int _numDifferentials
 Number of differential coefficeints.
 
WmUnstructuredStencilConstructor * _usc
 Used to generate element stencils.
 
real_lInverse
 Host storage for 'L inverse' reconstruction arrays.
 
real_l
 Host storage for 'L' reconstruction arrays.
 
real_b
 Host storage for 'B' reconstruction arrays.
 
real_w
 Host storage for weights arrays.
 
int * _stencils
 Host storage for stencils arrays.
 
real_stencildxs
 Host storage for stencil dxs arrays.
 

Constructor & Destructor Documentation

◆ WmUnstructuredReconstruction()

WmUnstructuredReconstruction::WmUnstructuredReconstruction ( const WmUnstructuredPatch patch,
int  numReconstructionElements,
int  numInternalElements,
int  spatialOrder,
int  stencilSize = -1,
int  weightOrder = 1 
)

Constructor for WmUnstructuredReconstruction.

Parameters
patchPatch associated with reconstruction
numReconstructionElementsNumber of elements in the mesh to generate reconstructions for
numInternalElementsNumber of internal elements for patch
spatialOrderSpatial accuracy order of reconstruction
stencilSizeSpecificy stencil size to use for reconstruction
weightOrderWeight power to use for generating reconstruction weights

◆ ~WmUnstructuredReconstruction()

WmUnstructuredReconstruction::~WmUnstructuredReconstruction ( )

Member Function Documentation

◆ constructStencil()

void WmUnstructuredReconstruction::constructStencil ( const int  elementIndex,
const int  stencilLength,
int *  stencil,
real stencildxs 
)
protected

Construct a stencil of stencilLength elements around a given element.

Note: Contains recursive call

Parameters
elementIndexElement of interest
stencilLengthNumber of elements to be put in stencil
stencilArray [stencilLength] to store stencil element indexes
stencildxsArray [3*stencilLength] to store stencil element dx vectors

◆ convertIndices()

int WmUnstructuredReconstruction::convertIndices ( const int *  indices) const
protected

Converts from ijk indices to 'hyper-tetrahedral array' indexes.

Parameters
indicesIndexes (ijk) to convert

◆ generateB()

void WmUnstructuredReconstruction::generateB ( const int  startIndex,
const int  endIndex 
)
protected

Generates the 'B' reconstruction array.

Note: This function is designed to be threaded

Parameters
startIndexElement index to start with
endIndexElement index to end with

◆ generateL()

void WmUnstructuredReconstruction::generateL ( const int  startIndex,
const int  endIndex 
)
protected

Generates the 'L' reconstruction array.

Note: Requires 'B' reconstruction arrays Note: This function is designed to be threaded

Parameters
startIndexElement index to start with
endIndexElement index to end with

◆ generateStencils()

void WmUnstructuredReconstruction::generateStencils ( const int  startIndex,
const int  endIndex 
)
protected

Generates stencils for reconstruction.

Note: This function is designed to be threaded

Parameters
startIndexElement index to start with
endIndexElement index to end with

◆ generateWeights()

void WmUnstructuredReconstruction::generateWeights ( const int  startIndex,
const int  endIndex 
)
protected

Generates the 'B' reconstruction array.

Note: This function is designed to be threaded

Parameters
startIndexElement index to start with
endIndexElement index to end with

◆ getB()

const real * WmUnstructuredReconstruction::getB ( ) const
inline

Get the host 'B' reconstruction array buffer.

Returns
Pointer to B array

◆ getBComponent()

real WmUnstructuredReconstruction::getBComponent ( const int  elementIndex,
const int *  index 
) const
protected

Get a component of the 'B' reconstruction array.

Note: Due to the unique way in which these 'hyper-tetrahedral arrays' are stored, we require functions like this

Parameters
elementIndexElement of interest
indexIndex of reconstruction array to modify
Returns
Value from reconstruction array

◆ getBSize()

int WmUnstructuredReconstruction::getBSize ( ) const
inline

Get the size of the 'B' reconstruction array.

Note: returned size is in indexes, not in bytes

Returns
Size of 'B' array

◆ getLComponent()

real WmUnstructuredReconstruction::getLComponent ( const int  elementIndex,
const int *  index 
) const
protected

Get a component of the 'L' reconstruction array.

Note: Due to the unique way in which these 'hyper-tetrahedral arrays' are stored, we require functions like this

Parameters
elementIndexElement of interest
indexIndex of reconstruction array to modify
Returns
Value from reconstruction array

◆ getLInverse()

const real * WmUnstructuredReconstruction::getLInverse ( ) const
inline

Get the host Inverse L array.

Returns
Pointer to lInverse array

◆ getLInverseComponent()

real WmUnstructuredReconstruction::getLInverseComponent ( const int  elementIndex,
const int *  index 
) const
protected

Get a component of the 'L inverse' reconstruction array.

Note: Due to the unique way in which these 'hyper-tetrahedral arrays' are stored, we require functions like this

Parameters
elementIndexElement of interest
indexIndex of reconstruction array to modify
Returns
Value from reconstruction array

◆ getLInverseSize()

int WmUnstructuredReconstruction::getLInverseSize ( ) const
inline

Get the size of the 'L inverse' reconstruction array.

Note: returned size is in indexes, not in bytes

Returns
Size of 'L inverse' array (same as 'L' array)

◆ getLSize()

int WmUnstructuredReconstruction::getLSize ( ) const
inline

Get the size of the 'L' reconstruction array.

Note: returned size is in indexes, not in bytes

Returns
Size of 'L' array

◆ getNumDifferentials()

int WmUnstructuredReconstruction::getNumDifferentials ( ) const
inline

Get the number of differential coefficients generated by reconstruction.

E.G.: q(x) = q_0 + q_x * x + q_xx * x^2 has 2 differential coefficients (q_0 does not count for some reason)

Returns
Number of reconstruction differential coefficients

◆ getSpatialOrder()

int WmUnstructuredReconstruction::getSpatialOrder ( ) const
inline

Get the spatial accuracy order of the reconstruction.

Returns
Spatial accuracy order

◆ getStencils()

const int * WmUnstructuredReconstruction::getStencils ( ) const
inline

Get the host stencils array.

Returns
Pointer to stencils array

◆ getStencilsDxs()

const real * WmUnstructuredReconstruction::getStencilsDxs ( ) const
inline

Get the host stencils dxs array.

Returns
Pointer to stencils array

◆ getStencilSize()

int WmUnstructuredReconstruction::getStencilSize ( ) const
inline

Get the size of the stencil array.

Note: This is the number of elements in a stencil NOT INCLUDING CENTRAL ELEMENT - not sure why I set it up this way Note: returned size is in indexes, not in bytes

Returns
Number of elements in stencil

◆ getWeights()

const real * WmUnstructuredReconstruction::getWeights ( ) const
inline

Get the host weights array.

Returns
Pointer to weights array

◆ getWeightsSize()

int WmUnstructuredReconstruction::getWeightsSize ( ) const
inline

Get the size of the weights array.

Note: returned size is in indexes, not in bytes

Returns
Number of weights per element reconstruction

◆ invertL()

void WmUnstructuredReconstruction::invertL ( const int  startIndex,
const int  endIndex 
)
protected

Generates the 'L inverse' reconstruction array.

Note: Requires 'L' reconstruction arrays Note: This function is designed to be threaded

Parameters
startIndexElement index to start with
endIndexElement index to end with

◆ setBComponent()

void WmUnstructuredReconstruction::setBComponent ( const int  elementIndex,
const int *  index,
const real val 
)
protected

Set a component of the 'B' reconstruction array.

Note: Due to the unique way in which these 'hyper-tetrahedral arrays' are stored, we require functions like this

Parameters
elementIndexElement of interest
indexIndex of reconstruction array to modify
valValue to set in reconstruction array

◆ setLComponent()

void WmUnstructuredReconstruction::setLComponent ( const int  elementIndex,
const int *  index,
const real val 
)
protected

Set a component of the 'L' reconstruction array.

Note: Due to the unique way in which these 'hyper-tetrahedral arrays' are stored, we require functions like this

Parameters
elementIndexElement of interest
indexIndex of reconstruction array to modify
valValue to set in reconstruction array

◆ setLInverseComponent()

void WmUnstructuredReconstruction::setLInverseComponent ( const int  elementIndex,
const int *  index,
const real val 
)
protected

Set a component of the 'L inverse' reconstruction array.

Note: Due to the unique way in which these 'hyper-tetrahedral arrays' are stored, we require functions like this

Parameters
elementIndexElement of interest
indexIndex of reconstruction array to modify
valValue to set in reconstruction array

Member Data Documentation

◆ _b

real* WmUnstructuredReconstruction::_b
protected

Host storage for 'B' reconstruction arrays.

◆ _bSize

int WmUnstructuredReconstruction::_bSize
protected

Size of 'B' reconstruction array per element.

◆ _l

real* WmUnstructuredReconstruction::_l
protected

Host storage for 'L' reconstruction arrays.

◆ _lInverse

real* WmUnstructuredReconstruction::_lInverse
protected

Host storage for 'L inverse' reconstruction arrays.

◆ _lSize

int WmUnstructuredReconstruction::_lSize
protected

Size of 'L' reconstruction array per element.

◆ _numDifferentials

int WmUnstructuredReconstruction::_numDifferentials
protected

Number of differential coefficeints.

Note: Does NOT include volume average solution (i.e. only derivative terms)

◆ _numDimsPerNode

int WmUnstructuredReconstruction::_numDimsPerNode
protected

Number of dimensions used to represent nodes - usually 3.

◆ _numDimsPerPrimitive

int WmUnstructuredReconstruction::_numDimsPerPrimitive
protected

Number of dimensions for a given primitive - important to minimize array sizes.

◆ _numInternalElements

int WmUnstructuredReconstruction::_numInternalElements
protected

Number of internal elements.

TODO: I don't think this is ever used

◆ _numReconstructionElements

int WmUnstructuredReconstruction::_numReconstructionElements
protected

Number of elements to generate reconstruction arrays for.

◆ _patch

const WmUnstructuredPatch& WmUnstructuredReconstruction::_patch
protected

Patch associated with reconstruction.

◆ _spatialOrder

int WmUnstructuredReconstruction::_spatialOrder
protected

Spatial accuracy order of reconstruction.

Note: _spatialOrder = k + 1 where 'k' is polynomial order

◆ _stencildxs

real* WmUnstructuredReconstruction::_stencildxs
protected

Host storage for stencil dxs arrays.

◆ _stencils

int* WmUnstructuredReconstruction::_stencils
protected

Host storage for stencils arrays.

◆ _stencilSize

int WmUnstructuredReconstruction::_stencilSize
protected

Number of elements in stencil.

Note: Does NOT include central element

◆ _usc

WmUnstructuredStencilConstructor* WmUnstructuredReconstruction::_usc
protected

Used to generate element stencils.

◆ _w

real* WmUnstructuredReconstruction::_w
protected

Host storage for weights arrays.

◆ _weightOrder

int WmUnstructuredReconstruction::_weightOrder
protected

Weight order.

Weights are calculated as 1/dx^n where n is the weight order

◆ _wSize

int WmUnstructuredReconstruction::_wSize
protected

Number of weights per element.


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