Stellarator and Tokamak Modeling and Meshing Software (STOMMS)
Loading...
Searching...
No Matches
XgcMesh Class Reference

Public Member Functions

 XgcMesh ()
 XgcMesh (std::string adiosFileName)
const PlaneMesh & getMeshAtPlane (const int &planeNum)
std::string getMeshName ()
int getNumPlanes ()
Omega_h::Mesh getOmegahMeshatPlane (const int &planeNum)
int getNumCurvesAtRegion (int physicsRegion, PlaneId planeId)
std::vector< CurveIdType > getCurvesAtRegion (int physicsRegion, PlaneId planeId)
std::vector< VertexIdType > getCriticalPoints (PointType pType, PlaneId planeId)
CurveType getCurveType (CurveIdType curveId, PlaneId planeId)
std::vector< CurveIdType > getCurvesForType (CurveType cType, PlaneId planeId)
CurveIdType getCurveIdFromGeometricEdge (EdgeIdType edgeId, PlaneId planeId)
SurfaceType getPhysicsRegionType (SurfaceIdType surfaceId, PlaneId planeId)
std::vector< EdgeIdType > getCurveGeometricEdges (CurveIdType curveId, PlaneId planeId)
TopoType getGeometricTopology (TopoType topoType, MeshIdType id, PlaneId planeId)
GeomIdType getGeometricClassification (TopoType topoType, MeshIdType id, PlaneId planeId)
std::vector< MeshIdType > getMeshEntities (TopoType geomTopoType, GeomIdType geomId, TopoType meshTopoType, bool includeClosure, PlaneId planeId)
std::vector< GeomIdType > getModelAdjEnts (TopoType geomTopoIn, GeomIdType geomEntId, TopoType geomTopoOut, PlaneId planeId)
std::vector< VertexIdType > getAdjacentXpoints (SurfaceIdType privateFaceIndex, PlaneId planeId)
SurfaceType getPhysicsRegionForMeshEnt (TopoType meshTopoType, MeshIdType id, PlaneId planeId)
std::map< MeshIdType, std::vector< CurveIdType > > getNonAlignedMeshVerticesOnModelSurface (SurfaceIdType surfaceId, PlaneId planeId)
std::map< MeshIdType, std::vector< CurveIdType > > getNonAlignedMeshVerticesOnPlane (PlaneId planeId)

Constructor & Destructor Documentation

◆ XgcMesh() [1/2]

XgcMesh::XgcMesh ( )
inline

◆ XgcMesh() [2/2]

XgcMesh::XgcMesh ( std::string adiosFileName)

XGC Mesh Class. Takes in adios2 file.

Parameters
adiosFileNameAdios2 file name containing mesh and related information.

Member Function Documentation

◆ getAdjacentXpoints()

std::vector< VertexIdType > XgcMesh::getAdjacentXpoints ( SurfaceIdType privateFaceIndex,
PlaneId planeId )

Function to take an index of a private region and returns a vector of the adjacent x-points. throws an exception if the passed index is not a private region.

Parameters
privateFaceIndexIndex of the private region.
planeIdId of the plane.

◆ getCriticalPoints()

std::vector< VertexIdType > XgcMesh::getCriticalPoints ( PointType pType,
PlaneId planeId )

Given the required point type and plane #, return x-points or o-points on the plane.

Parameters
pTypedesired critical point type (XPoint, OPoint).
planeIdId of the plane.

◆ getCurveGeometricEdges()

std::vector< EdgeIdType > XgcMesh::getCurveGeometricEdges ( CurveIdType curveId,
PlaneId planeId )

Given the id of a model curve, and plane #, this function returns all the geometric edges on that model curve.

Parameters
curveIdId of model curve for which model edges will be returned.
planeIdId of the plane.

◆ getCurveIdFromGeometricEdge()

CurveIdType XgcMesh::getCurveIdFromGeometricEdge ( EdgeIdType edgeId,
PlaneId planeId )

Given the model edge id and plane #, return the curve id on which model edge is classified on.

Parameters
edgeIdModel edge id.
planeIdId of the plane.

◆ getCurvesAtRegion()

std::vector< CurveIdType > XgcMesh::getCurvesAtRegion ( int physicsRegion,
PlaneId planeId )

Given the type of physics region, return the indices of flux curves.(Core = 0, SOL = 1, Private_1 = 2, private_2 = 3, ...). As in current implementation of XGC. Change in future as needed.

Parameters
physicsRegionPhysics region on which model curves are required.
planeIdId of the plane.

◆ getCurvesForType()

std::vector< CurveIdType > XgcMesh::getCurvesForType ( CurveType cType,
PlaneId planeId )

Given the curveType (closed,open etc.) and plane #, return all flux curves of that type.

Parameters
cTypeCurveType for which model curves are needed.
planeIdId of the plane.

◆ getCurveType()

CurveType XgcMesh::getCurveType ( CurveIdType curveId,
PlaneId planeId )

Given the id of a model curve and Plane #, return curve type.

Parameters
curveIdModel curve id for which type is desired.
planeIdId of the plane.

◆ getGeometricClassification()

