moab
moab::GmshUtil Class Reference

#include <GmshUtil.hpp>

List of all members.

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.

Author:
Jason Kraftcheck

Definition at line 42 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.

{
  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 48 of file GmshUtil.hpp.

Length of gmshElemTypes.

Definition at line 51 of file GmshUtil.hpp.


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