MOAB: Mesh Oriented datABase  (version 5.4.1)
moab Namespace Reference

Class representing axis-aligned bounding box. More...

Namespaces

namespace  _bvh
namespace  _element_tree
namespace  common_tree
namespace  Element
namespace  element_utility
namespace  ElemUtil
namespace  GeomUtil
namespace  Matrix
namespace  point_locator
namespace  SysUtil

Classes

struct  NodeDistance
struct  NodeSeg
struct  SimpleStat
class  AEntityFactory
 class AEntityFactory More...
class  AffineXform
 Define an affine transformation. More...
class  AxisBox
 Class representing axis-aligned bounding box. More...
class  BitPage
 bit tag data More...
class  BitTag
 data for a single bit tag More...
class  BoxPlaneIter
class  BSPTreePlaneIter
class  FILEDebugStream
class  CxxDebugStream
class  DebugOutput
 Utility class for printing debug output. More...
class  DebugOutputStream
class  DenseTag
 Dense storage of fixed-length tag data. More...
class  ElementSequence
class  EntitySequence
class  FILEErrorStream
class  CxxErrorStream
class  ErrorOutput
 Utility class for printing error output. More...
class  ErrorOutputStream
class  ComponentFactory
class  FindVolumeIntRegCtxt
class  GQT_IntRegCtxt
 An implementation of an Intersection Registration Context for use GQT ray-firing. More...
struct  angleAndIndex
class  DamselUtil
class  ExoIIUtil
class  FileTokenizer
 Parse a file as space-separated tokens. More...
struct  GmshElemType
class  GmshUtil
class  IODebugTrack
 Tool for debugging binary IO. More...
class  ExoIIInterface
struct  VtkElemType
class  VtkUtil
class  NCHelper
 Helper class to isolate reading of several different nc file formats. More...
class  ScdNCHelper
 Child helper class for scd mesh, e.g. CAM_EL or CAM_FV. More...
class  UcdNCHelper
 Child helper class for ucd mesh, e.g. CAM_SE (HOMME) or MPAS. More...
class  NCHelperDomain
 Child helper class for Domain grid. More...
class  NCHelperEuler
 Child helper class for Eulerian Spectral grid (CAM_EUL) More...
class  NCHelperFV
 Child helper class for Finite Volume grid (CAM_FV) More...
class  NCHelperGCRM
 Child helper class for GCRM grid. More...
class  NCHelperHOMME
 Child helper class for HOMME grid (CAM_SE) More...
class  NCHelperMPAS
 Child helper class for MPAS grid. More...
class  NCHelperScrip
class  NCWriteEuler
class  NCWriteFV
class  NCWriteGCRM
class  NCWriteHelper
class  ScdNCWriteHelper
 Child helper class for scd mesh, e.g. CAM_EL or CAM_FV. More...
class  UcdNCWriteHelper
 Child helper class for ucd mesh, e.g. CAM_SE (HOMME) or MPAS. More...
class  NCWriteHOMME
class  NCWriteMPAS
class  ReadABAQUS
class  ReadCCMIO
class  ReadCGM
class  ReadCGNS
 Export CGNS files. More...
class  ReadDamsel
class  ReadGmsh
 Gmsh (http://www.geuz.org/gmsh) file reader. More...
class  CheckOpenReadHDF5Handles
struct  SetContOffComp
class  ReadHDF5
 Read mesh from MOAB HDF5 (.h5m) file. More...
class  ReadHDF5Dataset
 Utility used for reading portions of an HDF5 dataset. More...
class  ReadHDF5VarLen
 Read variable-length data from 1-D array dataset. More...
class  ReadIDEAS
class  ReadMCNP5
class  ReadNASTRAN
class  ReadNC
 Output Exodus File for VERDE. More...
struct  ReadBlockData
struct  ReadFaceBlockData
class  ReadNCDF
 Output Exodus File for VERDE. More...
class  ReadOBJ
class  ReadRTT
class  ReadSmf
 Read SMF (Simple Model Format) files. More...
class  ReadSms
struct  BinaryHeader
struct  BinaryTri
class  ReadSTL
 ASCII and Binary Stereo Lithography File readers. More...
class  ReadTemplate
 Template for implementing new file readers in MOAB This class is a template for writing new file readers in MOAB. This shows how to efficiently create vertices and elements using the ReadUtilIface class, and to translate indices in connectivity lists into vertex handles created during the read. More...
class  ReadTetGen
class  ReadVtk
struct  SMF_ivars
class  SMF_State
class  Tqdcfr
class  WriteAns
class  WriteCCMIO
class  WriteCGNS
 Export CGNS files. More...
class  WriteDamsel
struct  ElemInfo
class  WriteGmsh
 Export Gmsh files. More...
class  WriteGMV
 Output Exodus File for VERDE. More...
class  CheckOpenWriteHDF5Handles
class  WriteHDF5
 Write mesh database to MOAB's native HDF5-based file format. More...
class  WriteNC
 Export NC files. More...
struct  MaterialSetData
struct  DirichletSetData
struct  NeumannSetData
class  WriteNCDF
 Output Exodus File for VERDE. More...
class  WriteSLAC
class  WriteSmf
struct  BinTri
class  WriteSTL
 ASCII and Binary Stereo Lithography File writers. More...
class  WriteTemplate
class  WriteVtk
struct  handle_id
class  range_tool
 Methods to insert/remove range-based data from contents list. Templatized to operate on both Range and set-based MeshSets. More...
class  MeshSetRComp
class  MeshSet
 Class to implement entity set functionality. More...
class  MeshSetSequence
class  MeshTag
 Tag with only a global/mesh value. More...
class  AdaptiveKDTree
 Adaptive KD tree, for sorting and searching entities spatially. More...
class  AdaptiveKDTreeIter
 Iterate over leaves of an adaptive kD-tree. More...
class  BoundBox
class  BSPTree
 BSP tree, for sorting and searching entities spatially. More...
class  BSPTreeIter
 Iterate over leaves of a BSPTree. More...
class  BSPTreeBoxIter
 Iterate over leaves of a BSPTree. More...
class  BSPTreePoly
 Convex polyhedron. More...
class  BVHTree
 Bounding Volume Hierarchy (sorta like a tree), for sorting and searching entities spatially. More...
class  CartVect
 Cartesian Vector. More...
class  CN
 Canonical numbering data and functions This class represents canonical ordering of finite-element meshes. Elements in the finite element "zoo" are represented. Canonical numbering denotes the vertex, edge, and face numbers making up each kind of element, and the vertex numbers defining those entities. Functions for evaluating adjacencies and other things based on vertex numbering are also provided. By default, this class defines a zero-based numbering system. For a complete description of this class, see the document "MOAB Canonical Numbering Conventions", Timothy J. Tautges, Sandia National Laboratories Report #SAND2004-xxxx. More...
class  Core
 Implementation of MOAB Interface Implementation of the MOAB Interface class. You shouldn't call functions directly on an object of type Core (use Interface instead), unless you really have to access non-API functionality. More...
class  CpuTimer
class  DGMSolver
class  HiReconstruction
class  DualTool
 Tools for constructing and working with mesh duals (both tet- and hex-based, though some functions may not make sense for tet duals) More...
class  EvalSet
class  ElemEvaluator
 Class facilitating local discretization-related functionsThis class implements discretization-related functionality operating on data in MOAB. A member of this class caches certain data about the element it's currently operating on, but is not meant to be instantiated one-per-element, but rather one-per-search (or other operation on a collection of elements). More...
class  Error
class  FBEngine
class  FileOptions
 Parse options string passed to file IO routines. More...
class  GeomQueryTool
 Tool for querying different aspects of geometric topology sets in MOAB. More...
class  GeomTopoTool
 Tool for interpreting geometric topology sets in MOAB database Tool for interpreting geometric topology sets in MOAB database; see MOAB metadata_info document for information on how geometric topology sets are read and represented. More...
class  HalfFacetRep
class  HigherOrderFactory
 Functions for converting to/from higher-order elements. More...
class  HomCoord
 Homogeneous coordinate vector. More...
class  HomXform
 Homogeneous coordinate transformation matrix. More...
class  Interface
 Main interface class to MOAB. More...
class  type_equals
class  type_not_equals
class  Intx2Mesh
class  Intx2MeshInPlane
class  Intx2MeshOnSphere
class  IntxRllCssphere
class  IntxUtils
class  IntxAreaUtils
class  LloydSmoother
class  LinearHex
class  LinearQuad
class  LinearTet
class  LinearTri
class  QuadraticHex
class  SpectralHex
class  SpectralQuad
class  Matrix3
class  MergeMesh
class  MeshGeneration
class  MeshTopoUtil
 MeshTopoUtil contains general mesh utility functions. More...
class  NestedRefine
class  OrientedBox
 Oriented bounding box. More...
class  OrientedBoxTreeTool
 Class for constructing and querying Hierarchical Oriented Bounding Box trees. More...
class  Point_search
class  Bvh_tree
class  Element_tree
struct  range_iter_tag
struct  range_base_iter
class  Range
 the class Range More...
class  range_inserter
 Use as you would an STL back_inserter. More...
class  RangeMap
 Map ranges of values. More...
class  ReaderIface
 Interface for mesh reader implementations. More...
class  ReaderWriterSet
 Maintain list of readers and writers. More...
class  ReadUtilIface
 Interface implemented in MOAB which provides memory for mesh reading utilities. More...
class  Remapper
class  TempestOnlineMap
 An offline map between two Meshes. More...
class  TempestRemapper
class  ReorderTool
class  ScdParData
 struct for keeping parallel data in one place More...
class  ScdInterface
 A structured mesh interface for MOAB-based data. More...
class  ScdBox
class  SetIterator
class  RangeSetIterator
class  VectorSetIterator
class  Skinner
 Class for constructing and querying skin of a mesh Class for constructing and querying skin of a mesh, defined as the outside lower-dimensional boundary of a mesh or a given set of entities. This class provides options for finding the forward- and reverse-oriented members of the skin. Several methods are available for computing the skin, e.g. using geometric topology sets, vertex-entity adjacencies, or directly from (n-1)-dimensional entities. More...
class  SpatialLocator
 Tool to facilitate spatial location of a point in a mesh. More...
class  SpatialLocatorTimes
 Statistics for spatial location. More...
class  SpectralMeshTool
 Class with convenience functions for handling spectral mesh Class with convenience functions for handling spectral meshes. See description of spectral mesh handling in doc/metadata_info.doc and in the MOAB user's guide. More...
class  Tree
 Parent class of various tree types in MOAB. More...
class  TreeStats
 Traversal statistics accumulating and reporting. More...
class  TupleList
struct  MBuuid
 struct that handles universally unique id's for the Mesh Database More...
class  UnknownInterface
 base class for all interface classes More...
class  Util
 Utility functions for computational geometry and mathematical calculations. More...
class  VerdictWrapper
class  WriterIface
 Interface for mesh writer implementations. More...
class  WriteUtilIface
 Interface implemented in MOAB which provides memory for mesh reading utilities. More...
struct  Data
struct  OBBTreeSITFrame
class  RayIntersector
class  RayIntersectSets
struct  OBBTreeCPFrame
class  TreeLayoutPrinter
class  TreeNodePrinter
class  StatData
class  gs_data
class  ParallelComm
 Parallel communications in MOAB. More...
class  ParallelData
 Parallel data in MOAB. More...
class  ParallelMergeMesh
class  ParCommGraph
class  ProcConfig
 Multi-CPU information for parallel MOAB. More...
struct  set_tuple
struct  ProcList
class  ReadParallel
class  SharedSetData
 ParallelComm data about shared entity sets. More...
class  TagNameCompare
struct  serial_tag_data
struct  DatasetVals
struct  elemtype
class  WriteHDF5Parallel
 Write MOAB HDF5 file in parallel. More...
class  PolyElementSeq
class  RangeSeqIntersectIter
 Iterate over the blocks of EntityHandles in an Range that are in the same EntitySequence. More...
class  ReadUtil
struct  CompSortedVect
class  ScdElementData
class  ScdVertexData
class  SequenceData
class  SequenceManager
class  AdjSides
class  SmoothCurve
class  SmoothFace
 Implement CAMAL geometry callbacks using smooth iMesh. More...
class  SparseTagDataAllocator
 allocator for tag data More...
class  SparseTag
 Sparse tag data. More...
class  StructuredElementSeq
class  SweptElementData
class  SweptElementSeq
class  SweptVertexData
class  TagBytesEqual
class  TagBytesLess
class  TagVarBytesEqual
class  TagVarBytesLess
class  TagTypeEqual
class  TagTypeLess
class  TagOneTypeEqual
class  TagOneTypeLess
class  TagVarTypeEqual
class  TagVarTypeLess
class  ByteArrayIterator
class  InsertCount
class  TagInfo
struct  range_data
class  TypeSequenceManager
 Maintain data structures organizing EntitySequence instances. More...
class  UnstructuredElemSeq
class  VarLenDenseTag
 Dense storage of variable-length tag data. More...
class  VarLenSparseTag
 Sparse tag variable-length data. More...
class  VarLenTagData
class  VarLenTag
 Class for storing variable-length tag data. More...
class  VertexSequence
class  WriteUtil
class  Coupler
 This class couples data between meshes. More...
class  DataCoupler
 This class couples data between meshes. More...
class  EdgeSizeEvaluator
class  EdgeSizeSimpleImplicit
class  EntityRefinerOutputFunctor
class  EntityRefiner
class  MeshOutputFunctor
 Implements the abstract EntityRefinerOutputFunctor class. More...
struct  MeshRefinerIterator
class  MeshRefiner
 Refine a mesh using a streaming operation. More...
class  ProcessSet
 Represent a set of processes using a bit vector. More...
class  RefinerTagManager
class  SimplexTemplateRefiner
class  SimplexTemplateTagAssigner
class  SplitVertexIndex
class  EntitySourceRecord
class  SplitVerticesBase
class  EntitySource
class  SplitVertices
 A dictionary of new vertices. More...

Typedefs

typedef std::vector< EntityHandleAdjacencyVector
typedef herr_t(* HDF5_Error_Func_Type )(void *)
typedef std::pair
< EntityHandle, EntityHandle
MeshSetRange
typedef std::pair< EntityType,
EntityType > 
DimensionPair
typedef ErrorCode(* EvalFcn )(const double *params, const double *field, const int ndim, const int num_tuples, double *work, double *result)
typedef ErrorCode(* JacobianFcn )(const double *params, const double *verts, const int nverts, const int ndim, double *work, double *result)
typedef ErrorCode(* IntegrateFcn )(const double *field, const double *verts, const int nverts, const int ndim, const int num_tuples, double *work, double *result)
typedef ErrorCode(* InitFcn )(const double *verts, const int nverts, double *&work)
typedef int(* InsideFcn )(const double *verts, const int ndims, const double tol)
typedef ErrorCode(* ReverseEvalFcn )(EvalFcn eval, JacobianFcn jacob, InsideFcn ins, const double *posn, const double *verts, const int nverts, const int ndim, const double iter_tol, const double inside_tol, double *work, double *params, int *is_inside)
typedef ErrorCode(* NormalFcn )(const int ientDim, const int facet, const int nverts, const double *verts, double normal[3])
typedef unsigned long EntityHandle
typedef long EntityID
typedef std::vector< EntityHandleHandleVec
typedef EntityHandle HFacet
 HalfFacetRep class implements the Array-Based Half-Facet(AHF) Mesh data structure on top of MOAB. \ It is based on a generalized notion of a half-facet derived from that a half-edge/half-face data structure for 2D/3D. \ The core construct of AHF are its two maps: sibling-half-facets(SIBHFS) and vertex-to-half-facet(V2HF) \ 1. SIBHFS: Maps every half-facet in the mesh to its sibling half-facets, \ 2. V2HF: Maps each vertex to an incident half-facet \ Using these two maps, a range of adjacency queries is performed. The maps are stored in dense tags over entities and vertices. \ \ Adjacency functions: \ 1. upward-incidence queries: vertex -> edge, edge -> faces, edge -> cells, face ->cells \ 2. neighborhood (same-dimensional) adjacency queries: edge -> edges, face -> faces, cell -> cells, etc. \ 3. downward adjacency queries: face -> edges, cell -> edges, etc. \ \ Mesh types supported: \ 1D(edges), 2D(triangles, quads), 3D(tet, pyramid, prism, hex), Mixed dimensional meshes \ \ CURRENTLY NOT SUPPORTED: \ 1. Meshes with mixed entity types of same dimension. Ex. a volume mesh with both tets and prisms. \ 2. create_if_missing = true \ 3. Modified meshes \.
typedef RangeMap< EntityHandle,
EntityHandle, 0 > 
HandleMap
typedef TagBytesEqual TagIntsEqual
typedef TagVarBytesEqual TagVarIntsEqual
typedef TagTypeLess< int > TagIntsLess
typedef TagVarTypeLess< int > TagVarIntsLess
typedef TagOneTypeEqual< int > TagOneIntEqual
typedef TagOneTypeLess< int > TagOneIntLess
typedef TagBytesEqual TagHandlesEqual
typedef TagVarBytesEqual TagVarHandlesEqual
typedef TagTypeLess< EntityHandleTagHandlesLess
typedef TagVarTypeLess
< EntityHandle
TagVarHandlesLess
typedef TagOneTypeEqual
< EntityHandle
TagOneHandleEqual
typedef TagOneTypeLess
< EntityHandle
TagOneHandleLess
typedef TagTypeEqual< double > TagDoublesEqual
typedef TagVarTypeEqual< double > TagVarDoublesEqual
typedef TagTypeLess< double > TagDoublesLess
typedef TagVarTypeLess< double > TagVarDoublesLess
typedef TagOneTypeEqual< double > TagOneDoubleEqual
typedef TagOneTypeLess< double > TagOneDoubleLess

Enumerations

enum  ExoIIElementType {
  EXOII_SPHERE = 0, EXOII_SPRING, EXOII_BAR, EXOII_BAR2,
  EXOII_BAR3, EXOII_BEAM, EXOII_BEAM2, EXOII_BEAM3,
  EXOII_TRUSS, EXOII_TRUSS2, EXOII_TRUSS3, EXOII_TRI,
  EXOII_TRI3, EXO_SHELL3, EXOII_TRI6, EXOII_TRI7,
  EXOII_QUAD, EXOII_QUAD4, EXOII_QUAD5, EXOII_QUAD8,
  EXOII_QUAD9, EXOII_SHELL, EXOII_SHELL4, EXOII_SHELL5,
  EXOII_SHELL8, EXOII_SHELL9, EXOII_TETRA, EXOII_TETRA4,
  EXOII_TET4, EXOII_TETRA8, EXOII_TETRA10, EXOII_TETRA14,
  EXOII_PYRAMID, EXOII_PYRAMID5, EXOII_PYRAMID10, EXOII_PYRAMID13,
  EXOII_PYRAMID18, EXOII_WEDGE, EXOII_KNIFE, EXOII_HEX,
  EXOII_HEX8, EXOII_HEX9, EXOII_HEX20, EXOII_HEX27,
  EXOII_HEXSHELL, EXOII_POLYGON, EXOII_POLYHEDRON, EXOII_MAX_ELEM_TYPE
}
enum  abaqus_line_types {
  abq_undefined_line = 0, abq_blank_line, abq_comment_line, abq_keyword_line,
  abq_data_line, abq_eof
}
enum  abaqus_keyword_type {
  abq_undefined = 0, abq_unsupported, abq_ambiguous, abq_heading,
  abq_part, abq_end_part, abq_assembly, abq_end_assembly,
  abq_node, abq_element, abq_nset, abq_elset,
  abq_instance, abq_end_instance, abq_solid_section
}
enum  abaqus_part_params { abq_part_undefined = 0, abq_part_ambiguous, abq_part_name }
enum  abaqus_instance_params { abq_instance_undefined = 0, abq_instance_ambiguous, abq_instance_name, abq_instance_part }
enum  abaqus_assembly_params { abq_assembly_undefined = 0, abq_assembly_ambiguous, abq_assembly_name }
enum  abaqus_node_params { abq_node_undefined = 0, abq_node_ambiguous, abq_node_nset, abq_node_system }
enum  abaqus_element_params { abq_element_undefined = 0, abq_element_ambiguous, abq_element_elset, abq_element_type }
enum  abaqus_element_type {
  abq_eletype_unsupported = 0, abq_eletype_dc3d8, abq_eletype_c3d8r, abq_eletype_dcc3d8,
  abq_eletype_c3d4, abq_eletype_dc3d4, abq_eletype_ds4
}
enum  abaqus_nset_params {
  abq_nset_undefined = 0, abq_nset_ambiguous, abq_nset_nset, abq_nset_elset,
  abq_nset_generate, abq_nset_instance
}
enum  abaqus_elset_params {
  abq_elset_undefined = 0, abq_elset_ambiguous, abq_elset_elset, abq_elset_generate,
  abq_elset_instance
}
enum  abaqus_solid_section_params { abq_solid_section_undefined = 0, abq_solid_section_ambiguous, abq_solid_section_elset, abq_solid_section_matname }
enum  keyword_type {
  obj_undefined = 0, object_start, group_start, face_start,
  vertex_start, valid_unsupported
}
enum  { MAX_SUB_ENTITIES = 12, MAX_SUB_ENTITY_VERTICES = 9 }
enum  GEOMTYPE { HISURFACE, HI3DCURVE, HI2DCURVE }
enum  ErrorType { MB_ERROR_TYPE_NEW_GLOBAL = 0, MB_ERROR_TYPE_NEW_LOCAL = 1, MB_ERROR_TYPE_EXISTING = 2 }
enum  MESHTYPE {
  CURVE = 0, SURFACE, SURFACE_MIXED, VOLUME,
  VOLUME_MIXED_1, VOLUME_MIXED_2, VOLUME_MIXED
}
 ENUM for the type of input mesh. More...
enum  {
  MAX_VERTICES = 8, MAX_EDGES = 12, MAX_FACES = 6, MAX_VERTS_HF = 4,
  MAX_INCIDENT_HF = 4
}
enum  QualityType {
  MB_UNDEFINED_QUALITY = -1, MB_EDGE_RATIO = 0, MB_MAX_EDGE_RATIO, MB_SKEW,
  MB_TAPER, MB_VOLUME, MB_STRETCH, MB_DIAGONAL,
  MB_DIMENSION, MB_ODDY, MB_MED_ASPECT_FROBENIUS, MB_MAX_ASPECT_FROBENIUS,
  MB_CONDITION, MB_JACOBIAN, MB_SCALED_JACOBIAN, MB_SHEAR,
  MB_SHAPE, MB_RELATIVE_SIZE_SQUARED, MB_SHAPE_AND_SIZE, MB_SHEAR_AND_SIZE,
  MB_DISTORTION, MB_LENGTH, MB_RADIUS_RATIO, MB_ASPECT_BETA,
  MB_ASPECT_RATIO, MB_ASPECT_GAMMA, MB_MINIMUM_ANGLE, MB_COLLAPSE_RATIO,
  MB_WARPAGE, MB_AREA, MB_MAXIMUM_ANGLE, MB_QUALITY_COUNT
}
enum  MBMessageTag {
  MB_MESG_ANY = MPI_ANY_TAG, MB_MESG_ENTS_ACK, MB_MESG_ENTS_SIZE, MB_MESG_ENTS_LARGE,
  MB_MESG_REMOTEH_ACK, MB_MESG_REMOTEH_SIZE, MB_MESG_REMOTEH_LARGE, MB_MESG_TAGS_ACK,
  MB_MESG_TAGS_SIZE, MB_MESG_TAGS_LARGE
}

Functions

static ErrorCode closest_to_triangles (Interface *moab, const Range &tris, const CartVect &from, double &shortest_dist_sqr, CartVect &closest_pt, EntityHandle &closest_tri)
static ErrorCode closest_to_triangles (Interface *moab, EntityHandle set_handle, const CartVect &from, double &shortest_dist_sqr, CartVect &closest_pt, EntityHandle &closest_tri)
static std::string mem_to_string (unsigned long mem)
template<typename T1 , typename T2 >
static T1 intersect (T1 set1_begin, T1 set1_end, T2 set2_begin, T2 set2_end)
AffineXform operator* (const AffineXform &A, const AffineXform &B)
AxisBox operator& (const AxisBox &a, const AxisBox &b)
AxisBox operator| (const AxisBox &a, const AxisBox &b)
bool operator|| (const AxisBox &a, const AxisBox &b)
static void corners_from_box (const double box_min[3], const double box_max[3], double corners[8][3])
static bool point_in_box (const double corners[8][3], const double point[3])
static void copy_coords (const double src[3], double dest[3])
static void plane_cut_edge (double old_coords_out[3], const double keep_end_coords[3], double cut_end_coords[3], const BSPTree::Plane &plane)
 Clip an edge using a plane.
static ErrorCode plane_cut_box (double cut_face_out[4][3], double corners_inout[8][3], const BSPTree::Plane &plane)
static ErrorCode plane_uncut_box (const double cut_face_in[4][3], double corners_inout[8][3], const BSPTree::Plane &plane)
static void subtr (double result[3], const double a[3], const double b[3])
static void sum (double result[3], const double a[3], const double b[3], const double c[3], const double d[3])
static void cross (double result[3], const double a[3], const double b[3])
static double dot (const double a[3], const double b[3])
template<typename PlaneIter >
static bool ray_intersect_halfspaces (const CartVect &ray_pt, const CartVect &ray_dir, const PlaneIter &begin, const PlaneIter &end, double &t_enter, double &t_exit)
static BSPTreePoly::Edgesplit_edge (BSPTreePoly::Vertex *&new_vtx, BSPTreePoly::Edge *into_edge)
static BSPTreePoly::Facesplit_face (BSPTreePoly::EdgeUse *start, BSPTreePoly::EdgeUse *end)
std::ostream & operator<< (std::ostream &s, const CartVect &v)
template<typename T >
static short int side_number (const T *parent_conn, const EntityType parent_type, const T *child_conn, const int child_num_verts, const int child_dim, int &side_no, int &sense, int &offset)
template<typename T >
bool connectivity_match (const T *conn1_i, const T *conn2_i, const int num_vertices, int &direct, int &offset)
template<typename T >
int permute_this (EntityType t, const int dim, T *conn, const int indices_per_ent, const int num_entries)
template<typename T >
int rev_permute_this (EntityType t, const int dim, T *conn, const int indices_per_ent, const int num_entries)
static const MeshSetget_mesh_set (const SequenceManager *sm, EntityHandle h)
static MeshSetget_mesh_set (SequenceManager *sm, EntityHandle h)
template<typename ITER >
static ErrorCode get_adjacencies_union (Core *gMB, ITER begin, ITER end, int to_dimension, bool create_if_missing, Range &adj_entities)
template<typename ITER >
static ErrorCode get_adjacencies_intersection (Core *mb, ITER begin, ITER end, const int to_dimension, const bool create_if_missing, std::vector< EntityHandle > &adj_entities)
template<typename ITER >
static ErrorCode get_adjacencies_intersection (Core *mb, ITER begin, ITER end, const int to_dimension, const bool create_if_missing, Range &adj_entities)
static bool is_zero_bytes (const void *mem, size_t size)
static void print_range (char *buffer, unsigned long begin, unsigned long end)
static ErrorCode not_found (const std::string &, EntityHandle)
static ErrorCode ent_not_found (const std::string &, EntityHandle)
void MBErrorHandler_Init ()
 Initialize MOAB error handler (e.g. create a utility object for printing error output)
void MBErrorHandler_Finalize ()
 Finalize MOAB error handler (e.g. delete the utility object for printing error output)
bool MBErrorHandler_Initialized ()
 Indicates whether MBErrorHandler_Init has been called.
void MBErrorHandler_GetLastError (std::string &error)
 Get information about the last error.
void MBTraceBackErrorHandler (int line, const char *func, const char *file, const char *dir, const char *err_msg, ErrorType err_type)
ErrorCode MBError (int line, const char *func, const char *file, const char *dir, ErrorCode err_code, const char *err_msg, ErrorType err_type)
 Routine that is called to create a new error or handle an existing one.
MB_EXPORT const char * MoabVersion ()
MB_EXPORT void GetInterface (MBuuid &interface_requested, UnknownInterface **iface)
MB_EXPORT void DeInitialize ()
MB_EXPORT void ReleaseInterface (UnknownInterface *iface)
bool intersect_segment_and_plane_slice (CartVect &from, CartVect &to, CartVect &p1, CartVect &p2, CartVect &, CartVect &normPlane, CartVect &intx_point, double &parPos)
ErrorCode area_coordinates (Interface *mbi, EntityHandle tri, CartVect &pnt, double *area_coord, EntityHandle &boundary_handle)
static bool strempty (const char *s)
EntityHandle CREATE_HALFFACET (const unsigned lid, const EntityID id)
EntityID FID_FROM_HALFFACET (HFacet handle)
int LID_FROM_HALFFACET (HFacet handle)
EntityHandle CREATE_HANDLE (const unsigned type, const EntityID id, int &err)
 Given a type and an id create a handle.
EntityHandle CREATE_HANDLE (const unsigned type, const EntityID id)
EntityHandle FIRST_HANDLE (unsigned type)
EntityHandle LAST_HANDLE (unsigned type)
EntityID ID_FROM_HANDLE (EntityHandle handle)
 Get the entity id out of the handle.
EntityType TYPE_FROM_HANDLE (EntityHandle handle)
bool angleCompare (angleAndIndex lhs, angleAndIndex rhs)
static bool verify (CartVect a, CartVect b, CartVect c, CartVect d, double x, double y, double z)
static ErrorCode error (ErrorCode rval)
ExoIIElementType operator++ (ExoIIElementType &type, int)
 postfix increment operator for EntityType
ExoIIElementTypeoperator++ (ExoIIElementType &type)
 prefix increment operator for EntityType
bool HDF5_can_append_hyperslabs ()
const bool operator== (const damsel_err_t &lhs, const damsel_err_t &rhs)
static herr_t handle_hdf5_error (void *data)
static void copy_sorted_file_ids (const EntityHandle *sorted_ids, long num_ids, Range &results)
static void intersect (const mhdf_EntDesc &group, const Range &range, Range &result)
static bool set_map_intersect (bool ranged, const long *contents, int content_len, const RangeMap< long, EntityHandle > &id_map)
static Range::iterator copy_set_contents (Range::iterator hint, int ranged, EntityHandle *contents, long length, Range &results)
static std::pair< int, int > allocate_mpe_state (const char *, const char *)
static void INT_IO_ERROR (bool condition, unsigned line)
static void swap8_voff (long *data)
static void swap4_uint (unsigned int *data)
static hid_t get_id_type ()
template<class HandleRangeIter >
size_t count_num_handles (HandleRangeIter iter, HandleRangeIter end)
template<class HandleRangeIter >
ErrorCode range_to_id_list_templ (HandleRangeIter begin, HandleRangeIter end, const RangeMap< EntityHandle, WriteHDF5::wid_t > &idMap, WriteHDF5::wid_t *array)
template<class HandleRangeIter >
ErrorCode range_to_blocked_list_templ (HandleRangeIter begin, HandleRangeIter end, const RangeMap< EntityHandle, WriteHDF5::wid_t > &idMap, std::vector< WriteHDF5::wid_t > &output_id_list, bool &ranged_list)
int compare_handle_id (const void *a, const void *b)
static MeshSet::Count insert_in_vector (const MeshSet::Count count, MeshSet::CompactList &list, const EntityHandle h, int &result)
 Insert into parent/child list.
static MeshSet::Count remove_from_vector (const MeshSet::Count count, MeshSet::CompactList &list, const EntityHandle h, int &result)
 Remvoe from parent/child list.
static EntityHandleresize_compact_list (MeshSet::Count &count, MeshSet::CompactList &clist, size_t new_list_size)
 Resize MeshSet::CompactList. Returns pointer to storage.
static ErrorCode vector_remove_range (MeshSet::Count &count, MeshSet::CompactList &clist, const Range &range, EntityHandle my_handle, AEntityFactory *adj)
static ErrorCode vector_remove_ranges (MeshSet::Count &count, MeshSet::CompactList &clist, const EntityHandle *pair_list, size_t num_pairs, EntityHandle my_handle, AEntityFactory *adj)
static ErrorCode vector_remove_vector (MeshSet::Count &count, MeshSet::CompactList &clist, const EntityHandle *vect, size_t vect_size, EntityHandle my_handle, AEntityFactory *adj)
static ErrorCode vector_insert_vector (MeshSet::Count &count, MeshSet::CompactList &clist, const EntityHandle *vect, size_t vect_size, EntityHandle my_handle, AEntityFactory *adj)
static void convert_to_ranges (const EntityHandle *vect_in, size_t vect_in_len, std::vector< EntityHandle > &vect_out)
MeshSet::hdl_iter::difference_type operator- (const MeshSet::hdl_iter &a, const MeshSet::hdl_iter &b)
static ErrorCode not_root_set (const std::string &, EntityHandle)
static bool all_root_set (std::string name, const EntityHandle *array, size_t len)
static ErrorCode not_found (const std::string &)
std::ostream & operator<< (std::ostream &out, const BoundBox &box)
CartVect operator+ (const CartVect &u, const CartVect &v)
CartVect operator- (const CartVect &u, const CartVect &v)
CartVect operator* (const CartVect &u, const CartVect &v)
double operator% (const CartVect &u, const CartVect &v)
 Dot product.
double angle (const CartVect &u, const CartVect &v)
 Interior angle between two vectors.
CartVect operator- (const CartVect &v)
CartVect operator+ (const CartVect &v, double s)
CartVect operator- (const CartVect &v, double s)
CartVect operator* (const CartVect &v, double s)
CartVect operator/ (const CartVect &v, double s)
CartVect operator+ (double s, const CartVect &v)
CartVect operator- (double s, const CartVect &v)
CartVect operator* (double s, const CartVect &v)
CartVect unit (const CartVect &v)
 Get unit vector in same direction.
std::ostream & operator<< (std::ostream &str, const HomCoord &hc)
template<typename Vector >
Matrix3 outer_product (const Vector &u, const Vector &v)
Matrix3 operator+ (const Matrix3 &a, const Matrix3 &b)
Matrix3 operator- (const Matrix3 &a, const Matrix3 &b)
Matrix3 operator* (const Matrix3 &a, const Matrix3 &b)
template<typename T >
std::vector< Toperator* (const Matrix3 &m, const std::vector< T > &v)
template<typename T >
std::vector< Toperator* (const std::vector< T > &v, const Matrix3 &m)
CartVect operator* (const Matrix3 &m, const CartVect &v)
CartVect operator* (const CartVect &v, const Matrix3 &m)
std::ostream & operator<< (std::ostream &, const OrientedBox &)
Range intersect (const Range &, const Range &)
 intersect two ranges, placing the results in the return range
Range subtract (const Range &from, const Range &)
 subtract range2 from this, placing the results in the return range
Range unite (const Range &r1, const Range &r2)
 unite two ranges, placing the results in the return range
Range::const_iterator operator+ (const Range::const_iterator &it, EntityID step)
Range::const_iterator operator+ (EntityID step, const Range::const_iterator &it)
Range::const_iterator operator- (const Range::const_iterator &it, EntityID step)
Range::const_iterator operator- (EntityID step, const Range::const_iterator &it)
EntityID operator- (const Range::const_iterator &it1, const Range::const_iterator &it2)
std::ostream & operator<< (std::ostream &s, const Range &r)
bool operator== (const Range &r1, const Range &r2)
bool operator!= (const Range &r1, const Range &r2)
std::ostream & operator<< (std::ostream &str, const ScdParData &pd)
void fail (const char *fmt,...)
std::string QualityType_ToString (QualityType qtype)
static double point_perp (const CartVect &p, const CartVect &b, const CartVect &m)
 Find closest point on line.
static ErrorCode box_from_axes (OrientedBox &result, Interface *instance, const Range &points)
 Common code for box calculation.
bool check_ray_limits (const double normal_par_pos, const double normal_par_dir, const double half_extent, const double *nonneg_ray_len, const double *neg_ray_len)
static ErrorCode split_box (Interface *instance, const OrientedBox &box, int axis, const Range &entities, Range &left_list, Range &right_list)
 Split triangles by which side of a plane they are on.
static ErrorCode split_sets (Interface *, const OrientedBox &box, int axis, const std::list< OrientedBoxTreeTool::SetData > &sets, std::list< OrientedBoxTreeTool::SetData > &left, std::list< OrientedBoxTreeTool::SetData > &right)
static int measure (const CartVect &v, double &result)
static double std_dev (double sqr, double sum, double count)
static void local_condense (realType *u, int op, const sint *cm)
static void local_uncondense (realType *u, const sint *cm)
static void local_condense_vec (realType *u, uint n, int op, const sint *cm)
static void local_uncondense_vec (realType *u, uint n, const sint *cm)
template<typename T >
static void UNPACK (unsigned char *&buff, T *val, size_t count)
template<typename T >
static void PACK (unsigned char *&buff, const T *val, size_t count)
static void PACK_INTS (unsigned char *&buff, const int *int_val, size_t num)
static void PACK_INT (unsigned char *&buff, int int_val)
static void PACK_DBLS (unsigned char *&buff, const double *dbl_val, size_t num)
static void PACK_EH (unsigned char *&buff, const EntityHandle *eh_val, size_t num)
static void PACK_VOID (unsigned char *&buff, const void *val, size_t num)
static void PACK_BYTES (unsigned char *&buff, const void *val, int num)
static void PACK_RANGE (unsigned char *&buff, const Range &rng)
static void UNPACK_INTS (unsigned char *&buff, int *int_val, size_t num)
static void UNPACK_INT (unsigned char *&buff, int &int_val)
static void UNPACK_DBLS (unsigned char *&buff, double *dbl_val, size_t num)
static void UNPACK_DBL (unsigned char *&buff, double &dbl_val)
static void UNPACK_EH (unsigned char *&buff, EntityHandle *eh_val, size_t num)
static void UNPACK_VOID (unsigned char *&buff, void *val, size_t num)
static void UNPACK_TYPE (unsigned char *&buff, EntityType &type)
static void UNPACK_RANGE (unsigned char *&buff, Range &rng)
static size_t RANGE_SIZE (const Range &rng)
void print_buff (unsigned char *ch, int size)
template<class T >
T LAND (const T &arg1, const T &arg2)
template<class T >
T LOR (const T &arg1, const T &arg2)
template<class T >
T LXOR (const T &arg1, const T &arg2)
template<class T >
T MAX (const T &arg1, const T &arg2)
template<class T >
T MIN (const T &arg1, const T &arg2)
template<class T >
T ADD (const T &arg1, const T &arg2)
template<class T >
T MULT (const T &arg1, const T &arg2)
static size_t choose_owner_idx (const std::vector< unsigned > &proc_list)
bool is_sorted_unique (std::vector< unsigned > &v)
static bool operator< (const ProcList &a, const ProcList &b)
 STATIC_ASSERT (sizeof(unsigned long) >=sizeof(EntityHandle))
const char * mpi_err_str (int errorcode)
template<typename T >
void VALGRIND_MAKE_VEC_UNDEFINED (std::vector< T > &)
static int my_Gatherv (void *sendbuf, int sendcount, MPI_Datatype sendtype, std::vector< unsigned char > &recvbuf, std::vector< int > &recvcounts, int root, MPI_Comm comm)
static void print_type_sets (Interface *iFace, DebugOutput *str, Range &sets)
static void set_bit (int position, unsigned char *bytes)
static bool get_bit (int position, const unsigned char *bytes)
 STATIC_ASSERT ((sizeof(DatasetVals)==3 *sizeof(long)))
template<typename TYPE >
static void convert_to_ranged_ids (const TYPE *buffer, size_t len, std::vector< WriteHDF5::wid_t > &result)
static void merge_ranged_ids (const unsigned long *range_list, size_t len, std::vector< WriteHDF5::wid_t > &result)
static void merge_vector_ids (const unsigned long *list, size_t len, std::vector< WriteHDF5::wid_t > &result)
static ErrorCode check_int_tag (Interface *mb, Tag tag)
bool IntPairComparator (const std::pair< int, int > &a, const std::pair< int, int > &b)
bool operator< (Node const &lhs, Node const &rhs)
static ErrorCode check_tag_type (Interface *moab, Tag tag, DataType exp_type, int exp_size)
std::ostream & operator<< (std::ostream &s, const TypeSequenceManager &seq_man)
std::ostream & operator<< (std::ostream &s, const SequenceManager &seq_man)
void print_sequences (const SequenceManager &seqman)
void print_sequences (const TypeSequenceManager &seqman)
bool within_tolerance (CartVect &p1, CartVect &p2, const double &tolerance)
int numAdjTriInSet (Interface *mb, EntityHandle startEdge, EntityHandle set)
template<class Container >
static void get_tagged (const SparseTag::MapType &mData, EntityType type, Container &output_range)
template<class Container >
static void get_tagged (const SparseTag::MapType &mData, Range::const_iterator begin, Range::const_iterator end, Container &output_range)
template<class Container >
static void get_tagged (const SparseTag::MapType &mData, Container &entities, EntityType type, const Range *intersect)
template<class Functor , class IteratorType >
static void find_tag_values (Functor compare, IteratorType begin, IteratorType end, Range &results)
template<class Functor , class IteratorType >
static void find_tag_values (Functor compare, IteratorType begin, IteratorType end, std::vector< EntityHandle > &results)
template<class Functor , class TagMap >
static void find_map_values (Functor compare, Range::const_iterator lower, Range::const_iterator upper, const TagMap &tag_map, Range &results)
template<class IteratorType , class ContainerType >
static void find_tag_values_equal (const TagInfo &tag_info, const void *value, int size, IteratorType begin, IteratorType end, ContainerType &results)
template<class IteratorType , class ContainerType >
static void find_tag_varlen_values_equal (const TagInfo &tag_info, const void *value, int size, IteratorType begin, IteratorType end, ContainerType &results)
template<class TagMap >
static void find_map_values_equal (const TagInfo &tag_info, const void *value, int size, Range::const_iterator begin, Range::const_iterator end, const TagMap &tag_map, Range &results)
template<class TagMap >
static void find_map_varlen_values_equal (const TagInfo &tag_info, const void *value, int size, Range::const_iterator begin, Range::const_iterator end, const TagMap &tag_map, Range &results)
static std::pair< EntityType,
EntityType > 
type_range (EntityType type)
static bool check_range (const range_data &d, bool prefer_end, EntityHandle &result)
static ErrorCode not_found (std::string, EntityHandle)
template<class Container >
static ErrorCode get_tagged (const SequenceManager *seqman, int mySequenceArray, EntityType type, Container &entities)
template<class Container >
static ErrorCode get_tagged (const SequenceManager *seqman, int mySequenceArray, Range::const_iterator begin, Range::const_iterator end, Container &entities)
template<class Container >
static ErrorCode get_tagged (const SequenceManager *seqman, int mySequenceArray, Container &entities, EntityType type, const Range *intersect)
template<class Container >
static void get_tagged (const VarLenSparseTag::MapType &mData, EntityType type, Container &output_range)
template<class Container >
static void get_tagged (const VarLenSparseTag::MapType &mData, Range::const_iterator begin, Range::const_iterator end, Container &output_range)
template<class Container >
static void get_tagged (const VarLenSparseTag::MapType &mData, Container &entities, EntityType type, const Range *intersect)
double physField (double x, double y, double z, double factor)
void putElementField (Interface *mbi, const char *tagname, double factor)
void putSpectralElementField (Interface *mbi, int dim, int np, const char *tagname, double factor)
void putVertexField (Interface *mbi, const char *tagname, double factor)
int pack_tuples (TupleList *tl, void **ptr)
void unpack_tuples (void *ptr, TupleList **tlp)
std::ostream & operator<< (std::ostream &os, const ProcessSet &pset)
template<int _n>
std::ostream & operator<< (std::ostream &os, const SplitVertexIndex< _n > &idx)

Variables

const char *const AFFINE_XFORM_TAG_NAME = "AFFINE_TRANSFORM"
const char *const AXIS_BOX_TAG_NAME = "AXIS_BOX"
static const int box_face_corners [6][4]
bool debug = false
bool debug_ap = false
static ErrorOutputerrorOutput = NULL
static std::string lastError = "No error"
double tolerance = 0.01
double tolerance_segment = 0.01
const bool Debug_surf_eval = false
bool debug_splits = false
const char DEFAULT_SEPARATOR = ';'
const char GEOM_SENSE_2_TAG_NAME [] = "GEOM_SENSE_2"
const char GEOM_SENSE_N_ENTS_TAG_NAME [] = "GEOM_SENSE_N_ENTS"
const char GEOM_SENSE_N_SENSES_TAG_NAME [] = "GEOM_SENSE_N_SENSES"
const char OBB_ROOT_TAG_NAME [] = "OBB_ROOT"
const char OBB_GSET_TAG_NAME [] = "OBB_GSET"
const char IMPLICIT_COMPLEMENT_NAME [] = "impl_complement"
int dum [] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }
const int hex_27_node_order []
const int tet_10_node_order [] = { 0, 1, 2, 3, 4, 5, 6, 7, 9, 8 }
const int pri_15_node_order []
const int pyr_13_node_order []
const int MAX_NODES = 28
const int mb_to_gmsh_type [][MAX_NODES]
const int EDGES_PER_CELL = 6
const int DEFAULT_MAX_EDGES_PER_CELL = 10
static int const kNValues = 10
static char const kDefaultState [] = "default"
static char const kUnitsName [] = "Units"
static int const kVertOffset = 2
static int const kCellInc = 4
const bool DEFAULT_BLOCKED_COORDINATE_IO = false
const bool DEFAULT_BCAST_SUMMARY = true
const bool DEFAULT_BCAST_DUPLICATE_READS = true
const size_t DEFAULT_HYPERSLAB_SELECTION_LIMIT = 200
const char * object_start_token = "o"
const char * group_start_token = "g"
const char * vertex_start_token = "v"
const char * face_start_token = "f"
const char *const geom_name [] = { "Vertex\0", "Curve\0", "Surface\0", "Volume\0" }
const char geom_category [][CATEGORY_TAG_SIZE] = { "Vertex\0", "Curve\0", "Surface\0", "Volume\0", "Group\0" }
const char *const vtk_type_names []
static int major = -1
static int minor = -1
const int *const *const *const cub_elem_order_map = exodus_elem_order_map
const char *const BLOCK_NODESET_OFFSET_TAG_NAME = "BLOCK_NODESET_OFFSET"
const char *const BLOCK_SIDESET_OFFSET_TAG_NAME = "BLOCK_SIDESET_OFFSET"
const unsigned pixel [] = { 0, 1, 3, 2 }
const unsigned voxel [] = { 0, 1, 3, 2, 4, 5, 7, 6 }
const unsigned wedge []
const unsigned qhex []
const int mb_to_vtk_type [][3]
static char const kStateName [] = "default"
const int DEFAULT_PRECISION = 10
const int TIME_STR_LEN = 11
const bool DEFAULT_STRICT = true
const unsigned char E = CN::MID_EDGE_BIT
const unsigned char F = CN::MID_FACE_BIT
const unsigned char R = CN::MID_REGION_BIT
const int MAXSIZE = 200
static const MBuuid IDD_MBCore = MBuuid( 0x8956e0a, 0xc300, 0x4005, 0xbd, 0xf6, 0xc3, 0x4e, 0xf7, 0x1f, 0x5a, 0x52 )
static const MBuuid IDD_MBUnknown
const char DEFAULT_TAG_NAME [] = "OBB"
const int MAX_BCAST_SIZE = ( 1 << 28 )
std::vector
< ParallelComm::Buffer * > 
msgs
unsigned int __PACK_num = 0
unsigned int __UNPACK_num = 0
unsigned int __PACK_count = 0
unsigned int __UNPACK_count = 0
std::string __PACK_string
std::string __UNPACK_string
const char * PARTITIONING_PCOMM_TAG_NAME = "__PRTN_PCOMM"
const unsigned SSVB = 3
const int UNUSED_SIZE = 0
bool debug_surf_eval1 = false
static int possibleQuality [MBMAXTYPE][MB_QUALITY_COUNT]
static int numQualities [MBMAXTYPE]
static char const * nameQuality [MB_QUALITY_COUNT]
static const char * nameType [MBMAXTYPE]

