libMesh
Public Member Functions | Public Attributes | List of all members
libMesh::VTKIO::ElementMaps Struct Reference

Helper object that holds a map from VTK to libMesh element types and vice-versa. More...

Public Member Functions

void associate (ElemType libmesh_type, vtkIdType vtk_type)
 
vtkIdType find (ElemType libmesh_type)
 
ElemType find (vtkIdType vtk_type)
 

Public Attributes

std::map< ElemType, vtkIdType > writing_map
 
std::map< vtkIdType, ElemTypereading_map
 

Detailed Description

Helper object that holds a map from VTK to libMesh element types and vice-versa.

Definition at line 185 of file vtk_io.h.

Member Function Documentation

◆ associate()

void libMesh::VTKIO::ElementMaps::associate ( ElemType  libmesh_type,
vtkIdType  vtk_type 
)

Definition at line 188 of file vtk_io.h.

References reading_map, and writing_map.

189  {
190  writing_map[libmesh_type] = vtk_type;
191  reading_map[vtk_type] = libmesh_type;
192  }
std::map< ElemType, vtkIdType > writing_map
Definition: vtk_io.h:216
std::map< vtkIdType, ElemType > reading_map
Definition: vtk_io.h:217

◆ find() [1/2]

vtkIdType libMesh::VTKIO::ElementMaps::find ( ElemType  libmesh_type)

Definition at line 195 of file vtk_io.h.

References writing_map.

196  {
197  std::map<ElemType, vtkIdType>::iterator it = writing_map.find(libmesh_type);
198 
199  if (it == writing_map.end())
200  libmesh_error_msg("Element type " << libmesh_type << " not available in VTK.");
201 
202  return it->second;
203  }
std::map< ElemType, vtkIdType > writing_map
Definition: vtk_io.h:216

◆ find() [2/2]

ElemType libMesh::VTKIO::ElementMaps::find ( vtkIdType  vtk_type)

Definition at line 206 of file vtk_io.h.

References reading_map.

207  {
208  std::map<vtkIdType, ElemType>::iterator it = reading_map.find(vtk_type);
209 
210  if (it == reading_map.end())
211  libmesh_error_msg("Element type " << vtk_type << " not available in libMesh.");
212 
213  return it->second;
214  }
std::map< vtkIdType, ElemType > reading_map
Definition: vtk_io.h:217

Member Data Documentation

◆ reading_map

std::map<vtkIdType, ElemType> libMesh::VTKIO::ElementMaps::reading_map

Definition at line 217 of file vtk_io.h.

Referenced by associate(), and find().

◆ writing_map

std::map<ElemType, vtkIdType> libMesh::VTKIO::ElementMaps::writing_map

Definition at line 216 of file vtk_io.h.

Referenced by associate(), and find().


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