GeomIdType XgcMesh::getGeometricClassification ( TopoType topoType,
MeshIdType id,
PlaneId planeId )

Function to return id of the model entity on which mesh entity is classified. This function must be used with the getGeometricTopology to get complete classification information.

Parameters
topoTypeTopology of the mesh entity for which classification information is needed (e.g TopoType::Vertex for mesh vertices if classification for mesh vertex is needed).
idid of the mesh entity.
planeIdId of the plane.

◆ getGeometricTopology()

TopoType XgcMesh::getGeometricTopology ( TopoType topoType,
MeshIdType id,
PlaneId planeId )

Function to return model topology of the model entity on which mesh entity is classified. This will return the dimension of the model entity on which mesh entity is classified.

Parameters
topoTypeTopology of the mesh entity for which classification information is needed (e.g TopoType::Vertex for mesh vertices if classification for mesh vertex is needed).
idid of the mesh entity.
planeIdId of the plane.

◆ getMeshAtPlane()

const PlaneMesh & XgcMesh::getMeshAtPlane ( const int & planeNum)

Given the plane number, return PlaneMesh. Made it public for testing underlying APIs. Once development is done, make it private.

Parameters
planeNumPlane Number on which mesh is required.

◆ getMeshEntities()

std::vector< MeshIdType > XgcMesh::getMeshEntities ( TopoType geomTopoType,
GeomIdType geomId,
TopoType meshTopoType,
bool includeClosure,
PlaneId planeId )

Reverse Classification.
Given the geometric model id and topology, return the reverse classification for the desired mesh topology.

Parameters
geomTopoTypeInput geometric topology on which mesh entities are required.
geomIdId of the geometric entity.
meshTopoTypeTopology of desired mesh entities.
includeClosureset true to get mesh entities on the closure of the model entity.
planeIdId of the plane.
Example
If all mesh vertices classified on a model face N (without closure) are desired, the usage of this API is:
std::vector< MeshIdType > getMeshEntities(TopoType geomTopoType, GeomIdType geomId, TopoType meshTopoType, bool includeClosure, PlaneId planeId)
@ Face
Definition xgc_reader_types.hpp:101
@ Vertex
Definition xgc_reader_types.hpp:99

◆ getMeshName()

std::string XgcMesh::getMeshName ( )

Function to return mesh name.

◆ getModelAdjEnts()

std::vector< GeomIdType > XgcMesh::getModelAdjEnts ( TopoType geomTopoIn,
GeomIdType geomEntId,
TopoType geomTopoOut,
PlaneId planeId )

Given the model entity topology, and its geometric id, returns all adjacents entities of dimension geomTopoOut.

Parameters
geomTopoTypeInput geometric topology on which adjacencies are needed.
geomIdId of the geometric entity.
planeIdId of the plane.

◆ getNonAlignedMeshVerticesOnModelSurface()

std::map< MeshIdType, std::vector< CurveIdType > > XgcMesh::getNonAlignedMeshVerticesOnModelSurface ( SurfaceIdType surfaceId,
PlaneId planeId )

Given a surface (model face), return all non-aligned mesh vertices on it. The return map contains vertex id as key and vector of flux curves bounding it.

Parameters
surfaceIdIndex of the model face on which non-aligned mesh vertices are required.
planeIdId of the plane.

◆ getNonAlignedMeshVerticesOnPlane()

std::map< MeshIdType, std::vector< CurveIdType > > XgcMesh::getNonAlignedMeshVerticesOnPlane ( PlaneId planeId)

Given just PlaneId, return all non-aligned mesh vertices on it. The return map contains vertex id as key and vector of flux curves bounding it.

Parameters
planeIdId of the plane.

◆ getNumCurvesAtRegion()

int XgcMesh::getNumCurvesAtRegion ( int physicsRegion,
PlaneId planeId )

Given the type of physics region, return the number of flux curves on it. Core = 0, SOL = 1, Private_1 = 2, private_2 = 3, ...). As in current implementation of XGC. Change in future as needed.

Parameters
physicsRegionPhysics region on which model curves are required.
planeIdId of the plane.

◆ getNumPlanes()

int XgcMesh::getNumPlanes ( )

Function to return number of planes in a mesh.

◆ getOmegahMeshatPlane()

Omega_h::Mesh XgcMesh::getOmegahMeshatPlane ( const int & planeNum)

Given the plane number, get Omegah mesh at that plane.

Parameters
planeNumPlane Number on which Omega_h mesh is required.

◆ getPhysicsRegionForMeshEnt()

SurfaceType XgcMesh::getPhysicsRegionForMeshEnt ( TopoType meshTopoType,
MeshIdType id,
PlaneId planeId )

Given the mesh entity (vertex or face) return the physics regions its classified on. meshTopoType: Topology of mesh entity (TopoType::Vertex, Face allowed). id: id of the mesh entity.

Parameters
planeIdId of the plane.

◆ getPhysicsRegionType()

SurfaceType XgcMesh::getPhysicsRegionType ( SurfaceIdType surfaceId,
PlaneId planeId )

Given the id of a surface and plane #, return physics type of the surface.

Parameters
surfaceId(in): Model face id.
planeIdId of the plane.