Detailed Description

Class representing axis-aligned bounding box.

Stores contiguous or partially contiguous values in an optimized fashion. Partially contiguous accessing patterns is also optimized.

Shape function space for spectral hexahedron.

Shape function space for trilinear tetrahedron, obtained by a pushforward of the canonical linear (affine) functions.

Shape function space for trilinear quadahedron, obtained by a pushforward of the canonical linear (affine) functions.

Shape function space for trilinear hexahedron, obtained by a pushforward of the canonical linear (affine) functions.

MOAB, a Mesh-Oriented datABase, is a software component for creating, storing and accessing finite element mesh data.

Copyright 2004 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

MOAB, a Mesh-Oriented datABase, is a software component for creating, storing and accessing finite element mesh data.

Copyright 2004 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

Author:
Jason Kraftcheck ([email protected])
Date:
August, 2006

MOAB, a Mesh-Oriented datABase, is a software component for creating, storing and accessing finite element mesh data.

Copyright 2004 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. Implementation of ABAQUS mesh hierarchy and meta-data on MOAB

This reader processes data written by the ABAQUS computer-aided engineering front-end. While that tool writes binary files in its own proprietary format, it also writes an ASCII input file that is the fundamental input to the ABAQUS solver itself. A published syntax for this format is available from Simulia.

This reader only supports a subset of the mesh syntax necessary to support a basic thermal analysis of solid systems.

An ABAQUS mesh makes use of the common paradigms of building a geometry as an "assembly" of "instances" of "parts".

A "part" is defined as a set of "nodes" and "elements" connecting those nodes. The nodes and elements can be arranged in "node sets" and "element sets" and specific "materials" can be assigned to "element sets" other features of parts are not currently used by applications and are not implemented.

Overview of supported structure

File: Heading Part Nodes Elements Node Sets Element Sets Solid Sections Assembly Instance Nodes Elements Node Sets Element Sets Solid Sections Node Sets

An "instance" is a full copy of a "part" with a linear geometric transformation. To create a full copy: • a duplicate set of nodes is created by copying the coordinates of the part nodes and applying a linear geometric transformation - the new coords are used to define the new nodes • a new node set is created for each node set in the part and the set of nodes among the duplicates are assigned to the new node set • a duplicate set of elements is defined by creating a new element with a connectivity made up of the duplicate nodes that correspond to the appropriate original element • a new element set is created for each element set in the part and the set of elements among the duplicates are assigned to the new element set; the corresponding material is also assigned go the new element sets

It is also possible for an "instance" to contain the complete definition of the mesh, copying nothing from the "part" (the "part" may have no mesh defined). It is unclear whether an "instance" can combine mesh from the "part" definition with mesh contained only in the "instance" definition. (Not appropriately documented in ABAUQUS Reference Manual.)

In order to provide convenient access to the data and mesh structures the following data model is used:

• EntitySet file_set • tags • NONE • members • all nodes of all parts and all instances • all elements of all parts and all instances • all assembly_sets • all part_sets • EntitySet part_set • tags • mSetNameTag (opaque=char*) name of entity set • members • part nodes • part elements • part node sets • part element sets • EntitySet assembly_set • tags • mSetNameTag (opaque=char*) name of entity set • members • instance_sets • instance element_sets • instance node_sets • instance nodes • instance elements • EntitySet instance_set • tags • mSetNameTag (opaque=char*) name of entity set • mPartHandleTag (handle) pointer to part from which this instance was generated • mAssemblyHandleTag (handle) pointer to assembly in which this instance exists • mInstancePIDTag (int) ordinal number indicating which instance of this part • mInstanceGIDTag (int) ordinal number indicating which instance in this assembly • members • instance nodes • instance elements • instance node_sets • instance element_sets • EntitySet node_set • tags • mSetNameTag (opaque=char*) name of entity set • mPartHandleTag (handle) pointer to part in which this node set exists (only defined for node sets that are in an instance and derive from a part) • mInstanceHandleTag (handle) pointer back to instance set in which this node set exists (NULL if this node_set is not in an instance) • mAssemblyHandleTag (handle) pointer to assembly in which this node set exists (NULL if this node_set is not in an assembly) • members • nodes • EntitySet element_set • tags • mSetNameTag (opaque=char*) name of entity set • mPartHandleTag (handle) pointer to part in which this element set exists (only defined for node sets that are in an instance and derive from a part) • mInstanceHandleTag (handle) pointer back to instance set in which this element set exists (NULL if this node_set is not in an instance) • mAssemblyHandleTag (handle) pointer to assembly in which this element set exists (NULL if this node_set is not in an assembly) • mMatNameTag (opaque=char*) name of material in these elements • mMaterialSetTag (integer) material id in these elements • members • elements • Entity node • tags • mLocalIDTag (int) numerical ID of node in local scope (part, instance) • mInstanceHandleTag (handle) pointer back to instance set in which this node exists (NULL if this node is not in an instance) • Entity element • tags • mLocalIDTag (int) numerical ID of element in local scope (part, instance) • mInstanceHandleTag (handle) pointer back to instance set in which this element exists (NULL if this element is not in an instance)

MOAB Damsel file reader For description of the Damsel-MOAB data model mapping, see WriteDamsel.cpp.

MOAB, a Mesh-Oriented datABase, is a software component for creating, storing and accessing finite element mesh data.

Copyright 2004 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. Data structure of MCNP5 data created by this reader:

each file_meshset contains DATA_AND_TIME_TAG TITLE_TAG NPS_TAG each tally_meshset contains TALLY_NUMBER_TAG TALLY_COMMENT_TAG TALLY_PARTICLE_TAG TALLY_COORD_SYS_TAG each mesh element contains TALLY_TAG ERROR_TAG

MOAB, a Mesh-Oriented datABase, is a software component for creating, storing and accessing finite element mesh data.

Copyright 2004 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Coroporation, the U.S. Government retains certain rights in this software.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The RTT file format is used by the Attila deterministic radiation transport code. The specific mesh format can be found in Chapter 9 of the Attila manual. The format is defined by xml like, block/end block type syntax. The implementation at the time of writing supports a subset of the whole format, and even Attila does not support the entireity of its own mesh format.

The mesh contains several features, that as a whole allow the conversion from the RTT format, to a DAGMC geometry and a Tet Mesh for tallying.

Sides - Defines the 6 boundary condtions for top, bottom, front, back left and right, as well as internal and external. --------------------------------------------------------------------- Faces - Logically equivalent to surfaces in DAGMC, containers for triangles, includes the definition of the sense of the faces with respect to the Cells (volumes) which bound it.

The face syntax looks like

1 (+)Pyrex@14

This means Face (surface) 1 is used to define the insde of the Pyrex cell only

75 (+)Pyrex/(-)Fuel30@25

This means Face (surface) 75 is used by both Cell Pyrex and Cell Fuel 30, the + and - signs refer to the sense, i.e. the inside sense defines the Pyrex and the outside sense defines the Fuel. --------------------------------------------------------------------- Cells - Entityset like coillections of tetrahedra which define contiguous material properties

cell_flags 1 REGIONS 1 Pyrex end_cell_flags

Defines that there is 1 region called Pyrex --------------------------------------------------------------------- Nodes - Defines the vertices for facets and tets, the syntax of which is shown below

100 1.8900000000E+03 0.0000000000E+00 5.0000000000E+03 100

Defines that this is node 100, and has the coordinates 1890.0, 0.0 5000.0 cm --------------------------------------------------------------------- Side (element) - Triangles

1 3 874 132 154 3 6365

Defines that this is side element 1, it has 3 nodes, 874, 132 and 154, side ID 3 and surface number 6365 --------------------------------------------------------------------- Cells (element) - Tetrahedra

691 4 599 556 1218 1216 2

Defines that this is tet 691, it has 4 connections to nodes 599, 556, 1218, 1216 and belongs to cell number 2.

point_locater.hpp Ryan H. Lewis Copyright 2012

element_tree.hpp Ryan H. Lewis (C) 2012

An element tree partitions a mesh composed of elements. We subdivide the bounding box of a mesh, and each element is either entirely on the left, entirely on the right, or crossing the diving line. We build a tree on the mesh with this property.

MOAB, a Mesh-Oriented datABase, is a software component for creating, storing and accessing finite element mesh data.

Copyright 2004 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

Author:
Clinton Stimpson
Date:
15 April 2002

Range FAQ and tips ********************

The purpose of this FAQ is to familiarize a user with the appropriate use of the Range template.

A few points about Range: ******* 1. Range is not the be all of generic containers. 2. Range has its strengths and weaknesses as any other STL container has. 3. Strengths: a. For contiguous values, storage is extremely minimal. b. Searching through contiguous values, at best, is a constant time operation. b. Fairly compatible with most STL algorithms. c. Insertions of data from high value to low value is a linear operation (constant for each insertion). d. Removal of a value using an iterator is constant time.

4. Weaknesses: a. For non-contiguous values, storage is not minimal and is on the order of 4x the storage space as using a vector. b. Searching through non-contiguous values is linear time operation. c. Insertions of random data is VERY slow.

Given the above characteristics of Ranges, you can now decide between Range and another STL container for your particular needs.

Tips ******* 1. Be aware of what iterators are available. Currently, there are three. Range<T>::iterator, Range<T>::const_iterator, and Range<T>::RangeListIterator. iterator is derived from const_iterator. const_iterator is derived from RangeListIterator. RangeListIterator is a std::list<std::pair<T,T> >::const_iterator. If a particular algorithm could be more efficient by using RangeListIterator, do so.

ie.

Range<char> range1; ... put some stuff in range1 Range<char> range2;

the SLOW way. std::copy(range1.begin(), range1.end(), range_inserter<...>(range2));

the FAST way. for(Range<char>::RangeListIterator iter = range1.begin(), iter != range1.end(); ++iter) { range2.insert(iter->first, iter->second); }

2. Prefer insert(val1, val2) over insert(val) where possible.

3. insert(val) and insert(val1, val2) have to perform searching to find out where to insert an item. Searches are started from the beginning of the values. Inserting larger values before smaller values will increase efficiency.

ie. std::set<int> my_set; Range<int> my_range; .. perform some operations which set does efficiently.

