2#ifndef WMUNSTRUCTUREDGEOMETRY_H_
3#define WMUNSTRUCTUREDGEOMETRY_H_
15#include "warpxm/warpxm_config.h"
90 void addNodeGroup(
const std::string name,
const std::vector<int>& nodeIndexes);
285 getNorm(
const int elementIndex,
const int faceIndex,
const int normType)
const
380 void getFaceNodes(
const int elementIndex,
const int faceIndex,
int* faceNodes)
const;
444 const real* nodePositions,
457 const real normalizedPosition[3],
458 real position[3])
const;
479 const int neighborElementIndex,
480 const int numJumps)
const;
510 int getFaceIndex(
const int elementIndex,
const int neighborElementIndex)
const;
523 const real normalizedPosition[3])
const;
534 const real* normalizedPosition,
535 real* inverseJacobian)
const;
546 const real normalizedPosition[3],
547 real position[3])
const;
565 const int toElementIndex,
627 const int face_index,
628 real reflected_centroid[3])
const;
Class used for generating mesh geometry concerns.
Definition: wmunstructuredgeometry.h:45
~WmUnstructuredGeometry()
Destroy geometry.
const WmUnstructuredPatch & _patch
Patch associated with geometry.
Definition: wmunstructuredgeometry.h:635
const real * getCoordinates() const
Access coordinates.
Definition: wmunstructuredgeometry.h:98
static void getTransformCoordinates(const int primitiveID, const real *nodePositions, real tC[])
Convert node/vertex positions into coordinate transform coordinates.
int _numNodesPerFace
Number of element nodes/vertexes that make up each face.
Definition: wmunstructuredgeometry.h:764
int _num_boundary_faces
Number of boundary faces between patch and unknown where neighbor = -1.
Definition: wmunstructuredgeometry.h:728
const int * getOrientations() const
Access orientations.
Definition: wmunstructuredgeometry.h:131
void get_face_centroid(const int element_index, const int face_index, real x[3]) const
Get the centroid of element's face.
WmUnstructuredGeometry(const WmUnstructuredPatch &patch)
Create unstructured geometry for a given patch.
int _primitiveID
PrimitiveID.
Definition: wmunstructuredgeometry.h:650
void getCentralPositionInElement(const int elementIndex, const real normalizedPosition[3], real position[3]) const
Get the real/mesh position within an element w.r.t the element centroid.
void getFaceNodes(const int elementIndex, const int faceIndex, int *faceNodes) const
Get the nodes for a given element's face.
const int * getLocalNeighborhood(const int elementIndex) const
Get list of element neighbors.
Definition: wmunstructuredgeometry.h:210
int * _neighborhood
Neighborhood of elements [_numElements X _numFacesPerElement].
Definition: wmunstructuredgeometry.h:674
real * _volumes
Volumes of elements [_numElements].
Definition: wmunstructuredgeometry.h:710
real * _norms
Face normals for elements [_numElements X 3 X 3].
Definition: wmunstructuredgeometry.h:704
std::string _primitive
Name of element primitive.
Definition: wmunstructuredgeometry.h:641
int getNumNodesPerFace() const
Number of nodes/vertexes on an element's face.
Definition: wmunstructuredgeometry.h:345
real * _centroids
Centroids of elements [_numElements X 3].
Definition: wmunstructuredgeometry.h:698
int _numDimsPerPrimitive
Number of dimensions for a given primitive.
Definition: wmunstructuredgeometry.h:740
int num_boundary_faces() const
Returns the number of boundary faces associated with the edge of a domain (i.e.
Definition: wmunstructuredgeometry.h:621
void printElement(const int elementIndex) const
Print element info to std::cout - used for DEBUG.
int * _connectivity
Connectivity of elements [_numElements X _numNodesPerElement].
Definition: wmunstructuredgeometry.h:668
int getNumElements() const
Number of total elements in geometry.
Definition: wmunstructuredgeometry.h:297
real * _coordinates
Node/vertex positions [_numNodes X _numDimsPerNode].
Definition: wmunstructuredgeometry.h:686
const int * getNeighborhood() const
Access neighborhood.
Definition: wmunstructuredgeometry.h:120
real getVolume(const int elementIndex) const
Get the volume of an element.
Definition: wmunstructuredgeometry.h:171
int getNumDimsPerNode() const
Number of dimensions used to store coordinates.
Definition: wmunstructuredgeometry.h:319
int getNumNodesPerElement() const
Number of nodes/vertexes on an element.
Definition: wmunstructuredgeometry.h:356
void getNodePositions(const int elementIndex, real *nodePositions) const
Get the node/vertex positions for an element.
void generateGeometry(real *coordinates, int *connectivity, int *neighborhood, int *orientations)
Generates geometry concerns.
int getOppositeFace(const int faceIndex) const
Get face index opposite of a given face index.
void generateInverseJacobian(const int elementIndex, const real *normalizedPosition, real *inverseJacobian) const
Generate the inverse Jacobian matrix for a given point within an element.
int getJumpedElementIndex(const int elementIndex, const int neighborElementIndex, const int numJumps) const
Get element index on other side of neighbor.
void getTransformCoordinates(const int elementIndex, real tC[][3]) const
Get the transform coordinates for an element.
nodeGroupMap_t _nodeGroups
Node groups associated with geometry/patch.
Definition: wmunstructuredgeometry.h:722
int _numDimsPerNode
Number of dimensions used to store nodes/vertexes.
Definition: wmunstructuredgeometry.h:734
void getPositionInElement(const int elementIndex, const real normalizedPosition[3], real position[3]) const
Generate real/mesh space position from normalized position for given element.
int _numFacesPerElement
Number of faces on an element.
Definition: wmunstructuredgeometry.h:758
int getNumTransformCoordinates() const
Get number of coordinate transform coordinates for this primitive.
Definition: wmunstructuredgeometry.h:400
std::map< std::string, std::vector< int > > nodeGroupMap_t
Definition: wmunstructuredgeometry.h:48
const std::type_info & getType() const
Get typeid of floats used to store coordinates/geometry stuff.
Definition: wmunstructuredgeometry.h:221
int getEnclosingElementIndex(const real *x) const
Find the element enclosing the given location.
int getNumFacesPerElement() const
Number of faces on an element.
Definition: wmunstructuredgeometry.h:367
int getFaceOrientation(const int elementIndex, const int faceIndex) const
Get the orientation of a specific face with respect to neighbor.
Definition: wmunstructuredgeometry.h:158
int getNumNodes() const
Number of total nodes in geometry.
Definition: wmunstructuredgeometry.h:308
real * _transformCoordinates
Coordinate transform coordinates [_numElements X _numTransformCoordinates X 3].
Definition: wmunstructuredgeometry.h:692
void reflect_centroid(const int element_index, const int face_index, real reflected_centroid[3]) const
int * _orientations
Orientations of faces [_numElements X _numFacesPerElement].
Definition: wmunstructuredgeometry.h:680
int getFacePrimitiveID() const
Get primitive's face primitive ID.
bool isEnclosedByElement(const int elementIndex, const real *x) const
Check if the element encloses the given location.
real getArea(const int elementIndex, const int faceIndex) const
Get area of element face.
Definition: wmunstructuredgeometry.h:185
real * _areas
Areas of element faces [_numElements X _numFacesPerElement].
Definition: wmunstructuredgeometry.h:716
int _numNodesPerElement
Number of nodes/vertexes for a given primitive.
Definition: wmunstructuredgeometry.h:752
std::string getNodeGroupOfNodes(const std::vector< int > &nodes) const
Identify which node group a set of nodes belong to.
const real * getNorm(const int elementIndex, const int faceIndex, const int normType) const
Get norm of element.
Definition: wmunstructuredgeometry.h:285
int _numElements
Number of total elements in patch.
Definition: wmunstructuredgeometry.h:656
int _numTransformCoordinates
Number of coordinate transform coordinates, usually the same as _numNodesPerElement.
Definition: wmunstructuredgeometry.h:746
const real * getCentroid(const int elementIndex) const
Get centroid of element.
Definition: wmunstructuredgeometry.h:263
const int * getConnectivity() const
Access connectivity.
Definition: wmunstructuredgeometry.h:109
real getElementWidth(const int elementIndex) const
Get rough estimate of element's characteristic width.
real generateVolumeJacobian(const int elementIndex, const real normalizedPosition[3]) const
Generate the volume Jacobian (ie Jacobian or determinant of the Jacobian matrix given appropriate dim...
std::pair< std::string, std::vector< int > > nodeGroupPair_t
Definition: wmunstructuredgeometry.h:47
int getNumDimsPerPrimitive() const
Number of dimensions used to express primtive.
Definition: wmunstructuredgeometry.h:334
int getFaceIndex(const int elementIndex, const int neighborElementIndex) const
Get the face index through which an neighbor element is found.
void addNodeGroup(const std::string name, const std::vector< int > &nodeIndexes)
Add node group to geometry.
int _numNodes
Number of total nodes in patch.
Definition: wmunstructuredgeometry.h:662
int getPrimitiveID() const
Get primitive ID for geometry.
Definition: wmunstructuredgeometry.h:236
static int getNumTransformCoordinates(const int primitiveID)
Number of coordinate transform coordinates.
void getFaceDistanceBetweenNeighborCentroids(const int fromElementIndex, const int toElementIndex, real dx[3]) const
Get the distance between two elements through a face.
Definition: wmunstructuredpatch.h:22
#define real
Definition: wmoclunstructuredreconstruction.h:11
@ WMPRIMITIVE_01_LINE
Definition: wmunstructuredgeometry.h:26
@ WMPRIMITIVE_4DPRISM
Definition: wmunstructuredgeometry.h:35
@ WMPRIMITIVE_3DPRISM
Definition: wmunstructuredgeometry.h:34
@ WMPRIMITIVE_POINT
Definition: wmunstructuredgeometry.h:31
@ WMPRIMITIVE_KINETIC_SQUARE
Definition: wmunstructuredgeometry.h:33
@ WMPRIMITIVE_TETRAHEDRON
Definition: wmunstructuredgeometry.h:29
@ WMPRIMITIVE_HEXAHEDRON
Definition: wmunstructuredgeometry.h:30
@ WMPRIMITIVE_QUADRILATERAL
Definition: wmunstructuredgeometry.h:28
@ WMPRIMITIVE_LINE
Definition: wmunstructuredgeometry.h:24
@ WMPRIMITIVE_NONE
Definition: wmunstructuredgeometry.h:36
@ WMPRIMITIVE_TRIANGLE
Definition: wmunstructuredgeometry.h:27