Stellarator and Tokamak Modeling and Meshing Software (STOMMS)
Loading...
Searching...
No Matches
Classes | Functions
meshOutput.h File Reference

Classes

struct  CurvesGroup
 
struct  Adj
 
struct  FluxCompare
 

Functions

std::map< int, std::vector< int > > modelFaceClassification (const std::vector< Face > &modelFaces)
 
std::map< int, std::vector< int > > modelVertexClassification (Vertex oPoint, std::vector< Vertex > xPoints)
 
std::vector< FluxcurveIndexing (const std::vector< Flux > &fluxCurves)
 
std::map< std::string, CurvesGroupcurveClassification (const std::vector< Flux > &fluxCurves, const std::vector< Edge > &wallCurve)
 
std::vector< int > getModelEdgesTagsOnCurve (const Flux &curve)
 
std::string getFaceType (int faceId)
 
std::string getEdgeType (int edgeId)
 
std::string getVertexType (int vertexId)
 
Adj getAdjacency (int inDim, const Plane &plane)
 
Adj getVertexAdj (const std::vector< Vertex > &vertices)
 
Adj getEdgeAdj (const std::vector< Edge > &edges)
 
Adj getFaceAdj (const std::vector< Face > &faces)
 
template<typename T >
void writeAdios2Array (adios2::IO &io, adios2::Engine &writer, std::vector< T > arrayData, int ncomp, std::string &name)
 
template<typename T >
void writeAdios2Value (adios2::IO &io, adios2::Engine &writer, T value, std::string &name)
 

Function Documentation

◆ curveClassification()

std::map< std::string, CurvesGroup > curveClassification ( const std::vector< Flux > &  fluxCurves,
const std::vector< Edge > &  wallCurve 
)

Function to return a map with type of curve as key (closed, open, separatrix, wall) and list of curves in that particular group (stored in class CurveGroup).

Parameters
fluxCurvesa vector of sorted flux curves (sorted in terms of psi values).
wallCurvewall curve ( a vector of model edges on wall curve).
Returns
a map between curve type and set of curve with that type in CurveGroup.

◆ curveIndexing()

std::vector< Flux > curveIndexing ( const std::vector< Flux > &  fluxCurves)

Function to arrange and index the curves as needed in XGC.

Parameters
fluxCurvesa vector of unsorted flux curves.
Returns
list of flux curves sorted in term of psi values.

◆ getAdjacency()

Adj getAdjacency ( int  inDim,
const Plane plane 
)

◆ getEdgeAdj()

Adj getEdgeAdj ( const std::vector< Edge > &  edges)

Given a vector of model edges, return both vertex and face adjacencies on all the model edges.

Parameters
edgesa vector of model edges.
Returns
Adj

◆ getEdgeType()

std::string getEdgeType ( int  edgeId)

Given the physics type id of model edge, returns the name of physics property.

Parameters
edgeIdphysics Id (curve type) of the model edge.
Returns
a string with property name.

◆ getFaceAdj()

Adj getFaceAdj ( const std::vector< Face > &  faces)

Given a vector of model faces, return both vertex and edge adjacencies on all the model faces.

Parameters
facesa vector of model faces.
Returns
Adj

◆ getFaceType()

std::string getFaceType ( int  faceId)

Given the physics type id of model face, returns the name of physics property.

Parameters
faceIdphysics Id (physics region type) of the model face.
Returns
a string with property name.

◆ getModelEdgesTagsOnCurve()

std::vector< int > getModelEdgesTagsOnCurve ( const Flux curve)

Function to return a vector of tags of model edges that are classified on a curve.

Parameters
curvecurve on which model edges tags are needed.
Returns
a vector of tags of model edges classified on curve.

◆ getVertexAdj()

Adj getVertexAdj ( const std::vector< Vertex > &  vertices)

Given a vector of model vertices, return both edge and face adjacencies on all the model vertices.

Parameters
verticesa vector of model vertices.
Returns
Adj

◆ getVertexType()

std::string getVertexType ( int  vertexId)

Given the physics type id of model vertex, returns the name of physics property.

Parameters
vertexIdphysics Id (critical point type) of the model vertex.
Returns
a string with property name.

◆ modelFaceClassification()

std::map< int, std::vector< int > > modelFaceClassification ( const std::vector< Face > &  modelFaces)

Function to get a map between physics classification (int) and list of tags of model entities classified on them. int = 0-7.

Parameters
modelFacesa vector of model faces which need classification.
Returns
a map between face physics id and list of tags of model entities on it.

◆ modelVertexClassification()

std::map< int, std::vector< int > > modelVertexClassification ( Vertex  oPoint,
std::vector< Vertex xPoints 
)

Function to get a map between physics classification (int) and list of tags of model entities classified on them. int = 0-2 (xPoint, oPoint, none).

Parameters
oPointmodel vertex classified on oPoint.
xPointsa vector of x-point model vertices.
Returns
a map between physics id and list of tags of model entities on it.

◆ writeAdios2Array()

template<typename T >
void writeAdios2Array ( adios2::IO &  io,
adios2::Engine &  writer,
std::vector< T >  arrayData,
int  ncomp,
std::string &  name 
)

Function to write an array(2D) in adios2 file.

Parameters
ioadios2 IO.
writeradios2 write engine.
arrayDataarray data in vector.
ncompNumber of components. The output array size = arrayData.size()/ncomp
nameoutput array name.

◆ writeAdios2Value()

template<typename T >
void writeAdios2Value ( adios2::IO &  io,
adios2::Engine &  writer,
value,
std::string &  name 
)

Function to write a value in adios2 file.

Parameters
ioadios2 IO.
writeradios2 write engine.
valuevalue to be written to adios2 file.
nameoutput variable name in adios2 file.