MOAB: Mesh Oriented datABase  (version 5.2.1)
moab::GmshUtil Class Reference

#include <GmshUtil.hpp>

+ Collaboration diagram for moab::GmshUtil:

Static Public Member Functions

static int get_gmsh_type (EntityType type, unsigned num_nodes)

Static Public Attributes

static const GmshElemType gmshElemTypes []
static const unsigned numGmshElemType = sizeof( GmshUtil::gmshElemTypes ) / sizeof( GmshUtil::gmshElemTypes[0] )
 Length of gmshElemTypes.

Detailed Description

General data about GMsh files for use by read and write code.

Jason Kraftcheck

Definition at line 43 of file GmshUtil.hpp.

Member Function Documentation

int moab::GmshUtil::get_gmsh_type ( EntityType  type,
unsigned  num_nodes 
) [static]

Get the Gmsh type corresponding to a tuple of the MOAB type and number of nodes. num_nodes is ignored for MBPOLYGON type. Returns -1 for unsupported types.

Definition at line 104 of file GmshUtil.cpp.

References gmshElemTypes, moab::MAX_NODES, moab::mb_to_gmsh_type, moab::GmshElemType::mb_type, and MBMAXTYPE.

Referenced by moab::WriteGmsh::write_file().

    if( num_nodes >= (unsigned)MAX_NODES ) return -1;

    int idx = mb_to_gmsh_type[type][num_nodes];
    if( !idx ) return -1;

    return gmshElemTypes[idx].mb_type == MBMAXTYPE ? -1 : idx;

Member Data Documentation

Gmsh types, indexed by Gmsh type number. For unused Gmsh type numbers, mb_type will be MBMAXTYPE.

Definition at line 49 of file GmshUtil.hpp.

Referenced by get_gmsh_type(), moab::ReadGmsh::load_file(), and moab::WriteGmsh::write_file().

const unsigned moab::GmshUtil::numGmshElemType = sizeof( GmshUtil::gmshElemTypes ) / sizeof( GmshUtil::gmshElemTypes[0] ) [static]

Length of gmshElemTypes.

Definition at line 52 of file GmshUtil.hpp.

Referenced by moab::ReadGmsh::load_file().

List of all members.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines