MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <VtkUtil.hpp>
Static Public Member Functions | |
static const VtkElemType * | get_vtk_type (EntityType type, unsigned num_nodes) |
Static Public Attributes | |
static const char * | vtkTypeNames [] |
vtk data type names, indexed by DataType | |
static const VtkElemType | vtkElemTypes [] |
static const unsigned | numVtkElemType = sizeof( VtkUtil::vtkElemTypes ) / sizeof( VtkUtil::vtkElemTypes[0] ) |
Lenght of vtkElemTypes. |
General data about VTK files for use by read and write code.
Definition at line 43 of file VtkUtil.hpp.
const VtkElemType * moab::VtkUtil::get_vtk_type | ( | EntityType | type, |
unsigned | num_nodes | ||
) | [static] |
Get the VTK type corresponding to a tuple of the MOAB type and number of nodes. num_nodes is ignored for MBPOLYGON type.
Definition at line 125 of file VtkUtil.cpp.
References moab::mb_to_vtk_type, MBPOLYGON, MBPOLYHEDRON, and vtkElemTypes.
Referenced by moab::WriteVtk::gather_mesh(), and moab::WriteVtk::write_elems().
{ const int i = mb_to_vtk_type[type][0]; // Index for linear type const int j = mb_to_vtk_type[type][1]; // Index for quadratic type const int k = mb_to_vtk_type[type][2]; // Index for full quadratic type if( i ) // If element type is supported at all (if not linear then not quadratic either) { // If the linear type is requested (all polygons are linear // irrespective of the number of nodes), return that. if( type == MBPOLYGON || type == MBPOLYHEDRON || vtkElemTypes[i].num_nodes == num_nodes ) return vtkElemTypes + i; // Otherwise if there is a quadratic type and the number of // nodes specified corresponds to the quadratic type, return that. else if( j && vtkElemTypes[j].num_nodes == num_nodes ) return vtkElemTypes + j; // Otherwise if there is a full quadratic type and the number of // nodes specified corresponds to the quadratic type, return that. else if( k && vtkElemTypes[k].num_nodes == num_nodes ) return vtkElemTypes + k; } return 0; }
const unsigned moab::VtkUtil::numVtkElemType = sizeof( VtkUtil::vtkElemTypes ) / sizeof( VtkUtil::vtkElemTypes[0] ) [static] |
Lenght of vtkElemTypes.
Definition at line 55 of file VtkUtil.hpp.
Referenced by moab::ReadVtk::vtk_read_unstructured_grid().
const VtkElemType moab::VtkUtil::vtkElemTypes [static] |
Vtk types, indexed by VTK type number. For unused VTK type numbers, mb_type will be MBMAXTYPE.
Definition at line 52 of file VtkUtil.hpp.
Referenced by get_vtk_type(), and moab::ReadVtk::vtk_read_unstructured_grid().
const char * moab::VtkUtil::vtkTypeNames [static] |
{ "unsigned_char", "int", "double", "bit", "unsigned_long", }
vtk data type names, indexed by DataType
Definition at line 48 of file VtkUtil.hpp.
Referenced by moab::WriteVtk::write_tag().