now copy the results from the set into the range. copy from the end of the set to the beginning of the set std::copy(my_set.rbegin(), my_set.rend(), range_inserter< Range<int> > ( my_range );

4. Use empty() instead of size() if you only need to find out if there is anything in the list.

5. Know what swap() does. Sometimes it is useful. It'll replace the contents of one list with another.

void compute_and_get_some_set( Range<char> range1, Range<char> range2, Range<char>& results ); { Range<char> tmp_results; .. perform some computation on range1 and range2 and put results in tmp_results; .. filter tmp_results out for some special type. .. etc.... return results results.swap(tmp_results); }

FAQ ******* 1. Why won't this code compile? ------------------------ class SomeClass { public: Range<int> range; }; .... void some_function( const SomeClass& some_class ) { Range<int>::iterator = some_class.range.begin(); } --------------------- Solution: you need to use Range<int>::const_iterator instead.

2. Why doesn't this work right when I try to change the contents of an Range?

make a range that has the letters A,B,C in it. Range<char> my_chars('A', 'C'); make an iterator that points to 'A'. Range<char>::iterator iter = my_chars.begin(); change A to D iter = 'D'; print contents of my_chars to stdout std::copy(my_chars.begin(), my_chars.end(), std::ostream_iterator(std::cout, " "));

result is A B C instead of B C D

When one calls *iter, which returns 'A', the actual storage of the value 'A' which is returned is in the iterator and not in the Range. This allows for multiple iterators on a single Range and the Range does not have to keep track of which iterator is referencing which value.

MOAB, a Mesh-Oriented datABase, is a software component for creating, storing and accessing finite element mesh data.

Copyright 2008 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.


Typedef Documentation

typedef std::vector< EntityHandle > moab::AdjacencyVector

Definition at line 29 of file AEntityFactory.hpp.

typedef std::pair< EntityType, EntityType > moab::DimensionPair

Definition at line 54 of file CN.hpp.

typedef unsigned long moab::EntityHandle

Definition at line 43 of file EntityHandle.hpp.

typedef long moab::EntityID

Definition at line 48 of file EntityHandle.hpp.

typedef ErrorCode( * moab::EvalFcn)(const double *params, const double *field, const int ndim, const int num_tuples, double *work, double *result)

Definition at line 14 of file ElemEvaluator.hpp.

Definition at line 39 of file ParallelComm.hpp.

typedef std::vector< EntityHandle > moab::HandleVec

Definition at line 28 of file Forward.hpp.

typedef herr_t( * moab::HDF5_Error_Func_Type)(void *)

Definition at line 14 of file HDF5Common.hpp.

HalfFacetRep class implements the Array-Based Half-Facet(AHF) Mesh data structure on top of MOAB. \ It is based on a generalized notion of a half-facet derived from that a half-edge/half-face data structure for 2D/3D. \ The core construct of AHF are its two maps: sibling-half-facets(SIBHFS) and vertex-to-half-facet(V2HF) \ 1. SIBHFS: Maps every half-facet in the mesh to its sibling half-facets, \ 2. V2HF: Maps each vertex to an incident half-facet \ Using these two maps, a range of adjacency queries is performed. The maps are stored in dense tags over entities and vertices. \ \ Adjacency functions: \ 1. upward-incidence queries: vertex -> edge, edge -> faces, edge -> cells, face ->cells \ 2. neighborhood (same-dimensional) adjacency queries: edge -> edges, face -> faces, cell -> cells, etc. \ 3. downward adjacency queries: face -> edges, cell -> edges, etc. \ \ Mesh types supported: \ 1D(edges), 2D(triangles, quads), 3D(tet, pyramid, prism, hex), Mixed dimensional meshes \ \ CURRENTLY NOT SUPPORTED: \ 1. Meshes with mixed entity types of same dimension. Ex. a volume mesh with both tets and prisms. \ 2. create_if_missing = true \ 3. Modified meshes \.

Definition at line 49 of file HalfFacetRep.hpp.

typedef ErrorCode( * moab::InitFcn)(const double *verts, const int nverts, double *&work)

Definition at line 36 of file ElemEvaluator.hpp.

typedef int( * moab::InsideFcn)(const double *verts, const int ndims, const double tol)

Definition at line 38 of file ElemEvaluator.hpp.

typedef ErrorCode( * moab::IntegrateFcn)(const double *field, const double *verts, const int nverts, const int ndim, const int num_tuples, double *work, double *result)

Definition at line 28 of file ElemEvaluator.hpp.

typedef ErrorCode( * moab::JacobianFcn)(const double *params, const double *verts, const int nverts, const int ndim, double *work, double *result)

Definition at line 21 of file ElemEvaluator.hpp.

Definition at line 429 of file MeshSet.cpp.

typedef ErrorCode( * moab::NormalFcn)(const int ientDim, const int facet, const int nverts, const double *verts, double normal[3])

Definition at line 54 of file ElemEvaluator.hpp.

typedef ErrorCode( * moab::ReverseEvalFcn)(EvalFcn eval, JacobianFcn jacob, InsideFcn ins, const double *posn, const double *verts, const int nverts, const int ndim, const double iter_tol, const double inside_tol, double *work, double *params, int *is_inside)

Definition at line 40 of file ElemEvaluator.hpp.

Definition at line 258 of file TagCompare.hpp.

typedef TagTypeLess< double > moab::TagDoublesLess

Definition at line 260 of file TagCompare.hpp.

Definition at line 251 of file TagCompare.hpp.

Definition at line 253 of file TagCompare.hpp.

Definition at line 244 of file TagCompare.hpp.

Definition at line 246 of file TagCompare.hpp.

Definition at line 262 of file TagCompare.hpp.

Definition at line 263 of file TagCompare.hpp.

Definition at line 255 of file TagCompare.hpp.

Definition at line 256 of file TagCompare.hpp.

Definition at line 248 of file TagCompare.hpp.

Definition at line 249 of file TagCompare.hpp.

Definition at line 259 of file TagCompare.hpp.

Definition at line 261 of file TagCompare.hpp.

Definition at line 252 of file TagCompare.hpp.

Definition at line 254 of file TagCompare.hpp.

Definition at line 245 of file TagCompare.hpp.

Definition at line 247 of file TagCompare.hpp.


Enumeration Type Documentation

anonymous enum
Enumerator:
MAX_VERTICES 
MAX_EDGES 
MAX_FACES 
MAX_VERTS_HF 
MAX_INCIDENT_HF 

Definition at line 65 of file HalfFacetRep.hpp.

anonymous enum
Enumerator:
MAX_SUB_ENTITIES 

the maximum number n-1 dimension adjacencies a element may have

MAX_SUB_ENTITY_VERTICES 

the maximum number of nodes an n-1 dimensional element may have

Definition at line 46 of file CN.hpp.

{
    //! the maximum number n-1 dimension adjacencies a element may have
    MAX_SUB_ENTITIES = 12,
    //! the maximum number of nodes an n-1 dimensional element may have
    MAX_SUB_ENTITY_VERTICES = 9
};
Enumerator:
abq_assembly_undefined 
abq_assembly_ambiguous 
abq_assembly_name 

Definition at line 286 of file ReadABAQUS.hpp.

Enumerator:
abq_element_undefined 
abq_element_ambiguous 
abq_element_elset 
abq_element_type 

Definition at line 301 of file ReadABAQUS.hpp.

Enumerator:
abq_eletype_unsupported 
abq_eletype_dc3d8 
abq_eletype_c3d8r 
abq_eletype_dcc3d8 
abq_eletype_c3d4 
abq_eletype_dc3d4 
abq_eletype_ds4 

Definition at line 309 of file ReadABAQUS.hpp.

Enumerator:
abq_elset_undefined 
abq_elset_ambiguous 
abq_elset_elset 
abq_elset_generate 
abq_elset_instance 

Definition at line 330 of file ReadABAQUS.hpp.

Enumerator:
abq_instance_undefined 
abq_instance_ambiguous 
abq_instance_name 
abq_instance_part 

Definition at line 278 of file ReadABAQUS.hpp.

Enumerator:
abq_undefined 
abq_unsupported 
abq_ambiguous 
abq_heading 
abq_part 
abq_end_part 
abq_assembly 
abq_end_assembly 
abq_node 
abq_element 
abq_nset 
abq_elset 
abq_instance 
abq_end_instance 
abq_solid_section 

Definition at line 252 of file ReadABAQUS.hpp.

Enumerator:
abq_undefined_line 
abq_blank_line 
abq_comment_line 
abq_keyword_line 
abq_data_line 
abq_eof 

Definition at line 242 of file ReadABAQUS.hpp.

Enumerator:
abq_node_undefined 
abq_node_ambiguous 
abq_node_nset 
abq_node_system 

Definition at line 293 of file ReadABAQUS.hpp.

Enumerator:
abq_nset_undefined 
abq_nset_ambiguous 
abq_nset_nset 
abq_nset_elset 
abq_nset_generate 
abq_nset_instance 

Definition at line 320 of file ReadABAQUS.hpp.

Enumerator:
abq_part_undefined 
abq_part_ambiguous 
abq_part_name 

Definition at line 271 of file ReadABAQUS.hpp.

Enumerator:
abq_solid_section_undefined 
abq_solid_section_ambiguous 
abq_solid_section_elset 
abq_solid_section_matname 

Definition at line 339 of file ReadABAQUS.hpp.

ErrorType - passed to the error handling routines indicating whether this is a new error (globally fatal or per-processor relevant) to be created, or an existing one to be handled

Enumerator:
MB_ERROR_TYPE_NEW_GLOBAL 
MB_ERROR_TYPE_NEW_LOCAL 
MB_ERROR_TYPE_EXISTING 

Definition at line 18 of file ErrorHandler.hpp.

Enumerator:
EXOII_SPHERE 
EXOII_SPRING 
EXOII_BAR 
EXOII_BAR2 
EXOII_BAR3 
EXOII_BEAM 
EXOII_BEAM2 
EXOII_BEAM3 
EXOII_TRUSS 
EXOII_TRUSS2 
EXOII_TRUSS3 
EXOII_TRI 
EXOII_TRI3 
EXO_SHELL3 
EXOII_TRI6 
EXOII_TRI7 
EXOII_QUAD 
EXOII_QUAD4 
EXOII_QUAD5 
EXOII_QUAD8 
EXOII_QUAD9 
EXOII_SHELL 
EXOII_SHELL4 
EXOII_SHELL5 
EXOII_SHELL8 
EXOII_SHELL9 
EXOII_TETRA 
EXOII_TETRA4 
EXOII_TET4 
EXOII_TETRA8 
EXOII_TETRA10 
EXOII_TETRA14 
EXOII_PYRAMID 
EXOII_PYRAMID5 
EXOII_PYRAMID10 
EXOII_PYRAMID13 
EXOII_PYRAMID18 
EXOII_WEDGE 
EXOII_KNIFE 
EXOII_HEX 
EXOII_HEX8 
EXOII_HEX9 
EXOII_HEX20 
EXOII_HEX27 
EXOII_HEXSHELL 
EXOII_POLYGON 
EXOII_POLYHEDRON 
EXOII_MAX_ELEM_TYPE 

Definition at line 25 of file ExoIIInterface.hpp.

Enumerator:
HISURFACE 
HI3DCURVE 
HI2DCURVE 

Definition at line 28 of file HiReconstruction.hpp.

Enumerator:
obj_undefined 
object_start 
group_start 
face_start 
vertex_start 
valid_unsupported 

Definition at line 106 of file ReadOBJ.hpp.

Enumerator:
MB_MESG_ANY 
MB_MESG_ENTS_ACK 
MB_MESG_ENTS_SIZE 
MB_MESG_ENTS_LARGE 
MB_MESG_REMOTEH_ACK 
MB_MESG_REMOTEH_SIZE 
MB_MESG_REMOTEH_LARGE 
MB_MESG_TAGS_ACK 
MB_MESG_TAGS_SIZE 
MB_MESG_TAGS_LARGE 

Definition at line 226 of file ParallelComm.cpp.

ENUM for the type of input mesh.

Enumerator:
CURVE 
SURFACE 
SURFACE_MIXED 
VOLUME 
VOLUME_MIXED_1 
VOLUME_MIXED_2 
VOLUME_MIXED 

Definition at line 54 of file HalfFacetRep.hpp.

{
    CURVE = 0,       // Homogeneous curve mesh
    SURFACE,         // Homogeneous surface mesh
    SURFACE_MIXED,   // Mixed surface with embedded curves
    VOLUME,          // Homogeneous volume mesh
    VOLUME_MIXED_1,  // Volume mesh with embedded curves
    VOLUME_MIXED_2,  // Volume mesh with embedded surface
    VOLUME_MIXED     // Volume mesh with embedded curves and surfaces
};
Enumerator:
MB_UNDEFINED_QUALITY 
MB_EDGE_RATIO 
MB_MAX_EDGE_RATIO 
MB_SKEW 
MB_TAPER 
MB_VOLUME 
MB_STRETCH 
MB_DIAGONAL 
MB_DIMENSION 
MB_ODDY 
MB_MED_ASPECT_FROBENIUS 
MB_MAX_ASPECT_FROBENIUS 
MB_CONDITION 
MB_JACOBIAN 
MB_SCALED_JACOBIAN 
MB_SHEAR 
MB_SHAPE 
MB_RELATIVE_SIZE_SQUARED 
MB_SHAPE_AND_SIZE 
MB_SHEAR_AND_SIZE 
MB_DISTORTION 
MB_LENGTH 
MB_RADIUS_RATIO 
MB_ASPECT_BETA 
MB_ASPECT_RATIO 
MB_ASPECT_GAMMA 
MB_MINIMUM_ANGLE 
MB_COLLAPSE_RATIO 
MB_WARPAGE 
MB_AREA 
MB_MAXIMUM_ANGLE 
MB_QUALITY_COUNT 

Definition at line 18 of file VerdictWrapper.hpp.

{
    // order exactly from HexMetricVals
    MB_UNDEFINED_QUALITY = -1,
    MB_EDGE_RATIO        = 0,  // 0  MBHEX, MBTET,                    MBQUAD,  MBTRI
    MB_MAX_EDGE_RATIO,         // 1  MBHEX,                           MBQUAD
    MB_SKEW,                   // 2  MBHEX,                           MBQUAD
    MB_TAPER,                  // 3  MBHEX,                           MBQUAD
    MB_VOLUME,                 // 4  MBHEX, MBTET, MBPRISM, MBKNIFE
    MB_STRETCH,                // 5  MBHEX,                           MBQUAD
    MB_DIAGONAL,               // 6  MBHEX,
    MB_DIMENSION,              // 7  MBHEX,
    MB_ODDY,                   // 8  MBHEX,                           MBQUAD
    MB_MED_ASPECT_FROBENIUS,   // 9  MBHEX,                           MBQUAD
    MB_MAX_ASPECT_FROBENIUS,   // 10 MBHEX, MBTET (aspect_frobenius)  MBQUAD,  MBTRI
                               // (aspect_frobenius)
    MB_CONDITION,              // 11 MBHEX, MBTET,                    MBQUAD,  MBTRI
    MB_JACOBIAN,               // 12 MBHEX, MBTET,                    MBQUAD
    MB_SCALED_JACOBIAN,        // 13 MBHEX, MBTET,                    MBQUAD,  MBTRI
    MB_SHEAR,                  // 14 MBHEX,                           MBQUAD,  MBTRI
    MB_SHAPE,                  // 15 MBHEX, MBTET,                    MBQUAD,  MBTRI
    MB_RELATIVE_SIZE_SQUARED,  // 16 MBHEX, MBTET,                    MBQUAD,  MBTRI
    MB_SHAPE_AND_SIZE,         // 17 MBHEX, MBTET,                    MBQUAD
    MB_SHEAR_AND_SIZE,         // 18 MBHEX,                           MBQUAD
    MB_DISTORTION,             // 19 MBHEX, MBTET,                    MBQUAD
                               // length for edge:
    MB_LENGTH,                 // 20 only for MBEDGE
                               // specific to tets
    MB_RADIUS_RATIO,           // 21        MBTET,                    MBQUAD,  MBTRI
    MB_ASPECT_BETA,            // 22        MBTET
    MB_ASPECT_RATIO,           // 23        MBTET,                    MBQUAD,  MBTRI
    MB_ASPECT_GAMMA,           // 24        MBTET
    MB_MINIMUM_ANGLE,          // 25        MBTET,                    MBQUAD,  MBTRI
    MB_COLLAPSE_RATIO,         // 26        MBTET
                               // specific to quads
    MB_WARPAGE,                // 27                                  MBQUAD
    MB_AREA,                   // 28                                  MBQUAD,  MBTRI
    MB_MAXIMUM_ANGLE,          // 29                                  MBQUAD,  MBTRI
    MB_QUALITY_COUNT           // used to size the arrays

};

Function Documentation

template<class T >
T moab::ADD ( const T arg1,
const T arg2 
)

Definition at line 3832 of file ParallelComm.cpp.

{
    return arg1 + arg2;
}
static bool moab::all_root_set ( std::string  name,
const EntityHandle *  array,
size_t  len 
) [inline, static]

Definition at line 27 of file MeshTag.cpp.

References not_root_set().

Referenced by moab::MeshTag::clear_data(), moab::MeshTag::get_data(), moab::MeshTag::remove_data(), and moab::MeshTag::set_data().

{
    for( size_t i = 0; i < len; ++i )
    {
        if( array[i] )
        {
            not_root_set( name, array[i] );
            return false;
        }
    }

    return true;
}
static std::pair< int, int > moab::allocate_mpe_state ( const char *  ,
const char *   
) [static]

Definition at line 50 of file ReadHDF5Dataset.cpp.

Referenced by moab::ReadHDF5Dataset::ReadHDF5Dataset().

{
    return std::pair< int, int >();
}
double moab::angle ( const CartVect &  u,
const CartVect &  v 
) [inline]
bool moab::angleCompare ( angleAndIndex  lhs,
angleAndIndex  rhs 
)

Definition at line 92 of file IntxUtils.cpp.

References moab::angleAndIndex::angle.

Referenced by moab::IntxUtils::SortAndRemoveDoubles2().

{
    return lhs.angle < rhs.angle;
}
ErrorCode moab::area_coordinates ( Interface *  mbi,
EntityHandle  tri,
CartVect &  pnt,
double *  area_coord,
EntityHandle &  boundary_handle 
)

Definition at line 98 of file FBEngine.cpp.

References debug_splits, ErrorCode, moab::Interface::get_adjacencies(), moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::Interface::INTERSECT, length(), moab::CartVect::length(), MB_SUCCESS, MBERRORR, P, and tolerance_segment.

Referenced by moab::FBEngine::split_surface_with_direction().

{

    int nnodes;
    const EntityHandle* conn3;
    ErrorCode rval = mbi->get_connectivity( tri, conn3, nnodes );
    MBERRORR( rval, "Failed to get connectivity" );
    assert( 3 == nnodes );
    CartVect P[3];
    rval = mbi->get_coords( conn3, nnodes, (double*)&P[0] );
    MBERRORR( rval, "Failed to get coordinates" );

    CartVect r0( P[0] - pnt );
    CartVect r1( P[1] - pnt );
    CartVect r2( P[2] - pnt );
    if( debug_splits )
    {
        std::cout << " nodes:" << conn3[0] << " " << conn3[1] << " " << conn3[2] << "\n";
        std::cout << " distances: " << r0.length() << " " << r1.length() << " " << r2.length() << "\n";
    }
    if( r0.length() < tolerance_segment )
    {
        area_coord[0]   = 1.;
        area_coord[1]   = 0.;
        area_coord[2]   = 0.;
        boundary_handle = conn3[0];
        return MB_SUCCESS;
    }
    if( r1.length() < tolerance_segment )
    {
        area_coord[0]   = 0.;
        area_coord[1]   = 1.;
        area_coord[2]   = 0.;
        boundary_handle = conn3[1];
        return MB_SUCCESS;
    }
    if( r2.length() < tolerance_segment )
    {
        area_coord[0]   = 0.;
        area_coord[1]   = 0.;
        area_coord[2]   = 1.;
        boundary_handle = conn3[2];
        return MB_SUCCESS;
    }

    CartVect v1( P[1] - P[0] );
    CartVect v2( P[2] - P[0] );

    double areaDouble = ( v1 * v2 ).length();  // the same for CartVect
    if( areaDouble < tolerance_segment * tolerance_segment )
    {
        MBERRORR( MB_FAILURE, "area of triangle too small" );
    }
    area_coord[0] = ( r1 * r2 ).length() / areaDouble;
    area_coord[1] = ( r2 * r0 ).length() / areaDouble;
    area_coord[2] = ( r0 * r1 ).length() / areaDouble;

    if( fabs( area_coord[0] + area_coord[1] + area_coord[2] - 1 ) > tolerance_segment )
    {
        MBERRORR( MB_FAILURE, "point outside triangle" );
    }
    // the tolerance is used here for area coordinates (0 to 1), and in other
    // parts it is used as an absolute distance; pretty inconsistent.
    bool side0 = ( area_coord[0] < tolerance_segment );
    bool side1 = ( area_coord[1] < tolerance_segment );
    bool side2 = ( area_coord[2] < tolerance_segment );
    if( !side0 && !side1 && !side2 ) return MB_SUCCESS;  // interior point
    // now, find out what boundary is in question
    // first, get all edges, in order
    std::vector< EntityHandle > edges;
    EntityHandle nn2[2];
    for( int i = 0; i < 3; i++ )
    {
        nn2[0] = conn3[( i + 1 ) % 3];
        nn2[1] = conn3[( i + 2 ) % 3];
        std::vector< EntityHandle > adjacent;
        rval = mbi->get_adjacencies( nn2, 2, 1, false, adjacent, Interface::INTERSECT );
        MBERRORR( rval, "Failed to get edges" );
        if( adjacent.size() != 1 ) MBERRORR( MB_FAILURE, "Failed to get adjacent edges" );
        // should be only one edge here
        edges.push_back( adjacent[0] );
    }

    if( side0 ) boundary_handle = edges[0];
    if( side1 ) boundary_handle = edges[1];
    if( side2 ) boundary_handle = edges[2];

    return MB_SUCCESS;
}
static ErrorCode moab::box_from_axes ( OrientedBox &  result,
Interface *  instance,
const Range &  points 
) [static]

Common code for box calculation.

Given the orientation of the box and an approximate center, calculate the exact center and extents of the box.

Parameters:
result.centerAs input, the approximate center of the box. As output, the exact center of the box.
result.axesAs input, directions of principal axes corresponding to the orientation of the box. Axes are assumed to be unit-length on input. Output will include extents of box.
pointsThe set of points the box should contain.

Definition at line 166 of file OrientedBox.cpp.

References moab::CartVect::array(), moab::OrientedBox::axes, moab::Range::begin(), moab::OrientedBox::center, moab::Matrix3::col(), moab::Matrix3::colscale(), moab::Range::end(), ErrorCode, moab::Interface::get_coords(), moab::OrientedBox::length, moab::CartVect::length(), MB_CHK_ERR, MB_SUCCESS, point_perp(), moab::OrientedBox::radius, swap(), moab::Matrix3::swapcol(), and t.

Referenced by moab::OrientedBox::compute_from_covariance_data(), and moab::OrientedBox::compute_from_vertices().

{
    ErrorCode rval;

    // project points onto axes to get box extents
    CartVect min( std::numeric_limits< double >::max() ), max( -std::numeric_limits< double >::max() );
    for( Range::iterator i = points.begin(); i != points.end(); ++i )
    {
        CartVect coords;
        rval = instance->get_coords( &*i, 1, coords.array() );MB_CHK_ERR( rval );

        for( int d = 0; d < 3; ++d )
        {
            const double t = point_perp( coords, result.center, result.axes.col( d ) );
            if( t < min[d] ) min[d] = t;
            if( t > max[d] ) max[d] = t;
        }
    }

    // We now have a box defined by three orthogonal line segments
    // that intersect at the center of the box.  Each line segment
    // is defined as result.center + t * result.axes[i], where the
    // range of t is [min[i], max[i]].

    // Calculate new center
    const CartVect mid = 0.5 * ( min + max );
    result.center += mid[0] * result.axes.col( 0 ) + mid[1] * result.axes.col( 1 ) + mid[2] * result.axes.col( 2 );

    // reorder axes by length
    CartVect range = 0.5 * ( max - min );
    if( range[2] < range[1] )
    {
        if( range[2] < range[0] )
        {
            std::swap( range[0], range[2] );
            result.axes.swapcol( 0, 2 );
        }
    }
    else if( range[1] < range[0] )
    {
        std::swap( range[0], range[1] );
        result.axes.swapcol( 0, 1 );
    }
    if( range[1] > range[2] )
    {
        std::swap( range[1], range[2] );
        result.axes.swapcol( 1, 2 );
    }

    // scale axis to encompass all points, divide in half
#if MB_ORIENTED_BOX_UNIT_VECTORS
    result.length = range;
#else
    result.axes.colscale( 0, range[0] );
    result.axes.colscale( 1, range[1] );
    result.axes.colscale( 2, range[2] );
#endif

#if MB_ORIENTED_BOX_OUTER_RADIUS
    result.radius = range.length();
#endif

    return MB_SUCCESS;
}
static ErrorCode moab::check_int_tag ( Interface *  mb,
Tag  tag 
) [static]

Definition at line 301 of file ReadUtil.cpp.

References ErrorCode, MB_SUCCESS, MB_TYPE_INTEGER, MB_TYPE_OPAQUE, MB_TYPE_OUT_OF_RANGE, size, moab::Interface::tag_get_bytes(), and moab::Interface::tag_get_data_type().

Referenced by moab::ReadUtil::assign_ids().

{
    int size;
    DataType type;
    ErrorCode rval = mb->tag_get_bytes( tag, size );
    if( MB_SUCCESS != rval ) return rval;
    if( size != sizeof( int ) ) return MB_TYPE_OUT_OF_RANGE;
    rval = mb->tag_get_data_type( tag, type );
    if( type != MB_TYPE_OPAQUE && type != MB_TYPE_INTEGER ) return MB_TYPE_OUT_OF_RANGE;

    return MB_SUCCESS;
}
static bool moab::check_range ( const range_data &  d,
bool  prefer_end,
EntityHandle &  result 
) [static]

Definition at line 453 of file TypeSequenceManager.cpp.

References moab::GeomUtil::first(), moab::range_data::first, moab::range_data::last, moab::range_data::max_end_handle, moab::range_data::min_start_handle, and moab::range_data::num_entities.

Referenced by moab::TypeSequenceManager::find_free_sequence().

{
    EntityHandle first = std::max( d.min_start_handle, d.first );
    EntityHandle last  = std::min( d.max_end_handle, d.last );
    if( last < first + d.num_entities - 1 )
    {
        result = 0;
        return false;
    }

    result = prefer_end ? last + 1 - d.num_entities : first;
    return true;
}
bool moab::check_ray_limits ( const double  normal_par_pos,
const double  normal_par_dir,
const double  half_extent,
const double *  nonneg_ray_len,
const double *  neg_ray_len 
) [inline]

Definition at line 444 of file OrientedBox.cpp.

Referenced by moab::OrientedBox::intersect_ray().

{

    const double extent_pos_diff = half_extent - normal_par_pos;

    // limit in positive direction
    if( nonneg_ray_len )
    {  // should be 0 <= t <= nonneg_ray_len
        assert( 0 <= *nonneg_ray_len );
        if( normal_par_dir > 0 )
        {  // if/else if needed for pos/neg divisor
            if( *nonneg_ray_len * normal_par_dir >= extent_pos_diff && extent_pos_diff >= 0 ) return true;
        }
        else if( normal_par_dir < 0 )
        {
            if( *nonneg_ray_len * normal_par_dir <= extent_pos_diff && extent_pos_diff <= 0 ) return true;
        }
    }
    else
    {  // should be 0 <= t
        if( normal_par_dir > 0 )
        {  // if/else if needed for pos/neg divisor
            if( extent_pos_diff >= 0 ) return true;
        }
        else if( normal_par_dir < 0 )
        {
            if( extent_pos_diff <= 0 ) return true;
        }
    }

    // limit in negative direction
    if( neg_ray_len )
    {  // should be neg_ray_len <= t < 0
        assert( 0 >= *neg_ray_len );
        if( normal_par_dir > 0 )
        {  // if/else if needed for pos/neg divisor
            if( *neg_ray_len * normal_par_dir <= extent_pos_diff && extent_pos_diff < 0 ) return true;
        }
        else if( normal_par_dir < 0 )
        {
            if( *neg_ray_len * normal_par_dir >= extent_pos_diff && extent_pos_diff > 0 ) return true;
        }
    }

    return false;
}
static ErrorCode moab::check_tag_type ( Interface *  moab,
Tag  tag,
DataType  exp_type,
int  exp_size 
) [static]

Definition at line 44 of file ReorderTool.cpp.

References CHKERR, ErrorCode, MB_SUCCESS, MB_TYPE_OUT_OF_RANGE, moab::Interface::tag_get_bytes(), and moab::Interface::tag_get_data_type().

Referenced by moab::ReorderTool::handle_order_from_int_tag(), moab::ReorderTool::int_order_from_sets_and_adj(), and moab::ReorderTool::reorder_entities().

{
    ErrorCode rval;
    DataType act_type;
    int act_size;

    rval = moab->tag_get_data_type( tag, act_type );CHKERR;

    rval = moab->tag_get_bytes( tag, act_size );CHKERR;

    if( act_type != exp_type || act_size != exp_size ) return MB_TYPE_OUT_OF_RANGE;

    return MB_SUCCESS;
}
static size_t moab::choose_owner_idx ( const std::vector< unsigned > &  proc_list) [static]

Definition at line 4478 of file ParallelComm.cpp.

Referenced by moab::ParallelComm::resolve_shared_sets().

{
    // Try to assign owners randomly so we get a good distribution,
    // (note: specifying the same seed on all procs is essential)
    unsigned val = 0;
    for( size_t i = 0; i < proc_list.size(); i++ )
        val ^= proc_list[i];
    srand( (int)( val ) );
    return rand() % proc_list.size();
}
static ErrorCode moab::closest_to_triangles ( Interface *  moab,
const Range &  tris,
const CartVect &  from,
double &  shortest_dist_sqr,
CartVect &  closest_pt,
EntityHandle &  closest_tri 
) [static]

Definition at line 1542 of file AdaptiveKDTree.cpp.

References moab::Range::begin(), moab::GeomUtil::closest_location_on_tri(), moab::Range::end(), ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_coords(), and MB_SUCCESS.

Referenced by closest_to_triangles(), moab::AdaptiveKDTree::closest_triangle(), and moab::AdaptiveKDTree::find_close_triangle().

{
    ErrorCode rval;
    CartVect pos, diff, verts[3];
    const EntityHandle* conn = NULL;
    int len                  = 0;

    for( Range::iterator i = tris.begin(); i != tris.end(); ++i )
    {
        rval = moab->get_connectivity( *i, conn, len );
        if( MB_SUCCESS != rval ) return rval;

        rval = moab->get_coords( conn, 3, verts[0].array() );
        if( MB_SUCCESS != rval ) return rval;

        GeomUtil::closest_location_on_tri( from, verts, pos );
        diff            = pos - from;
        double dist_sqr = diff % diff;
        if( dist_sqr < shortest_dist_sqr )
        {
            // new closest location
            shortest_dist_sqr = dist_sqr;
            closest_pt        = pos;
            closest_tri       = *i;
        }
    }

    return MB_SUCCESS;
}
static ErrorCode moab::closest_to_triangles ( Interface *  moab,
EntityHandle  set_handle,
const CartVect &  from,
double &  shortest_dist_sqr,
CartVect &  closest_pt,
EntityHandle &  closest_tri 
) [static]

Definition at line 1577 of file AdaptiveKDTree.cpp.

References closest_to_triangles(), ErrorCode, moab::Interface::get_entities_by_type(), MB_SUCCESS, and MBTRI.

{
    ErrorCode rval;
    Range tris;

    rval = moab->get_entities_by_type( set_handle, MBTRI, tris );
    if( MB_SUCCESS != rval ) return rval;

    return closest_to_triangles( moab, tris, from, shortest_dist_sqr, closest_pt, closest_tri );
}
int moab::compare_handle_id ( const void *  a,
const void *  b 
)

Definition at line 200 of file MergeMesh.cpp.

References moab::handle_id::eh, and moab::handle_id::val.

Referenced by moab::MergeMesh::merge_using_integer_tag().

{

    handle_id* ia = (handle_id*)a;
    handle_id* ib = (handle_id*)b;
    if( ia->val == ib->val )
    {
        return ( ia->eh < ib->eh ) ? -1 : 1;
    }
    else
    {
        return ( ia->val - ib->val );
    }
}
template<typename T >
bool moab::connectivity_match ( const T conn1_i,
const T conn2_i,
const int  num_vertices,
int &  direct,
int &  offset 
) [inline]

Definition at line 469 of file CN.cpp.

References T.

{

    bool they_match;

    // special test for 2 handles, since we don't want to wrap the list in this
    // case
    if( num_vertices == 2 )
    {
        they_match = false;
        if( conn1_i[0] == conn2_i[0] && conn1_i[1] == conn2_i[1] )
        {
            direct     = 1;
            they_match = true;
            offset     = 0;
        }
        else if( conn1_i[0] == conn2_i[1] && conn1_i[1] == conn2_i[0] )
        {
            they_match = true;
            direct     = -1;
            offset     = 1;
        }
    }

    else
    {
        const T* iter;
        iter = std::find( &conn2_i[0], &conn2_i[num_vertices], conn1_i[0] );
        if( iter == &conn2_i[num_vertices] ) return false;

        they_match = true;

        offset = iter - conn2_i;
        int i;

        // first compare forward
        for( i = 1; i < num_vertices; ++i )
        {
            if( conn1_i[i] != conn2_i[( offset + i ) % num_vertices] )
            {
                they_match = false;
                break;
            }
        }

        if( they_match == true )
        {
            direct = 1;
            return they_match;
        }

        they_match = true;

        // then compare reverse
        for( i = 1; i < num_vertices; i++ )
        {
            if( conn1_i[i] != conn2_i[( offset + num_vertices - i ) % num_vertices] )
            {
                they_match = false;
                break;
            }
        }
        if( they_match )
        {
            direct = -1;
        }
    }

    return they_match;
}
template<typename TYPE >
static void moab::convert_to_ranged_ids ( const TYPE *  buffer,
size_t  len,
std::vector< WriteHDF5::wid_t > &  result 
) [static]

Definition at line 1740 of file WriteHDF5Parallel.cpp.

References moab::Range::const_pair_begin(), moab::Range::const_pair_end(), moab::Range::insert(), and moab::Range::psize().

Referenced by moab::WriteHDF5Parallel::unpack_set().

{
    if( !len )
    {
        result.clear();
        return;
    }

    result.resize( len * 2 );
    Range tmp;
    for( size_t i = 0; i < len; i++ )
        tmp.insert( (EntityHandle)buffer[i] );
    result.resize( tmp.psize() * 2 );
    int j = 0;
    for( Range::const_pair_iterator pit = tmp.const_pair_begin(); pit != tmp.const_pair_end(); ++pit, j++ )
    {
        result[2 * j]     = pit->first;
        result[2 * j + 1] = pit->second - pit->first + 1;
    }
}
static void moab::convert_to_ranges ( const EntityHandle *  vect_in,
size_t  vect_in_len,
std::vector< EntityHandle > &  vect_out 
) [static]

Convert unsorted array of handles into array of ranged [begin,end] pairs

Definition at line 1160 of file MeshSet.cpp.

Referenced by moab::MeshSet::convert(), moab::MeshSet::insert_entity_vector(), and moab::MeshSet::remove_entity_vector().

{
    vect_out.reserve( 2 * vect_in_len );
    vect_out.resize( vect_in_len );
    std::copy( vect_in, vect_in + vect_in_len, vect_out.begin() );
    std::sort( vect_out.begin(), vect_out.end() );
    vect_out.erase( std::unique( vect_out.begin(), vect_out.end() ), vect_out.end() );

    // duplicate all entries
    vect_out.resize( vect_out.size() * 2 );
    for( long i = vect_out.size() - 1; i >= 0; --i )
        vect_out[i] = vect_out[i / 2];

    // compact adjacent ranges
    std::vector< EntityHandle >::iterator r = vect_out.begin(), w = vect_out.begin();
    while( r != vect_out.end() )
    {
        *w = *r;
        ++w;
        ++r;
        *w = *r;
        ++r;

        while( r != vect_out.end() && *w + 1 == *r )
        {
            ++r;
            *w = *r;
            ++r;
        }
        ++w;
    }

    // remove extra space
    vect_out.erase( w, vect_out.end() );
}
static void moab::copy_coords ( const double  src[3],
double  dest[3] 
) [inline, static]

Definition at line 580 of file BSPTree.cpp.

Referenced by moab::BSPTreeBoxIter::face_corners(), and plane_uncut_box().

{
    dest[0] = src[0];
    dest[1] = src[1];
    dest[2] = src[2];
}
static Range::iterator moab::copy_set_contents ( Range::iterator  hint,
int  ranged,
EntityHandle *  contents,
long  length,
Range &  results 
) [static]

Definition at line 2390 of file ReadHDF5.cpp.

References moab::Range::insert(), and length().

Referenced by moab::ReadHDF5::read_set_data().

{
    if( ranged )
    {
        assert( length % 2 == 0 );
        for( long i = 0; i < length; i += 2 )
            hint = results.insert( hint, contents[i], contents[i] + contents[i + 1] - 1 );
    }
    else
    {
        std::sort( contents, contents + length );
        for( long i = 0; i < length; ++i )
            hint = results.insert( hint, contents[i] );
    }
    return hint;
}
static void moab::copy_sorted_file_ids ( const EntityHandle *  sorted_ids,
long  num_ids,
Range &  results 
) [static]

Definition at line 112 of file ReadHDF5.cpp.

References moab::Range::begin(), and moab::Range::insert().

Referenced by moab::ReadHDF5::read_elems(), and moab::ReadHDF5::search_tag_values().

{
    Range::iterator hint = results.begin();
    long i               = 0;
    while( i < num_ids )
    {
        EntityHandle start = sorted_ids[i];
        for( ++i; i < num_ids && sorted_ids[i] == 1 + sorted_ids[i - 1]; ++i )
            ;
        hint = results.insert( hint, start, sorted_ids[i - 1] );
    }
}
static void moab::corners_from_box ( const double  box_min[3],
const double  box_max[3],
double  corners[8][3] 
) [static]

Definition at line 42 of file BSPTree.cpp.

References box_min().

Referenced by moab::BSPTree::create_tree(), and moab::BSPTree::set_tree_box().

{
    const double* ranges[] = { box_min, box_max };
    for( int z = 0; z < 2; ++z )
    {
        corners[4 * z][0] = box_min[0];
        corners[4 * z][1] = box_min[1];
        corners[4 * z][2] = ranges[z][2];

        corners[4 * z + 1][0] = box_max[0];
        corners[4 * z + 1][1] = box_min[1];
        corners[4 * z + 1][2] = ranges[z][2];

        corners[4 * z + 2][0] = box_max[0];
        corners[4 * z + 2][1] = box_max[1];
        corners[4 * z + 2][2] = ranges[z][2];

        corners[4 * z + 3][0] = box_min[0];
        corners[4 * z + 3][1] = box_max[1];
        corners[4 * z + 3][2] = ranges[z][2];
    }
}
template<class HandleRangeIter >
size_t moab::count_num_handles ( HandleRangeIter  iter,
HandleRangeIter  end 
) [inline]

Definition at line 1579 of file WriteHDF5.cpp.

Referenced by range_to_blocked_list_templ(), and range_to_id_list_templ().

{
    size_t result = 0;
    for( ; iter != end; ++iter )
        result += iter->second - iter->first + 1;

    return result;
}
EntityHandle moab::CREATE_HALFFACET ( const unsigned  lid,
const EntityID  id 
) [inline]

Definition at line 31 of file HalfFacetRep.cpp.

References MB_END_ID, and MB_ID_WIDTH.

Referenced by moab::HalfFacetRep::create_halffacet().

{
    assert( id <= MB_END_ID && lid < 6 );
    return ( ( (HFacet)lid ) << MB_ID_WIDTH ) | id;
}
EntityHandle moab::CREATE_HANDLE ( const unsigned  type,
const EntityID  id,
int &  err 
) [inline]

Given a type and an id create a handle.

Definition at line 55 of file Internals.hpp.

References MB_END_ID, MB_ID_WIDTH, and MBMAXTYPE.

Referenced by moab::SequenceManager::check_valid_entities(), moab::WriteHDF5Parallel::communicate_shared_set_data(), moab::SequenceManager::create_element(), moab::SequenceManager::create_mesh_set(), moab::SequenceManager::create_vertex(), moab::SequenceManager::delete_entities(), moab::Range::equal_range(), moab::VarLenSparseTag::find_entities_with_value(), moab::SparseTag::find_entities_with_value(), moab::RangeSeqIntersectIter::find_invalid_range(), moab::WriteVtk::gather_mesh(), moab::AEntityFactory::get_associated_meshsets(), moab::AEntityFactory::get_element(), moab::BitTag::get_entities_with_bits(), moab::SequenceManager::get_memory_use(), moab::TypeSequenceManager::get_memory_use(), moab::RangeSetIterator::get_next_by_dimension(), moab::RangeSetIterator::get_next_by_type(), moab::ParallelComm::get_remote_handles(), moab::BitTag::get_tagged(), moab::AEntityFactory::get_up_adjacency_elements(), moab::Core::handle_from_id(), handle_test(), moab::TypeSequenceManager::is_free_handle(), moab::TypeSequenceManager::last_free_handle(), moab::WriteGMV::local_write_mesh(), moab::Range::lower_bound(), main(), mb_range_seq_intersect_test(), mb_vertex_coordinate_test(), moab::Range::num_of_dimension(), moab::ReadNCDF::read_nodesets(), regression_insert_set_1(), regression_mmiller_8_2010(), moab::WriteHDF5Parallel::remove_remote_entities(), moab::SequenceManager::sequence_start_handle(), moab::Range::subset_by_dimension(), moab::HigherOrderFactory::tag_for_deletion(), and moab::Range::upper_bound().

{
    err = 0;  //< Assume that there is a real error value defined somewhere

    if( id > MB_END_ID || type > MBMAXTYPE )
    {
        err = 1;   //< Assume that there is a real error value defined somewhere
        return 1;  //<You've got to return something.  What do you return?
    }

    return ( ( (EntityHandle)type ) << MB_ID_WIDTH ) | id;
}
EntityHandle moab::CREATE_HANDLE ( const unsigned  type,
const EntityID  id 
) [inline]

Definition at line 68 of file Internals.hpp.

References MB_END_ID, MB_ID_WIDTH, and MBMAXTYPE.

{
    assert( id <= MB_END_ID && type <= MBMAXTYPE );
    return ( ( (EntityHandle)type ) << MB_ID_WIDTH ) | id;
}
static void moab::cross ( double  result[3],
const double  a[3],
const double  b[3] 
) [static]

Definition at line 930 of file BSPTree.cpp.

Referenced by moab::GeomUtil::box_hex_overlap(), moab::GeomUtil::box_linear_elem_overlap(), form_Q(), interior_point(), v_tri_scaled_jacobian(), and moab::BSPTreeBoxIter::volume().

{
    result[0] = a[1] * b[2] - a[2] * b[1];
    result[1] = a[2] * b[0] - a[0] * b[2];
    result[2] = a[0] * b[1] - a[1] * b[0];
}

Definition at line 127 of file Factory.cpp.

References iface, moab::ComponentFactory::objects_in_use, and size.

{
    // delete all instances of objects
    while( ComponentFactory::objects_in_use.size() )
    {
        UnknownInterface* iface = ComponentFactory::objects_in_use.front();
        ComponentFactory::objects_in_use.pop_front();
        if( iface ) delete iface;
    }
}
static ErrorCode moab::ent_not_found ( const std::string &  ,
EntityHandle   
) [inline, static]

Definition at line 36 of file DenseTag.cpp.

References moab::CN::EntityTypeName(), ID_FROM_HANDLE(), MB_ENTITY_NOT_FOUND, and TYPE_FROM_HANDLE().

Referenced by moab::DenseTag::get_array_private().

{
    // MB_ENTITY_NOT_FOUND could be a non-error condition, do not call MB_SET_ERR on it
#if 0
  fprintf(
      stderr,
      "[Warning]: Invalid entity handle setting tag %s: %s %ld\n",
      name.c_str(),
      CN::EntityTypeName(TYPE_FROM_HANDLE(h)),
      (unsigned long)ID_FROM_HANDLE(h)
      );
#endif

    return MB_ENTITY_NOT_FOUND;
}
static ErrorCode moab::error ( ErrorCode  rval) [inline, static]

Definition at line 127 of file DamselUtil.hpp.

Referenced by _run_test(), about(), moab::HalfFacetRep::add_cells_of_single_component(), adj_perf(), ahf_test(), moab::HalfFacetRep::another_halfedge(), moab::WriteHDF5Parallel::append_serial_tag_data(), moab::WriteHDF5::assign_ids(), moab::HiReconstruction::average_vertex_normal(), moab::HiReconstruction::average_vertex_tangent(), moab::HalfFacetRep::check_mixed_entity_type(), moab::WriteHDF5Parallel::check_serial_tag_data(), moab::WriteCCMIO::close_and_compress(), closedsurface_uref_hirec_convergence_study(), moab::HalfFacetRep::collect_and_compare(), moab::WriteHDF5Parallel::communicate_shared_set_ids(), moab::HiReconstruction::compute_average_vertex_normals_surf(), moab::HiReconstruction::compute_average_vertex_tangents_curve(), moab::TempestOnlineMap::ComputeMetrics(), moab::NestedRefine::construct_hm_1D(), moab::NestedRefine::construct_hm_2D(), moab::NestedRefine::construct_hm_3D(), moab::NestedRefine::construct_hm_entities(), moab::NestedRefine::copy_vertices_from_prev_level(), moab::NestedRefine::count_subentities(), moab::HalfFacetRep::count_subentities(), moab::WriteCCMIO::create_ccmio_structure(), moab::ReadUtil::create_entity_sets(), create_hexes_and_verts(), moab::NestedRefine::create_hm_storage_single_level(), create_mesh(), moab::ReadNCDF::create_sideset_element(), create_simple_mesh(), create_single_entity(), moab::WriteHDF5::create_tag(), moab::WriteHDF5Parallel::create_tag_tables(), create_unitsq_quads(), create_unitsq_tris(), moab::HalfFacetRep::determine_border_vertices(), moab::HalfFacetRep::determine_incident_halfedges(), moab::HalfFacetRep::determine_incident_halffaces(), moab::HalfFacetRep::determine_incident_halfverts(), moab::HalfFacetRep::determine_sibling_halfedges(), moab::HalfFacetRep::determine_sibling_halffaces(), moab::HalfFacetRep::determine_sibling_halfverts(), moab::NestedRefine::estimate_hm_storage(), moab::WriteHDF5Parallel::exchange_file_ids(), moab::NestedRefine::exchange_ghosts(), moab::HalfFacetRep::fid_from_halfacet(), moab::HalfFacetRep::find_matching_halfedge(), moab::HalfFacetRep::find_matching_halfface(), moab::HalfFacetRep::find_matching_implicit_edge_in_cell(), moab::NestedRefine::find_shortest_diagonal_octahedron(), moab::HalfFacetRep::find_total_edges_2d(), moab::HalfFacetRep::find_total_edges_faces_3d(), moab::WriteHDF5::gather_all_mesh(), moab::HalfFacetRep::gather_halfedges(), moab::WriteHDF5Parallel::gather_interface_meshes(), moab::NestedRefine::generate_hm(), moab::NestedRefine::generate_mesh_hierarchy(), moab::TempestOnlineMap::GenerateRemappingWeights(), moab::NestedRefine::get_adjacencies(), moab::HalfFacetRep::get_adjacencies(), moab::WriteHDF5::get_adjacencies(), moab::NestedRefine::get_connectivity(), moab::NestedRefine::get_coordinates(), get_degree_seq(), moab::HalfFacetRep::get_down_adjacencies(), moab::HalfFacetRep::get_down_adjacencies_2d(), moab::HalfFacetRep::get_down_adjacencies_edg_3d(), moab::HalfFacetRep::get_down_adjacencies_face_3d(), moab::ReadUtil::get_element_connect(), moab::HalfFacetRep::get_face_edges(), moab::HalfFacetRep::get_half_facet_in_comp(), moab::NestedRefine::get_local_vid(), get_max_volume(), moab::HalfFacetRep::get_neighbor_adjacencies(), moab::HalfFacetRep::get_neighbor_adjacencies_2d(), moab::ReadUtil::get_node_coords(), moab::HiReconstruction::get_normals_surf(), moab::ParallelComm::get_remote_handles(), moab::ReadCCMIO::get_state(), moab::ReadCCMIO::get_str_option(), moab::WriteHDF5::get_tag_data_length(), moab::WriteHDF5::get_tag_size(), moab::HiReconstruction::get_tangents_curve(), moab::HalfFacetRep::get_up_adjacencies(), moab::HalfFacetRep::get_up_adjacencies_2d(), moab::HalfFacetRep::get_up_adjacencies_edg_3d(), moab::HalfFacetRep::get_up_adjacencies_edg_3d_comp(), moab::HalfFacetRep::get_up_adjacencies_face_3d(), moab::HalfFacetRep::get_up_adjacencies_vert_2d(), moab::HalfFacetRep::get_up_adjacencies_vert_3d(), moab::ReorderTool::handle_order_from_int_tag(), moab::ReorderTool::handle_order_from_sets_and_adj(), moab::HiReconstruction::hiproj_walf_around_vertex(), moab::HiReconstruction::hiproj_walf_in_element(), moab::HiReconstruction::HiReconstruction(), moab::HalfFacetRep::init_curve(), moab::HalfFacetRep::init_surface(), moab::HalfFacetRep::init_volume(), moab::NestedRefine::initialize(), moab::HiReconstruction::initialize(), moab::HalfFacetRep::initialize(), moab::WriteHDF5::initialize_mesh(), moab::NestedRefine::is_edge_on_boundary(), moab::NestedRefine::is_face_on_boundary(), moab::NestedRefine::is_vertex_on_boundary(), moab::ReadCCMIO::load_file(), load_file_one(), moab::ReadCCMIO::load_matset_data(), load_meshset_hirec(), moab::ReadCCMIO::load_metadata(), moab::ReadCCMIO::load_neuset_data(), moab::TempestRemapper::load_tempest_mesh_private(), main(), moab::HalfFacetRep::mark_halfedges(), mb_bar_connectivity_test(), mb_forced_adjacencies_test(), mb_hex_connectivity_test(), mb_quad_connectivity_test(), mb_skin_fileset_test(), mb_tet_connectivity_test(), mb_tri_connectivity_test(), mb_vertex_coordinate_test(), mb_vertex_tag_test(), moab::NestedRefine::NestedRefine(), moab::HiReconstruction::obtain_nring_ngbvs(), moab::WriteCCMIO::open_file(), moab::WriteHDF5Parallel::parallel_create_file(), parsedims(), perf_inmesh(), moab::HiReconstruction::polyfit3d_walf_curve_vertex(), moab::HiReconstruction::polyfit3d_walf_surf_vertex(), project_exact_torus(), moab::ReadCCMIO::read_all_faces(), read_buffered_map(), moab::ReadCCMIO::read_faces(), moab::ReadCCMIO::read_gids_and_types(), moab::ReadNCDF::read_global_ids(), read_map_from_disk(), moab::ReadCCMIO::read_topology_types(), moab::ReadCCMIO::read_vertices(), moab::TempestOnlineMap::ReadParallelMap(), moab::HiReconstruction::reconstruct3D_curve_geom(), moab::HiReconstruction::reconstruct3D_surf_geom(), refine_entities(), moab::ReorderTool::reorder_entities(), moab::NestedRefine::reorder_indices(), moab::ReorderTool::reorder_tag_data(), resolve_and_exchange(), moab::ParallelComm::send_recv_entities(), moab::Error::set_last_error(), moab::NestedRefine::subdivide_cells(), moab::NestedRefine::subdivide_tets(), tag_info_test(), test_1D(), test_2D(), test_3D(), test_adjacencies(), test_closedsurface_mesh(), test_entities(), test_get_part_boundary(), test_ghost_elements(), test_mesh(), test_normal_linear_hex(), test_normal_linear_quad(), test_normal_linear_tet(), test_normal_linear_tri(), test_tempest_cs_create(), test_tempest_ico_create(), test_tempest_map_bcast(), test_tempest_mpas_create(), test_tempest_overlap_combinations(), test_tempest_rll_create(), test_tempest_to_moab_convert(), test_unitcircle(), test_unitsphere(), test_unitsq_quads(), test_unitsq_tris(), umr_perf_test(), moab::NestedRefine::update_ahf_1D(), moab::HalfFacetRep::update_entity_ranges(), moab::NestedRefine::update_global_ahf(), moab::NestedRefine::update_global_ahf_1D(), moab::NestedRefine::update_global_ahf_1D_sub(), moab::NestedRefine::update_global_ahf_2D(), moab::NestedRefine::update_global_ahf_2D_sub(), moab::NestedRefine::update_global_ahf_3D(), moab::NestedRefine::update_local_ahf(), moab::ParallelComm::update_remote_data(), moab::NestedRefine::update_special_tags(), moab::NestedRefine::update_tracking_verts(), usage(), moab::HiReconstruction::vertex_get_incident_elements(), moab::NestedRefine::vertex_to_entities_down(), moab::NestedRefine::vertex_to_entities_up(), TreeValidator::visit(), moab::WriteCCMIO::write_cells_and_faces(), moab::WriteCCMIO::write_dbl_option(), moab::WriteNCDF::write_element_order_map(), moab::WriteHDF5::write_elems(), moab::WriteCCMIO::write_external_faces(), moab::WriteHDF5::write_file(), moab::WriteHDF5::write_file_impl(), moab::WriteNCDF::write_global_element_order_map(), moab::WriteNCDF::write_global_node_order_map(), moab::WriteCCMIO::write_int_option(), moab::WriteCCMIO::write_nodes(), moab::WriteCCMIO::write_problem_description(), moab::WriteCCMIO::write_processor(), moab::WriteCCMIO::write_str_option(), moab::WriteHDF5::write_tag(), and moab::TempestOnlineMap::WriteSCRIPMapFile().

{
    return rval;
}
EntityID moab::FID_FROM_HALFFACET ( HFacet  handle) [inline]

Definition at line 36 of file HalfFacetRep.cpp.

References MB_ID_MASK.

Referenced by moab::HalfFacetRep::fid_from_halfacet().

{
    return ( handle & MB_ID_MASK );
}
template<class Functor , class TagMap >
static void moab::find_map_values ( Functor  compare,
Range::const_iterator  lower,
Range::const_iterator  upper,
const TagMap &  tag_map,
Range &  results 
) [inline, static]

Definition at line 286 of file TagCompare.hpp.

References moab::Range::begin(), compare(), and moab::Range::insert().

{
    Range::iterator insert = results.begin();
    for( ; lower != upper; ++lower )
    {
        typename TagMap::const_iterator i = tag_map.find( *lower );
        if( i != tag_map.end() && compare( i->second ) ) insert = results.insert( insert, *lower );
    }
}
template<class TagMap >
static void moab::find_map_values_equal ( const TagInfo &  tag_info,
const void *  value,
int  size,
Range::const_iterator  begin,
Range::const_iterator  end,
const TagMap &  tag_map,
Range &  results 
) [inline, static]

Find all entities for which a tag has a specific value

Parameters:
IteratorType: an iterator that has map behavior: the value of 'first' is the entity handle. the value of 'second' is a pointer to the tag data.
ContainerType: std::vector<EntityHandle> or Range

Definition at line 376 of file TagCompare.hpp.

References moab::TagInfo::get_data_type(), MB_TYPE_DOUBLE, MB_TYPE_HANDLE, and MB_TYPE_INTEGER.

Referenced by moab::SparseTag::find_entities_with_value().

{
    switch( tag_info.get_data_type() )
    {
        case MB_TYPE_INTEGER:
            if( size == sizeof( int ) )
                find_map_values< TagOneIntEqual, TagMap >( TagOneIntEqual( value ), begin, end, tag_map, results );
            else
                find_map_values< TagIntsEqual, TagMap >( TagIntsEqual( value, size ), begin, end, tag_map, results );
            break;

        case MB_TYPE_DOUBLE:
            if( size == sizeof( double ) )
                find_map_values< TagOneDoubleEqual, TagMap >( TagOneDoubleEqual( value ), begin, end, tag_map,
                                                              results );
            else
                find_map_values< TagDoublesEqual, TagMap >( TagDoublesEqual( value, size ), begin, end, tag_map,
                                                            results );
            break;

        case MB_TYPE_HANDLE:
            if( size == sizeof( EntityHandle ) )
                find_map_values< TagOneHandleEqual, TagMap >( TagOneHandleEqual( value ), begin, end, tag_map,
                                                              results );
            else
                find_map_values< TagHandlesEqual, TagMap >( TagHandlesEqual( value, size ), begin, end, tag_map,
                                                            results );
            break;

        default:
            find_map_values< TagBytesEqual, TagMap >( TagBytesEqual( value, size ), begin, end, tag_map, results );
            break;
    }
}
template<class TagMap >
static void moab::find_map_varlen_values_equal ( const TagInfo &  tag_info,
const void *  value,
int  size,
Range::const_iterator  begin,
Range::const_iterator  end,
const TagMap &  tag_map,
Range &  results 
) [inline, static]

Definition at line 417 of file TagCompare.hpp.

References moab::TagInfo::get_data_type(), MB_TYPE_DOUBLE, MB_TYPE_HANDLE, and MB_TYPE_INTEGER.

Referenced by moab::VarLenSparseTag::find_entities_with_value().

{
    switch( tag_info.get_data_type() )
    {
        case MB_TYPE_INTEGER:
            find_map_values< TagVarIntsEqual, TagMap >( TagVarIntsEqual( value, size ), begin, end, tag_map, results );
            break;
        case MB_TYPE_DOUBLE:
            find_map_values< TagVarDoublesEqual, TagMap >( TagVarDoublesEqual( value, size ), begin, end, tag_map,
                                                           results );
            break;
        case MB_TYPE_HANDLE:
            find_map_values< TagVarHandlesEqual, TagMap >( TagVarHandlesEqual( value, size ), begin, end, tag_map,
                                                           results );
            break;
        default:
            find_map_values< TagVarBytesEqual, TagMap >( TagVarBytesEqual( value, size ), begin, end, tag_map,
                                                         results );
            break;
    }
}
template<class Functor , class IteratorType >
static void moab::find_tag_values ( Functor  compare,
IteratorType  begin,
IteratorType  end,
Range &  results 
) [inline, static]

Definition at line 268 of file TagCompare.hpp.

References moab::Range::begin(), compare(), and moab::Range::insert().

{
    Range::iterator insert = results.begin();
    for( IteratorType i = begin; i != end; ++i )
        if( compare( i->second ) ) insert = results.insert( insert, i->first );
}
template<class Functor , class IteratorType >
static void moab::find_tag_values ( Functor  compare,
IteratorType  begin,
IteratorType  end,
std::vector< EntityHandle > &  results 
) [inline, static]

Definition at line 276 of file TagCompare.hpp.

References compare().

{
    for( IteratorType i = begin; i != end; ++i )
        if( compare( i->second ) ) results.push_back( i->first );
}
template<class IteratorType , class ContainerType >
static void moab::find_tag_values_equal ( const TagInfo &  tag_info,
const void *  value,
int  size,
IteratorType  begin,
IteratorType  end,
ContainerType &  results 
) [inline, static]

Find all entities for which a tag has a specific value

Parameters:
IteratorType: an iterator that has map behavior: the value of 'first' is the entity handle. the value of 'second' is a pointer to the tag data.
ContainerType: std::vector<EntityHandle> or Range

Definition at line 307 of file TagCompare.hpp.

References moab::TagInfo::get_data_type(), MB_TYPE_DOUBLE, MB_TYPE_HANDLE, and MB_TYPE_INTEGER.

Referenced by moab::DenseTag::find_entities_with_value(), and moab::SparseTag::find_entities_with_value().

{
    switch( tag_info.get_data_type() )
    {
        case MB_TYPE_INTEGER:
            if( size == sizeof( int ) )
                find_tag_values< TagOneIntEqual, IteratorType >( TagOneIntEqual( value ), begin, end, results );
            else
                find_tag_values< TagIntsEqual, IteratorType >( TagIntsEqual( value, size ), begin, end, results );
            break;

        case MB_TYPE_DOUBLE:
            if( size == sizeof( double ) )
                find_tag_values< TagOneDoubleEqual, IteratorType >( TagOneDoubleEqual( value ), begin, end, results );
            else
                find_tag_values< TagDoublesEqual, IteratorType >( TagDoublesEqual( value, size ), begin, end, results );
            break;

        case MB_TYPE_HANDLE:
            if( size == sizeof( EntityHandle ) )
                find_tag_values< TagOneHandleEqual, IteratorType >( TagOneHandleEqual( value ), begin, end, results );
            else
                find_tag_values< TagHandlesEqual, IteratorType >( TagHandlesEqual( value, size ), begin, end, results );
            break;

        default:
            find_tag_values< TagBytesEqual, IteratorType >( TagBytesEqual( value, size ), begin, end, results );
            break;
    }
}
template<class IteratorType , class ContainerType >
static void moab::find_tag_varlen_values_equal ( const TagInfo &  tag_info,
const void *  value,
int  size,
IteratorType  begin,
IteratorType  end,
ContainerType &  results 
) [inline, static]

Definition at line 343 of file TagCompare.hpp.

References moab::TagInfo::get_data_type(), MB_TYPE_DOUBLE, MB_TYPE_HANDLE, and MB_TYPE_INTEGER.

Referenced by moab::VarLenDenseTag::find_entities_with_value(), and moab::VarLenSparseTag::find_entities_with_value().

{
    switch( tag_info.get_data_type() )
    {
        case MB_TYPE_INTEGER:
            find_tag_values< TagVarIntsEqual, IteratorType >( TagVarIntsEqual( value, size ), begin, end, results );
            break;
        case MB_TYPE_DOUBLE:
            find_tag_values< TagVarDoublesEqual, IteratorType >( TagVarDoublesEqual( value, size ), begin, end,
                                                                 results );
            break;
        case MB_TYPE_HANDLE:
            find_tag_values< TagVarHandlesEqual, IteratorType >( TagVarHandlesEqual( value, size ), begin, end,
                                                                 results );
            break;
        default:
            find_tag_values< TagVarBytesEqual, IteratorType >( TagVarBytesEqual( value, size ), begin, end, results );
            break;
    }
}
template<typename ITER >
static ErrorCode moab::get_adjacencies_intersection ( Core *  mb,
ITER  begin,
ITER  end,
const int  to_dimension,
const bool  create_if_missing,
std::vector< EntityHandle > &  adj_entities 
) [inline, static]

Definition at line 1317 of file Core.cpp.

References moab::Core::a_entity_factory(), moab::CN::Dimension(), ErrorCode, moab::AEntityFactory::get_adjacencies(), moab::Core::get_connectivity(), MB_CHK_ERR, MB_SUCCESS, MBPOLYHEDRON, and TYPE_FROM_HANDLE().

Referenced by moab::Core::get_adjacencies(), and get_adjacencies_intersection().

{
    const size_t SORT_THRESHOLD = 200;
    std::vector< EntityHandle > temp_vec;
    std::vector< EntityHandle >::iterator adj_it, w_it;
    ErrorCode result = MB_SUCCESS;

    if( begin == end )
    {
        adj_entities.clear();  // intersection
        return MB_SUCCESS;
    }

    // First iteration is a special case if input list is empty.
    // Rather than returning nothing (intersecting with empty
    // input list), we begin with the adjacencies for the first entity.
    if( adj_entities.empty() )
    {
        EntityType entity_type = TYPE_FROM_HANDLE( *begin );
        if( to_dimension == CN::Dimension( entity_type ) )
            adj_entities.push_back( *begin );
        else if( to_dimension == 0 && entity_type != MBPOLYHEDRON )
        {
            result = mb->get_connectivity( &( *begin ), 1, adj_entities );MB_CHK_ERR( result );
        }
        else
        {
            result = mb->a_entity_factory()->get_adjacencies( *begin, to_dimension, create_if_missing, adj_entities );MB_CHK_ERR( result );
        }
        ++begin;
    }

    for( ITER from_it = begin; from_it != end; ++from_it )
    {
        // running results kept in adj_entities; clear temp_vec, which is working space
        temp_vec.clear();

        // get the next set of adjacencies
        EntityType entity_type = TYPE_FROM_HANDLE( *from_it );
        if( to_dimension == CN::Dimension( entity_type ) )
            temp_vec.push_back( *from_it );
        else if( to_dimension == 0 && entity_type != MBPOLYHEDRON )
        {
            result = mb->get_connectivity( &( *from_it ), 1, temp_vec );MB_CHK_ERR( result );
        }
        else
        {
            result = mb->a_entity_factory()->get_adjacencies( *from_it, to_dimension, create_if_missing, temp_vec );MB_CHK_ERR( result );
        }

        // otherwise intersect with the current set of results
        w_it = adj_it = adj_entities.begin();
        if( temp_vec.size() * adj_entities.size() < SORT_THRESHOLD )
        {
            for( ; adj_it != adj_entities.end(); ++adj_it )
                if( std::find( temp_vec.begin(), temp_vec.end(), *adj_it ) != temp_vec.end() )
                {
                    *w_it = *adj_it;
                    ++w_it;
                }
        }
        else
        {
            std::sort( temp_vec.begin(), temp_vec.end() );
            for( ; adj_it != adj_entities.end(); ++adj_it )
                if( std::binary_search( temp_vec.begin(), temp_vec.end(), *adj_it ) )
                {
                    *w_it = *adj_it;
                    ++w_it;
                }
        }
        adj_entities.erase( w_it, adj_entities.end() );

        // we're intersecting, so if there are no more results, we're done
        if( adj_entities.empty() ) break;
    }

    return MB_SUCCESS;
}
template<typename ITER >
static ErrorCode moab::get_adjacencies_intersection ( Core *  mb,
ITER  begin,
ITER  end,
const int  to_dimension,
const bool  create_if_missing,
Range &  adj_entities 
) [inline, static]

Definition at line 1403 of file Core.cpp.

References moab::Range::begin(), moab::Range::empty(), moab::Range::end(), moab::Range::erase(), ErrorCode, get_adjacencies_intersection(), MB_CHK_ERR, and MB_SUCCESS.

{
    std::vector< EntityHandle > results;
    ErrorCode rval = moab::get_adjacencies_intersection( mb, begin, end, to_dimension, create_if_missing, results );MB_CHK_ERR( rval );

    if( adj_entities.empty() )
    {
        std::copy( results.begin(), results.end(), range_inserter( adj_entities ) );
        return MB_SUCCESS;
    }

    Range::iterator it = adj_entities.begin();
    while( it != adj_entities.end() )
    {
        if( std::find( results.begin(), results.end(), *it ) == results.end() )
            it = adj_entities.erase( it );
        else
            ++it;
    }
    return MB_SUCCESS;
}
template<typename ITER >
static ErrorCode moab::get_adjacencies_union ( Core *  gMB,
ITER  begin,
ITER  end,
int  to_dimension,
bool  create_if_missing,
Range &  adj_entities 
) [inline, static]

Definition at line 1243 of file Core.cpp.

References moab::Core::a_entity_factory(), moab::Range::begin(), moab::CN::Dimension(), ErrorCode, moab::GeomUtil::first(), moab::AEntityFactory::get_adjacencies(), moab::Core::get_connectivity(), moab::Range::insert(), MB_SUCCESS, MBPOLYHEDRON, and TYPE_FROM_HANDLE().

Referenced by moab::Core::get_adjacencies().

{
    const size_t DEFAULT_MAX_BLOCKS_SIZE = 4000;
    const size_t MAX_OUTER_ITERATIONS    = 100;

    std::vector< EntityHandle > temp_vec, storage;
    std::vector< EntityHandle >::const_iterator ti;
    ErrorCode result = MB_SUCCESS, tmp_result;
    ITER i           = begin;
    Range::iterator ins;
    const EntityHandle* conn;
    int conn_len;

    // Just copy any vertices from the input range into the output
    size_t remaining = end - begin;
    assert( begin + remaining == end );

    // How many entities to work with at once? 2000 or so shouldn't require
    // too much memory, but don't iterate in outer loop more than a
    // 1000 times (make it bigger if many input entiites.)
    const size_t block_size = std::max( DEFAULT_MAX_BLOCKS_SIZE, remaining / MAX_OUTER_ITERATIONS );
    while( remaining > 0 )
    {
        const size_t count = remaining > block_size ? block_size : remaining;
        remaining -= count;
        temp_vec.clear();
        for( size_t j = 0; j < count; ++i, ++j )
        {
            if( CN::Dimension( TYPE_FROM_HANDLE( *i ) ) == to_dimension )
            {
                temp_vec.push_back( *i );
            }
            else if( to_dimension == 0 && TYPE_FROM_HANDLE( *i ) != MBPOLYHEDRON )
            {
                tmp_result = gMB->get_connectivity( *i, conn, conn_len, false, &storage );
                if( MB_SUCCESS != tmp_result )
                {
                    result = tmp_result;
                    continue;
                }
                temp_vec.insert( temp_vec.end(), conn, conn + conn_len );
            }
            else
            {
                tmp_result = gMB->a_entity_factory()->get_adjacencies( *i, to_dimension, create_if_missing, temp_vec );
                if( MB_SUCCESS != tmp_result )
                {
                    result = tmp_result;
                    continue;
                }
            }
        }

        std::sort( temp_vec.begin(), temp_vec.end() );
        ins = adj_entities.begin();
        ti  = temp_vec.begin();
        while( ti != temp_vec.end() )
        {
            EntityHandle first  = *ti;
            EntityHandle second = *ti;
            for( ++ti; ti != temp_vec.end() && ( *ti - second <= 1 ); ++ti )
                second = *ti;
            ins = adj_entities.insert( ins, first, second );
        }
    }
    return result;
}
static bool moab::get_bit ( int  position,
const unsigned char *  bytes 
) [static]

Definition at line 746 of file WriteHDF5Parallel.cpp.

Referenced by moab::WriteHDF5Parallel::create_tag_tables().

{
    int byte = position / 8;
    int bit  = position % 8;
    return 0 != ( bytes[byte] & ( ( (unsigned char)1 ) << bit ) );
}
static hid_t moab::get_id_type ( ) [static]

Definition at line 95 of file WriteHDF5.cpp.

{
    if( 8 == sizeof( WriteHDF5::wid_t ) )
    {
        if( 8 == sizeof( long ) )
            return H5T_NATIVE_ULONG;
        else
            return H5T_NATIVE_UINT64;
    }
    else if( 4 == sizeof( WriteHDF5::wid_t ) )
    {
        if( 4 == sizeof( int ) )
            return H5T_NATIVE_UINT;
        else
            return H5T_NATIVE_UINT32;
    }
    else
    {
        assert( 0 );
        return (hid_t)-1;
    }
}
static MeshSet* moab::get_mesh_set ( SequenceManager *  sm,
EntityHandle  h 
) [inline, static]

Definition at line 162 of file Core.cpp.

References moab::SequenceManager::find(), MB_SUCCESS, MBENTITYSET, and TYPE_FROM_HANDLE().

{
    EntitySequence* seq;
    if( MBENTITYSET != TYPE_FROM_HANDLE( h ) || MB_SUCCESS != sm->find( h, seq ) ) return 0;
    return reinterpret_cast< MeshSetSequence* >( seq )->get_set( h );
}
template<class Container >
static void moab::get_tagged ( const VarLenSparseTag::MapType &  mData,
EntityType  type,
Container &  output_range 
) [inline, static]

Definition at line 306 of file VarLenSparseTag.cpp.

References FIRST_HANDLE(), LAST_HANDLE(), MBMAXTYPE, and TYPE_FROM_HANDLE().

{
    VarLenSparseTag::MapType::const_iterator iter;
    typename Container::iterator hint = output_range.begin();
    if( MBMAXTYPE == type )
    {
        for( iter = mData.begin(); iter != mData.end(); ++iter )
            hint = output_range.insert( hint, iter->first );
    }
    else
    {
#ifdef MOAB_HAVE_UNORDERED_MAP
        for( iter = mData.begin(); iter != mData.end(); ++iter )
            if( TYPE_FROM_HANDLE( iter->first ) == type ) hint = output_range.insert( hint, iter->first );
#else
        iter                                         = mData.lower_bound( FIRST_HANDLE( type ) );
        VarLenSparseTag::MapType::const_iterator end = mData.lower_bound( LAST_HANDLE( type ) + 1 );
        for( ; iter != end; ++iter )
            hint = output_range.insert( hint, iter->first );
#endif
    }
}
template<class Container >
static void moab::get_tagged ( const VarLenSparseTag::MapType &  mData,
Range::const_iterator  begin,
Range::const_iterator  end,
Container &  output_range 
) [inline, static]

Definition at line 330 of file VarLenSparseTag.cpp.

{
    typename Container::iterator hint = output_range.begin();
    for( Range::const_iterator i = begin; i != end; ++i )
        if( mData.find( *i ) != mData.end() ) hint = output_range.insert( hint, *i );
}
template<class Container >
static void moab::get_tagged ( const VarLenSparseTag::MapType &  mData,
Container &  entities,
EntityType  type,
const Range *  intersect 
) [inline, static]

Definition at line 341 of file VarLenSparseTag.cpp.

References moab::Range::begin(), moab::Range::end(), entities, moab::Range::equal_range(), and MBMAXTYPE.

{
    if( !intersect )
        get_tagged< Container >( mData, type, entities );
    else if( MBMAXTYPE == type )
        get_tagged< Container >( mData, intersect->begin(), intersect->end(), entities );
    else
    {
        std::pair< Range::iterator, Range::iterator > r = intersect->equal_range( type );
        get_tagged< Container >( mData, r.first, r.second, entities );
    }
}
template<class Container >
static void moab::get_tagged ( const SparseTag::MapType &  mData,
EntityType  type,
Container &  output_range 
) [inline, static]

Definition at line 389 of file SparseTag.cpp.

References FIRST_HANDLE(), LAST_HANDLE(), MBMAXTYPE, and TYPE_FROM_HANDLE().

Referenced by moab::VarLenDenseTag::get_tagged_entities(), moab::VarLenSparseTag::get_tagged_entities(), moab::SparseTag::get_tagged_entities(), moab::VarLenDenseTag::num_tagged_entities(), moab::VarLenSparseTag::num_tagged_entities(), and moab::SparseTag::num_tagged_entities().

{
    SparseTag::MapType::const_iterator iter;
    typename Container::iterator hint = output_range.begin();
    if( MBMAXTYPE == type )
    {
        for( iter = mData.begin(); iter != mData.end(); ++iter )
            hint = output_range.insert( hint, iter->first );
    }
    else
    {
#ifdef MOAB_HAVE_UNORDERED_MAP
        for( iter = mData.begin(); iter != mData.end(); ++iter )
            if( TYPE_FROM_HANDLE( iter->first ) == type ) hint = output_range.insert( hint, iter->first );
#else
        iter                                   = mData.lower_bound( FIRST_HANDLE( type ) );
        SparseTag::MapType::const_iterator end = mData.lower_bound( LAST_HANDLE( type ) + 1 );
        for( ; iter != end; ++iter )
            hint = output_range.insert( hint, iter->first );
#endif
    }
}
template<class Container >
static void moab::get_tagged ( const SparseTag::MapType &  mData,
Range::const_iterator  begin,
Range::const_iterator  end,
Container &  output_range 
) [inline, static]

Definition at line 413 of file SparseTag.cpp.

{
    typename Container::iterator hint = output_range.begin();
    for( Range::const_iterator i = begin; i != end; ++i )
        if( mData.find( *i ) != mData.end() ) hint = output_range.insert( hint, *i );
}
template<class Container >
static void moab::get_tagged ( const SparseTag::MapType &  mData,
Container &  entities,
EntityType  type,
const Range *  intersect 
) [inline, static]

Definition at line 424 of file SparseTag.cpp.

References moab::Range::begin(), moab::Range::end(), entities, moab::Range::equal_range(), and MBMAXTYPE.

{
    if( !intersect )
        get_tagged< Container >( mData, type, entities );
    else if( MBMAXTYPE == type )
        get_tagged< Container >( mData, intersect->begin(), intersect->end(), entities );
    else
    {
        std::pair< Range::iterator, Range::iterator > r = intersect->equal_range( type );
        get_tagged< Container >( mData, r.first, r.second, entities );
    }
}
template<class Container >
static ErrorCode moab::get_tagged ( const SequenceManager *  seqman,
int  mySequenceArray,
EntityType  type,
Container &  entities 
) [inline, static]

Definition at line 461 of file VarLenDenseTag.cpp.

References moab::TypeSequenceManager::begin(), moab::VarLenTag::data(), moab::TypeSequenceManager::end(), moab::SequenceManager::entity_map(), MB_SUCCESS, moab::VarLenTag::size(), t, and type_range().

{
    typename Container::iterator hint         = entities.begin();
    std::pair< EntityType, EntityType > range = type_range( type );
    TypeSequenceManager::const_iterator i;
    const VarLenTag *data, *iter, *end;
    for( EntityType t = range.first; t != range.second; ++t )
    {
        const TypeSequenceManager& map = seqman->entity_map( t );
        for( i = map.begin(); i != map.end(); ++i )
        {
            data = reinterpret_cast< const VarLenTag* >( ( *i )->data()->get_tag_data( mySequenceArray ) );
            if( !data ) continue;
            end                 = data + ( *i )->end_handle() - ( *i )->data()->start_handle() + 1;
            iter                = data + ( *i )->start_handle() - ( *i )->data()->start_handle();
            EntityHandle handle = ( *i )->start_handle();
            for( ; iter != end; ++iter, ++handle )
                if( iter->size() ) hint = entities.insert( hint, handle );
        }
    }

    return MB_SUCCESS;
}
template<class Container >
static ErrorCode moab::get_tagged ( const SequenceManager *  seqman,
int  mySequenceArray,
Range::const_iterator  begin,
Range::const_iterator  end,
Container &  entities 
) [inline, static]

Definition at line 489 of file VarLenDenseTag.cpp.

References moab::EntitySequence::data(), ErrorCode, moab::RangeSeqIntersectIter::get_end_handle(), moab::RangeSeqIntersectIter::get_sequence(), moab::RangeSeqIntersectIter::get_start_handle(), moab::SequenceData::get_tag_data(), moab::RangeSeqIntersectIter::init(), MB_SUCCESS, size, moab::SequenceData::start_handle(), and moab::RangeSeqIntersectIter::step().

{
    typename Container::iterator hint = entities.begin();
    RangeSeqIntersectIter iter( const_cast< SequenceManager* >( seqman ) );
    ErrorCode rval = iter.init( begin, end );
    const VarLenTag* data;
    for( ; MB_SUCCESS == rval; rval = iter.step() )
    {
        data = reinterpret_cast< const VarLenTag* >( iter.get_sequence()->data()->get_tag_data( mySequenceArray ) );
        if( !data ) continue;

        data += iter.get_start_handle() - iter.get_sequence()->data()->start_handle();
        size_t count = iter.get_end_handle() - iter.get_start_handle() + 1;
        for( size_t i = 0; i < count; ++i )
            if( data[i].size() ) hint = entities.insert( hint, iter.get_start_handle() + i );
        rval = iter.step();
    }

    if( MB_FAILURE != rval )  // We get MB_FAILURE at iterator end
        return rval;

    return MB_SUCCESS;
}
template<class Container >
static ErrorCode moab::get_tagged ( const SequenceManager *  seqman,
int  mySequenceArray,
Container &  entities,
EntityType  type,
const Range *  intersect 
) [inline, static]

Definition at line 518 of file VarLenDenseTag.cpp.

References moab::Range::begin(), moab::Range::end(), entities, moab::Range::equal_range(), and MBMAXTYPE.

{
    if( !intersect )
        return get_tagged< Container >( seqman, mySequenceArray, type, entities );
    else if( MBMAXTYPE == type )
        return get_tagged< Container >( seqman, mySequenceArray, intersect->begin(), intersect->end(), entities );
    else
    {
        std::pair< Range::iterator, Range::iterator > r = intersect->equal_range( type );
        return get_tagged< Container >( seqman, mySequenceArray, r.first, r.second, entities );
    }
}
MB_EXPORT void moab::GetInterface ( MBuuid &  interface_requested,
UnknownInterface **  iface 
)

Definition at line 114 of file Factory.cpp.

References moab::ComponentFactory::objects_in_use, and moab::ComponentFactory::QueryInterface().

{
    // create an instance of our component factory
    ComponentFactory server;
    // ask the component factory to give us the interface we want
    server.QueryInterface( interface_requested, iface );
    // if the interface existed, put it on our list
    if( iface && *iface ) ComponentFactory::objects_in_use.push_front( *iface );
}
static herr_t moab::handle_hdf5_error ( void *  data) [static]

Definition at line 103 of file ReadHDF5.cpp.

References moab::ReadHDF5::HDF5ErrorHandler::data, moab::ReadHDF5::HDF5ErrorHandler::func, and MB_CHK_ERR_CONT.

Referenced by moab::ReadHDF5::clean_up_read(), moab::WriteHDF5::init(), main(), moab::ReadHDF5::set_up_read(), and moab::WriteHDF5::write_finished().

{
    ReadHDF5::HDF5ErrorHandler* h = reinterpret_cast< ReadHDF5::HDF5ErrorHandler* >( data );
    herr_t result                 = 0;
    if( h->func ) result = ( *h->func )( h->data );MB_CHK_ERR_CONT( MB_FAILURE );
    return result;
}

Definition at line 8 of file HDF5Common.cpp.

References dim.

Referenced by moab::WriteHDF5Parallel::parallel_create_file(), and moab::ReadHDF5::set_up_read().

{
    hsize_t dim = 100;
    hid_t space = H5Screate_simple( 1, &dim, NULL );
    bool result = false;

    HDF5_Error_Func_Type fptr = 0;
    void* fdata               = 0;
#if defined( H5Eget_auto_vers ) && H5Eget_auto_vers > 1
    if( 0 <= H5Eget_auto( H5E_DEFAULT, &fptr, &fdata ) ) H5Eset_auto( H5E_DEFAULT, 0, 0 );
#else
    if( 0 <= H5Eget_auto( &fptr, &fdata ) ) H5Eset_auto( 0, 0 );
#endif

    hsize_t start = 1, count = 5;
    H5Sselect_hyperslab( space, H5S_SELECT_SET, &start, 0, &count, 0 );
    start = 20;
    if( 0 <= H5Sselect_hyperslab( space, H5S_SELECT_APPEND, &start, 0, &count, 0 ) ) result = true;

    if( fptr )
    {
#if defined( H5Eset_auto_vers ) && H5Eset_auto_vers > 1
        H5Eset_auto( H5E_DEFAULT, fptr, fdata );
#else
        H5Eset_auto( fptr, fdata );
#endif
    }
    H5Sclose( space );

    return result;
}
EntityID moab::ID_FROM_HANDLE ( EntityHandle  handle) [inline]

Get the entity id out of the handle.

Definition at line 85 of file Internals.hpp.

References MB_ID_MASK.

Referenced by moab::HalfFacetRep::add_cells_of_single_component(), moab::WriteHDF5::assign_ids(), moab::Core::check_adjacencies(), moab::HalfFacetRep::check_nonmanifold_vertices(), check_valid_connectivity(), moab::WriteHDF5Parallel::communicate_shared_set_data(), moab::HalfFacetRep::create_halffacet(), moab::ParallelComm::create_interface_sets(), moab::HalfFacetRep::determine_border_vertices(), moab::HalfFacetRep::determine_incident_halfedges(), moab::HalfFacetRep::determine_incident_halffaces(), moab::HalfFacetRep::determine_incident_halfverts(), moab::HalfFacetRep::determine_sibling_halfedges(), moab::HalfFacetRep::determine_sibling_halffaces(), moab::HalfFacetRep::determine_sibling_halfverts(), ent_not_found(), moab::WriteHDF5Parallel::exchange_file_ids(), moab::HalfFacetRep::find_matching_halfedge(), moab::HalfFacetRep::find_matching_halfface(), moab::HalfFacetRep::find_matching_implicit_edge_in_cell(), moab::Skinner::find_skin_vertices_2D(), moab::Skinner::find_skin_vertices_3D(), moab::NestedRefine::get_connectivity(), moab::NestedRefine::get_coordinates(), moab::HalfFacetRep::get_half_facet_in_comp(), moab::HalfFacetRep::get_incident_map(), moab::ParallelComm::get_local_handles(), moab::HalfFacetRep::get_neighbor_adjacencies_1d(), moab::HalfFacetRep::get_neighbor_adjacencies_3d(), moab::RangeSetIterator::get_next_by_type(), moab::HalfFacetRep::get_sibling_map(), moab::HalfFacetRep::get_up_adjacencies_1d(), moab::HalfFacetRep::get_up_adjacencies_2d(), moab::HalfFacetRep::get_up_adjacencies_edg_3d(), moab::HalfFacetRep::get_up_adjacencies_edg_3d_comp(), moab::HalfFacetRep::get_up_adjacencies_face_3d(), moab::HalfFacetRep::get_up_adjacencies_vert_2d(), moab::HalfFacetRep::get_up_adjacencies_vert_3d(), hash_handle(), moab::Core::id_from_handle(), moab::HalfFacetRep::init_curve(), moab::HalfFacetRep::init_surface(), moab::HalfFacetRep::init_volume(), moab::Intx2Mesh::intersect_meshes(), moab::DualTool::list_entities(), moab::Core::list_entities(), moab::Core::list_entity(), moab::DebugOutput::list_range_real(), main(), moab::HalfFacetRep::mark_halfedges(), mb_type_is_maxtype_test(), mb_write_mesh_test(), not_found(), not_root_set(), moab::Range::num_of_type(), operator<<(), moab::ParallelComm::pack_sets(), moab::Core::print(), moab::ParallelComm::print_buffer(), moab::Core::print_database(), print_handles(), moab::WriteHDF5::print_id_map(), moab::HalfFacetRep::print_tags(), moab::ReadNCDF::read_nodes(), moab::HalfFacetRep::resize_hf_maps(), seqman_equal(), moab::HalfFacetRep::set_incident_map(), moab::HalfFacetRep::set_sibling_map(), moab::Range::str_rep(), moab::BitTag::unpack(), moab::ParallelComm::update_remote_data(), moab::ParallelComm::update_remote_data_old(), moab::WriteNCDF::write_BCs(), and moab::WriteNCDF::write_global_node_order_map().

{
    return ( handle & MB_ID_MASK );
}
static MeshSet::Count moab::insert_in_vector ( const MeshSet::Count  count,
MeshSet::CompactList &  list,
const EntityHandle  h,
int &  result 
) [inline, static]

Insert into parent/child list.

Definition at line 103 of file MeshSet.cpp.

References moab::MeshSet::CompactList::hnd, moab::MeshSet::MANY, moab::MeshSet::ONE, moab::MeshSet::CompactList::ptr, size, moab::MeshSet::TWO, and moab::MeshSet::ZERO.

Referenced by moab::MeshSet::add_child(), and moab::MeshSet::add_parent().

{
    switch( count )
    {
        case MeshSet::ZERO:
            list.hnd[0] = h;
            result      = true;
            return MeshSet::ONE;
        case MeshSet::ONE:
            if( list.hnd[0] == h )
            {
                result = false;
                return MeshSet::ONE;
            }
            else
            {
                result      = true;
                list.hnd[1] = h;
                return MeshSet::TWO;
            }
        case MeshSet::TWO:
            if( list.hnd[0] == h || list.hnd[1] == h )
            {
                result = false;
                return MeshSet::TWO;
            }
            else
            {
                EntityHandle* ptr = (EntityHandle*)malloc( 3 * sizeof( EntityHandle ) );
                ptr[0]            = list.hnd[0];
                ptr[1]            = list.hnd[1];
                ptr[2]            = h;
                list.ptr[0]       = ptr;
                list.ptr[1]       = ptr + 3;
                result            = true;
                return MeshSet::MANY;
            }
        case MeshSet::MANY:
            if( std::find( list.ptr[0], list.ptr[1], h ) != list.ptr[1] )
            {
                result = false;
            }
            else
            {
                int size          = list.ptr[1] - list.ptr[0];
                list.ptr[0]       = (EntityHandle*)realloc( list.ptr[0], ( size + 1 ) * sizeof( EntityHandle ) );
                list.ptr[0][size] = h;
                list.ptr[1]       = list.ptr[0] + size + 1;
                result            = true;
            }
            return MeshSet::MANY;
    }

    return MeshSet::ZERO;
}
static void moab::INT_IO_ERROR ( bool  condition,
unsigned  line 
) [inline, static]

Definition at line 114 of file Tqdcfr.cpp.

References buffer.

{
    if( !condition )
    {
        char buffer[] = __FILE__ "             ";
        sprintf( buffer, "%s:%u", __FILE__, line );
        fflush( stderr );
        perror( buffer );
        abort();
    }
}
static void moab::intersect ( const mhdf_EntDesc group,
const Range &  range,
Range &  result 
) [static]

Definition at line 125 of file ReadHDF5.cpp.

References moab::Range::begin(), mhdf_EntDesc::count, moab::Range::end(), moab::Range::lower_bound(), moab::Range::merge(), and mhdf_EntDesc::start_id.

{
    Range::const_iterator s, e;
    s = Range::lower_bound( range.begin(), range.end(), group.start_id );
    e = Range::lower_bound( s, range.end(), group.start_id + group.count );
    result.merge( s, e );
}
Range moab::intersect ( const Range &  range1,
const Range &  range2 
)

intersect two ranges, placing the results in the return range

Definition at line 626 of file Range.cpp.

References moab::Range::begin(), moab::Range::const_pair_begin(), moab::Range::end(), moab::GeomUtil::first(), moab::Range::insert(), MAX(), and MIN().

{
    Range::const_pair_iterator r_it[2] = { range1.const_pair_begin(), range2.const_pair_begin() };
    EntityHandle low_it, high_it;

    Range lhs;
    Range::iterator hint = lhs.begin();

    // terminate the while loop when at least one "start" iterator is at the
    // end of the list
    while( r_it[0] != range1.end() && r_it[1] != range2.end() )
    {

        if( r_it[0]->second < r_it[1]->first )
            // 1st subrange completely below 2nd subrange
            ++r_it[0];
        else if( r_it[1]->second < r_it[0]->first )
            // 2nd subrange completely below 1st subrange
            ++r_it[1];

        else
        {
            // else ranges overlap; first find greater start and lesser end
            low_it  = MAX( r_it[0]->first, r_it[1]->first );
            high_it = MIN( r_it[0]->second, r_it[1]->second );

            // insert into result
            hint = lhs.insert( hint, low_it, high_it );

            // now find bounds of this insertion and increment corresponding iterator
            if( high_it == r_it[0]->second ) ++r_it[0];
            if( high_it == r_it[1]->second ) ++r_it[1];
        }
    }

    return lhs;
}
template<typename T1 , typename T2 >
static T1 moab::intersect ( T1  set1_begin,
T1  set1_end,
T2  set2_begin,
T2  set2_end 
) [inline, static]

Definition at line 886 of file AEntityFactory.cpp.

Referenced by add_dead_elems_to_impl_compl(), MetisPartitioner::assemble_taggedsets_graph(), moab::WriteHDF5::check_dense_format_tag(), moab::WriteHDF5Parallel::communicate_shared_set_ids(), moab::WriteHDF5Parallel::create_meshset_tables(), moab::ReadGmsh::create_sets(), vtkMoabReader::CreateSubBlocks(), dot_children(), dot_contained(), moab::ParallelComm::exchange_tags(), FBiGeom_getEntSets(), FBiGeom_getNumEntSets(), moab::ReadHDF5::find_sets_containing(), smoab::findFaceSets(), moab::DualTool::foc_get_addl_ents(), moab::ReadUtil::gather_related_ents(), moab::Core::get_entities_by_type_and_tag(), moab::ReadHDF5::get_subset_ids(), moab::ParallelComm::get_tag_send_list(), moab::BitTag::get_tagged_entities(), moab::DenseTag::get_tagged_entities(), moab::AEntityFactory::get_up_adjacency_elements(), moab::FBEngine::getEntities(), moab::FBEngine::getNumOfType(), ZoltanPartitioner::include_closure(), intersect_test(), SetIntersectIter< Container >::intersect_with_set(), moab::ReadHDF5::load_file_partial(), mb_skin_higher_order_regions_common(), moab::MergeMesh::merge_higher_dimensions(), moab::BitTag::num_tagged_entities(), moab::GeomTopoTool::other_entity(), moab::FBEngine::redistribute_boundary_edges_to_faces(), moab::ParallelComm::reduce_tags(), remove_entities_from_sets(), moab::WriteHDF5Parallel::remove_remote_entities(), moab::WriteHDF5Parallel::remove_remote_sets(), moab::ParallelComm::resolve_shared_sets(), set_intersection_query(), moab::FBEngine::split_surface_with_direction(), moab::MeshTopoUtil::star_next_entity(), test_boolean(), test_multiple_files(), moab::ReorderTool::update_set_contents(), moab::WriteGmsh::write_file(), and moab::WriteVtk::write_tags().

{
  T1 set1_write = set1_begin;
  while (set1_begin != set1_end) {
    if (set2_begin == set2_end)
      return set1_write;
    while (*set2_begin < *set1_begin)
      if (++set2_begin == set2_end)
        return set1_write;
    if (!(*set1_begin < *set2_begin)) {
      *set1_write = *set1_begin;
      ++set1_write;
      ++set2_begin;
    }
    ++set1_begin;
  }
  return set1_write;
}
bool moab::intersect_segment_and_plane_slice ( CartVect &  from,
CartVect &  to,
CartVect &  p1,
CartVect &  p2,
CartVect &  ,
CartVect &  normPlane,
CartVect &  intx_point,
double &  parPos 
)

Definition at line 50 of file FBEngine.cpp.

References debug_splits, and tolerance_segment.

Referenced by moab::FBEngine::compute_intersection_points(), and moab::FBEngine::split_surface_with_direction().

{
    //
    // plane eq is normPlane % r + d = 0, or normPlane % r - normPlane%p1 = 0
    double dd      = -normPlane % p1;
    double valFrom = normPlane % from + dd;
    double valTo   = normPlane % to + dd;

    if( fabs( valFrom ) < tolerance_segment )
    {
        intx_point   = from;
        parPos       = 0.;
        double proj1 = ( intx_point - p1 ) % ( p2 - p1 );
        double proj2 = ( intx_point - p2 ) % ( p1 - p2 );
        if( proj1 <= -tolerance_segment || proj2 <= -tolerance_segment ) return false;
        if( debug_splits ) std::cout << "intx : " << intx_point << "\n";
        return true;
    }
    if( fabs( valTo ) < tolerance_segment )
    {
        intx_point   = to;
        parPos       = 1;
        double proj1 = ( intx_point - p1 ) % ( p2 - p1 );
        double proj2 = ( intx_point - p2 ) % ( p1 - p2 );
        if( proj1 <= -tolerance_segment || proj2 <= -tolerance_segment ) return false;
        if( debug_splits ) std::cout << "intx : " << intx_point << "\n";
        return true;
    }
    if( valFrom * valTo > 0 ) return false;  // no intersection, although it could be very close
    // else, it could intersect the plane; check for the slice too.
    parPos     = valFrom / ( valFrom - valTo );  // this is 0 for valFrom 0, 1 for valTo 0
    intx_point = from + ( to - from ) * parPos;
    // now check if the intx_point is indeed between p1 and p2 in the slice.
    double proj1 = ( intx_point - p1 ) % ( p2 - p1 );
    double proj2 = ( intx_point - p2 ) % ( p1 - p2 );
    if( proj1 <= -tolerance_segment || proj2 <= -tolerance_segment ) return false;

    if( debug_splits ) std::cout << "intx : " << intx_point << "\n";
    return true;
}
bool moab::IntPairComparator ( const std::pair< int, int > &  a,
const std::pair< int, int > &  b 
)

Definition at line 530 of file TempestRemapper.cpp.

Referenced by moab::TempestRemapper::convert_overlap_mesh_sorted_by_source().

{
    if( a.first == b.first )
        return a.second < b.second;
    else
        return a.first < b.first;
}
bool moab::is_sorted_unique ( std::vector< unsigned > &  v)

Definition at line 4613 of file ParallelComm.cpp.

Referenced by moab::ParallelComm::resolve_shared_sets().

{
    for( size_t i = 1; i < v.size(); i++ )
        if( v[i - 1] >= v[i] ) return false;
    return true;
}
static bool moab::is_zero_bytes ( const void *  mem,
size_t  size 
) [static]

Definition at line 2266 of file Core.cpp.

References size.

Referenced by moab::Core::tag_get_handle().

{
    const char* iter      = reinterpret_cast< const char* >( mem );
    const char* const end = iter + size;
    for( ; iter != end; ++iter )
        if( *iter ) return false;
    return true;
}
template<class T >
T moab::LAND ( const T arg1,
const T arg2 
)

Definition at line 3807 of file ParallelComm.cpp.

{
    return arg1 && arg2;
}
int moab::LID_FROM_HALFFACET ( HFacet  handle) [inline]

Definition at line 40 of file HalfFacetRep.cpp.

References MB_ID_WIDTH.

Referenced by moab::HalfFacetRep::lid_from_halffacet().

{
    return static_cast< int >( handle >> MB_ID_WIDTH );
}
static void moab::local_condense ( realType u,
int  op,
const sint cm 
) [static]

Definition at line 128 of file gs.cpp.

References DO_ADD, DO_BPR, DO_MAX, DO_MIN, DO_MUL, GS_OP_ADD, GS_OP_BPR, GS_OP_MAX, GS_OP_MIN, GS_OP_MUL, and LOOP.

Referenced by moab::gs_data::gs_data_op(), and moab::gs_data::gs_data_op_many().

{
    switch( op )
    {
        case GS_OP_ADD:
            LOOP( DO_ADD );
            break;
        case GS_OP_MUL:
            LOOP( DO_MUL );
            break;
        case GS_OP_MIN:
            LOOP( DO_MIN );
            break;
        case GS_OP_MAX:
            LOOP( DO_MAX );
            break;
        case GS_OP_BPR:
            LOOP( DO_BPR );
            break;
    }
}
static void moab::local_condense_vec ( realType u,
uint  n,
int  op,
const sint cm 
) [static]

Definition at line 177 of file gs.cpp.

References DO_ADD, DO_BPR, DO_MAX, DO_MIN, DO_MUL, GS_OP_ADD, GS_OP_BPR, GS_OP_MAX, GS_OP_MIN, GS_OP_MUL, and LOOP.

Referenced by moab::gs_data::gs_data_op_vec().

{
    switch( op )
    {
        case GS_OP_ADD:
            LOOP( DO_ADD );
            break;
        case GS_OP_MUL:
            LOOP( DO_MUL );
            break;
        case GS_OP_MIN:
            LOOP( DO_MIN );
            break;
        case GS_OP_MAX:
            LOOP( DO_MAX );
            break;
        case GS_OP_BPR:
            LOOP( DO_BPR );
            break;
    }
}
static void moab::local_uncondense ( realType u,
const sint cm 
) [static]

Definition at line 150 of file gs.cpp.

References DO_SET, and LOOP.

Referenced by moab::gs_data::gs_data_op(), and moab::gs_data::gs_data_op_many().

{
    LOOP( DO_SET );
}
static void moab::local_uncondense_vec ( realType u,
uint  n,
const sint cm 
) [static]

Definition at line 199 of file gs.cpp.

References DO_SET, and LOOP.

Referenced by moab::gs_data::gs_data_op_vec().

{
    LOOP( DO_SET );
}
template<class T >
T moab::LOR ( const T arg1,
const T arg2 
)

Definition at line 3812 of file ParallelComm.cpp.

{
    return arg1 || arg2;
}
template<class T >
T moab::LXOR ( const T arg1,
const T arg2 
)

Definition at line 3817 of file ParallelComm.cpp.

{
    return ( ( arg1 && !arg2 ) || ( !arg1 && arg2 ) );
}
template<class T >
T moab::MAX ( const T arg1,
const T arg2 
)

Definition at line 3822 of file ParallelComm.cpp.

Referenced by moab::Tqdcfr::check_contiguous(), intersect(), and moab::Tqdcfr::read_nodes().

{
    return ( arg1 > arg2 ? arg1 : arg2 );
}
ErrorCode moab::MBError ( int  line,
const char *  func,
const char *  file,
const char *  dir,
ErrorCode  err_code,
const char *  err_msg,
ErrorType  err_type 
)

Routine that is called to create a new error or handle an existing one.

Definition at line 96 of file ErrorHandler.cpp.

References lastError, MB_ERROR_TYPE_EXISTING, MBTraceBackErrorHandler(), and MPI_COMM_WORLD.

{
    // When this routine is called to handle an existing error (instead of creating a new one),
    // we need to check if the returned non-success result from a function might be a non-error
    // condition. If no last error message was ever set, just return the given error code.
    if( MB_ERROR_TYPE_EXISTING == err_type && "No error" == lastError ) return err_code;

    MBTraceBackErrorHandler( line, func, file, dir, err_msg, err_type );

#ifdef MOAB_HAVE_MPI
    // If this is called from the main() routine we call MPI_Abort() to allow
    // the parallel program to be properly shutdown
    if( strncmp( func, "main", 4 ) == 0 ) MPI_Abort( MPI_COMM_WORLD, err_code );
#endif

    return err_code;
}

Finalize MOAB error handler (e.g. delete the utility object for printing error output)

Examples:
CrystalRouterExample.cpp, ErrorHandlingSimulation.cpp, TestErrorHandling.cpp, and TestErrorHandlingPar.cpp.

Definition at line 40 of file ErrorHandler.cpp.

References errorOutput.

Referenced by moab::Core::deinitialize(), and main().

{
    if( NULL != errorOutput )
    {
        delete errorOutput;
        errorOutput = NULL;
    }
}
void moab::MBErrorHandler_GetLastError ( std::string &  error)

Get information about the last error.

Definition at line 54 of file ErrorHandler.cpp.

References lastError.

Referenced by moab::Core::get_last_error().

Initialize MOAB error handler (e.g. create a utility object for printing error output)

Examples:
CrystalRouterExample.cpp, ErrorHandlingSimulation.cpp, TestErrorHandling.cpp, and TestErrorHandlingPar.cpp.

Definition at line 30 of file ErrorHandler.cpp.

References errorOutput, and moab::ErrorOutput::use_world_rank().

Referenced by moab::Core::initialize(), and main().

{
    if( NULL == errorOutput )
    {
        errorOutput = new( std::nothrow ) ErrorOutput( stderr );
        assert( NULL != errorOutput );
        errorOutput->use_world_rank();
    }
}

Indicates whether MBErrorHandler_Init has been called.

Definition at line 49 of file ErrorHandler.cpp.

References errorOutput.

Referenced by moab::Core::initialize().

{
    return ( NULL != errorOutput );
}
void moab::MBTraceBackErrorHandler ( int  line,
const char *  func,
const char *  file,
const char *  dir,
const char *  err_msg,
ErrorType  err_type 
)

Definition at line 59 of file ErrorHandler.cpp.

References errorOutput, moab::ErrorOutput::get_rank(), moab::ErrorOutput::have_rank(), lastError, MB_ERROR_TYPE_EXISTING, MB_ERROR_TYPE_NEW_GLOBAL, moab::ErrorOutput::print(), moab::ErrorOutput::printf(), and rank.

Referenced by MBError().

{
    if( NULL == errorOutput ) return;

    // For a globally fatal error, get world rank of current processor, so that it is only printed
    // from processor 0 For a per-processor relevant error, set rank of current processor to 0, so
    // that it is always printed
    int rank = 0;
    if( MB_ERROR_TYPE_NEW_GLOBAL == err_type && errorOutput->have_rank() ) rank = errorOutput->get_rank();

    if( 0 == rank )
    {
        // Print the error message for a new error
        if( MB_ERROR_TYPE_EXISTING != err_type && NULL != err_msg )
        {
            errorOutput->print( "--------------------- Error Message ------------------------------------\n" );
            errorOutput->printf( "%s!\n", err_msg );
            lastError = err_msg;
        }

        // Print a line of stack trace for a new error, or an existing one
        errorOutput->printf( "%s() line %d in %s%s\n", func, line, dir, file );
    }
    else
    {
        // Do not print the error message or stack trace, since processor 0 will print them
        // Sleep 10 seconds before aborting so it will not accidently kill process 0
        sleep( 10 );
        abort();
    }
}
static int moab::measure ( const CartVect &  v,
double &  result 
) [static]

Definition at line 1799 of file OrientedBoxTreeTool.cpp.

Referenced by gather_set_stats(), main(), moab::OrientedBoxTreeTool::recursive_stats(), and test_eval().

{
    const double tol = 1e-6;
    int dims         = 0;
    result           = 1;
    for( int i = 0; i < 3; ++i )
        if( v[i] > tol )
        {
            ++dims;
            result *= v[i];
        }
    return dims;
}
static std::string moab::mem_to_string ( unsigned long  mem) [static]

Definition at line 2069 of file AdaptiveKDTree.cpp.

References buffer, and unit().

Referenced by moab::AdaptiveKDTree::print(), and print_stats().

{
    char unit[3] = "B";
    if( mem > 9 * 1024 )
    {
        mem = ( mem + 512 ) / 1024;
        strcpy( unit, "kB" );
    }
    if( mem > 9 * 1024 )
    {
        mem = ( mem + 512 ) / 1024;
        strcpy( unit, "MB" );
    }
    if( mem > 9 * 1024 )
    {
        mem = ( mem + 512 ) / 1024;
        strcpy( unit, "GB" );
    }
    char buffer[256];
    sprintf( buffer, "%lu %s", mem, unit );
    return buffer;
}
static void moab::merge_ranged_ids ( const unsigned long *  range_list,
size_t  len,
std::vector< WriteHDF5::wid_t > &  result 
) [static]

Definition at line 1761 of file WriteHDF5Parallel.cpp.

References moab::Range::const_pair_begin(), moab::Range::const_pair_end(), moab::Range::insert(), moab::Range::psize(), and STATIC_ASSERT().

Referenced by moab::WriteHDF5Parallel::unpack_set().

{
    typedef WriteHDF5::wid_t wid_t;
    assert( 0 == len % 2 );
    assert( 0 == result.size() % 2 );
    STATIC_ASSERT( sizeof( std::pair< wid_t, wid_t > ) == 2 * sizeof( wid_t ) );

    result.insert( result.end(), range_list, range_list + len );
    size_t plen = result.size() / 2;
    Range tmp;
    for( size_t i = 0; i < plen; i++ )
    {
        EntityHandle starth = (EntityHandle)result[2 * i];
        EntityHandle endh   = (EntityHandle)result[2 * i] + (wid_t)result[2 * i + 1] - 1;  // id + count - 1
        tmp.insert( starth, endh );
    }
    // Now convert back to std::vector<WriteHDF5::wid_t>, compressed range format
    result.resize( tmp.psize() * 2 );
    int j = 0;
    for( Range::const_pair_iterator pit = tmp.const_pair_begin(); pit != tmp.const_pair_end(); ++pit, j++ )
    {
        result[2 * j]     = pit->first;
        result[2 * j + 1] = pit->second - pit->first + 1;
    }
}
static void moab::merge_vector_ids ( const unsigned long *  list,
size_t  len,
std::vector< WriteHDF5::wid_t > &  result 
) [static]

Definition at line 1787 of file WriteHDF5Parallel.cpp.

Referenced by moab::WriteHDF5Parallel::unpack_set().

{
    result.insert( result.end(), list, list + len );
}
template<class T >
T moab::MIN ( const T arg1,
const T arg2 
)

Definition at line 3827 of file ParallelComm.cpp.

Referenced by moab::Tqdcfr::check_contiguous(), and intersect().

{
    return ( arg1 < arg2 ? arg1 : arg2 );
}
MB_EXPORT const char* moab::MoabVersion ( )

Definition at line 108 of file Factory.cpp.

References MB_INTERFACE_VERSION.

const char* moab::mpi_err_str ( int  errorcode)

Definition at line 80 of file WriteHDF5Parallel.cpp.

References buffer.

{
    static char buffer[2048];
    int len = sizeof( buffer );
    MPI_Error_string( errorcode, buffer, &len );
    buffer[std::min( (size_t)len, sizeof( buffer ) - 1 )] = '\0';
    return buffer;
}
template<class T >
T moab::MULT ( const T arg1,
const T arg2 
)

Definition at line 3837 of file ParallelComm.cpp.

{
    return arg1 * arg2;
}
static int moab::my_Gatherv ( void *  sendbuf,
int  sendcount,
MPI_Datatype  sendtype,
std::vector< unsigned char > &  recvbuf,
std::vector< int > &  recvcounts,
int  root,
MPI_Comm  comm 
) [static]

Definition at line 184 of file WriteHDF5Parallel.cpp.

References rank.

Referenced by moab::WriteHDF5Parallel::create_tag_tables().

{
    int nproc, rank, bytes, err;
    MPI_Comm_size( comm, &nproc );
    MPI_Comm_rank( comm, &rank );
    MPI_Type_size( sendtype, &bytes );

    recvcounts.resize( rank == root ? nproc : 0 );
    err = MPI_Gather( &sendcount, 1, MPI_INT, &recvcounts[0], 1, MPI_INT, root, comm );
    if( MPI_SUCCESS != err ) return err;

    std::vector< int > disp( recvcounts.size() );
    if( root == rank )
    {
        disp[0] = 0;
        for( int i = 1; i < nproc; ++i )
            disp[i] = disp[i - 1] + recvcounts[i - 1];
        recvbuf.resize( bytes * ( disp.back() + recvcounts.back() ) );
    }

    return MPI_Gatherv( sendbuf, sendcount, sendtype, &recvbuf[0], &recvcounts[0], &disp[0], sendtype, root, comm );
}
static ErrorCode moab::not_found ( const std::string &  ,
EntityHandle   
) [inline, static]

Definition at line 20 of file DenseTag.cpp.

References moab::CN::EntityTypeName(), ID_FROM_HANDLE(), MB_TAG_NOT_FOUND, and TYPE_FROM_HANDLE().

Referenced by moab::VarLenDenseTag::get_array(), moab::MeshTag::get_data(), moab::DenseTag::get_data(), and moab::VarLenDenseTag::get_data().

{
    // MB_TAG_NOT_FOUND could be a non-error condition, do not call MB_SET_ERR on it
#if 0
  if (h)
    fprintf(stderr, "[Warning]: No dense tag %s value for %s %ld\n",
        name.c_str(),
        CN::EntityTypeName(TYPE_FROM_HANDLE(h)),
        (unsigned long)ID_FROM_HANDLE(h));
  else
    fprintf(stderr, "[Warning]: No dense tag %s value for root set\n", name.c_str());
#endif

    return MB_TAG_NOT_FOUND;
}
static ErrorCode moab::not_found ( std::string  ,
EntityHandle   
) [inline, static]

Definition at line 21 of file VarLenDenseTag.cpp.

References moab::CN::EntityTypeName(), ID_FROM_HANDLE(), MB_TAG_NOT_FOUND, and TYPE_FROM_HANDLE().

{
#if 0
  // MB_TAG_NOT_FOUND could be a non-error condition, do not call MB_SET_ERR on it
  // Print warning messages for debugging only
  if (h)
    fprintf(stderr, "[Warning]: No variable-length dense tag %s value for %s %lu\n",
        name.c_str(),
        CN::EntityTypeName(TYPE_FROM_HANDLE(h)),
        (unsigned long)ID_FROM_HANDLE(h));
  else
    fprintf(stderr, "[Warning]: No variable-length dense tag %s value for root set\n", name.c_str());
#endif

    return MB_TAG_NOT_FOUND;
}
static ErrorCode moab::not_found ( const std::string &  ) [inline, static]

Definition at line 41 of file MeshTag.cpp.

References MB_TAG_NOT_FOUND.

{
    // MB_TAG_NOT_FOUND could be a non-error condition, do not call MB_SET_ERR on it
#if 0
  fprintf(stderr, "[Warning]: No mesh tag %s value for global/mesh tag\n", name.c_str());
#endif

    return MB_TAG_NOT_FOUND;
}
static ErrorCode moab::not_root_set ( const std::string &  ,
EntityHandle   
) [inline, static]

Definition at line 16 of file MeshTag.cpp.

References moab::CN::EntityTypeName(), ID_FROM_HANDLE(), MB_SET_ERR, MB_TAG_NOT_FOUND, MB_VARIABLE_DATA_LENGTH, and TYPE_FROM_HANDLE().

Referenced by all_root_set(), moab::MeshTag::clear_data(), moab::MeshTag::get_data(), moab::MeshTag::remove_data(), moab::MeshTag::set_data(), and moab::MeshTag::tag_iterate().

{
    // MB_TAG_NOT_FOUND could be a non-error condition, do not call MB_SET_ERR on it
    // Print warning messages for debugging only
#if 0
  MB_SET_ERR(MB_VARIABLE_DATA_LENGTH, "Cannot get/set mesh/global tag " << name << " on non-root-set " << CN::EntityTypeName(TYPE_FROM_HANDLE(h)) << " " << (unsigned long)ID_FROM_HANDLE(h));
#endif

    return MB_TAG_NOT_FOUND;
}
int moab::numAdjTriInSet ( Interface *  mb,
EntityHandle  startEdge,
EntityHandle  set 
)

Definition at line 25 of file SmoothFace.cpp.

References moab::Interface::contains_entities(), moab::Interface::get_adjacencies(), and moab::Interface::UNION.

{
    std::vector< EntityHandle > adjTri;
    mb->get_adjacencies( &startEdge, 1, 2, false, adjTri, Interface::UNION );
    // count how many are in the set
    int nbInSet = 0;
    for( size_t i = 0; i < adjTri.size(); i++ )
    {
        EntityHandle tri = adjTri[i];
        if( mb->contains_entities( set, &tri, 1 ) ) nbInSet++;
    }
    return nbInSet;
}
bool moab::operator!= ( const Range &  r1,
const Range &  r2 
) [inline]

Definition at line 924 of file Range.hpp.

{
    return !( r1 == r2 );
}
double moab::operator% ( const CartVect &  u,
const CartVect &  v 
) [inline]

Dot product.

Definition at line 170 of file CartVect.hpp.

{
    return u[0] * v[0] + u[1] * v[1] + u[2] * v[2];
}
AxisBox moab::operator& ( const AxisBox &  a,
const AxisBox &  b 
) [inline]

intersect

Definition at line 116 of file AxisBox.hpp.

{
    return AxisBox( a ) &= b;
}
AffineXform moab::operator* ( const AffineXform A,
const AffineXform B 
) [inline]

create a new transform equivalent to transform A followed by transform B

Definition at line 119 of file AffineXform.hpp.

References moab::AffineXform::accumulate().

{
    AffineXform result( A );
    result.accumulate( B );
    return result;
}
CartVect moab::operator* ( const CartVect &  u,
const CartVect &  v 
) [inline]

cross product

Definition at line 164 of file CartVect.hpp.

{
    return CartVect( u[1] * v[2] - u[2] * v[1], u[2] * v[0] - u[0] * v[2], u[0] * v[1] - u[1] * v[0] );
}
CartVect moab::operator* ( const CartVect &  v,
double  s 
) [inline]

Definition at line 227 of file CartVect.hpp.

{
    return CartVect( v[0] * s, v[1] * s, v[2] * s );
}
CartVect moab::operator* ( double  s,
const CartVect &  v 
) [inline]

Definition at line 243 of file CartVect.hpp.

{
    return CartVect( v[0] * s, v[1] * s, v[2] * s );
}
Matrix3 moab::operator* ( const Matrix3 &  a,
const Matrix3 &  b 
) [inline]

Definition at line 1051 of file Matrix3.hpp.

References moab::Matrix3::_mat, and moab::Matrix::mmult3().

{
#ifndef MOAB_HAVE_LAPACK
    return Matrix3( a._mat * b._mat );
#else
    return Matrix::mmult3( a, b );
#endif
}
template<typename T >
std::vector< T > moab::operator* ( const Matrix3 &  m,
const std::vector< T > &  v 
) [inline]

Definition at line 1061 of file Matrix3.hpp.

References moab::Matrix::matrix_vector().

{
    return moab::Matrix::matrix_vector( m, v );
}
template<typename T >
std::vector< T > moab::operator* ( const std::vector< T > &  v,
const Matrix3 &  m 
) [inline]

Definition at line 1067 of file Matrix3.hpp.

References moab::Matrix::vector_matrix().

{
    return moab::Matrix::vector_matrix( v, m );
}
CartVect moab::operator* ( const Matrix3 &  m,
const CartVect &  v 
) [inline]

Definition at line 1072 of file Matrix3.hpp.

References moab::Matrix::matrix_vector().

{
    return moab::Matrix::matrix_vector( m, v );
}
CartVect moab::operator* ( const CartVect &  v,
const Matrix3 &  m 
) [inline]

Definition at line 1077 of file Matrix3.hpp.

References moab::Matrix::vector_matrix().

{
    return moab::Matrix::vector_matrix( v, m );
}
CartVect moab::operator+ ( const CartVect &  u,
const CartVect &  v 
) [inline]

Definition at line 153 of file CartVect.hpp.

{
    return CartVect( u[0] + v[0], u[1] + v[1], u[2] + v[2] );
}
CartVect moab::operator+ ( const CartVect &  v,
double  s 
) [inline]

Definition at line 219 of file CartVect.hpp.

{
    return CartVect( v[0] + s, v[1] + s, v[2] + s );
}
CartVect moab::operator+ ( double  s,
const CartVect &  v 
) [inline]

Definition at line 235 of file CartVect.hpp.

{
    return CartVect( v[0] + s, v[1] + s, v[2] + s );
}
Range::const_iterator moab::operator+ ( const Range::const_iterator &  it,
EntityID  step 
) [inline]

Definition at line 780 of file Range.hpp.

{
    Range::const_iterator tmp( it );
    return tmp += step;
}
Range::const_iterator moab::operator+ ( EntityID  step,
const Range::const_iterator &  it 
) [inline]

Definition at line 786 of file Range.hpp.

{
    Range::const_iterator tmp( it );
    return tmp += step;
}
Matrix3 moab::operator+ ( const Matrix3 &  a,
const Matrix3 &  b 
) [inline]

Definition at line 1027 of file Matrix3.hpp.

References moab::Matrix3::_mat, and moab::Matrix3::size.

{
#ifndef MOAB_HAVE_LAPACK
    return Matrix3( a._mat + b._mat );
#else
    Matrix3 s( a );
    for( int i = 0; i < Matrix3::size; ++i )
        s( i ) += b._mat[i];
    return s;
#endif
}
ExoIIElementType moab::operator++ ( ExoIIElementType &  type,
int   
) [inline]

postfix increment operator for EntityType

Definition at line 121 of file ExoIIUtil.hpp.

Referenced by moab::Range::pair_iterator::operator++(), moab::Range::const_iterator::operator++(), and moab::Range::const_pair_iterator::operator++().

{
    return (ExoIIElementType)( ( (int&)type )++ );
}
ExoIIElementType& moab::operator++ ( ExoIIElementType &  type) [inline]

prefix increment operator for EntityType

Definition at line 127 of file ExoIIUtil.hpp.

{
    return (ExoIIElementType&)( ++( (int&)type ) );
}
CartVect moab::operator- ( const CartVect &  u,
const CartVect &  v 
) [inline]

Definition at line 158 of file CartVect.hpp.

{
    return CartVect( u[0] - v[0], u[1] - v[1], u[2] - v[2] );
}
CartVect moab::operator- ( const CartVect &  v) [inline]

Definition at line 215 of file CartVect.hpp.

{
    return CartVect( -v[0], -v[1], -v[2] );
}
CartVect moab::operator- ( const CartVect &  v,
double  s 
) [inline]

Definition at line 223 of file CartVect.hpp.

{
    return CartVect( v[0] - s, v[1] - s, v[2] - s );
}
CartVect moab::operator- ( double  s,
const CartVect &  v 
) [inline]

Definition at line 239 of file CartVect.hpp.

{
    return CartVect( v[0] - s, v[1] - s, v[2] - s );
}
MeshSet::hdl_iter::difference_type moab::operator- ( const MeshSet::hdl_iter &  a,
const MeshSet::hdl_iter &  b 
) [inline]

Definition at line 387 of file MeshSet.hpp.

References moab::MeshSet::hdl_iter::h.

{
    return (MeshSet::hdl_iter::difference_type)a.h - (MeshSet::hdl_iter::difference_type)b.h;
}
Range::const_iterator moab::operator- ( const Range::const_iterator &  it,
EntityID  step 
) [inline]

Definition at line 792 of file Range.hpp.

{
    Range::const_iterator tmp( it );
    return tmp -= step;
}
Range::const_iterator moab::operator- ( EntityID  step,
const Range::const_iterator &  it 
) [inline]

Definition at line 798 of file Range.hpp.

{
    Range::const_iterator tmp( it );
    return tmp -= step;
}
EntityID moab::operator- ( const Range::const_iterator &  it1,
const Range::const_iterator &  it2 
)

Definition at line 793 of file Range.cpp.

References moab::Range::PairNode::mNext, moab::Range::const_iterator::mNode, and moab::Range::const_iterator::mValue.

{
    assert( !it2.mValue || *it2 >= *it1 );
    if( it2.mNode == it1.mNode )
    {
        return *it2 - *it1;
    }

    EntityID result = it1.mNode->second - it1.mValue + 1;
    for( Range::PairNode* n = it1.mNode->mNext; n != it2.mNode; n = n->mNext )
        result += n->second - n->first + 1;
    if( it2.mValue )  // (it2.mNode != &mHead)
        result += it2.mValue - it2.mNode->first;
    return result;
}
Matrix3 moab::operator- ( const Matrix3 &  a,
const Matrix3 &  b 
) [inline]

Definition at line 1039 of file Matrix3.hpp.

References moab::Matrix3::_mat, and moab::Matrix3::size.

{
#ifndef MOAB_HAVE_LAPACK
    return Matrix3( a._mat - b._mat );
#else
    Matrix3 s( a );
    for( int i = 0; i < Matrix3::size; ++i )
        s( i ) -= b._mat[i];
    return s;
#endif
}
CartVect moab::operator/ ( const CartVect &  v,
double  s 
) [inline]

Definition at line 231 of file CartVect.hpp.

{
    return CartVect( v[0] / s, v[1] / s, v[2] / s );
}
bool moab::operator< ( Node const &  lhs,
Node const &  rhs 
)

Definition at line 871 of file TempestRemapper.cpp.

{
    return std::pow( lhs.x - rhs.x, 2.0 ) + std::pow( lhs.y - rhs.y, 2.0 ) + std::pow( lhs.z - rhs.z, 2.0 );
}
static bool moab::operator< ( const ProcList &  a,
const ProcList &  b 
) [static]

Definition at line 6242 of file ParallelComm.cpp.

References MAX_SHARING_PROCS, and moab::ProcList::procs.

{
    for( int i = 0; i < MAX_SHARING_PROCS; i++ )
    {
        if( a.procs[i] < b.procs[i] )
            return true;
        else if( b.procs[i] < a.procs[i] )
            return false;
        else if( a.procs[i] < 0 )
            return false;
    }
    return false;
}
std::ostream & moab::operator<< ( std::ostream &  s,
const CartVect &  v 
)

Definition at line 22 of file CartVect.cpp.

{
    return s << '[' << v[0] << ' ' << v[1] << ' ' << v[2] << ']';
}
template<int _n>
std::ostream& moab::operator<< ( std::ostream &  os,
const SplitVertexIndex< _n > &  idx 
)

Definition at line 94 of file SplitVertices.hpp.

{
    for( int i = 0; i < _n; ++i )
    {
        os << idx.ids[i] << " ";
    }
    os << "(" << idx.process_set << ")";
    return os;
}
std::ostream& moab::operator<< ( std::ostream &  os,
const ProcessSet &  pset 
)

Definition at line 131 of file ProcessSet.cpp.

References moab::ProcessSet::is_process_member(), and MAX_SHARING_PROCS.

{
    for( int i = 0; i < MAX_SHARING_PROCS; ++i )
    {
        os << ( pset.is_process_member( i ) ? "1" : "0" );
    }
    return os;
}
std::ostream& moab::operator<< ( std::ostream &  out,
const BoundBox &  box 
) [inline]

Definition at line 158 of file BoundBox.hpp.

References moab::BoundBox::bMax, and moab::BoundBox::bMin.

{
    out << ( std::string ) "Min: ";
    out << box.bMin;
    out << ( std::string ) ", Max: ";
    out << box.bMax;
    return out;
}
std::ostream & moab::operator<< ( std::ostream &  s,
const OrientedBox &  b 
)

Definition at line 45 of file OrientedBox.cpp.

References moab::OrientedBox::axes, moab::OrientedBox::center, moab::Matrix3::col(), and moab::OrientedBox::length.

{
    return s << b.center << " + " << b.axes.col( 0 )
#if MB_ORIENTED_BOX_UNIT_VECTORS
             << ":" << b.length[0]
#endif
             << " x " << b.axes.col( 1 )
#if MB_ORIENTED_BOX_UNIT_VECTORS
             << ":" << b.length[1]
#endif
             << " x " << b.axes.col( 2 )
#if MB_ORIENTED_BOX_UNIT_VECTORS
             << ":" << b.length[2]
#endif
        ;
}
std::ostream& moab::operator<< ( std::ostream &  str,
const HomCoord &  hc 
) [inline]

Definition at line 491 of file HomXform.hpp.

References moab::HomCoord::i(), moab::HomCoord::j(), and moab::HomCoord::k().

{
    str << "(" << hc.i() << "," << hc.j() << "," << hc.k() << ")";
    return str;
}
std::ostream& moab::operator<< ( std::ostream &  s,
const TypeSequenceManager &  seq_man 
)

Definition at line 876 of file SequenceManager.cpp.

References moab::TypeSequenceManager::begin(), moab::EntitySequence::data(), moab::TypeSequenceManager::end(), moab::SequenceData::end_handle(), moab::EntitySequence::end_handle(), ID_FROM_HANDLE(), moab::SequenceData::start_handle(), and moab::EntitySequence::start_handle().

{
    const SequenceData* prev_data = 0;
    for( TypeSequenceManager::const_iterator i = seq_man.begin(); i != seq_man.end(); ++i )
    {
        const EntitySequence* seq = *i;
        if( seq->data() != prev_data )
        {
            prev_data = seq->data();
            s << "SequenceData [" << ID_FROM_HANDLE( seq->data()->start_handle() ) << ","
              << ID_FROM_HANDLE( seq->data()->end_handle() ) << "]" << std::endl;
        }
        s << "  Sequence [" << ID_FROM_HANDLE( seq->start_handle() ) << "," << ID_FROM_HANDLE( seq->end_handle() )
          << "]" << std::endl;
    }

    return s;
}
std::ostream& moab::operator<< ( std::ostream &  s,
const SequenceManager &  seq_man 
)

Definition at line 895 of file SequenceManager.cpp.

References moab::TypeSequenceManager::empty(), moab::SequenceManager::entity_map(), moab::CN::EntityTypeName(), MBMAXTYPE, MBVERTEX, and t.

{
    for( EntityType t = MBVERTEX; t < MBMAXTYPE; ++t )
    {
        if( !seq_man.entity_map( t ).empty() )
            s << std::endl
              << "****************** " << CN::EntityTypeName( t ) << " ******************" << std::endl
              << seq_man.entity_map( t ) << std::endl;
    }

    return s;
}
std::ostream& moab::operator<< ( std::ostream &  s,
const Range &  r 
) [inline]

Definition at line 917 of file Range.hpp.

References moab::Range::print().

{
    r.print( s );
    return s;
}
std::ostream & moab::operator<< ( std::ostream &  str,
const ScdParData &  pd 
)

Definition at line 1513 of file ScdInterface.cpp.

References moab::ScdParData::gDims, moab::ScdParData::gPeriodic, moab::ScdParData::PartitionMethodNames, moab::ScdParData::partMethod, and moab::ScdParData::pDims.

{
    str << "Partition method = " << ScdParData::PartitionMethodNames[pd.partMethod] << ", gDims = (" << pd.gDims[0]
        << "," << pd.gDims[1] << "," << pd.gDims[2] << ")-(" << pd.gDims[3] << "," << pd.gDims[4] << "," << pd.gDims[5]
        << "), gPeriodic = (" << pd.gPeriodic[0] << "," << pd.gPeriodic[1] << "," << pd.gPeriodic[2] << "), pDims = ("
        << pd.pDims[0] << "," << pd.pDims[1] << "," << pd.pDims[2] << ")" << std::endl;
    return str;
}
const bool moab::operator== ( const damsel_err_t &  lhs,
const damsel_err_t &  rhs 
) [inline]

Definition at line 128 of file ReadDamsel.hpp.

{
    return lhs.id == rhs.id;
}
bool moab::operator== ( const Range &  r1,
const Range &  r2 
)

Definition at line 987 of file Range.cpp.

References moab::Range::const_pair_begin(), and moab::Range::const_pair_end().

{
    Range::const_pair_iterator i1, i2;
    i1 = r1.const_pair_begin();
    i2 = r2.const_pair_begin();
    for( ; i1 != r1.const_pair_end(); ++i1, ++i2 )
        if( i2 == r2.const_pair_end() || i1->first != i2->first || i1->second != i2->second ) return false;
    return i2 == r2.const_pair_end();
}
AxisBox moab::operator| ( const AxisBox &  a,
const AxisBox &  b 
) [inline]

unite

Definition at line 122 of file AxisBox.hpp.

{
    return AxisBox( a ) |= b;
}
bool moab::operator|| ( const AxisBox &  a,
const AxisBox &  b 
) [inline]

intersects

Definition at line 128 of file AxisBox.hpp.

References moab::AxisBox::maximum(), and moab::AxisBox::minimum().

{
    return a.minimum()[0] <= b.maximum()[0] && a.minimum()[1] <= b.maximum()[1] && a.minimum()[2] <= b.maximum()[2] &&
           a.maximum()[0] >= b.minimum()[0] && a.maximum()[1] >= b.minimum()[1] && a.maximum()[2] >= b.minimum()[2];
}
template<typename Vector >
Matrix3 moab::outer_product ( const Vector &  u,
const Vector &  v 
) [inline]

Definition at line 1021 of file Matrix3.hpp.

Referenced by moab::OrientedBox::compute_from_covariance_data(), moab::OrientedBox::compute_from_vertices(), moab::OrientedBox::covariance_data_from_tris(), and moab::AffineXform::rotation().

{
    return Matrix3( u[0] * v[0], u[0] * v[1], u[0] * v[2], u[1] * v[0], u[1] * v[1], u[1] * v[2], u[2] * v[0],
                    u[2] * v[1], u[2] * v[2] );
}
template<typename T >
static void moab::PACK ( unsigned char *&  buff,
const T val,
size_t  count 
) [inline, static]

Definition at line 98 of file ParallelComm.cpp.

References T.

Referenced by PACK_DBLS(), PACK_EH(), PACK_INTS(), and PACK_VOID().

{
    memcpy( buff, val, count * sizeof( T ) );
    buff += count * sizeof( T );
}
static void moab::PACK_BYTES ( unsigned char *&  buff,
const void *  val,
int  num 
) [inline, static]

Definition at line 145 of file ParallelComm.cpp.

References PACK_INT(), and PACK_VOID().

Referenced by moab::ParallelComm::pack_tag().

{
    PACK_INT( buff, num );
    PACK_VOID( buff, val, num );
}
static void moab::PACK_DBLS ( unsigned char *&  buff,
const double *  dbl_val,
size_t  num 
) [inline, static]

Definition at line 115 of file ParallelComm.cpp.

References PACK(), and PC.

Referenced by moab::ParallelComm::pack_entities().

{
    PACK( buff, dbl_val, num );
    PC( num, " doubles" );
}
static void moab::PACK_EH ( unsigned char *&  buff,
const EntityHandle *  eh_val,
size_t  num 
) [inline, static]
static void moab::PACK_INTS ( unsigned char *&  buff,
const int *  int_val,
size_t  num 
) [inline, static]
static void moab::PACK_RANGE ( unsigned char *&  buff,
const Range &  rng 
) [inline, static]

Definition at line 151 of file ParallelComm.cpp.

References moab::Range::const_pair_begin(), moab::Range::const_pair_end(), PACK_EH(), PACK_INT(), PC, and moab::Range::psize().

Referenced by moab::ParallelComm::pack_sets().

{
    PACK_INT( buff, rng.psize() );
    Range::const_pair_iterator cit;
    for( cit = rng.const_pair_begin(); cit != rng.const_pair_end(); ++cit )
    {
        EntityHandle eh[2] = { cit->first, cit->second };
        PACK_EH( buff, eh, 2 );
    }
    PC( rng.psize(), "-subranged range" );
}
int pack_tuples ( TupleList *  tl,
void **  ptr 
)

Definition at line 1853 of file Coupler.cpp.

References moab::TupleList::get_n(), moab::TupleList::getTupleSize(), sint, slong, UINT_PER_LONG, UINT_PER_REAL, UINT_PER_UNSIGNED, ulong, moab::TupleList::vi_rd, moab::TupleList::vl_rd, moab::TupleList::vr_rd, and moab::TupleList::vul_rd.

Referenced by moab::Coupler::get_matching_entities(), and main().

{
    uint mi, ml, mul, mr;
    tl->getTupleSize( mi, ml, mul, mr );

    uint n = tl->get_n();

    int sz_buf = 1 + 4 * UINT_PER_UNSIGNED +
                 tl->get_n() * ( mi + ml * UINT_PER_LONG + mul * UINT_PER_LONG + mr * UINT_PER_REAL );

    uint* buf = (uint*)malloc( sz_buf * sizeof( uint ) );
    *ptr      = (void*)buf;

    // Copy n
    memcpy( buf, &n, sizeof( uint ) ), buf += 1;
    // Copy mi
    memcpy( buf, &mi, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
    // Copy ml
    memcpy( buf, &ml, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
    // Copy mul
    memcpy( buf, &mul, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
    // Copy mr
    memcpy( buf, &mr, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
    // Copy vi_wr
    memcpy( buf, tl->vi_rd, tl->get_n() * mi * sizeof( sint ) ), buf += tl->get_n() * mi;
    // Copy vl_wr
    memcpy( buf, tl->vl_rd, tl->get_n() * ml * sizeof( slong ) ), buf += tl->get_n() * ml * UINT_PER_LONG;
    // Copy vul_wr
    memcpy( buf, tl->vul_rd, tl->get_n() * mul * sizeof( ulong ) ), buf += tl->get_n() * mul * UINT_PER_LONG;
    // Copy vr_wr
    memcpy( buf, tl->vr_rd, tl->get_n() * mr * sizeof( realType ) ), buf += tl->get_n() * mr * UINT_PER_REAL;

    return sz_buf;
}
static void moab::PACK_VOID ( unsigned char *&  buff,
const void *  val,
size_t  num 
) [inline, static]

Definition at line 139 of file ParallelComm.cpp.

References PACK(), and PC.

Referenced by PACK_BYTES(), moab::ParallelComm::pack_sets(), and moab::ParallelComm::pack_tag().

{
    PACK( buff, reinterpret_cast< const unsigned char* >( val ), num );
    PC( num, " void" );
}
template<typename T >
int moab::permute_this ( EntityType  t,
const int  dim,
T conn,
const int  indices_per_ent,
const int  num_entries 
) [inline]

Definition at line 1029 of file CN.cpp.

References dim, MAX_SUB_ENTITIES, moab::CN::permuteVec, t, and T.

Referenced by moab::CN::permuteThis().

{
    T tmp_conn[MAX_SUB_ENTITIES];
    assert( indices_per_ent <= CN::permuteVec[t][dim][MAX_SUB_ENTITIES] );
    if( indices_per_ent > CN::permuteVec[t][dim][MAX_SUB_ENTITIES] ) return 1;
    short int* tvec = CN::permuteVec[t][dim];
    T* pvec         = conn;
    for( int j = 0; j < num_entries; j++ )
    {
        for( int i = 0; i < indices_per_ent; i++ )
            tmp_conn[tvec[i]] = pvec[i];
        memcpy( pvec, tmp_conn, indices_per_ent * sizeof( T ) );
        pvec += indices_per_ent;
    }

    return 0;
}
double moab::physField ( double  x,
double  y,
double  z,
double  factor 
)

Definition at line 14 of file addfield.cpp.

Referenced by main(), putElementField(), putSpectralElementField(), and putVertexField().

{

    // 1/r^2 decay from {0,0,0}
    // tjt - changing to 1/r
    /*
  double scale = 1.0/factor;
  out = fabs(x*scale) + fabs(y*scale) + fabs(z*scale);
  out += 1e-1; // clamp
  out = 1/out;
    */
    double out = factor * sqrt( x * x + y * y + z * z );

    return out;
}
static ErrorCode moab::plane_cut_box ( double  cut_face_out[4][3],
double  corners_inout[8][3],
const BSPTree::Plane &  plane 
) [static]

Given the corners of a hexahedron in corners_input and a plane, cut the hex with the plane, updating corners_input and storing the original,cut-off side of the hex in cut_face_out.

The portion of the hex below the plane is retained. cut_face_out will contain the side of the hex that is entirely above the plane.

Returns:
MB_FAILURE if plane/hex intersection is not a quadrilateral.

Definition at line 667 of file BSPTree.cpp.

References moab::BSPTreeBoxIter::B0154, moab::BSPTreeBoxIter::B1265, moab::BSPTreeBoxIter::B2376, moab::BSPTreeBoxIter::B3047, moab::BSPTreeBoxIter::B3210, moab::BSPTreeBoxIter::B4567, MB_SUCCESS, plane_cut_edge(), and moab::BSPTreeBoxIter::side_above_plane().

Referenced by moab::BSPTreeBoxIter::down(), moab::BSPTreeBoxIter::step(), and moab::BSPTreeBoxIter::step_to_first_leaf().

{
    switch( BSPTreeBoxIter::side_above_plane( corners_inout, plane ) )
    {
        case BSPTreeBoxIter::B0154:
            plane_cut_edge( cut_face_out[0], corners_inout[3], corners_inout[0], plane );
            plane_cut_edge( cut_face_out[1], corners_inout[2], corners_inout[1], plane );
            plane_cut_edge( cut_face_out[2], corners_inout[6], corners_inout[5], plane );
            plane_cut_edge( cut_face_out[3], corners_inout[7], corners_inout[4], plane );
            break;
        case BSPTreeBoxIter::B1265:
            plane_cut_edge( cut_face_out[0], corners_inout[0], corners_inout[1], plane );
            plane_cut_edge( cut_face_out[1], corners_inout[3], corners_inout[2], plane );
            plane_cut_edge( cut_face_out[2], corners_inout[7], corners_inout[6], plane );
            plane_cut_edge( cut_face_out[3], corners_inout[4], corners_inout[5], plane );
            break;
        case BSPTreeBoxIter::B2376:
            plane_cut_edge( cut_face_out[0], corners_inout[1], corners_inout[2], plane );
            plane_cut_edge( cut_face_out[1], corners_inout[0], corners_inout[3], plane );
            plane_cut_edge( cut_face_out[2], corners_inout[4], corners_inout[7], plane );
            plane_cut_edge( cut_face_out[3], corners_inout[5], corners_inout[6], plane );
            break;
        case BSPTreeBoxIter::B3047:
            plane_cut_edge( cut_face_out[0], corners_inout[2], corners_inout[3], plane );
            plane_cut_edge( cut_face_out[1], corners_inout[1], corners_inout[0], plane );
            plane_cut_edge( cut_face_out[2], corners_inout[5], corners_inout[4], plane );
            plane_cut_edge( cut_face_out[3], corners_inout[6], corners_inout[7], plane );
            break;
        case BSPTreeBoxIter::B3210:
            plane_cut_edge( cut_face_out[0], corners_inout[7], corners_inout[3], plane );
            plane_cut_edge( cut_face_out[1], corners_inout[6], corners_inout[2], plane );
            plane_cut_edge( cut_face_out[2], corners_inout[5], corners_inout[1], plane );
            plane_cut_edge( cut_face_out[3], corners_inout[4], corners_inout[0], plane );
            break;
        case BSPTreeBoxIter::B4567:
            plane_cut_edge( cut_face_out[0], corners_inout[0], corners_inout[4], plane );
            plane_cut_edge( cut_face_out[1], corners_inout[1], corners_inout[5], plane );
            plane_cut_edge( cut_face_out[2], corners_inout[2], corners_inout[6], plane );
            plane_cut_edge( cut_face_out[3], corners_inout[3], corners_inout[7], plane );
            break;
        default:
            return MB_FAILURE;  // child is not a box
    }

    return MB_SUCCESS;
}
static void moab::plane_cut_edge ( double  old_coords_out[3],
const double  keep_end_coords[3],
double  cut_end_coords[3],
const BSPTree::Plane &  plane 
) [inline, static]

Clip an edge using a plane.

Given an edge from keep_end_coords to cut_end_coords, cut the edge using the passed plane, such that cut_end_coords is updated with a new location on the plane, and old_coords_out contains the original value of cut_end_coords.

Definition at line 641 of file BSPTree.cpp.

References moab::BSPTree::Plane::coeff, moab::CartVect::get(), moab::BSPTree::Plane::norm, and t.

Referenced by plane_cut_box().

{
    const CartVect start( keep_end_coords ), end( cut_end_coords );
    const CartVect norm( plane.norm );
    CartVect xsect_point;

    const CartVect m = end - start;
    const double t   = -( norm % start + plane.coeff ) / ( norm % m );
    assert( t > 0.0 && t < 1.0 );
    xsect_point = start + t * m;

    end.get( old_coords_out );
    xsect_point.get( cut_end_coords );
}
static ErrorCode moab::plane_uncut_box ( const double  cut_face_in[4][3],
double  corners_inout[8][3],
const BSPTree::Plane &  plane 
) [inline, static]

reverse of plane_cut_box

Definition at line 722 of file BSPTree.cpp.

References moab::BSPTreeBoxIter::B0154, moab::BSPTreeBoxIter::B1265, moab::BSPTreeBoxIter::B2376, moab::BSPTreeBoxIter::B3047, moab::BSPTreeBoxIter::B3210, moab::BSPTreeBoxIter::B4567, copy_coords(), MB_SUCCESS, and moab::BSPTreeBoxIter::side_on_plane().

Referenced by moab::BSPTreeBoxIter::step(), and moab::BSPTreeBoxIter::up().

{
    switch( BSPTreeBoxIter::side_on_plane( corners_inout, plane ) )
    {
        case BSPTreeBoxIter::B0154:
            copy_coords( corners_inout[0], cut_face_in[0] );
            copy_coords( corners_inout[1], cut_face_in[1] );
            copy_coords( corners_inout[5], cut_face_in[2] );
            copy_coords( corners_inout[4], cut_face_in[3] );
            break;
        case BSPTreeBoxIter::B1265:
            copy_coords( corners_inout[1], cut_face_in[0] );
            copy_coords( corners_inout[2], cut_face_in[1] );
            copy_coords( corners_inout[6], cut_face_in[2] );
            copy_coords( corners_inout[5], cut_face_in[3] );
            break;
        case BSPTreeBoxIter::B2376:
            copy_coords( corners_inout[2], cut_face_in[0] );
            copy_coords( corners_inout[3], cut_face_in[1] );
            copy_coords( corners_inout[7], cut_face_in[2] );
            copy_coords( corners_inout[6], cut_face_in[3] );
            break;
        case BSPTreeBoxIter::B3047:
            copy_coords( corners_inout[3], cut_face_in[0] );
            copy_coords( corners_inout[0], cut_face_in[1] );
            copy_coords( corners_inout[4], cut_face_in[2] );
            copy_coords( corners_inout[7], cut_face_in[3] );
            break;
        case BSPTreeBoxIter::B3210:
            copy_coords( corners_inout[3], cut_face_in[0] );
            copy_coords( corners_inout[2], cut_face_in[1] );
            copy_coords( corners_inout[1], cut_face_in[2] );
            copy_coords( corners_inout[0], cut_face_in[3] );
            break;
        case BSPTreeBoxIter::B4567:
            copy_coords( corners_inout[4], cut_face_in[0] );
            copy_coords( corners_inout[5], cut_face_in[1] );
            copy_coords( corners_inout[6], cut_face_in[2] );
            copy_coords( corners_inout[7], cut_face_in[3] );
            break;
        default:
            return MB_FAILURE;  // child is not a box
    }

    return MB_SUCCESS;
}
static bool moab::point_in_box ( const double  corners[8][3],
const double  point[3] 
) [static]

Definition at line 67 of file BSPTree.cpp.

Referenced by moab::BSPTreeBoxIter::initialize().

{
    const unsigned side_verts[6][3] = { { 0, 3, 1 }, { 4, 5, 7 }, { 0, 1, 4 }, { 1, 2, 5 }, { 2, 3, 6 }, { 3, 0, 7 } };
    // If we assume planar sides, then the box is the intersection
    // of 6 half-spaces defined by the planes of the sides.
    const CartVect pt( point );
    for( unsigned s = 0; s < 6; ++s )
    {
        CartVect v0( corners[side_verts[s][0]] );
        CartVect v1( corners[side_verts[s][1]] );
        CartVect v2( corners[side_verts[s][2]] );
        CartVect N = ( v1 - v0 ) * ( v2 - v0 );
        if( ( v0 - pt ) % N < 0 ) return false;
    }
    return true;
}
static double moab::point_perp ( const CartVect &  p,
const CartVect &  b,
const CartVect &  m 
) [static]

Find closest point on line.

Find the point on the line for which a line trough the input point p and the result position is orthogonal to the input line.

Parameters:
pThe point for which to find the perpendicular
bA point on the line
mThe direction of the line
Returns:
The location on the line specified as 't' in the formula t * m + b

Definition at line 73 of file OrientedBox.cpp.

References moab::Util::is_finite(), and t.

Referenced by box_from_axes().

{
#if MB_ORIENTED_BOX_UNIT_VECTORS
    double t = ( m % ( p - b ) );
#else
    double t           = ( m % ( p - b ) ) / ( m % m );
#endif
    return Util::is_finite( t ) ? t : 0.0;
}
void moab::print_buff ( unsigned char *  ch,
int  size 
)

Definition at line 867 of file ParallelComm.cpp.

References size.

{
    for( int i = 0; i < size; i++ )
        std::cout << ch[i];
    std::cout << "\n";
}
static void moab::print_range ( char *  buffer,
unsigned long  begin,
unsigned long  end 
) [static]

Definition at line 232 of file DebugOutput.cpp.

Referenced by moab::DebugOutput::list_ints_real(), and moab::DebugOutput::list_range_real().

{
    assert( end > begin );
    // begin with a space
    *buffer  = ' ';
    char* b1 = buffer + 1;
    // print begin-end, but keep track of where each peice is written
    char* e1 = b1 + sprintf( b1, "%lu", begin );
    *e1      = '-';
    char* b2 = e1 + 1;
    char* e2 = b2 + sprintf( b2, "%lu", end );
    // if the printed strings for both numbers don't contain the same
    // number of digits, don't do anything more
    if( e1 - b1 == e2 - b2 )
    {
        // see how many leading digits the two numbers have in common
        char* p = b2;
        while( *p && *p == *b1 )
        {
            ++p;
            ++b1;
        }
        // remove common shared leading digits from second number
        if( p > b2 && *p )
        {
            // shift second value down so that common leading digits are not repeated
            while( *p )
            {
                *b2 = *p;
                ++b2;
                ++p;
            }
            e2 = b2;
        }
    }
    // add trailing comma
    *e2 = ',';
    ++e2;
    *e2 = '\0';
}
void moab::print_sequences ( const SequenceManager &  seqman)

Definition at line 908 of file SequenceManager.cpp.

{
    std::cout << seqman << std::endl;
}
void moab::print_sequences ( const TypeSequenceManager &  seqman)

Definition at line 913 of file SequenceManager.cpp.

{
    std::cout << seqman << std::endl;
}
static void moab::print_type_sets ( Interface *  iFace,
DebugOutput *  str,
Range &  sets 
) [static]

Definition at line 213 of file WriteHDF5Parallel.cpp.

References moab::Range::begin(), dim, DIRICHLET_SET_TAG_NAME, moab::Range::end(), GEOM_DIMENSION_TAG_NAME, moab::DebugOutput::get_verbosity(), moab::Interface::globalId_tag(), moab::Range::insert(), MATERIAL_SET_TAG_NAME, MB_SUCCESS, MB_TYPE_INTEGER, NEUMANN_SET_TAG_NAME, moab::DebugOutput::print(), moab::DebugOutput::printf(), size, moab::Range::size(), moab::Interface::tag_get_data(), and moab::Interface::tag_get_handle().

Referenced by moab::WriteHDF5Parallel::create_meshset_tables().

{
    const unsigned VB = 2;
    if( str->get_verbosity() < VB ) return;

    Tag gid, did, bid, sid, nid;
    gid = iFace->globalId_tag();
    iFace->tag_get_handle( GEOM_DIMENSION_TAG_NAME, 1, MB_TYPE_INTEGER, did );
    iFace->tag_get_handle( MATERIAL_SET_TAG_NAME, 1, MB_TYPE_INTEGER, bid );
    iFace->tag_get_handle( DIRICHLET_SET_TAG_NAME, 1, MB_TYPE_INTEGER, nid );
    iFace->tag_get_handle( NEUMANN_SET_TAG_NAME, 1, MB_TYPE_INTEGER, sid );
    Range typesets[10];
    const char* typenames[] = { "Block ",  "Sideset ", "NodeSet", "Vertex", "Curve",
                                "Surface", "Volume",   "Body",    "Other" };
    for( Range::iterator riter = sets.begin(); riter != sets.end(); ++riter )
    {
        unsigned dim, id;  //, oldsize;
        if( MB_SUCCESS == iFace->tag_get_data( bid, &*riter, 1, &id ) )
            dim = 0;
        else if( MB_SUCCESS == iFace->tag_get_data( sid, &*riter, 1, &id ) )
            dim = 1;
        else if( MB_SUCCESS == iFace->tag_get_data( nid, &*riter, 1, &id ) )
            dim = 2;
        else if( MB_SUCCESS == iFace->tag_get_data( did, &*riter, 1, &dim ) )
        {
            id = 0;
            iFace->tag_get_data( gid, &*riter, 1, &id );
            dim += 3;
        }
        else
        {
            id  = *riter;
            dim = 9;
        }

        // oldsize = typesets[dim].size();
        typesets[dim].insert( id );
        // assert(typesets[dim].size() - oldsize == 1);
    }
    for( int ii = 0; ii < 9; ++ii )
    {
        char tmp[64];
        sprintf( tmp, "%s (%lu) ", typenames[ii], (unsigned long)typesets[ii].size() );
        str->print( VB, tmp, typesets[ii] );
    }
    str->printf( VB, "Total: %lu\n", (unsigned long)sets.size() );
}
void moab::putElementField ( Interface mbi,
const char *  tagname,
double  factor 
)

Definition at line 30 of file addfield.cpp.

References ErrorCode, moab::Interface::get_coords(), moab::Interface::get_entities_by_dimension(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, physField(), moab::Range::size(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().

Referenced by main().

{
    Range elems;

    mbi->get_entities_by_dimension( 0, 3, elems );

    const double defVal = 0.;
    Tag fieldTag;
    ErrorCode rval = mbi->tag_get_handle( tagname, 1, MB_TYPE_DOUBLE, fieldTag, MB_TAG_DENSE | MB_TAG_CREAT, &defVal );
    assert( MB_SUCCESS == rval );
#ifdef NDEBUG
    if( MB_SUCCESS == rval )
    {
    };  // Line to avoid compiler warning about unused variable
#endif

    int numElems = elems.size();

    for( int i = 0; i < numElems; i++ )
    {
        // cout << elems[i] << endl;
        EntityHandle elem = elems[i];

        double xyz[3];
        mbi->get_coords( &elem, 1, xyz );

        double fieldValue = physField( xyz[0], xyz[1], xyz[2], factor );

        mbi->tag_set_data( fieldTag, &elem, 1, &fieldValue );
    }
}
void moab::putSpectralElementField ( Interface mbi,
int  dim,
int  np,
const char *  tagname,
double  factor 
)

Definition at line 62 of file addfield.cpp.

References ErrorCode, moab::Interface::get_coords(), moab::Interface::get_entities_by_dimension(), MB_ALREADY_ALLOCATED, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, np, physField(), moab::Range::size(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().

Referenced by main().

{
    Range elems;

    mbi->get_entities_by_dimension( 0, dim, elems );

    const int ndofperE = np * np;
    double* defDouble  = new double[ndofperE];
    Tag fieldTag;
    ErrorCode rval =
        mbi->tag_get_handle( tagname, ndofperE, MB_TYPE_DOUBLE, fieldTag, MB_TAG_DENSE | MB_TAG_CREAT, &defDouble );
    std::cout << "rval = " << rval << std::endl;
    assert( MB_SUCCESS == rval || rval == MB_ALREADY_ALLOCATED );
#ifdef NDEBUG
    if( MB_SUCCESS == rval || rval == MB_ALREADY_ALLOCATED )
    {
    };  // Line to avoid compiler warning about unused variable
#endif

    int numElems = elems.size();
    std::vector< double > tData( ndofperE, 0.0 );

    for( int i = 0; i < numElems; i++ )
    {
        EntityHandle elem = elems[i];

        double xyz[3];
        mbi->get_coords( &elem, 1, xyz );

        double fieldValue = physField( xyz[0], xyz[1], xyz[2], factor );
        for( int j = 0; j < ndofperE; ++j )
            tData[j] = fieldValue;  // same value evaluated at the center; could modify it to use
                                    // GLL points ?

        mbi->tag_set_data( fieldTag, &elem, 1, &tData[0] );
    }

    delete[] defDouble;
    tData.clear();
}
void moab::putVertexField ( Interface mbi,
const char *  tagname,
double  factor 
)

Definition at line 103 of file addfield.cpp.

References moab::Interface::get_coords(), moab::Interface::get_entities_by_type(), MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, MBVERTEX, physField(), moab::Range::size(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().

Referenced by main().

{
    Range verts;

    mbi->get_entities_by_type( 0, MBVERTEX, verts );

    const double defVal = 0.;
    Tag fieldTag;
    mbi->tag_get_handle( tagname, 1, MB_TYPE_DOUBLE, fieldTag, MB_TAG_DENSE | MB_TAG_CREAT, &defVal );

    int numVerts = verts.size();
    for( int i = 0; i < numVerts; i++ )
    {
        EntityHandle vert = verts[i];  //?

        double vertPos[3];
        mbi->get_coords( &vert, 1, vertPos );

        double fieldValue = physField( vertPos[0], vertPos[1], vertPos[2], factor );

        mbi->tag_set_data( fieldTag, &vert, 1, &fieldValue );
    }
}
std::string moab::QualityType_ToString ( QualityType  qtype) [inline]

Definition at line 60 of file VerdictWrapper.hpp.

References MB_AREA, MB_ASPECT_BETA, MB_ASPECT_GAMMA, MB_ASPECT_RATIO, MB_COLLAPSE_RATIO, MB_CONDITION, MB_DIAGONAL, MB_DIMENSION, MB_DISTORTION, MB_EDGE_RATIO, MB_JACOBIAN, MB_LENGTH, MB_MAX_ASPECT_FROBENIUS, MB_MAX_EDGE_RATIO, MB_MAXIMUM_ANGLE, MB_MED_ASPECT_FROBENIUS, MB_MINIMUM_ANGLE, MB_ODDY, MB_RADIUS_RATIO, MB_RELATIVE_SIZE_SQUARED, MB_SCALED_JACOBIAN, MB_SHAPE, MB_SHAPE_AND_SIZE, MB_SHEAR, MB_SHEAR_AND_SIZE, MB_SKEW, MB_STRETCH, MB_TAPER, MB_UNDEFINED_QUALITY, MB_VOLUME, and MB_WARPAGE.

Referenced by verdict_unit_tests().

{
    switch( qtype )
    {
        case MB_UNDEFINED_QUALITY:
            return "MB_UNDEFINED_QUALITY";
        case MB_EDGE_RATIO:
            return "MB_EDGE_RATIO";
        case MB_MAX_EDGE_RATIO:
            return "MB_MAX_EDGE_RATIO";
        case MB_SKEW:
            return "MB_SKEW";
        case MB_TAPER:
            return "MB_TAPER";
        case MB_VOLUME:
            return "MB_VOLUME";
        case MB_STRETCH:
            return "MB_STRETCH";
        case MB_DIAGONAL:
            return "MB_DIAGONAL";
        case MB_DIMENSION:
            return "MB_DIMENSION";
        case MB_ODDY:
            return "MB_ODDY";
        case MB_MED_ASPECT_FROBENIUS:
            return "MB_MED_ASPECT_FROBENIUS";
        case MB_MAX_ASPECT_FROBENIUS:
            return "MB_MAX_ASPECT_FROBENIUS";
        case MB_CONDITION:
            return "MB_CONDITION";
        case MB_JACOBIAN:
            return "MB_JACOBIAN";
        case MB_SCALED_JACOBIAN:
            return "MB_SCALED_JACOBIAN";
        case MB_SHEAR:
            return "MB_SHEAR";
        case MB_SHAPE:
            return "MB_SHAPE";
        case MB_RELATIVE_SIZE_SQUARED:
            return "MB_RELATIVE_SIZE_SQUARED";
        case MB_SHAPE_AND_SIZE:
            return "MB_SHAPE_AND_SIZE";
        case MB_SHEAR_AND_SIZE:
            return "MB_SHEAR_AND_SIZE";
        case MB_DISTORTION:
            return "MB_DISTORTION";
        case MB_LENGTH:
            return "MB_LENGTH";
        case MB_RADIUS_RATIO:
            return "MB_RADIUS_RATIO";
        case MB_ASPECT_BETA:
            return "MB_ASPECT_BETA";
        case MB_ASPECT_RATIO:
            return "MB_ASPECT_RATIO";
        case MB_ASPECT_GAMMA:
            return "MB_ASPECT_GAMMA";
        case MB_MINIMUM_ANGLE:
            return "MB_MINIMUM_ANGLE";
        case MB_COLLAPSE_RATIO:
            return "MB_COLLAPSE_RATIO";
        case MB_WARPAGE:
            return "MB_WARPAGE";
        case MB_AREA:
            return "MB_AREA";
        case MB_MAXIMUM_ANGLE:
            return "MB_MAXIMUM_ANGLE";
        default:
            return "MB_QUALITY_COUNT";
    }
}
static size_t moab::RANGE_SIZE ( const Range &  rng) [inline, static]

Definition at line 240 of file ParallelComm.cpp.

References moab::Range::psize().

Referenced by moab::ParallelComm::estimate_sets_buffer_size(), and moab::ParallelComm::pack_sets().

{
    return 2 * sizeof( EntityHandle ) * rng.psize() + sizeof( int );
}
template<class HandleRangeIter >
ErrorCode moab::range_to_blocked_list_templ ( HandleRangeIter  begin,
HandleRangeIter  end,
const RangeMap< EntityHandle, WriteHDF5::wid_t > &  idMap,
std::vector< WriteHDF5::wid_t > &  output_id_list,
bool &  ranged_list 
) [inline]

Definition at line 1632 of file WriteHDF5.cpp.

References moab::RangeMap< KeyType, ValType, NullVal >::back(), moab::RangeMap< KeyType, ValType, NullVal >::begin(), count_num_handles(), moab::RangeMap< KeyType, ValType, NullVal >::end(), moab::RangeMap< KeyType, ValType, NullVal >::lower_bound(), MB_SUCCESS, and range_to_id_list_templ().

Referenced by moab::WriteHDF5::range_to_blocked_list().

{
    output_id_list.clear();
    if( begin == end )
    {
        ranged_list = false;
        return MB_SUCCESS;
    }

    // First try ranged format, but give up if we reach the
    // non-range format size.
    RangeMap< EntityHandle, WriteHDF5::wid_t >::iterator ri = idMap.begin();

    const size_t num_handles = count_num_handles( begin, end );
    // If we end up with more than this many range blocks, then
    // we're better off just writing the set as a simple list
    size_t pairs_remaining = num_handles / 2;
    for( HandleRangeIter pi = begin; pi != end; ++pi )
    {
        EntityHandle h                              = pi->first;
        WriteHDF5::wid_t local_mapped_from_subrange = 0;
        while( h <= pi->second )
        {
            ri = idMap.lower_bound( ri, idMap.end(), h );
            if( ri == idMap.end() || ri->begin > h )
            {
                ++h;
                continue;
            }

            WriteHDF5::wid_t n = pi->second - pi->first + 1 - local_mapped_from_subrange;
            if( n > ri->count ) n = ri->count;

            WriteHDF5::wid_t id = ri->value + ( h - ri->begin );
            // see if we can go to the end of the range
            if( id + n > ri->value + ri->count )  // we have to reduce n, because we cannot go over next subrange
            {
                if( ri->value + ri->count - id > 0 ) n = ri->value + ri->count - id;
            }

            // See if we can append it to the previous range
            if( !output_id_list.empty() && output_id_list[output_id_list.size() - 2] + output_id_list.back() == id )
            {
                output_id_list.back() += n;
            }

            // If we ran out of space, (or set is empty) just do list format
            else if( !pairs_remaining )
            {
                ranged_list = false;
                output_id_list.resize( num_handles );
                range_to_id_list_templ( begin, end, idMap, &output_id_list[0] );
                output_id_list.erase( std::remove( output_id_list.begin(), output_id_list.end(), 0u ),
                                      output_id_list.end() );
                return MB_SUCCESS;
            }

            //
            else
            {
                --pairs_remaining;
                output_id_list.push_back( id );
                output_id_list.push_back( n );
            }
            local_mapped_from_subrange += n;  // we already mapped so many
            h += n;
        }
    }

    ranged_list = true;
    return MB_SUCCESS;
}
template<class HandleRangeIter >
ErrorCode moab::range_to_id_list_templ ( HandleRangeIter  begin,
HandleRangeIter  end,
const RangeMap< EntityHandle, WriteHDF5::wid_t > &  idMap,
WriteHDF5::wid_t *  array 
) [inline]

Definition at line 1589 of file WriteHDF5.cpp.

References moab::RangeMap< KeyType, ValType, NullVal >::begin(), count_num_handles(), moab::RangeMap< KeyType, ValType, NullVal >::end(), ErrorCode, moab::RangeMap< KeyType, ValType, NullVal >::lower_bound(), MB_ENTITY_NOT_FOUND, and MB_SUCCESS.

Referenced by range_to_blocked_list_templ(), and moab::WriteHDF5::range_to_id_list().

{
    ErrorCode rval                                          = MB_SUCCESS;
    RangeMap< EntityHandle, WriteHDF5::wid_t >::iterator ri = idMap.begin();
    WriteHDF5::wid_t* i                                     = array;
    for( HandleRangeIter pi = begin; pi != end; ++pi )
    {
        EntityHandle h = pi->first;
        while( h <= pi->second )
        {
            ri = idMap.lower_bound( ri, idMap.end(), h );
            if( ri == idMap.end() || ri->begin > h )
            {
                rval = MB_ENTITY_NOT_FOUND;
                *i   = 0;
                ++i;
                ++h;
                continue;
            }

            // compute the last available value of the found target range (ri iterator)
            WriteHDF5::wid_t last_valid_input_value_in_current_map_range = ri->begin + ri->count - 1;
            // limit the number of steps we do on top of h so we do not overflow the output range
            // span
            WriteHDF5::wid_t step_until = std::min( last_valid_input_value_in_current_map_range, pi->second );
            WriteHDF5::wid_t n          = step_until - h + 1;
            assert( n > 0 );  // We must at least step 1

            WriteHDF5::wid_t id = ri->value + ( h - ri->begin );
            for( WriteHDF5::wid_t j = 0; j < n; ++i, ++j )
                *i = id + j;
            h += n;
        }
    }

    assert( i == array + count_num_handles( begin, end ) );
    return rval;
}
template<typename PlaneIter >
static bool moab::ray_intersect_halfspaces ( const CartVect &  ray_pt,
const CartVect &  ray_dir,
const PlaneIter &  begin,
const PlaneIter &  end,
double &  t_enter,
double &  t_exit 
) [inline, static]

Definition at line 1179 of file BSPTree.cpp.

References moab::CartVect::array().

Referenced by moab::BSPTreeIter::intersect_ray(), and moab::BSPTreeBoxIter::intersect_ray().

{
    const double epsilon = 1e-12;

    // begin with inifinite ray
    t_enter = 0.0;
    t_exit  = std::numeric_limits< double >::infinity();

    // cut ray such that we keep only the portion contained
    // in each halfspace
    for( PlaneIter i = begin; i != end; ++i )
    {
        CartVect norm( i->norm );
        double coeff = i->coeff;
        double den   = norm % ray_dir;
        if( fabs( den ) < epsilon )
        {                                                   // ray is parallel to plane
            if( i->above( ray_pt.array() ) ) return false;  // ray entirely outside half-space
        }
        else
        {
            double t_xsect = ( -coeff - ( norm % ray_pt ) ) / den;
            // keep portion of ray/segment below plane
            if( den > 0 )
            {
                if( t_xsect < t_exit ) t_exit = t_xsect;
            }
            else
            {
                if( t_xsect > t_enter ) t_enter = t_xsect;
            }
        }
    }

    return t_exit >= t_enter;
}
MB_EXPORT void moab::ReleaseInterface ( UnknownInterface *  iface)

Definition at line 141 of file Factory.cpp.

References iface, and moab::ComponentFactory::objects_in_use.

{
    if( !iface ) return;
    // remove this object from our list and delete it
    ComponentFactory::objects_in_use.remove( iface );
    delete iface;
}
static MeshSet::Count moab::remove_from_vector ( const MeshSet::Count  count,
MeshSet::CompactList &  list,
const EntityHandle  h,
int &  result 
) [inline, static]

Remvoe from parent/child list.

Definition at line 162 of file MeshSet.cpp.

References moab::MeshSet::CompactList::hnd, moab::MeshSet::MANY, moab::MeshSet::ONE, moab::MeshSet::CompactList::ptr, size, moab::MeshSet::TWO, and moab::MeshSet::ZERO.

Referenced by main(), moab::MeshSet::remove_child(), and moab::MeshSet::remove_parent().

{
    switch( count )
    {
        case MeshSet::ZERO:
            result = false;
            return MeshSet::ZERO;
        case MeshSet::ONE:
            if( h == list.hnd[0] )
            {
                result = true;
                return MeshSet::ZERO;
            }
            else
            {
                result = false;
                return MeshSet::ONE;
            }
        case MeshSet::TWO:
            if( h == list.hnd[0] )
            {
                list.hnd[0] = list.hnd[1];
                result      = true;
                return MeshSet::ONE;
            }
            else if( h == list.hnd[1] )
            {
                result = true;
                return MeshSet::ONE;
            }
            else
            {
                result = false;
                return MeshSet::TWO;
            }
        case MeshSet::MANY: {
            EntityHandle *i, *j, *p;
            i = std::find( list.ptr[0], list.ptr[1], h );
            if( i == list.ptr[1] )
            {
                result = false;
                return MeshSet::MANY;
            }

            result = true;
            p      = list.ptr[1] - 1;
            while( i != p )
            {
                j  = i + 1;
                *i = *j;
                i  = j;
            }
            int size = p - list.ptr[0];
            if( size == 2 )
            {
                p           = list.ptr[0];
                list.hnd[0] = p[0];
                list.hnd[1] = p[1];
                free( p );
                return MeshSet::TWO;
            }
            else
            {
                list.ptr[0] = (EntityHandle*)realloc( list.ptr[0], size * sizeof( EntityHandle ) );
                list.ptr[1] = list.ptr[0] + size;
                return MeshSet::MANY;
            }
        }
    }

    return MeshSet::ZERO;
}
static EntityHandle * moab::resize_compact_list ( MeshSet::Count &  count,
MeshSet::CompactList &  clist,
size_t  new_list_size 
) [static]

Resize MeshSet::CompactList. Returns pointer to storage.

Definition at line 390 of file MeshSet.cpp.

References moab::MeshSet::CompactList::hnd, moab::MeshSet::MANY, and moab::MeshSet::CompactList::ptr.

Referenced by moab::MeshSet::convert(), moab::range_tool< pair_iter_t >::ranged_insert_entities(), moab::range_tool< pair_iter_t >::ranged_remove_entities(), moab::range_tool< pair_iter_t >::vector_insert_entities(), vector_insert_vector(), vector_remove_range(), vector_remove_ranges(), and vector_remove_vector().

{
    if( count <= 2 )
    {
        if( new_list_size <= 2 )
        {
            count = (MeshSet::Count)new_list_size;
            return clist.hnd;
        }
        else
        {
            EntityHandle* list = (EntityHandle*)malloc( new_list_size * sizeof( EntityHandle ) );
            list[0]            = clist.hnd[0];
            list[1]            = clist.hnd[1];
            clist.ptr[0]       = list;
            clist.ptr[1]       = list + new_list_size;
            count              = MeshSet::MANY;
            return list;
        }
    }
    else if( new_list_size > 2 )
    {
        if( new_list_size > (size_t)( clist.ptr[1] - clist.ptr[0] ) )
            clist.ptr[0] = (EntityHandle*)realloc( clist.ptr[0], new_list_size * sizeof( EntityHandle ) );
        clist.ptr[1] = clist.ptr[0] + new_list_size;
        count        = MeshSet::MANY;
        return clist.ptr[0];
    }
    else
    {
        EntityHandle* list = clist.ptr[0];
        clist.hnd[0]       = list[0];
        clist.hnd[1]       = list[1];
        free( list );
        count = (MeshSet::Count)new_list_size;
        return clist.hnd;
    }
}
template<typename T >
int moab::rev_permute_this ( EntityType  t,
const int  dim,
T conn,
const int  indices_per_ent,
const int  num_entries 
) [inline]

Definition at line 1048 of file CN.cpp.

References dim, MAX_SUB_ENTITIES, moab::CN::revPermuteVec, t, and T.

Referenced by moab::CN::revPermuteThis().

{
    T tmp_conn[MAX_SUB_ENTITIES];
    assert( indices_per_ent <= CN::revPermuteVec[t][dim][MAX_SUB_ENTITIES] );
    if( indices_per_ent > CN::revPermuteVec[t][dim][MAX_SUB_ENTITIES] ) return 1;
    short int* tvec = CN::revPermuteVec[t][dim];
    T* pvec         = conn;
    for( int j = 0; j < num_entries; j++ )
    {
        for( int i = 0; i < indices_per_ent; i++ )
            tmp_conn[i] = pvec[tvec[i]];
        memcpy( pvec, tmp_conn, indices_per_ent * sizeof( T ) );
        pvec += indices_per_ent;
    }

    return 0;
}
static void moab::set_bit ( int  position,
unsigned char *  bytes 
) [static]

Definition at line 739 of file WriteHDF5Parallel.cpp.

Referenced by moab::WriteHDF5Parallel::create_tag_tables().

{
    int byte = position / 8;
    int bit  = position % 8;
    bytes[byte] |= ( ( (unsigned char)1 ) << bit );
}
static bool moab::set_map_intersect ( bool  ranged,
const long *  contents,
int  content_len,
const RangeMap< long, EntityHandle > &  id_map 
) [static]

Definition at line 2159 of file ReadHDF5.cpp.

References moab::RangeMap< KeyType, ValType, NullVal >::empty(), moab::RangeMap< KeyType, ValType, NullVal >::exists(), and moab::RangeMap< KeyType, ValType, NullVal >::intersects().

Referenced by moab::ReadHDF5::find_sets_containing().

{
    if( ranged )
    {
        if( !content_len || id_map.empty() ) return false;

        const long* j         = contents;
        const long* const end = contents + content_len;
        assert( content_len % 2 == 0 );
        while( j != end )
        {
            long start = *( j++ );
            long count = *( j++ );
            if( id_map.intersects( start, count ) ) return true;
        }
    }
    else
    {
        const long* const end = contents + content_len;
        for( const long* i = contents; i != end; ++i )
            if( id_map.exists( *i ) ) return true;
    }

    return false;
}
template<typename T >
static short int moab::side_number ( const T parent_conn,
const EntityType  parent_type,
const T child_conn,
const int  child_num_verts,
const int  child_dim,
int &  side_no,
int &  sense,
int &  offset 
) [static]

Definition at line 218 of file CN.cpp.

References moab::CN::SideNumber(), and moab::CN::VerticesPerEntity().

Referenced by create_fine_mesh(), fill_coord_on_edges(), iMOAB_GetPointerToSurfaceBC(), MBCN_SideNumberInt(), MBCN_SideNumberLong(), MBCN_SideNumberUint(), MBCN_SideNumberUlong(), MBCN_SideNumberVoid(), moab::CN::SideNumber(), and moab::HigherOrderFactory::tag_for_deletion().

{
    int parent_num_verts = CN::VerticesPerEntity( parent_type );
    int side_indices[8];
    assert( sizeof( side_indices ) / sizeof( side_indices[0] ) >= (size_t)child_num_verts );

    for( int i = 0; i < child_num_verts; i++ )
    {
        side_indices[i] = std::find( parent_conn, parent_conn + parent_num_verts, child_conn[i] ) - parent_conn;
        if( side_indices[i] == parent_num_verts ) return -1;
    }

    return CN::SideNumber( parent_type, &side_indices[0], child_num_verts, child_dim, side_no, sense, offset );
}
static ErrorCode moab::split_box ( Interface *  instance,
const OrientedBox &  box,
int  axis,
const Range &  entities,
Range &  left_list,
Range &  right_list 
) [static]

Split triangles by which side of a plane they are on.

Given a plane specified as a bisecting plane normal to one of the axes of a box, split triangles based on which side of the plane they are on.

Parameters:
instanceMOAB instance
boxThe oriented box containing all the entities
axisThe axis for which the split plane is orthogonal
left_listOutput, entities to the left of the plane
right_listOutput, entities to the right of the plane
num_intersectingOutput, number entities intersecting plane

Definition at line 167 of file OrientedBoxTreeTool.cpp.

References moab::OrientedBox::axis(), moab::OrientedBox::center, moab::Range::clear(), ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::Range::insert(), MB_SUCCESS, moab::Range::rbegin(), and moab::Range::rend().

Referenced by moab::OrientedBoxTreeTool::build_tree().

{
    ErrorCode rval;
    left_list.clear();
    right_list.clear();

    std::vector< CartVect > coords;
    for( Range::reverse_iterator i = entities.rbegin(); i != entities.rend(); ++i )
    {
        const EntityHandle* conn = NULL;
        int conn_len             = 0;
        rval                     = instance->get_connectivity( *i, conn, conn_len );
        if( MB_SUCCESS != rval ) return rval;

        coords.resize( conn_len );
        rval = instance->get_coords( conn, conn_len, coords[0].array() );
        if( MB_SUCCESS != rval ) return rval;

        CartVect centroid( 0.0 );
        for( int j = 0; j < conn_len; ++j )
            centroid += coords[j];
        centroid /= conn_len;

        if( ( box.axis( axis ) % ( centroid - box.center ) ) < 0.0 )
            left_list.insert( *i );
        else
            right_list.insert( *i );
    }

    return MB_SUCCESS;
}
static BSPTreePoly::Edge * moab::split_edge ( BSPTreePoly::Vertex *&  new_vtx,
BSPTreePoly::Edge *  into_edge 
) [static]

Definition at line 546 of file BSPTreePoly.cpp.

References moab::BSPTreePoly::Edge::end(), moab::BSPTreePoly::Edge::endPtr, moab::BSPTreePoly::Edge::forwardPtr, moab::BSPTreePoly::EdgeUse::insert_after(), moab::BSPTreePoly::EdgeUse::insert_before(), moab::BSPTreePoly::Edge::reversePtr, and moab::BSPTreePoly::VertexUse::set_vertex().

Referenced by moab::BSPTreePoly::cut_polyhedron().

{
    // split edge, creating new edge
    BSPTreePoly::Edge* new_edge = new BSPTreePoly::Edge( new_vtx, into_edge->end() );
    into_edge->endPtr->set_vertex( new_vtx );  // This call might delete new_vtx

    // update coedge loops in faces
    if( into_edge->forwardPtr )
    {
        new_edge->forwardPtr = new BSPTreePoly::EdgeUse( new_edge );
        new_edge->forwardPtr->insert_after( into_edge->forwardPtr );
    }
    if( into_edge->reversePtr )
    {
        new_edge->reversePtr = new BSPTreePoly::EdgeUse( new_edge );
        new_edge->reversePtr->insert_before( into_edge->reversePtr );
    }

    return new_edge;
}
static BSPTreePoly::Face* moab::split_face ( BSPTreePoly::EdgeUse *  start,
BSPTreePoly::EdgeUse *  end 
) [static]

Definition at line 567 of file BSPTreePoly.cpp.

References moab::BSPTreePoly::EdgeUse::end(), moab::BSPTreePoly::EdgeUse::facePtr, moab::BSPTreePoly::Edge::forwardPtr, moab::BSPTreePoly::EdgeUse::nextPtr, moab::BSPTreePoly::EdgeUse::prevPtr, moab::BSPTreePoly::Edge::reversePtr, moab::BSPTreePoly::EdgeUse::start(), and moab::BSPTreePoly::Face::usePtr.

Referenced by moab::BSPTreePoly::cut_polyhedron().

{
    BSPTreePoly::Face* face = start->facePtr;
    assert( face == end->facePtr );
    BSPTreePoly::Face* new_face      = new BSPTreePoly::Face;
    BSPTreePoly::EdgeUse* keep_start = start->prevPtr;
    BSPTreePoly::EdgeUse* keep_end   = end->nextPtr;
    for( BSPTreePoly::EdgeUse* ptr = start; ptr != keep_end; ptr = ptr->nextPtr )
    {
        if( face->usePtr == ptr ) face->usePtr = keep_start;
        ptr->facePtr = new_face;
    }
    new_face->usePtr        = start;
    BSPTreePoly::Edge* edge = new BSPTreePoly::Edge( start->start(), end->end() );
    edge->forwardPtr        = new BSPTreePoly::EdgeUse( edge );
    edge->reversePtr        = new BSPTreePoly::EdgeUse( edge );

    edge->forwardPtr->facePtr = face;
    edge->forwardPtr->prevPtr = keep_start;
    keep_start->nextPtr       = edge->forwardPtr;
    edge->forwardPtr->nextPtr = keep_end;
    keep_end->prevPtr         = edge->forwardPtr;

    edge->reversePtr->facePtr = new_face;
    edge->reversePtr->nextPtr = start;
    start->prevPtr            = edge->reversePtr;
    edge->reversePtr->prevPtr = end;
    end->nextPtr              = edge->reversePtr;

    return new_face;
}
static ErrorCode moab::split_sets ( Interface *  ,
const OrientedBox &  box,
int  axis,
const std::list< OrientedBoxTreeTool::SetData > &  sets,
std::list< OrientedBoxTreeTool::SetData > &  left,
std::list< OrientedBoxTreeTool::SetData > &  right 
) [static]

Definition at line 317 of file OrientedBoxTreeTool.cpp.

References moab::OrientedBox::axis(), moab::OrientedBox::center, and MB_SUCCESS.

Referenced by moab::OrientedBoxTreeTool::build_sets().

{
    left.clear();
    right.clear();

    std::list< OrientedBoxTreeTool::SetData >::const_iterator i;
    for( i = sets.begin(); i != sets.end(); ++i )
    {
        CartVect centroid( i->box_data.center / i->box_data.area );
        if( ( box.axis( axis ) % ( centroid - box.center ) ) < 0.0 )
            left.push_back( *i );
        else
            right.push_back( *i );
    }

    return MB_SUCCESS;
}
moab::STATIC_ASSERT ( sizeof(unsigned long) >=sizeof(EntityHandle)  )

Referenced by merge_ranged_ids().

moab::STATIC_ASSERT ( (sizeof(DatasetVals)==3 *sizeof(long))  )
static double moab::std_dev ( double  sqr,
double  sum,
double  count 
) [inline, static]

Definition at line 1878 of file OrientedBoxTreeTool.cpp.

Referenced by moab::OrientedBoxTreeTool::stats(), and TriStats::write_results().

{
    sum /= count;
    sqr /= count;
    return sqrt( sqr - sum * sum );
}
static void moab::subtr ( double  result[3],
const double  a[3],
const double  b[3] 
) [static]

Definition at line 914 of file BSPTree.cpp.

Referenced by moab::BSPTreeBoxIter::volume().

{
    result[0] = a[0] - b[0];
    result[1] = a[1] - b[1];
    result[2] = a[2] - b[2];
}
Range moab::subtract ( const Range &  from,
const Range &  range2 
)

subtract range2 from this, placing the results in the return range

Examples:
DeformMeshRemap.cpp.

Definition at line 664 of file Range.cpp.

References alloc_pair(), moab::Range::begin(), moab::Range::const_pair_begin(), moab::Range::delete_pair_node(), moab::Range::end(), moab::Range::erase(), moab::Range::PairNode::mNext, moab::Range::PairNode::mPrev, moab::Range::pair_iterator::node(), and moab::Range::pair_begin().

Referenced by add_dead_elems_to_impl_compl(), ahf_test(), moab::ParallelComm::assign_global_ids(), check_mesh_is_tet(), moab::GeomTopoTool::check_model(), check_parallel_read(), moab::Core::clean_up_failed_read(), cleanup_after_intersection(), compute_tracer_case1(), moab::TempestRemapper::ComputeOverlapMesh(), moab::WriteHDF5Parallel::create_meshset_tables(), IntxUtilsCSLAM::create_span_quads(), DeformMeshRemap::deform_master(), moab::Core::delete_entities(), moab::ReadHDF5::delete_non_side_elements(), moab::ReadParallel::delete_nonlocal_entities(), dot_get_sets(), dot_nodes(), smoab::CellSet::erase(), moab::ParallelComm::exchange_owned_mesh(), moab::ParallelComm::exchange_owned_meshs(), DeformMeshRemap::find_other_sets(), moab::DualTool::foc_get_ents(), moab::DualTool::fsr_get_fourth_quad(), moab::WriteHDF5Parallel::gather_interface_meshes(), moab::WriteNCDF::gather_mesh_information(), moab::MeshTopoUtil::get_bridge_adjacencies(), moab::Core::get_entities_by_type_and_tag(), get_expected_ghosts(), moab::DualTool::get_opposite_verts(), moab::ParallelComm::get_sent_ents(), moab::FBEngine::getAdjacentEntities(), moab::TempestRemapper::GetOverlapAugmentedEntities(), moab::FBEngine::gsubtract(), iMesh_load(), iMOAB_DeregisterApplication(), iMOAB_UpdateMeshInfo(), moab::MeshSet::intersect(), moab::Tqdcfr::load_file(), moab::Coupler::locate_points(), main(), mb_skin_poly_test(), mb_skin_verts_common(), mb_skin_volume_test_common(), moab::MergeMesh::merge_all(), moab::DualTool::next_loop_vertex(), pack_unpack_noremoteh(), print_partitioned_entities(), moab::Tqdcfr::read_nodes(), moab::ReadNCDF::read_nodesets(), moab::ReadHDF5::read_set_ids_recursive(), moab::ReadNCDF::read_sidesets(), moab::ParCommGraph::receive_mesh(), ZoltanPartitioner::repartition(), moab::ParallelComm::resolve_shared_sets(), moab::DualTool::rev_atomic_pillow(), moab::ParallelComm::send_entities(), moab::FBEngine::separate(), moab::Core::serial_load_file(), moab::FBEngine::smooth_new_intx_points(), moab::MeshTopoUtil::split_entity_nonmanifold(), moab::FBEngine::split_internal_edge(), moab::ParCommGraph::split_owned_range(), subtract_test(), moab::ParallelComm::tag_iface_entities(), test_adjacencies(), test_boolean(), test_geometric_sets(), test_get_ents_with_default_value(), test_get_set(), test_get_set_variable_length(), test_multiple_files(), test_read_parallel(), test_remove_entities(), test_subset(), test_var_length_data_common(), moab::DualTool::traverse_hyperplane(), moab::WriteVtk::write_elems(), and moab::IODebugTrack::~IODebugTrack().

{
    const bool braindead = false;

    if( braindead )
    {
        // brain-dead implementation right now
        Range res( range1 );
        for( Range::const_iterator rit = range2.begin(); rit != range2.end(); ++rit )
            res.erase( *rit );

        return res;
    }
    else
    {
        Range lhs( range1 );

        Range::pair_iterator r_it0       = lhs.pair_begin();
        Range::const_pair_iterator r_it1 = range2.const_pair_begin();

        // terminate the while loop when at least one "start" iterator is at the
        // end of the list
        while( r_it0 != lhs.end() && r_it1 != range2.end() )
        {
            // case a: pair wholly within subtracted pair
            if( r_it0->first >= r_it1->first && r_it0->second <= r_it1->second )
            {
                Range::PairNode* rtmp = r_it0.node();
                ++r_it0;
                lhs.delete_pair_node( rtmp );
            }
            // case b: pair overlaps upper part of subtracted pair
            else if( r_it0->first <= r_it1->second && r_it0->first >= r_it1->first )
            {
                r_it0->first = r_it1->second + 1;
                ++r_it1;
            }
            // case c: pair overlaps lower part of subtracted pair
            else if( r_it0->second >= r_it1->first && r_it0->second <= r_it1->second )
            {
                r_it0->second = r_it1->first - 1;
                ++r_it0;
            }
            // case d: pair completely surrounds subtracted pair
            else if( r_it0->first < r_it1->first && r_it0->second > r_it1->second )
            {
                Range::PairNode* new_node =
                    alloc_pair( r_it0.node(), r_it0.node()->mPrev, r_it0->first, r_it1->first - 1 );
                new_node->mPrev->mNext = new_node->mNext->mPrev = new_node;
                r_it0.node()->first                             = r_it1->second + 1;
                ++r_it1;
            }
            else
            {
                while( r_it0->second < r_it1->first && r_it0 != lhs.end() )
                    ++r_it0;
                if( r_it0 == lhs.end() ) break;
                while( r_it1->second < r_it0->first && r_it1 != range2.end() )
                    ++r_it1;
            }
        }

        return lhs;
    }
}
static void moab::swap4_uint ( unsigned int *  data) [static]

Definition at line 168 of file Tqdcfr.cpp.

Referenced by moab::Tqdcfr::FREADIA().

{
    unsigned char tmp, *cdat = (unsigned char*)data;
    tmp     = cdat[0];
    cdat[0] = cdat[3], cdat[3] = tmp;
    tmp     = cdat[1];
    cdat[1] = cdat[2], cdat[2] = tmp;
}
static void moab::swap8_voff ( long *  data) [static]

Definition at line 155 of file Tqdcfr.cpp.

Referenced by moab::Tqdcfr::FREADDA().

{
    unsigned char tmp, *cdat = (unsigned char*)data;
    tmp     = cdat[0];
    cdat[0] = cdat[7], cdat[7] = tmp;
    tmp     = cdat[1];
    cdat[1] = cdat[6], cdat[6] = tmp;
    tmp     = cdat[2];
    cdat[2] = cdat[5], cdat[5] = tmp;
    tmp     = cdat[3];
    cdat[3] = cdat[4], cdat[4] = tmp;
}
EntityType moab::TYPE_FROM_HANDLE ( EntityHandle  handle) [inline]

Get the type out of the handle. Can do a simple shift because handles are unsigned (therefore shifting fills with zero's)

Definition at line 92 of file Internals.hpp.

References MB_ID_WIDTH.

Referenced by moab::AEntityFactory::add_adjacency(), moab::Skinner::add_adjacency(), moab::Core::adjacencies_iterate(), moab::Range::all_of_dimension(), moab::Range::all_of_type(), moab::VerdictWrapper::all_quality_measures(), moab::WriteHDF5::assign_ids(), moab::SweptElementData::calc_num_entities(), moab::ScdElementData::calc_num_entities(), moab::HigherOrderFactory::center_node_exist(), check_adj_ho_nodes(), moab::Core::check_adjacencies(), moab::AEntityFactory::check_equiv_entities(), check_ho_element(), check_set_contents(), check_valid_connectivity(), moab::SequenceManager::check_valid_entities(), moab::BitTag::clear_data(), closedsurface_uref_hirec_convergence_study(), moab::Core::connect_iterate(), moab::DualTool::construct_dual_cells(), moab::DualTool::construct_dual_edges(), moab::DualTool::construct_dual_faces(), moab::DualTool::construct_dual_vertices(), moab::SpectralMeshTool::convert_to_coarse(), moab::ParallelComm::create_interface_sets(), moab::Skinner::create_side(), moab::SequenceManager::delete_entities(), moab::Core::delete_entities(), moab::SequenceManager::delete_entity(), moab::ReadHDF5::delete_non_side_elements(), moab::MeshSet::DIM_FROM_HANDLE(), moab::Core::dimension_from_handle(), ent_not_found(), moab::AEntityFactory::entities_equivalent(), moab::ParallelComm::estimate_ents_buffer_size(), moab::WriteHDF5Parallel::exchange_file_ids(), moab::Skinner::face_reversed(), moab::SequenceManager::find(), moab::DenseTag::find_entities_with_value(), moab::VarLenDenseTag::find_entities_with_value(), moab::RangeSeqIntersectIter::find_invalid_range(), find_side(), moab::Skinner::find_skin_vertices(), moab::Skinner::find_skin_vertices_2D(), moab::Skinner::find_skin_vertices_3D(), moab::WriteSLAC::gather_interior_exterior(), moab::WriteTemplate::gather_mesh_information(), moab::WriteSLAC::gather_mesh_information(), moab::WriteNCDF::gather_mesh_information(), moab::WriteUtil::gather_nodes_from_elements(), moab::AEntityFactory::get_adjacencies(), moab::WriteUtil::get_adjacencies(), moab::Core::get_adjacencies(), get_adjacencies_intersection(), get_adjacencies_union(), moab::MeshTopoUtil::get_bridge_adjacencies(), moab::Core::get_connectivity(), moab::Core::get_coords(), moab::BitTag::get_data(), moab::AEntityFactory::get_down_adjacency_elements(), moab::AEntityFactory::get_down_adjacency_elements_poly(), moab::AEntityFactory::get_element(), moab::WriteUtil::get_element_connect(), moab::AEntityFactory::get_elements(), moab::MeshSet::get_entities_by_type(), moab::BitTag::get_entities_with_bits(), moab::WriteUtil::get_entity_list_pointers(), moab::ParallelComm::get_local_handles(), moab::SequenceManager::get_memory_use(), moab::TypeSequenceManager::get_memory_use(), get_mesh_set(), moab::WriteTemplate::get_neuset_elems(), moab::WriteSLAC::get_neuset_elems(), moab::WriteCCMIO::get_neuset_elems(), moab::VectorSetIterator::get_next_arr(), moab::RangeSetIterator::get_next_by_dimension(), moab::RangeSetIterator::get_next_by_type(), moab::MeshSet::get_non_set_entities(), moab::ReadUtil::get_ordered_vertices(), moab::SweptVertexData::get_params(), moab::ScdVertexData::get_params(), moab::SweptElementData::get_params(), moab::ScdElementData::get_params(), moab::SweptElementData::get_params_connectivity(), moab::ScdElementData::get_params_connectivity(), moab::MeshSetSequence::get_parent_child_meshsets(), moab::WriteNCDF::get_sideset_elems(), get_tagged(), moab::BitTag::get_tagged(), moab::AEntityFactory::get_up_adjacency_elements(), moab::WriteTemplate::get_valid_sides(), moab::WriteSLAC::get_valid_sides(), moab::WriteNCDF::get_valid_sides(), moab::AEntityFactory::get_vertices(), handle_test(), moab::Core::high_order_node(), ht_content_type(), iMesh_getEntArr2ndAdj(), iMesh_getEntArrAdj(), iMesh_getEntitiesRec(), iMeshP_getAdjEntities(), moab::Skinner::initialize(), moab::AdaptiveKDTree::intersect_children_with_elems(), moab::DualTool::is_blind(), moab::TypeSequenceManager::is_free_handle(), moab::TypeSequenceManager::last_free_handle(), moab::RayIntersectSets::leaf(), moab::DualTool::list_entities(), moab::Core::list_entities(), moab::Core::list_entity(), moab::DebugOutput::list_range_real(), mb_mesh_set_appends(), mb_type_str(), moab::AEntityFactory::merge_adjust_adjacencies(), moab::Core::merge_entities(), moab::SequenceManager::new_sequence_size(), not_found(), not_root_set(), nothing_but_type(), moab::AEntityFactory::notify_change_connectivity(), moab::AEntityFactory::notify_create_entity(), moab::AEntityFactory::notify_delete_entity(), moab::MeshSet::num_entities_by_type(), moab::Range::num_of_dimension(), moab::Range::num_of_type(), iBase_EntityArrIterator_Private::IsType::operator()(), moab::MeshSet::not_type_test::operator()(), moab::MeshSet::type_test::operator()(), moab::DualTool::order_chord(), moab::ParallelComm::pack_entities(), moab::ParallelComm::pack_entity_seq(), moab::ParallelComm::pack_sets(), ZoltanPartitioner::partition_owned_cells(), moab::MergeMesh::perform_merge(), moab::ParallelComm::print_buffer(), moab::Core::print_database(), print_handles(), moab::WriteHDF5::print_id_map(), moab::VerdictWrapper::quality_measure(), moab::OrientedBoxTreeTool::ray_intersect_triangles(), moab::AEntityFactory::remove_adjacency(), moab::AEntityFactory::remove_all_adjacencies(), moab::BitTag::remove_data(), moab::SequenceManager::replace_subsequence(), moab::GeomTopoTool::restore_topology_from_adjacency(), moab::Core::set_connectivity(), moab::Core::set_coords(), moab::BitTag::set_data(), moab::Core::side_element(), moab::Core::side_number(), moab::OrientedBoxTreeTool::sphere_intersect_triangles(), moab::MeshTopoUtil::split_entities_manifold(), moab::Range::str_rep(), test_closedsurface_mesh(), moab::EntitySequence::type(), moab::Core::type_from_handle(), moab::BitTag::unpack(), moab::RangeSeqIntersectIter::update_entity_sequence(), moab::ParallelComm::update_remote_data(), moab::ParallelComm::update_remote_data_old(), validate_tree(), verdict_test1(), moab::WriteCCMIO::write_cells_and_faces(), moab::WriteVtk::write_elems(), and moab::WriteVtk::write_tag().

{
    return static_cast< EntityType >( handle >> MB_ID_WIDTH );
}
static std::pair< EntityType, EntityType > moab::type_range ( EntityType  type) [inline, static]

Definition at line 524 of file TagCompare.hpp.

References MBMAXTYPE, and MBVERTEX.

Referenced by moab::DenseTag::find_entities_with_value(), moab::VarLenDenseTag::find_entities_with_value(), moab::BitTag::get_entities_with_bits(), moab::BitTag::get_tagged(), get_tagged(), and moab::DenseTag::get_tagged_entities().

{
    if( type == MBMAXTYPE )
        return std::pair< EntityType, EntityType >( MBVERTEX, MBMAXTYPE );
    else
    {
        EntityType next = type;
        ++next;
        return std::pair< EntityType, EntityType >( type, next );
    }
}
CartVect moab::unit ( const CartVect &  v) [inline]

Get unit vector in same direction.

Definition at line 249 of file CartVect.hpp.

References moab::CartVect::length().

Referenced by clock_to_string(), mem_to_string(), and mem_to_string().

{
    const double len = v.length();
    return CartVect( v[0] / len, v[1] / len, v[2] / len );
}
Range moab::unite ( const Range &  r1,
const Range &  r2 
) [inline]

unite two ranges, placing the results in the return range

Definition at line 773 of file Range.hpp.

References moab::Range::begin(), moab::Range::end(), and moab::Range::insert().

Referenced by ZoltanPartitioner::repartition(), moab::FBEngine::separate(), and test_iterates().

{
    Range r( r1 );
    r.insert( r2.begin(), r2.end() );
    return r;
}
template<typename T >
static void moab::UNPACK ( unsigned char *&  buff,
T val,
size_t  count 
) [inline, static]

Definition at line 91 of file ParallelComm.cpp.

References T.

Referenced by UNPACK_DBLS(), UNPACK_EH(), UNPACK_INTS(), and UNPACK_VOID().

{
    memcpy( val, buff, count * sizeof( T ) );
    buff += count * sizeof( T );
}
static void moab::UNPACK_DBL ( unsigned char *&  buff,
double &  dbl_val 
) [inline, static]

Definition at line 180 of file ParallelComm.cpp.

References UNPACK_DBLS().

Referenced by moab::ParallelComm::print_buffer().

{
    UNPACK_DBLS( buff, &dbl_val, 1 );
}
static void moab::UNPACK_DBLS ( unsigned char *&  buff,
double *  dbl_val,
size_t  num 
) [inline, static]

Definition at line 174 of file ParallelComm.cpp.

References UNPACK(), and UPC.

Referenced by moab::ParallelComm::print_buffer(), moab::ParallelComm::settle_intersection_points(), UNPACK_DBL(), and moab::ParallelComm::unpack_entities().

{
    UNPACK( buff, dbl_val, num );
    UPC( num, " doubles" );
}
static void moab::UNPACK_EH ( unsigned char *&  buff,
EntityHandle *  eh_val,
size_t  num 
) [inline, static]
static void moab::UNPACK_INTS ( unsigned char *&  buff,
int *  int_val,
size_t  num 
) [inline, static]
static void moab::UNPACK_RANGE ( unsigned char *&  buff,
Range &  rng 
) [inline, static]

Definition at line 213 of file ParallelComm.cpp.

References moab::Range::insert(), UNPACK_EH(), UNPACK_INT(), and UPC.

Referenced by moab::ParallelComm::unpack_sets().

{
    int num_subs;
    EntityHandle eh[2];
    UNPACK_INT( buff, num_subs );
    for( int i = 0; i < num_subs; i++ )
    {
        UPC( num_subs, "-subranged range" );
        UNPACK_EH( buff, eh, 2 );
        rng.insert( eh[0], eh[1] );
    }
}
void unpack_tuples ( void *  ptr,
TupleList **  tlp 
)

Definition at line 1889 of file Coupler.cpp.

References moab::TupleList::disableWriteAccess(), moab::TupleList::enableWriteAccess(), moab::TupleList::get_n(), moab::TupleList::getTupleSize(), moab::TupleList::initialize(), moab::TupleList::set_n(), sint, slong, UINT_PER_LONG, UINT_PER_REAL, UINT_PER_UNSIGNED, ulong, moab::TupleList::vi_wr, moab::TupleList::vl_wr, moab::TupleList::vr_wr, and moab::TupleList::vul_wr.

Referenced by moab::Coupler::get_matching_entities(), and main().

{
    TupleList* tl = new TupleList();
    *tlp          = tl;

    uint nt;
    unsigned mit, mlt, mult, mrt;
    uint* buf = (uint*)ptr;

    // Get n
    memcpy( &nt, buf, sizeof( uint ) ), buf += 1;
    // Get mi
    memcpy( &mit, buf, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
    // Get ml
    memcpy( &mlt, buf, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
    // Get mul
    memcpy( &mult, buf, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
    // Get mr
    memcpy( &mrt, buf, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;

    // Initialize tl
    tl->initialize( mit, mlt, mult, mrt, nt );
    tl->enableWriteAccess();
    tl->set_n( nt );

    uint mi, ml, mul, mr;
    tl->getTupleSize( mi, ml, mul, mr );

    // Get vi_rd
    memcpy( tl->vi_wr, buf, tl->get_n() * mi * sizeof( sint ) ), buf += tl->get_n() * mi;
    // Get vl_rd
    memcpy( tl->vl_wr, buf, tl->get_n() * ml * sizeof( slong ) ), buf += tl->get_n() * ml * UINT_PER_LONG;
    // Get vul_rd
    memcpy( tl->vul_wr, buf, tl->get_n() * mul * sizeof( ulong ) ), buf += tl->get_n() * mul * UINT_PER_LONG;
    // Get vr_rd
    memcpy( tl->vr_wr, buf, tl->get_n() * mr * sizeof( realType ) ), buf += tl->get_n() * mr * UINT_PER_REAL;

    tl->disableWriteAccess();
    return;
}
static void moab::UNPACK_TYPE ( unsigned char *&  buff,
EntityType &  type 
) [inline, static]

Definition at line 205 of file ParallelComm.cpp.

References MBMAXTYPE, MBVERTEX, and UNPACK_INT().

Referenced by moab::ParallelComm::print_buffer(), and moab::ParallelComm::unpack_entities().

{
    int int_type = MBMAXTYPE;
    UNPACK_INT( buff, int_type );
    type = static_cast< EntityType >( int_type );
    assert( type >= MBVERTEX && type <= MBMAXTYPE );
}
static void moab::UNPACK_VOID ( unsigned char *&  buff,
void *  val,
size_t  num 
) [inline, static]

Definition at line 199 of file ParallelComm.cpp.

References UNPACK(), and UPC.

Referenced by moab::ParallelComm::unpack_sets().

{
    UNPACK( buff, reinterpret_cast< unsigned char* >( val ), num );
    UPC( num, " void" );
}
template<typename T >
void moab::VALGRIND_MAKE_VEC_UNDEFINED ( std::vector< T > &  ) [inline]

Definition at line 163 of file WriteHDF5Parallel.cpp.

Referenced by moab::WriteHDF5Parallel::negotiate_type_list().

{
    /* Nothing to do */
}
static ErrorCode moab::vector_insert_vector ( MeshSet::Count &  count,
MeshSet::CompactList &  clist,
const EntityHandle *  vect,
size_t  vect_size,
EntityHandle  my_handle,
AEntityFactory *  adj 
) [static]

Insert unsorted array of handles into vector-based MeshSet

Definition at line 1036 of file MeshSet.cpp.

References moab::AEntityFactory::add_adjacency(), moab::MeshSet::MANY, MB_SUCCESS, moab::MeshSet::CompactList::ptr, and resize_compact_list().

Referenced by moab::MeshSet::insert_entity_vector().

{
    const size_t orig_size = count < MeshSet::MANY ? (int)count : clist.ptr[1] - clist.ptr[0];
    EntityHandle* list     = resize_compact_list( count, clist, orig_size + vect_size );
    if( adj )
        for( size_t i = 0; i < vect_size; ++i )
            adj->add_adjacency( vect[i], my_handle, false );
    memcpy( list + orig_size, vect, sizeof( EntityHandle ) * vect_size );
    return MB_SUCCESS;
}
static ErrorCode moab::vector_remove_range ( MeshSet::Count &  count,
MeshSet::CompactList &  clist,
const Range &  range,
EntityHandle  my_handle,
AEntityFactory *  adj 
) [static]

Remove Range of handles fromr vector-based MeshSet

Definition at line 913 of file MeshSet.cpp.

References moab::Range::end(), moab::Range::find(), moab::MeshSet::CompactList::hnd, moab::MeshSet::MANY, MB_SUCCESS, moab::MeshSet::CompactList::ptr, moab::AEntityFactory::remove_adjacency(), and resize_compact_list().

Referenced by moab::MeshSet::remove_entity_ranges().

{
    EntityHandle* list;
    size_t list_size;
    if( count < MeshSet::MANY )
    {
        list      = clist.hnd;
        list_size = count;
    }
    else
    {
        list      = clist.ptr[0];
        list_size = clist.ptr[1] - clist.ptr[0];
    }

    const EntityHandle* const list_end = list + list_size;
    EntityHandle* list_write           = list;
    for( const EntityHandle* list_read = list; list_read != list_end; ++list_read )
    {
        if( range.find( *list_read ) == range.end() )
        {  // keep
            *list_write = *list_read;
            ++list_write;
        }
        else if( adj )
        {
            adj->remove_adjacency( *list_read, my_handle );
        }
    }

    resize_compact_list( count, clist, list_write - list );
    return MB_SUCCESS;
}
static ErrorCode moab::vector_remove_ranges ( MeshSet::Count &  count,
MeshSet::CompactList &  clist,
const EntityHandle *  pair_list,
size_t  num_pairs,
EntityHandle  my_handle,
AEntityFactory *  adj 
) [static]

Remove range-based MeshSet contents from vector-based MeshSet

Definition at line 951 of file MeshSet.cpp.

References moab::MeshSet::CompactList::hnd, moab::MeshSet::MANY, MB_SUCCESS, moab::MeshSet::CompactList::ptr, moab::AEntityFactory::remove_adjacency(), and resize_compact_list().

Referenced by moab::MeshSet::remove_entity_ranges().

{
    EntityHandle* list;
    size_t list_size;
    if( count < MeshSet::MANY )
    {
        list      = clist.hnd;
        list_size = count;
    }
    else
    {
        list      = clist.ptr[0];
        list_size = clist.ptr[1] - clist.ptr[0];
    }

    const EntityHandle *const list_end = list + list_size, *const input_end = pair_list + 2 * num_pairs;
    EntityHandle* list_write = list;
    for( const EntityHandle* list_read = list; list_read != list_end; ++list_read )
    {
        const EntityHandle* ptr = std::lower_bound( pair_list, input_end, *list_read );
        if( ( ptr != input_end && ( *ptr == *list_read || ( ptr - pair_list ) % 2 ) ) &&  // if in delete list
            std::find( list_read + 1, list_end, *list_read ) == list_end )
        {  // and is last occurance in list
            // only remove adj if no previous occurance
            if( adj && std::find( list, list_write, *list_read ) == list_write )
                adj->remove_adjacency( *list_read, my_handle );
        }
        else
        {
            *list_write = *list_read;
            ++list_write;
        }
    }

    resize_compact_list( count, clist, list_write - list );
    return MB_SUCCESS;
}
static ErrorCode moab::vector_remove_vector ( MeshSet::Count &  count,
MeshSet::CompactList &  clist,
const EntityHandle *  vect,
size_t  vect_size,
EntityHandle  my_handle,
AEntityFactory *  adj 
) [static]

Remove unsorted array of handles from vector-based MeshSet

Definition at line 994 of file MeshSet.cpp.

References moab::MeshSet::CompactList::hnd, moab::MeshSet::MANY, MB_SUCCESS, moab::MeshSet::CompactList::ptr, moab::AEntityFactory::remove_adjacency(), and resize_compact_list().

Referenced by moab::MeshSet::remove_entity_vector().

{
    EntityHandle* list;
    size_t list_size;
    if( count < MeshSet::MANY )
    {
        list      = clist.hnd;
        list_size = count;
    }
    else
    {
        list      = clist.ptr[0];
        list_size = clist.ptr[1] - clist.ptr[0];
    }

    const EntityHandle *const list_end = list + list_size, *const input_end = vect + vect_size;
    EntityHandle* list_write = list;
    for( const EntityHandle* list_read = list; list_read != list_end; ++list_read )
    {
        if( std::find( vect, input_end, *list_read ) != input_end &&  // if in delete list
            std::find( list_read + 1, list_end, *list_read ) == list_end )
        {  // and is last occurance in list
            // only remove adj if no previous occurance?
            if( adj )  // && std::find(list, list_write, *list_read) == list_write)
                adj->remove_adjacency( *list_read, my_handle );
        }
        else
        {
            *list_write = *list_read;
            ++list_write;
        }
    }

    resize_compact_list( count, clist, list_write - list );
    return MB_SUCCESS;
}
static bool moab::verify ( CartVect  a,
CartVect  b,
CartVect  c,
CartVect  d,
double  x,
double  y,
double  z 
) [static]

Definition at line 1399 of file IntxUtils.cpp.

Referenced by moab::IntxUtils::intersect_great_circle_arc_with_clat_arc().

{
    // to check, the point has to be between a and b on a great arc, and between c and d on a const
    // lat circle
    CartVect s( x, y, z );
    CartVect n1 = a * b;
    CartVect n2 = a * s;
    CartVect n3 = s * b;
    if( n1 % n2 < 0 || n1 % n3 < 0 ) return false;

    // do the same for c, d, s, in plane z=0
    c[2] = d[2] = s[2] = 0.;  // bring everything in the same plane, z=0;

    n1 = c * d;
    n2 = c * s;
    n3 = s * d;
    if( n1 % n2 < 0 || n1 % n3 < 0 ) return false;

    return true;
}
bool moab::within_tolerance ( CartVect &  p1,
CartVect &  p2,
const double &  tolerance 
)

Definition at line 18 of file SmoothFace.cpp.

Referenced by moab::SmoothFace::facet_area_coordinate().

{
    if( ( fabs( p1[0] - p2[0] ) < tolerance ) && ( fabs( p1[1] - p2[1] ) < tolerance ) &&
        ( fabs( p1[2] - p2[2] ) < tolerance ) )
        return true;
    return false;
}

Variable Documentation

unsigned int moab::__PACK_count = 0

Definition at line 55 of file ParallelComm.cpp.

unsigned int moab::__PACK_num = 0

Definition at line 55 of file ParallelComm.cpp.

std::string moab::__PACK_string

Definition at line 56 of file ParallelComm.cpp.

unsigned int moab::__UNPACK_count = 0

Definition at line 55 of file ParallelComm.cpp.

unsigned int moab::__UNPACK_num = 0

Definition at line 55 of file ParallelComm.cpp.

std::string moab::__UNPACK_string

Definition at line 56 of file ParallelComm.cpp.

const char* const moab::AFFINE_XFORM_TAG_NAME = "AFFINE_TRANSFORM"

Definition at line 36 of file AffineXform.cpp.

Referenced by moab::AffineXform::get_tag().

const char* const moab::AXIS_BOX_TAG_NAME = "AXIS_BOX"

Definition at line 29 of file AxisBox.cpp.

Referenced by moab::AxisBox::get_tag().

const char* const moab::BLOCK_NODESET_OFFSET_TAG_NAME = "BLOCK_NODESET_OFFSET"

Definition at line 103 of file Tqdcfr.cpp.

Referenced by moab::Tqdcfr::convert_nodesets_sidesets().

const char* const moab::BLOCK_SIDESET_OFFSET_TAG_NAME = "BLOCK_SIDESET_OFFSET"

Definition at line 104 of file Tqdcfr.cpp.

Referenced by moab::Tqdcfr::convert_nodesets_sidesets().

const int moab::box_face_corners[6][4] [static]
Initial value:
 { { 0, 1, 5, 4 }, { 1, 2, 6, 5 }, { 2, 3, 7, 6 },
                                            { 3, 0, 4, 7 }, { 3, 2, 1, 0 }, { 4, 5, 6, 7 } }

Definition at line 1248 of file BSPTree.cpp.

Referenced by moab::BoxPlaneIter::BoxPlaneIter().

const int* const* const* const moab::cub_elem_order_map = exodus_elem_order_map

Definition at line 101 of file Tqdcfr.cpp.

Referenced by moab::Tqdcfr::read_elements().

const bool moab::Debug_surf_eval = false

Definition at line 45 of file FBEngine.cpp.

Referenced by moab::FBEngine::initializeSmoothing().

Definition at line 81 of file ReadHDF5.cpp.

Referenced by moab::ReadHDF5::set_up_read().

const bool moab::DEFAULT_BCAST_SUMMARY = true

Definition at line 75 of file ReadHDF5.cpp.

Referenced by moab::ReadHDF5::set_up_read().

Definition at line 68 of file ReadHDF5.cpp.

Referenced by moab::ReadHDF5::set_up_read().

const char moab::DEFAULT_SEPARATOR = ';'

Definition at line 31 of file FileOptions.cpp.

Referenced by moab::FileOptions::FileOptions().

const bool moab::DEFAULT_STRICT = true

Definition at line 51 of file WriteVtk.cpp.

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

const char moab::DEFAULT_TAG_NAME[] = "OBB"

Definition at line 45 of file OrientedBoxTreeTool.cpp.

Referenced by main(), and moab::OrientedBoxTreeTool::OrientedBoxTreeTool().

const unsigned char moab::F = CN::MID_FACE_BIT
const char* moab::face_start_token = "f"

Definition at line 51 of file ReadOBJ.cpp.

const char moab::geom_category[][CATEGORY_TAG_SIZE] = { "Vertex\0", "Curve\0", "Surface\0", "Volume\0", "Group\0" }

Definition at line 60 of file ReadOBJ.cpp.

Referenced by build_new_surface(), and moab::ReadOBJ::create_new_object().

const char* const moab::geom_name[] = { "Vertex\0", "Curve\0", "Surface\0", "Volume\0" }

Definition at line 57 of file ReadOBJ.cpp.

Referenced by moab::ReadOBJ::create_new_object().

const char moab::GEOM_SENSE_2_TAG_NAME[] = "GEOM_SENSE_2"

Definition at line 37 of file GeomTopoTool.cpp.

Referenced by moab::GeomTopoTool::check_face_sense_tag().

const char moab::GEOM_SENSE_N_ENTS_TAG_NAME[] = "GEOM_SENSE_N_ENTS"

Definition at line 39 of file GeomTopoTool.cpp.

Referenced by moab::GeomTopoTool::check_edge_sense_tags().

const char moab::GEOM_SENSE_N_SENSES_TAG_NAME[] = "GEOM_SENSE_N_SENSES"

Definition at line 40 of file GeomTopoTool.cpp.

Referenced by moab::GeomTopoTool::check_edge_sense_tags().

const char* moab::group_start_token = "g"

Definition at line 49 of file ReadOBJ.cpp.

Initial value:
 { 0,  1,  2,  3,  4,  5,  6,  7,                   
                                  8,  11, 12, 9,  13, 10, 14, 15, 16, 19, 17, 18,  
                                  24, 20, 23, 21, 22, 25,                          
                                  26 }

Definition at line 23 of file GmshUtil.cpp.

const MBuuid moab::IDD_MBCore = MBuuid( 0x8956e0a, 0xc300, 0x4005, 0xbd, 0xf6, 0xc3, 0x4e, 0xf7, 0x1f, 0x5a, 0x52 ) [static]
const MBuuid moab::IDD_MBUnknown [static]
Initial value:
    MBuuid( 0xf4f6605e, 0x2a7e, 0x4760, 0xbb, 0x06, 0xb9, 0xed, 0x27, 0xe9, 0x4a, 0xec )

uuid for an unknown interface this can be used to either return a default interface or a NULL interface

Definition at line 92 of file UnknownInterface.hpp.

Referenced by moab::Core::QueryInterface(), and moab::ComponentFactory::QueryInterface().

const char moab::IMPLICIT_COMPLEMENT_NAME[] = "impl_complement"

Definition at line 44 of file GeomTopoTool.cpp.

Referenced by moab::GeomTopoTool::setup_implicit_complement().

int const moab::kCellInc = 4 [static]

Definition at line 78 of file ReadCCMIO.cpp.

char const moab::kDefaultState[] = "default" [static]

Definition at line 75 of file ReadCCMIO.cpp.

int const moab::kNValues = 10 [static]

Definition at line 74 of file ReadCCMIO.cpp.

char const moab::kStateName[] = "default" [static]

Definition at line 81 of file WriteCCMIO.cpp.

Referenced by moab::WriteCCMIO::create_ccmio_structure().

char const moab::kUnitsName[] = "Units" [static]

Definition at line 76 of file ReadCCMIO.cpp.

int const moab::kVertOffset = 2 [static]

Definition at line 77 of file ReadCCMIO.cpp.

std::string moab::lastError = "No error" [static]

Definition at line 28 of file ErrorHandler.cpp.

Referenced by MBError(), MBErrorHandler_GetLastError(), and MBTraceBackErrorHandler().

const int moab::MAX_BCAST_SIZE = ( 1 << 28 )

Definition at line 52 of file ParallelComm.cpp.

Referenced by moab::ParallelComm::broadcast_entities().

const int moab::MAX_NODES = 28

Definition at line 85 of file GmshUtil.cpp.

Referenced by moab::GmshUtil::get_gmsh_type().

Initial value:
 {
    
    TWENTYEIGHT_ZEROS,                                                                            
    { 0, 0, 1, 8, 26, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },    
    { 0, 0, 0, 2, 0, 0, 9, 0, 0, 20, 21, 0, 22, 0, 0, 23, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0 },  
    { 0, 0, 0, 0, 3, 0, 0, 0, 16, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },     
    TWENTYEIGHT_ZEROS,                                                                            
    { 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0 },     
    { 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 19, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },     
    { 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0 },     
    TWENTYEIGHT_ZEROS,                                                                            
    { 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 12 },     
    TWENTYEIGHT_ZEROS,                                                                            
    TWENTYEIGHT_ZEROS,                                                                            
    TWENTYEIGHT_ZEROS }

Definition at line 86 of file GmshUtil.cpp.

Referenced by moab::GmshUtil::get_gmsh_type().

const int moab::mb_to_vtk_type[][3]
Initial value:
 { { 1, 0, 0 },     
                                  { 3, 21, 0 },    
                                  { 5, 22, 0 },    
                                  { 9, 23, 28 },   
                                  { 7, 0, 0 },     
                                  { 10, 24, 0 },   
                                  { 14, 27, 0 },   
                                  { 13, 26, 0 },   
                                  { 0, 0, 0 },     
                                  { 12, 25, 29 },  
                                  { 42, 0, 0 },    
                                  { 0, 0, 0 },     
                                  { 0, 0, 0 } }

Definition at line 111 of file VtkUtil.cpp.

Referenced by moab::VtkUtil::get_vtk_type().

char const* moab::nameQuality[MB_QUALITY_COUNT] [static]

Definition at line 90 of file VerdictWrapper.cpp.

Referenced by moab::VerdictWrapper::quality_name().

const char* moab::nameType[MBMAXTYPE] [static]
Initial value:
 {
    "MBVERTEX",     
    "MBEDGE",       
    "MBTRI",        
    "MBQUAD",       
    "MBPOLYGON",    
    "MBTET",        
    "MBPYRAMID",    
    "MBPRISM",      
    "MBKNIFE",      
    "MBHEX",        
    "MBPOLYHEDRON", 
    "MBENTITYSET",  
}

Definition at line 125 of file VerdictWrapper.cpp.

Referenced by moab::VerdictWrapper::entity_type_name().

Initial value:
 {
    0,   
    1,   
    13,  
    22,  
    0,   
    14,  
    0,   
    1,   
    1,   
    20,  
    0,   
    0,   
}

Definition at line 76 of file VerdictWrapper.cpp.

Referenced by moab::VerdictWrapper::num_qualities().

const char moab::OBB_GSET_TAG_NAME[] = "OBB_GSET"

Definition at line 42 of file GeomTopoTool.cpp.

Referenced by moab::GeomTopoTool::GeomTopoTool().

const char moab::OBB_ROOT_TAG_NAME[] = "OBB_ROOT"
const char* moab::object_start_token = "o"

Definition at line 48 of file ReadOBJ.cpp.

const char* moab::PARTITIONING_PCOMM_TAG_NAME = "__PRTN_PCOMM"

Name of tag used to store ParallelComm Index on mesh paritioning sets

Definition at line 296 of file ParallelComm.cpp.

Referenced by moab::ParallelComm::get_pcomm(), and moab::ParallelComm::set_partitioning().

const unsigned moab::pixel[] = { 0, 1, 3, 2 }

Definition at line 44 of file VtkUtil.cpp.

Initial value:
 {
    
    
    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },  
    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 },  
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1 },  
    { 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1 },  
    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },  
    { 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0 },  
    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },  
    { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },  
    { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },  
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },  
    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },  
    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }   
}

Definition at line 25 of file VerdictWrapper.cpp.

Referenced by moab::VerdictWrapper::possible_quality(), and moab::VerdictWrapper::quality_measure().

Initial value:
 {
    0, 1, 2, 3, 4,  5,              
    6, 8, 9, 7, 10, 11, 12, 14, 13  
}

Definition at line 32 of file GmshUtil.cpp.

Initial value:
 {
    0, 1, 2, 3, 4,             
    5, 8, 9, 6, 10, 7, 11, 12  
}

Definition at line 36 of file GmshUtil.cpp.

const unsigned moab::qhex[]
Initial value:
 { 0,  1,  2,  3,                                   
                          4,  5,  6,  7,  8,  9,  10, 11,                  
                          16, 17, 18, 19, 12, 13, 14, 15, 23, 21, 20, 22,  
                          24, 25, 26 }

Definition at line 52 of file VtkUtil.cpp.

const int moab::tet_10_node_order[] = { 0, 1, 2, 3, 4, 5, 6, 7, 9, 8 }

Definition at line 28 of file GmshUtil.cpp.

const int moab::TIME_STR_LEN = 11

Definition at line 53 of file WriteNCDF.cpp.

Referenced by moab::WriteNCDF::time_and_date(), and moab::WriteNCDF::write_header().

const char* moab::vertex_start_token = "v"

Definition at line 50 of file ReadOBJ.cpp.

const unsigned moab::voxel[] = { 0, 1, 3, 2, 4, 5, 7, 6 }

Definition at line 45 of file VtkUtil.cpp.

const unsigned moab::wedge[]
Initial value:
 { 0,  2,  1,                                       
                           3,  5,  4,                                       
                           8,  7,  6,                                       
                           14, 13, 12,                                      
                           9,  11, 10,                                      
                           17, 16, 15 }

Definition at line 46 of file VtkUtil.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines