74 void print(std::stringstream& ss)
const;
78 const int outsideElementIndex,
79 const int insideFaceIndex,
80 const int outsideFaceIndex,
104 std::vector<int> _nodeIndexAllocation;
111 typedef std::map<std::string, std::vector<std::unique_ptr<face_t>>>
bcFaceMap_t;
114 const std::vector<std::string>& boundaryNames,
116 const bool useLimiter =
false);
409 int local_face_index)
const
421 std::stringstream ss;
424 const real* fGeoArray =
427 ss <<
"global_face_index = " << global_face_index <<
" on patch "
429 ss <<
"effective_dx = " << fGeoArray[0] << std::endl;
431 for (
int i = 0; i < numDims; i++)
433 ss << fGeoArray[1 + i] <<
", ";
435 ss <<
")" << std::endl;
438 for (
int i = 0; i < numFaceNodes; i++)
441 for (
int j = 0; j < numDims; j++)
443 ss << fGeoArray[1 + numDims + i * numDims + j] <<
", ";
447 ss <<
")" << std::endl;
449 std::cout << ss.str();
458 std::stringstream ss;
462 const real* eGeomArray =
465 ss <<
"global_element_index = " << global_element_index <<
" on patch "
467 ss <<
"(dx,dy,dv) = (";
468 for (
int i = 0; i < numDims; i++)
470 ss << eGeomArray[i] <<
", ";
472 ss <<
")" << std::endl;
475 for (
int i = 0; i < numElementNodes; i++)
478 for (
int j = 0; j < numDims; j++)
480 ss << eGeomArray[numDims + i * numDims + j] <<
", ";
484 ss <<
")" << std::endl;
486 std::cout << ss.str();
510 int* global_node_indexes,
511 real* global_node_positions)
const;
522 const int* global_node_indexes,
523 const real position[3])
const;
567 const int local_face_index)
const
600 const int local_face_index,
601 const int local_node_index)
const
606 element_index * numFacesPerElement * numFaceNodes * 2 +
607 local_face_index * numFaceNodes * 2 + local_node_index * 2;
631 std::vector<real> x(ndims);
636 for (
int elementIndex = scope.
lower(0); elementIndex <= scope.
upper(0);
639 for (
int localNodeIndex = 0; localNodeIndex < N_p; localNodeIndex++)
641 const int globalNodeIndex = elementIndex * N_p + localNodeIndex;
644 globalElementGeometryData[element_geometry_block_size * elementIndex +
645 ndims * (localNodeIndex + 1) + 0];
648 x[1] = globalElementGeometryData[element_geometry_block_size *
650 ndims * (localNodeIndex + 1) + 1];
654 x[2] = globalElementGeometryData[element_geometry_block_size *
656 ndims * (localNodeIndex + 1) + 2];
659 f(globalNodeIndex, x);
789 void constructFacesAndLayer1Vector();
795 void setInteriorFaceIndexes();
801 void setNumFacesPerLayer();
808 void constructAllFacesVectorAndCountNumFaces();
818 void setupLimiters(
const bool useLimiter);
824 void setupFaceGeometry();
831 void setupElementGeometry(
const bool useLimiter);
840 void setupDGNeighborhoodLocalNeighborFacesAndOrientations();
850 int boundaryFaceIndex(
const int global_face_index)
const;
863 int boundaryElementIndex(
const int global_face_index)
const;
876 void setupElementwiseFaceInsideOutsideNodes();
Definition: wmbasisarrayset.h:13
int getNumDims() const
Definition: wmbasisarrayset.h:43
int getNumTotalNodes() const
Definition: wmbasisarrayset.h:47
int getNumFaceNodes() const
Definition: wmbasisarrayset.h:27
Definition: wmudggeometry.h:108
WmUDGGeometry(const WmUnstructuredPatch &patch, const std::vector< std::string > &boundaryNames, const WmBasisArraySet &dgBasisSet, const bool useLimiter=false)
std::vector< int > _dg_neighborhood
Neighborhood of elements [_numElements X _numFacesPerElement] However ghost elements are given a numb...
Definition: wmudggeometry.h:760
const int * getReconstructionArray_StencilIndexes() const
Definition: wmudggeometry.h:240
std::vector< real > _reconstruction_lInverse
Definition: wmudggeometry.h:711
std::vector< int > _dg_orientations
Get orientations for each elements by face [_numElements X _numFacesPerElement] However ghost element...
Definition: wmudggeometry.h:772
int getFaceNodeIndexes_Composite_BlockSize() const
Definition: wmudggeometry.h:347
int isPatchBoundaryFace(int faceIndex) const
Definition: wmudggeometry.h:383
const WmUnstructuredPatch & _patch
Definition: wmudggeometry.h:665
int _reconstruction_b_blockSize
Definition: wmudggeometry.h:707
int getFaceElementIndexes_Interconnected_BlockSize() const
Returns block size of interconnectedFaceElementIndexes.
Definition: wmudggeometry.h:338
int _numSharedFaces
Definition: wmudggeometry.h:680
int getNeighborLocalFaceIndex(const int element_index, const int local_face_index) const
Get neighboring element local face index at a particular local face index of an element index Returns...
Definition: wmudggeometry.h:566
int _numFaces
Definition: wmudggeometry.h:678
int getGeometryArray_Limiter_Size() const
Definition: wmudggeometry.h:235
const real * getGeometryArray_Limiter() const
Definition: wmudggeometry.h:190
const int * getDGNeighborhood() const
Get raw pointer to _dg_neighborhood.
Definition: wmudggeometry.h:543
std::vector< int > _reconstruction_stencilIndexes
Definition: wmudggeometry.h:709
int getElementIndexes_NumInLayers(int lowerLayer, int upperLayer) const
int getFaceIndexes_NumInLayers(int lowerLayer, int upperLayer) const
int getReconstructionArray_Weights_Size() const
Definition: wmudggeometry.h:285
void forEachNode(Func f)
Iterate over every node in this geometry and call the provided function.
Definition: wmudggeometry.h:625
int getReconstructionArray_Correction_BlockSize() const
Definition: wmudggeometry.h:275
int _reconstruction_stencilIndexes_blockSize
Definition: wmudggeometry.h:704
int getReconstructionArray_StencilIndexes_Size() const
Definition: wmudggeometry.h:280
int getNumElements_Inclusive() const
Definition: wmudggeometry.h:146
bool hasBoundary(const std::string &boundary) const
const real * getReconstructionArray_Weights() const
Definition: wmudggeometry.h:245
std::vector< real > _faceGeometry
Definition: wmudggeometry.h:698
int getFaceNodeIndexes_Composite_Size() const
Definition: wmudggeometry.h:362
boundaryFacesMap_t _boundaryFaceIndexes
Definition: wmudggeometry.h:670
void printCompositeFaceNodeIndexesArray(std::stringstream &ss) const
int getNumFaces_Shared() const
Definition: wmudggeometry.h:137
int getNumL1Elements() const
Grab number of layer 1 elements.
Definition: wmudggeometry.h:494
int _reconstruction_w_blockSize
Definition: wmudggeometry.h:705
std::vector< int > _isBoundaryFaceArray
Definition: wmudggeometry.h:734
int getGlobalNodeIndexAtPosition(const real *global_node_positions, const int *global_node_indexes, const real position[3]) const
Find the global node index of a position given global_node_indexes and global_node_positions of an el...
int getGeometryArray_Face_BlockSize() const
Definition: wmudggeometry.h:195
int isBoundaryFace(int faceIndex) const
Definition: wmudggeometry.h:377
int _jacobianGeometryBlockSize
Definition: wmudggeometry.h:695
int get_global_face_from_element_local_face(int global_element_index, int local_face_index) const
Definition: wmudggeometry.h:408
const real * getCommonNormal(int faceIndex) const
Definition: wmudggeometry.h:388
int getNumFaces_Interior() const
Definition: wmudggeometry.h:129
int getFaceNodeIndexes_Interconnected_BlockSize() const
Definition: wmudggeometry.h:343
const WmUnstructuredPatch & getPatch() const
Definition: wmudggeometry.h:393
std::vector< real > _elementGeometry
Definition: wmudggeometry.h:700
int _interconnectedFaceNodeIndexesBlockSize
Definition: wmudggeometry.h:714
std::vector< int > _inside_outside_global_node_indexes
This gives the element and facewise inside and outside global node indexes [_numElements_PEG X numFac...
Definition: wmudggeometry.h:780
const int * getFaceElementIndexes_Interconnected() const
Definition: wmudggeometry.h:306
std::vector< real > _reconstruction_w
Definition: wmudggeometry.h:710
int getFaceNodeIndexes_Interconnected_Size() const
Definition: wmudggeometry.h:357
const int * getLocalDGNeighborhood(const int element_index) const
Get raw pointer to _dg_neighborhood at a particular element index.
Definition: wmudggeometry.h:553
int getFaceOrientation(const int element_index, const int local_face_index) const
Get the orientation at a particular local face index of an element index Returns 0 when unstructured ...
Definition: wmudggeometry.h:581
std::vector< int > _isPatchBoundaryFaceArray
Definition: wmudggeometry.h:737
int _numElements_PEG
Definition: wmudggeometry.h:684
std::vector< int > _interconnectedFaceElementIndexes
Definition: wmudggeometry.h:722
std::shared_ptr< WxRange > ownElementRange() const
The range of elements belonging to this patch.
std::map< std::string, std::vector< std::unique_ptr< face_t > > > bcFaceMap_t
Definition: wmudggeometry.h:111
void printFaceInformation(int global_face_index) const
Definition: wmudggeometry.h:419
std::vector< std::string > _boundaryNames
Definition: wmudggeometry.h:669
void printDGNeighborhood(std::stringstream &ss) const
Print _dg_neighborhood into a stringstream.
int _numBoundaryFaces
Definition: wmudggeometry.h:679
int _numElements_PIPEG
Definition: wmudggeometry.h:687
const boundaryFacesMap_t & getBoundaryFaces() const
Definition: wmudggeometry.h:120
int getReconstructionArray_StencilIndexes_BlockSize() const
Definition: wmudggeometry.h:260
std::vector< int > _l1_elements
Definition: wmudggeometry.h:752
int getNumElements_Interpatch_Elements_Group() const
Definition: wmudggeometry.h:151
int getGeometryArray_Element_BlockSize() const
the block size of the element geometry array
Definition: wmudggeometry.h:205
int getReconstructionArray_Correction_Size() const
Definition: wmudggeometry.h:295
void getElementGlobalNodePositionsAndIndexes(const int element_index, int *global_node_indexes, real *global_node_positions) const
Grab the global node positions and indexes for an element.
std::vector< std::shared_ptr< face_t > > _interior_faces
Definition: wmudggeometry.h:673
std::vector< int > _compositeGlobalFaceNodeIndexes
Definition: wmudggeometry.h:732
std::vector< int > _dg_neighbor_local_face
Local faces of neighboring elements written by face [_numElements X _numFacesPerElement] However ghos...
Definition: wmudggeometry.h:766
int _reconstruction_lInverse_blockSize
Definition: wmudggeometry.h:706
std::vector< real > _commonNormals
Definition: wmudggeometry.h:740
const WmUnstructuredGeometry * get_unstructured_geometry() const
Definition: wmudggeometry.h:398
int getNumFaces() const
Definition: wmudggeometry.h:125
int getGeometryArray_Jacobian_Size() const
Definition: wmudggeometry.h:230
const int * getFaceNodeGlobalInsideOutsideIndexes(const int element_index, const int local_face_index, const int local_node_index) const
Get raw pointer to _inside_outside_global_node_indexes at a particular element index,...
Definition: wmudggeometry.h:599
void printElementwiseFaceInsideOutsideNodes(std::stringstream &ss) const
Print _inside_outside_global_node_indexes into a stringstream.
void printElementInformation(int global_element_index)
Definition: wmudggeometry.h:456
bcFaceMap_t _shared_faces
Definition: wmudggeometry.h:676
std::vector< std::shared_ptr< face_t > > _all_faces
Definition: wmudggeometry.h:674
std::vector< real > _reconstruction_b
Definition: wmudggeometry.h:712
bcFaceMap_t _boundary_faces
Definition: wmudggeometry.h:675
std::map< std::string, std::vector< int > > boundaryFacesMap_t
Definition: wmudggeometry.h:110
std::vector< int > _compositeFaceNodeIndexes
Definition: wmudggeometry.h:730
int getGeometryArray_Jacobian_BlockSize() const
Definition: wmudggeometry.h:210
std::vector< int > _interconnectedFaceNodeIndexes
Definition: wmudggeometry.h:720
int _limiterGeometryBlockSize
Definition: wmudggeometry.h:696
int _faceGeometryBlockSize
Definition: wmudggeometry.h:693
const real * getGeometryArray_Face() const
Definition: wmudggeometry.h:156
int _numElements_PIPBCEG
Definition: wmudggeometry.h:691
int getGeometryArray_Face_Size() const
Definition: wmudggeometry.h:220
std::vector< real > _jacobianGeometry
Definition: wmudggeometry.h:701
int getElementIndexes_StartIndexForLayer(int layer) const
std::vector< int > _interconnectedFaceElementIndexesNoMinusOne
Definition: wmudggeometry.h:728
const int * getGlobalFaceNodeIndexes_Composite() const
Definition: wmudggeometry.h:325
int _numInteriorFaces
Definition: wmudggeometry.h:681
int _elementGeometryBlockSize
Definition: wmudggeometry.h:694
const WmBasisArraySet & _basisSet
Definition: wmudggeometry.h:667
std::vector< real > _limiterGeometry
Definition: wmudggeometry.h:702
int getReconstructionArray_Reconstruction_Size() const
Definition: wmudggeometry.h:290
const real * getGeometryArray_Element() const
the "element geometry array"
Definition: wmudggeometry.h:182
int getReconstructionArray_Reconstruction_BlockSize() const
Definition: wmudggeometry.h:270
int getGeometryArray_Element_Size() const
Definition: wmudggeometry.h:225
int getFaceIndexes_StartIndexForLayer(int layer) const
int getGeometryArray_Limiter_BlockSize() const
Definition: wmudggeometry.h:215
std::vector< int > _numFacesPerLayer
Definition: wmudggeometry.h:718
const face_t & get_face(const int global_face_index) const
Definition: wmudggeometry.h:403
const int * getFaceNodeIndexes_Interconnected() const
Definition: wmudggeometry.h:300
int _compositeFaceNodeIndexesBlockSize
Definition: wmudggeometry.h:716
const real * getGeometryArray_Jacobian() const
Definition: wmudggeometry.h:186
int _interconnectedFaceElementIndexesBlockSize
Definition: wmudggeometry.h:715
std::vector< real > _globalFaceNumbersOfGlobalElementNumbers
Definition: wmudggeometry.h:743
const int * getFaceElementIndexes_InterconnectedNoMinusOne() const
Definition: wmudggeometry.h:313
std::vector< real > _numerical_flux_multipliers
Definition: wmudggeometry.h:754
int getNumFaces_Boundary() const
Definition: wmudggeometry.h:133
const real * getReconstructionArray_Reconstruction() const
Definition: wmudggeometry.h:250
const real * getReconstructionArray_Correction() const
Definition: wmudggeometry.h:255
int getNumElements() const
Definition: wmudggeometry.h:142
int getReconstructionArray_Weights_BlockSize() const
Definition: wmudggeometry.h:265
const WmUnstructuredGeometry * _uG
Definition: wmudggeometry.h:666
const int * getFaceNodeIndexes_Composite() const
Definition: wmudggeometry.h:319
int getFaceElementIndexes_Interconnected_Size() const
Definition: wmudggeometry.h:352
Class used for generating mesh geometry concerns.
Definition: wmunstructuredgeometry.h:45
int getNumFacesPerElement() const
Number of faces on an element.
Definition: wmunstructuredgeometry.h:367
Definition: wmunstructuredpatch.h:22
int getPatchIndex() const
Definition: wmunstructuredpatch.h:54
TYPE upper(unsigned dim) const
Upper bound along dimension 'dim'.
Definition: wxbox.h:147
TYPE lower(unsigned dim) const
Lower bound along dimension 'dim'.
Definition: wxbox.h:124
WxRange represents a hyper-rectangular domain of an n-dimensional space of integers.
Definition: wxrange.h:23
Definition: wmudggeometry.h:13
int * _insideFaceLocalNodeIndexes
Definition: wmudggeometry.h:97
bool is_boundary_face() const
Definition: wmudggeometry.h:65
int _outsideFaceIndex
Definition: wmudggeometry.h:89
int * _outsideFaceLocalNodeIndexes
Definition: wmudggeometry.h:98
int _globalIndex
Definition: wmudggeometry.h:93
int * _insideFaceGlobalNodeIndexes
Definition: wmudggeometry.h:95
const int * get_outside_face_local_node_indexes() const
Definition: wmudggeometry.h:61
int get_inside_face_orientation() const
Definition: wmudggeometry.h:33
int _insideFaceIndex
Definition: wmudggeometry.h:88
int get_outside_face_index() const
Definition: wmudggeometry.h:29
const int * get_outside_face_global_node_indexes() const
Definition: wmudggeometry.h:53
void print(std::stringstream &ss) const
int get_global_id() const
Definition: wmudggeometry.h:45
int get_inside_face_index() const
Definition: wmudggeometry.h:25
int _insideFaceOrientation
Definition: wmudggeometry.h:90
bool is_patch_boundary_face() const
Definition: wmudggeometry.h:69
const int * get_inside_face_local_node_indexes() const
Definition: wmudggeometry.h:57
const real * _norm
Definition: wmudggeometry.h:92
bool _isPatchBoundaryFace
Definition: wmudggeometry.h:101
void setup(const WmBasisArraySet &dgBasisSet)
bool _isBoundaryFace
Definition: wmudggeometry.h:100
int _outsideElementIndex
Definition: wmudggeometry.h:87
const int * get_inside_face_global_node_indexes() const
Definition: wmudggeometry.h:49
int * _outsideFaceGlobalNodeIndexes
Definition: wmudggeometry.h:96
const real * get_norm() const
Definition: wmudggeometry.h:41
face_t(const int insideElementIndex, const int outsideElementIndex, const int insideFaceIndex, const int outsideFaceIndex, const WmUnstructuredGeometry &geometry, const WmBasisArraySet &dgBasisSet)
int get_outside_face_orientation() const
Definition: wmudggeometry.h:37
int get_inside_element_index() const
Definition: wmudggeometry.h:17
int _outsideFaceOrientation
Definition: wmudggeometry.h:91
int get_outside_element_index() const
Definition: wmudggeometry.h:21
int _insideElementIndex
Definition: wmudggeometry.h:86
Definition: phase_space_34duoprism.h:9
#define real
Definition: wmoclunstructuredreconstruction.h:11