Advanced Multi-Physics (AMP)
On-Line Documentation
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
AMP::Xdmf Class Reference

#include <Xdmf.h>

Classes

struct  MeshData
 
struct  VarData
 

Public Types

enum class  Center {
  Null = 0 , Node , Edge , Face ,
  Cell , Grid , Other
}
 
enum class  DataType {
  Null = 0 , Char , Int32 , Int64 ,
  Uint32 , Uint64 , Float , Double
}
 
enum class  RankType {
  Null = 0 , Scalar , Vector , Tensor ,
  Tensor6 , Matrix , GlobalID
}
 
enum class  TopologyType {
  Null = 0 , Polyvertex , Polyline , Polygon ,
  Triangle , Quadrilateral , Tetrahedron , Pyramid ,
  Wedge , Hexahedron , Edge_3 , Triangle_6 ,
  Quadrilateral_8 , Tetrahedron_10 , Pyramid_13 , Wedge_15 ,
  Hexahedron_20 , Mixed , CurvilinearMesh2D , CurvilinearMesh3D ,
  RectangularMesh2D , RectangularMesh3D , UniformMesh2D , UniformMesh3D
}
 

Public Member Functions

void addMesh (const std::string &meshName, const MeshData &domain)
 Add a mesh domain.
 
void addMultiMesh (const std::string &meshName, const std::vector< MeshData > &submeshes)
 Add a multi-mesh.
 
void addMultiMesh (const std::string &meshName, const std::vector< std::string > &submeshes)
 Add a multi-mesh.
 
void clear ()
 Clear the internal data.
 
bool empty () const
 Check if the class is empty.
 
void gather (const AMP::AMP_MPI &comm)
 Gather all data to rank 0.
 
void write (const std::string &filename) const
 Write the xml file.
 

Static Public Member Functions

static MeshData createCurvilinearMesh (const std::string &name, const ArraySize &size, const std::string &x, const std::string &y="", const std::string &z="")
 Add a Curvilinear mesh.
 
static MeshData createPointMesh (const std::string &name, uint8_t NDIM, size_t N, const std::string &x, const std::string &y="", const std::string &z="")
 Add a Point mesh.
 
static MeshData createUniformMesh (const std::string &name, const std::vector< double > &range, const ArraySize &size)
 Add a uniform mesh.
 
static MeshData createUnstructuredMesh (const std::string &name, uint8_t NDIM, TopologyType type, size_t NumElements, const std::string &dofMap, size_t NumNodes, const std::string &x, const std::string &y="", const std::string &z="")
 Add an unstructured mesh.
 

Private Attributes

std::map< std::string, std::vector< MeshData > > d_meshData
 

Detailed Description

Definition at line 18 of file Xdmf.h.

Member Enumeration Documentation

◆ Center

enum class AMP::Xdmf::Center
strong
Enumerator
Null 
Node 
Edge 
Face 
Cell 
Grid 
Other 

Definition at line 49 of file Xdmf.h.

◆ DataType

enum class AMP::Xdmf::DataType
strong
Enumerator
Null 
Char 
Int32 
Int64 
Uint32 
Uint64 
Float 
Double 

Definition at line 47 of file Xdmf.h.

◆ RankType

enum class AMP::Xdmf::RankType
strong
Enumerator
Null 
Scalar 
Vector 
Tensor 
Tensor6 
Matrix 
GlobalID 

Definition at line 48 of file Xdmf.h.

◆ TopologyType

enum class AMP::Xdmf::TopologyType
strong
Enumerator
Null 
Polyvertex 
Polyline 
Polygon 
Triangle 
Quadrilateral 
Tetrahedron 
Pyramid 
Wedge 
Hexahedron 
Edge_3 
Triangle_6 
Quadrilateral_8 
Tetrahedron_10 
Pyramid_13 
Wedge_15 
Hexahedron_20 
Mixed 
CurvilinearMesh2D 
CurvilinearMesh3D 
RectangularMesh2D 
RectangularMesh3D 
UniformMesh2D 
UniformMesh3D 

Definition at line 21 of file Xdmf.h.

Member Function Documentation

◆ addMesh()

void AMP::Xdmf::addMesh ( const std::string &  meshName,
const MeshData domain 
)

Add a mesh domain.

◆ addMultiMesh() [1/2]

void AMP::Xdmf::addMultiMesh ( const std::string &  meshName,
const std::vector< MeshData > &  submeshes 
)

Add a multi-mesh.

◆ addMultiMesh() [2/2]

void AMP::Xdmf::addMultiMesh ( const std::string &  meshName,
const std::vector< std::string > &  submeshes 
)

Add a multi-mesh.

◆ clear()

void AMP::Xdmf::clear ( )

Clear the internal data.

◆ createCurvilinearMesh()

static MeshData AMP::Xdmf::createCurvilinearMesh ( const std::string &  name,
const ArraySize size,
const std::string &  x,
const std::string &  y = "",
const std::string &  z = "" 
)
static

Add a Curvilinear mesh.

This function adds a curvilinear mesh

Parameters
[in]nameThe name of the mesh
[in]sizeThe number of cells in the mesh
[in]xThe x coordinates or the xy/xyz coordinates
[in]yThe y coordinates (may be null)
[in]zThe z coordinates (may be null)

◆ createPointMesh()

static MeshData AMP::Xdmf::createPointMesh ( const std::string &  name,
uint8_t  NDIM,
size_t  N,
const std::string &  x,
const std::string &  y = "",
const std::string &  z = "" 
)
static

Add a Point mesh.

◆ createUniformMesh()

static MeshData AMP::Xdmf::createUniformMesh ( const std::string &  name,
const std::vector< double > &  range,
const ArraySize size 
)
static

Add a uniform mesh.

This function adds a uniform rectangular mesh

Parameters
[in]nameThe name of the mesh
[in]rangeThe range of the mesh [ x_min, x_max, y_min, y_max, z_min, z_max ]
[in]sizeThe number of cells in the mesh

◆ createUnstructuredMesh()

static MeshData AMP::Xdmf::createUnstructuredMesh ( const std::string &  name,
uint8_t  NDIM,
TopologyType  type,
size_t  NumElements,
const std::string &  dofMap,
size_t  NumNodes,
const std::string &  x,
const std::string &  y = "",
const std::string &  z = "" 
)
static

Add an unstructured mesh.

This function adds an unstructured mesh to the class to write. The mesh may be one of several unsupported unstructured mesh types. This function does not support mixed elements.

Parameters
[in]nameThe name of the mesh
[in]NDIMThe number of physical dimensions
[in]typeThe element type
[in]NumElementsThe number of elements
[in]dofMapThe connectivity information (type x NumElements)
[in]NumNodesThe number of nodes
[in]xThe x coordinates or the xy/xyz coordinates
[in]yThe y coordinates (may be null)
[in]zThe z coordinates (may be null)

◆ empty()

bool AMP::Xdmf::empty ( ) const
inline

Check if the class is empty.

Definition at line 159 of file Xdmf.h.

References d_meshData.

◆ gather()

void AMP::Xdmf::gather ( const AMP::AMP_MPI comm)

Gather all data to rank 0.

◆ write()

void AMP::Xdmf::write ( const std::string &  filename) const

Write the xml file.

Member Data Documentation

◆ d_meshData

std::map<std::string, std::vector<MeshData> > AMP::Xdmf::d_meshData
private

Definition at line 162 of file Xdmf.h.

Referenced by empty().


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



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:42.
Comments on this page