Mesh Oriented datABase  (version 5.5.0)
An array-based unstructured mesh library
moab Namespace Reference

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

Namespaces

 _bvh
 
 _element_tree
 
 common_tree
 
 Element
 
 element_utility
 
 ElemUtil
 
 GeomUtil
 
 Matrix
 
 point_locator
 
 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
 Structure defining relation between MOAB and VTK element types. VTK had different types for quadratic than linear elements, so a tuple of the MOAB type and number of elements maps to a VTK type. More...
 
class  GmshUtil
 General data about GMsh files for use by read and write code. More...
 
class  IODebugTrack
 Tool for debugging binary IO. More...
 
class  ExoIIInterface
 
struct  VtkElemType
 Structure defining relation between MOAB and VTK element types. VTK had different types for quadratic than linear elements, so a tuple of the MOAB type and number of elements maps to a VTK type. More...
 
class  VtkUtil
 General data about VTK files for use by read and write code. More...
 
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  NCHelperESMF
 
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 used to hold data for each block to be output in Exodus; used by initialize_exodus_file to initialize the file header for increased speed More...
 
struct  DirichletSetData
 struct used to hold data for each nodeset to be output in Exodus; used by initialize_exodus_file to initialize the file header for increased speed More...
 
struct  NeumannSetData
 struct used to hold data for each sideset to be output in Exodus; used by initialize_exodus_file to initialize the file header for increased speed More...
 
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
 predicate for STL algorithms. Returns true if the entity handle is of the specified type. For example, to remove all the tris out of a list of 2D entities retrieved using get_adjacencies you could do std::remove_if(list.begin(), list.end(), type_equals(gMB, MBTRI)); More...
 
class  type_not_equals
 predicate for STL algorithms. Returns true if the entity handle is not of the specified type. For example, to remove all but the tris out of a list of 2D entities retrieved using get_adjacencies you could do std::remove_if(list.begin(), list.end(), type_not_equals(gMB, MBTRI)); More...
 
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...
 

Typedefs

typedef std::vector< EntityHandleAdjacencyVector
 
typedef herr_t(* HDF5_Error_Func_Type) (void *)
 
typedef std::pair< EntityHandle, EntityHandleMeshSetRange
 
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 . More...
 
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< EntityHandleTagVarHandlesLess
 
typedef TagOneTypeEqual< EntityHandleTagOneHandleEqual
 
typedef TagOneTypeLess< EntityHandleTagOneHandleLess
 
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 }
 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. More...
 
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)
 
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. More...
 
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) More...
 
void MBErrorHandler_Finalize ()
 Finalize MOAB error handler (e.g. delete the utility object for printing error output) More...
 
bool MBErrorHandler_Initialized ()
 Indicates whether MBErrorHandler_Init has been called. More...
 
void MBErrorHandler_GetLastError (std::string &error)
 Get information about the last error. More...
 
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. More...
 
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. More...
 
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. More...
 
EntityType TYPE_FROM_HANDLE (EntityHandle handle)
 Get the type out of the handle. Can do a simple shift because handles are unsigned (therefore shifting fills with zero's) More...
 
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 More...
 
ExoIIElementTypeoperator++ (ExoIIElementType &type)
 prefix increment operator for EntityType More...
 
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 ()
 
static ErrorCode error (ErrorCode rval)
 
static herr_t handle_hdf5_error (void *data)
 
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. More...
 
static MeshSet::Count remove_from_vector (const MeshSet::Count count, MeshSet::CompactList &list, const EntityHandle h, int &result)
 Remvoe from parent/child list. More...
 
static EntityHandleresize_compact_list (MeshSet::Count &count, MeshSet::CompactList &clist, size_t new_list_size)
 Resize MeshSet::CompactList. Returns pointer to storage. More...
 
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. More...
 
double angle (const CartVect &u, const CartVect &v)
 Interior angle between two vectors. More...
 
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. More...
 
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 More...
 
Range subtract (const Range &from, const Range &)
 subtract range2 from this, placing the results in the return range More...
 
Range unite (const Range &r1, const Range &r2)
 unite two ranges, placing the results in the return range More...
 
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. More...
 
static ErrorCode box_from_axes (OrientedBox &result, Interface *instance, const Range &points)
 Common code for box calculation. More...
 
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. More...
 
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))
 
static ErrorCode error (ErrorCode rval)
 
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 error (ErrorCode val)
 
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)
 

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 DEFAULT_MAX_EDGES_PER_CELL = 10
 
const double pideg = acos( -1.0 ) / 180.0
 
const int EDGES_PER_CELL = 6
 
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
 uuid for an unknown interface this can be used to either return a default interface or a NULL interface More...
 
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 (kraft.nosp@m.che@.nosp@m.cae.w.nosp@m.isc..nosp@m.edu)
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

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); }

  1. Prefer insert(val1, val2) over insert(val) where possible.
  2. 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 );

  1. Use empty() instead of size() if you only need to find out if there is anything in the list.
  2. 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.

  1. 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

◆ AdjacencyVector

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

Definition at line 29 of file AEntityFactory.hpp.

◆ DimensionPair

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

Definition at line 54 of file CN.hpp.

◆ EntityHandle

◆ EntityID

typedef long moab::EntityID

Definition at line 48 of file EntityHandle.hpp.

◆ EvalFcn

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.

◆ HandleMap

Definition at line 40 of file ParallelComm.hpp.

◆ HandleVec

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

Definition at line 30 of file Forward.hpp.

◆ HDF5_Error_Func_Type

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

Definition at line 14 of file HDF5Common.hpp.

◆ 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 .

Definition at line 49 of file HalfFacetRep.hpp.

◆ InitFcn

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

Definition at line 36 of file ElemEvaluator.hpp.

◆ InsideFcn

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

Definition at line 38 of file ElemEvaluator.hpp.

◆ IntegrateFcn

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.

◆ JacobianFcn

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.

◆ MeshSetRange

Definition at line 429 of file MeshSet.cpp.

◆ NormalFcn

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

Definition at line 53 of file ElemEvaluator.hpp.

◆ ReverseEvalFcn

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.

◆ TagDoublesEqual

Definition at line 258 of file TagCompare.hpp.

◆ TagDoublesLess

typedef TagTypeLess< double > moab::TagDoublesLess

Definition at line 260 of file TagCompare.hpp.

◆ TagHandlesEqual

Definition at line 251 of file TagCompare.hpp.

◆ TagHandlesLess

Definition at line 253 of file TagCompare.hpp.

◆ TagIntsEqual

Definition at line 244 of file TagCompare.hpp.

◆ TagIntsLess

Definition at line 246 of file TagCompare.hpp.

◆ TagOneDoubleEqual

Definition at line 262 of file TagCompare.hpp.

◆ TagOneDoubleLess

Definition at line 263 of file TagCompare.hpp.

◆ TagOneHandleEqual

Definition at line 255 of file TagCompare.hpp.

◆ TagOneHandleLess

Definition at line 256 of file TagCompare.hpp.

◆ TagOneIntEqual

Definition at line 248 of file TagCompare.hpp.

◆ TagOneIntLess

Definition at line 249 of file TagCompare.hpp.

◆ TagVarDoublesEqual

Definition at line 259 of file TagCompare.hpp.

◆ TagVarDoublesLess

Definition at line 261 of file TagCompare.hpp.

◆ TagVarHandlesEqual

Definition at line 252 of file TagCompare.hpp.

◆ TagVarHandlesLess

Definition at line 254 of file TagCompare.hpp.

◆ TagVarIntsEqual

Definition at line 245 of file TagCompare.hpp.

◆ TagVarIntsLess

Definition at line 247 of file TagCompare.hpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MAX_VERTICES 
MAX_EDGES 
MAX_FACES 
MAX_VERTS_HF 
MAX_INCIDENT_HF 

Definition at line 65 of file HalfFacetRep.hpp.

66 {
67  MAX_VERTICES = 8,
68  MAX_EDGES = 12,
69  MAX_FACES = 6,
70  MAX_VERTS_HF = 4,
71  MAX_INCIDENT_HF = 4
72 };

◆ anonymous enum

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.

47 {
48  //! the maximum number n-1 dimension adjacencies a element may have
49  MAX_SUB_ENTITIES = 12,
50  //! the maximum number of nodes an n-1 dimensional element may have
52 };

◆ abaqus_assembly_params

Enumerator
abq_assembly_undefined 
abq_assembly_ambiguous 
abq_assembly_name 

Definition at line 286 of file ReadABAQUS.hpp.

287 {
291 };

◆ abaqus_element_params

Enumerator
abq_element_undefined 
abq_element_ambiguous 
abq_element_elset 
abq_element_type 

Definition at line 301 of file ReadABAQUS.hpp.

302 {
307 };

◆ abaqus_element_type

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.

◆ abaqus_elset_params

Enumerator
abq_elset_undefined 
abq_elset_ambiguous 
abq_elset_elset 
abq_elset_generate 
abq_elset_instance 

Definition at line 330 of file ReadABAQUS.hpp.

◆ abaqus_instance_params

Enumerator
abq_instance_undefined 
abq_instance_ambiguous 
abq_instance_name 
abq_instance_part 

Definition at line 278 of file ReadABAQUS.hpp.

◆ abaqus_keyword_type

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.

253 {
254  abq_undefined = 0,
257  abq_heading,
258  abq_part,
259  abq_end_part,
260  abq_assembly,
262  abq_node,
263  abq_element,
264  abq_nset,
265  abq_elset,
266  abq_instance,
269 };

◆ abaqus_line_types

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.

243 {
244  abq_undefined_line = 0,
249  abq_eof
250 };

◆ abaqus_node_params

Enumerator
abq_node_undefined 
abq_node_ambiguous 
abq_node_nset 
abq_node_system 

Definition at line 293 of file ReadABAQUS.hpp.

294 {
295  abq_node_undefined = 0,
299 };

◆ abaqus_nset_params

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.

321 {
322  abq_nset_undefined = 0,
328 };

◆ abaqus_part_params

Enumerator
abq_part_undefined 
abq_part_ambiguous 
abq_part_name 

Definition at line 271 of file ReadABAQUS.hpp.

272 {
273  abq_part_undefined = 0,
276 };

◆ abaqus_solid_section_params

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

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.

19 {
23 };

◆ ExoIIElementType

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.

◆ GEOMTYPE

Enumerator
HISURFACE 
HI3DCURVE 
HI2DCURVE 

Definition at line 28 of file HiReconstruction.hpp.

29 {
30  HISURFACE,
31  HI3DCURVE,
32  HI2DCURVE
33 };

◆ keyword_type

Enumerator
obj_undefined 
object_start 
group_start 
face_start 
vertex_start 
valid_unsupported 

Definition at line 106 of file ReadOBJ.hpp.

107 {
108  obj_undefined = 0,
109  object_start,
110  group_start,
111  face_start,
112  vertex_start,
114 };

◆ MBMessageTag

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.

◆ MESHTYPE

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.

55 {
56  CURVE = 0, // Homogeneous curve mesh
57  SURFACE, // Homogeneous surface mesh
58  SURFACE_MIXED, // Mixed surface with embedded curves
59  VOLUME, // Homogeneous volume mesh
60  VOLUME_MIXED_1, // Volume mesh with embedded curves
61  VOLUME_MIXED_2, // Volume mesh with embedded surface
62  VOLUME_MIXED // Volume mesh with embedded curves and surfaces
63 };

◆ QualityType

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.

19 {
20  // order exactly from HexMetricVals
22  MB_EDGE_RATIO = 0, // 0 MBHEX, MBTET, MBQUAD, MBTRI
23  MB_MAX_EDGE_RATIO, // 1 MBHEX, MBQUAD
24  MB_SKEW, // 2 MBHEX, MBQUAD
25  MB_TAPER, // 3 MBHEX, MBQUAD
26  MB_VOLUME, // 4 MBHEX, MBTET, MBPRISM, MBKNIFE
27  MB_STRETCH, // 5 MBHEX, MBQUAD
28  MB_DIAGONAL, // 6 MBHEX,
29  MB_DIMENSION, // 7 MBHEX,
30  MB_ODDY, // 8 MBHEX, MBQUAD
31  MB_MED_ASPECT_FROBENIUS, // 9 MBHEX, MBQUAD
32  MB_MAX_ASPECT_FROBENIUS, // 10 MBHEX, MBTET (aspect_frobenius) MBQUAD, MBTRI
33  // (aspect_frobenius)
34  MB_CONDITION, // 11 MBHEX, MBTET, MBQUAD, MBTRI
35  MB_JACOBIAN, // 12 MBHEX, MBTET, MBQUAD
36  MB_SCALED_JACOBIAN, // 13 MBHEX, MBTET, MBQUAD, MBTRI
37  MB_SHEAR, // 14 MBHEX, MBQUAD, MBTRI
38  MB_SHAPE, // 15 MBHEX, MBTET, MBQUAD, MBTRI
39  MB_RELATIVE_SIZE_SQUARED, // 16 MBHEX, MBTET, MBQUAD, MBTRI
40  MB_SHAPE_AND_SIZE, // 17 MBHEX, MBTET, MBQUAD
41  MB_SHEAR_AND_SIZE, // 18 MBHEX, MBQUAD
42  MB_DISTORTION, // 19 MBHEX, MBTET, MBQUAD
43  // length for edge:
44  MB_LENGTH, // 20 only for MBEDGE
45  // specific to tets
46  MB_RADIUS_RATIO, // 21 MBTET, MBQUAD, MBTRI
47  MB_ASPECT_BETA, // 22 MBTET
48  MB_ASPECT_RATIO, // 23 MBTET, MBQUAD, MBTRI
49  MB_ASPECT_GAMMA, // 24 MBTET
50  MB_MINIMUM_ANGLE, // 25 MBTET, MBQUAD, MBTRI
51  MB_COLLAPSE_RATIO, // 26 MBTET
52  // specific to quads
53  MB_WARPAGE, // 27 MBQUAD
54  MB_AREA, // 28 MBQUAD, MBTRI
55  MB_MAXIMUM_ANGLE, // 29 MBQUAD, MBTRI
56  MB_QUALITY_COUNT // used to size the arrays
57 
58 };

Function Documentation

◆ ADD()

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

Definition at line 3832 of file ParallelComm.cpp.

3833 {
3834  return arg1 + arg2;
3835 }

◆ all_root_set()

static bool moab::all_root_set ( std::string  name,
const EntityHandle array,
size_t  len 
)
inlinestatic

Definition at line 27 of file MeshTag.cpp.

28 {
29  for( size_t i = 0; i < len; ++i )
30  {
31  if( array[i] )
32  {
33  not_root_set( name, array[i] );
34  return false;
35  }
36  }
37 
38  return true;
39 }

References not_root_set().

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

◆ allocate_mpe_state()

static std::pair< int, int > moab::allocate_mpe_state ( const char *  ,
const char *   
)
static

Definition at line 50 of file ReadHDF5Dataset.cpp.

51 {
52  return std::pair< int, int >();
53 }

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

◆ angle()

double moab::angle ( const CartVect u,
const CartVect v 
)
inline

◆ angleCompare()

bool moab::angleCompare ( angleAndIndex  lhs,
angleAndIndex  rhs 
)

Definition at line 92 of file IntxUtils.cpp.

93 {
94  return lhs.angle < rhs.angle;
95 }

References moab::angleAndIndex::angle.

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

◆ area_coordinates()

ErrorCode moab::area_coordinates ( Interface mbi,
EntityHandle  tri,
CartVect pnt,
double *  area_coord,
EntityHandle boundary_handle 
)

Definition at line 98 of file FBEngine.cpp.

103 {
104 
105  int nnodes;
106  const EntityHandle* conn3;
107  ErrorCode rval = mbi->get_connectivity( tri, conn3, nnodes );
108  MBERRORR( rval, "Failed to get connectivity" );
109  assert( 3 == nnodes );
110  CartVect P[3];
111  rval = mbi->get_coords( conn3, nnodes, (double*)&P[0] );
112  MBERRORR( rval, "Failed to get coordinates" );
113 
114  CartVect r0( P[0] - pnt );
115  CartVect r1( P[1] - pnt );
116  CartVect r2( P[2] - pnt );
117  if( debug_splits )
118  {
119  std::cout << " nodes:" << conn3[0] << " " << conn3[1] << " " << conn3[2] << "\n";
120  std::cout << " distances: " << r0.length() << " " << r1.length() << " " << r2.length() << "\n";
121  }
122  if( r0.length() < tolerance_segment )
123  {
124  area_coord[0] = 1.;
125  area_coord[1] = 0.;
126  area_coord[2] = 0.;
127  boundary_handle = conn3[0];
128  return MB_SUCCESS;
129  }
130  if( r1.length() < tolerance_segment )
131  {
132  area_coord[0] = 0.;
133  area_coord[1] = 1.;
134  area_coord[2] = 0.;
135  boundary_handle = conn3[1];
136  return MB_SUCCESS;
137  }
138  if( r2.length() < tolerance_segment )
139  {
140  area_coord[0] = 0.;
141  area_coord[1] = 0.;
142  area_coord[2] = 1.;
143  boundary_handle = conn3[2];
144  return MB_SUCCESS;
145  }
146 
147  CartVect v1( P[1] - P[0] );
148  CartVect v2( P[2] - P[0] );
149 
150  double areaDouble = ( v1 * v2 ).length(); // the same for CartVect
151  if( areaDouble < tolerance_segment * tolerance_segment )
152  {
153  MBERRORR( MB_FAILURE, "area of triangle too small" );
154  }
155  area_coord[0] = ( r1 * r2 ).length() / areaDouble;
156  area_coord[1] = ( r2 * r0 ).length() / areaDouble;
157  area_coord[2] = ( r0 * r1 ).length() / areaDouble;
158 
159  if( fabs( area_coord[0] + area_coord[1] + area_coord[2] - 1 ) > tolerance_segment )
160  {
161  MBERRORR( MB_FAILURE, "point outside triangle" );
162  }
163  // the tolerance is used here for area coordinates (0 to 1), and in other
164  // parts it is used as an absolute distance; pretty inconsistent.
165  bool side0 = ( area_coord[0] < tolerance_segment );
166  bool side1 = ( area_coord[1] < tolerance_segment );
167  bool side2 = ( area_coord[2] < tolerance_segment );
168  if( !side0 && !side1 && !side2 ) return MB_SUCCESS; // interior point
169  // now, find out what boundary is in question
170  // first, get all edges, in order
171  std::vector< EntityHandle > edges;
172  EntityHandle nn2[2];
173  for( int i = 0; i < 3; i++ )
174  {
175  nn2[0] = conn3[( i + 1 ) % 3];
176  nn2[1] = conn3[( i + 2 ) % 3];
177  std::vector< EntityHandle > adjacent;
178  rval = mbi->get_adjacencies( nn2, 2, 1, false, adjacent, Interface::INTERSECT );
179  MBERRORR( rval, "Failed to get edges" );
180  if( adjacent.size() != 1 ) MBERRORR( MB_FAILURE, "Failed to get adjacent edges" );
181  // should be only one edge here
182  edges.push_back( adjacent[0] );
183  }
184 
185  if( side0 ) boundary_handle = edges[0];
186  if( side1 ) boundary_handle = edges[1];
187  if( side2 ) boundary_handle = edges[2];
188 
189  return MB_SUCCESS;
190 }

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

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

◆ box_from_axes()

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.

167 {
168  ErrorCode rval;
169 
170  // project points onto axes to get box extents
171  CartVect min( std::numeric_limits< double >::max() ), max( -std::numeric_limits< double >::max() );
172  for( Range::iterator i = points.begin(); i != points.end(); ++i )
173  {
174  CartVect coords;
175  rval = instance->get_coords( &*i, 1, coords.array() );MB_CHK_ERR( rval );
176 
177  for( int d = 0; d < 3; ++d )
178  {
179  const double t = point_perp( coords, result.center, result.axes.col( d ) );
180  if( t < min[d] ) min[d] = t;
181  if( t > max[d] ) max[d] = t;
182  }
183  }
184 
185  // We now have a box defined by three orthogonal line segments
186  // that intersect at the center of the box. Each line segment
187  // is defined as result.center + t * result.axes[i], where the
188  // range of t is [min[i], max[i]].
189 
190  // Calculate new center
191  const CartVect mid = 0.5 * ( min + max );
192  result.center += mid[0] * result.axes.col( 0 ) + mid[1] * result.axes.col( 1 ) + mid[2] * result.axes.col( 2 );
193 
194  // reorder axes by length
195  CartVect range = 0.5 * ( max - min );
196  if( range[2] < range[1] )
197  {
198  if( range[2] < range[0] )
199  {
200  std::swap( range[0], range[2] );
201  result.axes.swapcol( 0, 2 );
202  }
203  }
204  else if( range[1] < range[0] )
205  {
206  std::swap( range[0], range[1] );
207  result.axes.swapcol( 0, 1 );
208  }
209  if( range[1] > range[2] )
210  {
211  std::swap( range[1], range[2] );
212  result.axes.swapcol( 1, 2 );
213  }
214 
215  // scale axis to encompass all points, divide in half
216 #if MB_ORIENTED_BOX_UNIT_VECTORS
217  result.length = range;
218 #else
219  result.axes.colscale( 0, range[0] );
220  result.axes.colscale( 1, range[1] );
221  result.axes.colscale( 2, range[2] );
222 #endif
223 
224 #if MB_ORIENTED_BOX_OUTER_RADIUS
225  result.radius = range.length();
226 #endif
227 
228  return MB_SUCCESS;
229 }

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::CartVect::length(), moab::OrientedBox::length, MB_CHK_ERR, MB_SUCCESS, point_perp(), moab::OrientedBox::radius, moab::Matrix3::swapcol(), and t.

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

◆ check_int_tag()

static ErrorCode moab::check_int_tag ( Interface mb,
Tag  tag 
)
static

Definition at line 301 of file ReadUtil.cpp.

302 {
303  int size;
304  DataType type;
305  ErrorCode rval = mb->tag_get_bytes( tag, size );
306  if( MB_SUCCESS != rval ) return rval;
307  if( size != sizeof( int ) ) return MB_TYPE_OUT_OF_RANGE;
308  rval = mb->tag_get_data_type( tag, type );
309  if( type != MB_TYPE_OPAQUE && type != MB_TYPE_INTEGER ) return MB_TYPE_OUT_OF_RANGE;
310 
311  return MB_SUCCESS;
312 }

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

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

◆ check_range()

static bool moab::check_range ( const range_data d,
bool  prefer_end,
EntityHandle result 
)
static

Definition at line 453 of file TypeSequenceManager.cpp.

454 {
455  EntityHandle first = std::max( d.min_start_handle, d.first );
456  EntityHandle last = std::min( d.max_end_handle, d.last );
457  if( last < first + d.num_entities - 1 )
458  {
459  result = 0;
460  return false;
461  }
462 
463  result = prefer_end ? last + 1 - d.num_entities : first;
464  return true;
465 }

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().

◆ check_ray_limits()

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.

449 {
450 
451  const double extent_pos_diff = half_extent - normal_par_pos;
452 
453  // limit in positive direction
454  if( nonneg_ray_len )
455  { // should be 0 <= t <= nonneg_ray_len
456  assert( 0 <= *nonneg_ray_len );
457  if( normal_par_dir > 0 )
458  { // if/else if needed for pos/neg divisor
459  if( *nonneg_ray_len * normal_par_dir >= extent_pos_diff && extent_pos_diff >= 0 ) return true;
460  }
461  else if( normal_par_dir < 0 )
462  {
463  if( *nonneg_ray_len * normal_par_dir <= extent_pos_diff && extent_pos_diff <= 0 ) return true;
464  }
465  }
466  else
467  { // should be 0 <= t
468  if( normal_par_dir > 0 )
469  { // if/else if needed for pos/neg divisor
470  if( extent_pos_diff >= 0 ) return true;
471  }
472  else if( normal_par_dir < 0 )
473  {
474  if( extent_pos_diff <= 0 ) return true;
475  }
476  }
477 
478  // limit in negative direction
479  if( neg_ray_len )
480  { // should be neg_ray_len <= t < 0
481  assert( 0 >= *neg_ray_len );
482  if( normal_par_dir > 0 )
483  { // if/else if needed for pos/neg divisor
484  if( *neg_ray_len * normal_par_dir <= extent_pos_diff && extent_pos_diff < 0 ) return true;
485  }
486  else if( normal_par_dir < 0 )
487  {
488  if( *neg_ray_len * normal_par_dir >= extent_pos_diff && extent_pos_diff > 0 ) return true;
489  }
490  }
491 
492  return false;
493 }

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

◆ check_tag_type()

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.

45 {
46  ErrorCode rval;
47  DataType act_type;
48  int act_size;
49 
50  rval = moab->tag_get_data_type( tag, act_type );CHKERR;
51 
52  rval = moab->tag_get_bytes( tag, act_size );CHKERR;
53 
54  if( act_type != exp_type || act_size != exp_size ) return MB_TYPE_OUT_OF_RANGE;
55 
56  return MB_SUCCESS;
57 }

References CHKERR, ErrorCode, MB_SUCCESS, and MB_TYPE_OUT_OF_RANGE.

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

◆ choose_owner_idx()

static size_t moab::choose_owner_idx ( const std::vector< unsigned > &  proc_list)
static

Definition at line 4478 of file ParallelComm.cpp.

4479 {
4480  // Try to assign owners randomly so we get a good distribution,
4481  // (note: specifying the same seed on all procs is essential)
4482  unsigned val = 0;
4483  for( size_t i = 0; i < proc_list.size(); i++ )
4484  val ^= proc_list[i];
4485  srand( (int)( val ) );
4486  return rand() % proc_list.size();
4487 }

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

◆ closest_to_triangles() [1/2]

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.

1548 {
1549  ErrorCode rval;
1550  CartVect pos, diff, verts[3];
1551  const EntityHandle* conn = NULL;
1552  int len = 0;
1553 
1554  for( Range::iterator i = tris.begin(); i != tris.end(); ++i )
1555  {
1556  rval = moab->get_connectivity( *i, conn, len );
1557  if( MB_SUCCESS != rval ) return rval;
1558 
1559  rval = moab->get_coords( conn, 3, verts[0].array() );
1560  if( MB_SUCCESS != rval ) return rval;
1561 
1562  GeomUtil::closest_location_on_tri( from, verts, pos );
1563  diff = pos - from;
1564  double dist_sqr = diff % diff;
1565  if( dist_sqr < shortest_dist_sqr )
1566  {
1567  // new closest location
1568  shortest_dist_sqr = dist_sqr;
1569  closest_pt = pos;
1570  closest_tri = *i;
1571  }
1572  }
1573 
1574  return MB_SUCCESS;
1575 }

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

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

◆ closest_to_triangles() [2/2]

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.

1583 {
1584  ErrorCode rval;
1585  Range tris;
1586 
1587  rval = moab->get_entities_by_type( set_handle, MBTRI, tris );
1588  if( MB_SUCCESS != rval ) return rval;
1589 
1590  return closest_to_triangles( moab, tris, from, shortest_dist_sqr, closest_pt, closest_tri );
1591 }

References closest_to_triangles(), ErrorCode, MB_SUCCESS, and MBTRI.

◆ compare_handle_id()

int moab::compare_handle_id ( const void *  a,
const void *  b 
)

Definition at line 200 of file MergeMesh.cpp.

201 {
202 
203  handle_id* ia = (handle_id*)a;
204  handle_id* ib = (handle_id*)b;
205  if( ia->val == ib->val )
206  {
207  return ( ia->eh < ib->eh ) ? -1 : 1;
208  }
209  else
210  {
211  return ( ia->val - ib->val );
212  }
213 }

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

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

◆ connectivity_match()

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.

470 {
471 
472  bool they_match;
473 
474  // special test for 2 handles, since we don't want to wrap the list in this
475  // case
476  if( num_vertices == 2 )
477  {
478  they_match = false;
479  if( conn1_i[0] == conn2_i[0] && conn1_i[1] == conn2_i[1] )
480  {
481  direct = 1;
482  they_match = true;
483  offset = 0;
484  }
485  else if( conn1_i[0] == conn2_i[1] && conn1_i[1] == conn2_i[0] )
486  {
487  they_match = true;
488  direct = -1;
489  offset = 1;
490  }
491  }
492 
493  else
494  {
495  const T* iter;
496  iter = std::find( &conn2_i[0], &conn2_i[num_vertices], conn1_i[0] );
497  if( iter == &conn2_i[num_vertices] ) return false;
498 
499  they_match = true;
500 
501  offset = iter - conn2_i;
502  int i;
503 
504  // first compare forward
505  for( i = 1; i < num_vertices; ++i )
506  {
507  if( conn1_i[i] != conn2_i[( offset + i ) % num_vertices] )
508  {
509  they_match = false;
510  break;
511  }
512  }
513 
514  if( they_match == true )
515  {
516  direct = 1;
517  return they_match;
518  }
519 
520  they_match = true;
521 
522  // then compare reverse
523  for( i = 1; i < num_vertices; i++ )
524  {
525  if( conn1_i[i] != conn2_i[( offset + num_vertices - i ) % num_vertices] )
526  {
527  they_match = false;
528  break;
529  }
530  }
531  if( they_match )
532  {
533  direct = -1;
534  }
535  }
536 
537  return they_match;
538 }

References T.

◆ convert_to_ranged_ids()

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.

1741 {
1742  if( !len )
1743  {
1744  result.clear();
1745  return;
1746  }
1747 
1748  result.resize( len * 2 );
1749  Range tmp;
1750  for( size_t i = 0; i < len; i++ )
1751  tmp.insert( (EntityHandle)buffer[i] );
1752  result.resize( tmp.psize() * 2 );
1753  int j = 0;
1754  for( Range::const_pair_iterator pit = tmp.const_pair_begin(); pit != tmp.const_pair_end(); ++pit, j++ )
1755  {
1756  result[2 * j] = pit->first;
1757  result[2 * j + 1] = pit->second - pit->first + 1;
1758  }
1759 }

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

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

◆ convert_to_ranges()

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.

1161 {
1162  vect_out.reserve( 2 * vect_in_len );
1163  vect_out.resize( vect_in_len );
1164  std::copy( vect_in, vect_in + vect_in_len, vect_out.begin() );
1165  std::sort( vect_out.begin(), vect_out.end() );
1166  vect_out.erase( std::unique( vect_out.begin(), vect_out.end() ), vect_out.end() );
1167 
1168  // duplicate all entries
1169  vect_out.resize( vect_out.size() * 2 );
1170  for( long i = vect_out.size() - 1; i >= 0; --i )
1171  vect_out[i] = vect_out[i / 2];
1172 
1173  // compact adjacent ranges
1174  std::vector< EntityHandle >::iterator r = vect_out.begin(), w = vect_out.begin();
1175  while( r != vect_out.end() )
1176  {
1177  *w = *r;
1178  ++w;
1179  ++r;
1180  *w = *r;
1181  ++r;
1182 
1183  while( r != vect_out.end() && *w + 1 == *r )
1184  {
1185  ++r;
1186  *w = *r;
1187  ++r;
1188  }
1189  ++w;
1190  }
1191 
1192  // remove extra space
1193  vect_out.erase( w, vect_out.end() );
1194 }

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

◆ copy_coords()

static void moab::copy_coords ( const double  src[3],
double  dest[3] 
)
inlinestatic

Definition at line 580 of file BSPTree.cpp.

581 {
582  dest[0] = src[0];
583  dest[1] = src[1];
584  dest[2] = src[2];
585 }

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

◆ copy_set_contents()

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.

2395 {
2396  if( ranged )
2397  {
2398  assert( length % 2 == 0 );
2399  for( long i = 0; i < length; i += 2 )
2400  hint = results.insert( hint, contents[i], contents[i] + contents[i + 1] - 1 );
2401  }
2402  else
2403  {
2404  std::sort( contents, contents + length );
2405  for( long i = 0; i < length; ++i )
2406  hint = results.insert( hint, contents[i] );
2407  }
2408  return hint;
2409 }

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

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

◆ copy_sorted_file_ids()

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.

113 {
114  Range::iterator hint = results.begin();
115  long i = 0;
116  while( i < num_ids )
117  {
118  EntityHandle start = sorted_ids[i];
119  for( ++i; i < num_ids && sorted_ids[i] == 1 + sorted_ids[i - 1]; ++i )
120  ;
121  hint = results.insert( hint, start, sorted_ids[i - 1] );
122  }
123 }

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

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

◆ corners_from_box()

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.

43 {
44  const double* ranges[] = { box_min, box_max };
45  for( int z = 0; z < 2; ++z )
46  {
47  corners[4 * z][0] = box_min[0];
48  corners[4 * z][1] = box_min[1];
49  corners[4 * z][2] = ranges[z][2];
50 
51  corners[4 * z + 1][0] = box_max[0];
52  corners[4 * z + 1][1] = box_min[1];
53  corners[4 * z + 1][2] = ranges[z][2];
54 
55  corners[4 * z + 2][0] = box_max[0];
56  corners[4 * z + 2][1] = box_max[1];
57  corners[4 * z + 2][2] = ranges[z][2];
58 
59  corners[4 * z + 3][0] = box_min[0];
60  corners[4 * z + 3][1] = box_max[1];
61  corners[4 * z + 3][2] = ranges[z][2];
62  }
63 }

References box_max(), and box_min().

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

◆ count_num_handles()

template<class HandleRangeIter >
size_t moab::count_num_handles ( HandleRangeIter  iter,
HandleRangeIter  end 
)
inline

Definition at line 1579 of file WriteHDF5.cpp.

1580 {
1581  size_t result = 0;
1582  for( ; iter != end; ++iter )
1583  result += iter->second - iter->first + 1;
1584 
1585  return result;
1586 }

Referenced by range_to_blocked_list_templ(), and range_to_id_list_templ().

◆ CREATE_HALFFACET()

EntityHandle moab::CREATE_HALFFACET ( const unsigned  lid,
const EntityID  id 
)
inline

Definition at line 31 of file HalfFacetRep.cpp.

32 {
33  assert( id <= MB_END_ID && lid < 6 );
34  return ( ( (HFacet)lid ) << MB_ID_WIDTH ) | id;
35 }

References MB_END_ID, and MB_ID_WIDTH.

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

◆ CREATE_HANDLE() [1/2]

EntityHandle moab::CREATE_HANDLE ( const unsigned  type,
const EntityID  id 
)
inline

Definition at line 68 of file Internals.hpp.

69 {
70  assert( id <= MB_END_ID && type <= MBMAXTYPE );
71  return ( ( (EntityHandle)type ) << MB_ID_WIDTH ) | id;
72 }

References MB_END_ID, MB_ID_WIDTH, and MBMAXTYPE.

◆ CREATE_HANDLE() [2/2]

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.

56 {
57  err = 0; //< Assume that there is a real error value defined somewhere
58 
59  if( id > MB_END_ID || type > MBMAXTYPE )
60  {
61  err = 1; //< Assume that there is a real error value defined somewhere
62  return 1; //<You've got to return something. What do you return?
63  }
64 
65  return ( ( (EntityHandle)type ) << MB_ID_WIDTH ) | id;
66 }

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::SparseTag::find_entities_with_value(), moab::VarLenSparseTag::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(), moab::TypeSequenceManager::is_free_handle(), moab::TypeSequenceManager::last_free_handle(), moab::WriteGMV::local_write_mesh(), moab::Range::lower_bound(), main(), moab::Range::num_of_dimension(), moab::ReadNCDF::read_nodesets(), 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().

◆ cross()

static void moab::cross ( double  result[3],
const double  a[3],
const double  b[3] 
)
static

Definition at line 930 of file BSPTree.cpp.

931 {
932  result[0] = a[1] * b[2] - a[2] * b[1];
933  result[1] = a[2] * b[0] - a[0] * b[2];
934  result[2] = a[0] * b[1] - a[1] * b[0];
935 }

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().

◆ DeInitialize()

MB_EXPORT void moab::DeInitialize ( )

Definition at line 127 of file Factory.cpp.

128 {
129  // delete all instances of objects
130  while( ComponentFactory::objects_in_use.size() )
131  {
132  UnknownInterface* iface = ComponentFactory::objects_in_use.front();
133  ComponentFactory::objects_in_use.pop_front();
134  if( iface ) delete iface;
135  }
136 }

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

◆ dot()

static double moab::dot ( const double  a[3],
const double  b[3] 
)
static

◆ ent_not_found()

static ErrorCode moab::ent_not_found ( const std::string &  ,
EntityHandle   
)
inlinestatic

Definition at line 36 of file DenseTag.cpp.

37 {
38  // MB_ENTITY_NOT_FOUND could be a non-error condition, do not call MB_SET_ERR on it
39 #if 0
40  fprintf(
41  stderr,
42  "[Warning]: Invalid entity handle setting tag %s: %s %ld\n",
43  name.c_str(),
44  CN::EntityTypeName(TYPE_FROM_HANDLE(h)),
45  (unsigned long)ID_FROM_HANDLE(h)
46  );
47 #endif
48 
49  return MB_ENTITY_NOT_FOUND;
50 }

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

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

◆ error() [1/4]

static ErrorCode moab::error ( ErrorCode  rval)
inlinestatic

Definition at line 127 of file DamselUtil.hpp.

128 {
129  return rval;
130 }

Referenced by about(), moab::HalfFacetRep::add_cells_of_single_component(), 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(), 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(), moab::NestedRefine::create_hm_storage_single_level(), moab::ReadNCDF::create_sideset_element(), moab::WriteHDF5::create_tag(), moab::VarLenDenseTag::create_tag(), moab::WriteHDF5Parallel::create_tag_tables(), 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::VarLenDenseTag::find_entities_with_value(), 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::HalfFacetRep::get_adjacencies(), moab::NestedRefine::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::Error::get_last_error(), 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::ReadCCMIO::get_processors(), 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(), handle_hdf5_error(), 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::HalfFacetRep::initialize(), moab::NestedRefine::initialize(), moab::HiReconstruction::initialize(), moab::WriteHDF5::initialize_mesh(), moab::NestedRefine::is_cell_on_boundary(), moab::NestedRefine::is_edge_on_boundary(), moab::NestedRefine::is_face_on_boundary(), moab::NestedRefine::is_vertex_on_boundary(), moab::ReadCCMIO::load_file(), moab::ReadCCMIO::load_matset_data(), moab::ReadCCMIO::load_metadata(), moab::ReadCCMIO::load_neuset_data(), moab::TempestRemapper::load_tempest_mesh_private(), main(), moab::HalfFacetRep::mark_halfedges(), MBErrorHandler_GetLastError(), moab::NestedRefine::NestedRefine(), moab::HiReconstruction::obtain_nring_ngbvs(), moab::WriteCCMIO::open_file(), moab::WriteHDF5Parallel::parallel_create_file(), moab::HiReconstruction::polyfit3d_walf_curve_vertex(), moab::HiReconstruction::polyfit3d_walf_surf_vertex(), moab::ReadCCMIO::read_all_faces(), moab::ReadCCMIO::read_faces(), moab::ReadCCMIO::read_gids_and_types(), moab::ReadNCDF::read_global_ids(), moab::ReadCCMIO::read_topology_types(), moab::ReadCCMIO::read_vertices(), moab::TempestOnlineMap::ReadParallelMap(), moab::HiReconstruction::reconstruct3D_curve_geom(), moab::HiReconstruction::reconstruct3D_surf_geom(), moab::VarLenDenseTag::release_all_data(), moab::ReorderTool::reorder_entities(), moab::NestedRefine::reorder_indices(), moab::ReorderTool::reorder_tag_data(), moab::ParallelComm::send_recv_entities(), moab::Error::set_last_error(), moab::NestedRefine::subdivide_cells(), moab::NestedRefine::subdivide_tets(), 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(), 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().

◆ error() [2/4]

static ErrorCode moab::error ( ErrorCode  rval)
inlinestatic

Definition at line 123 of file WriteHDF5.cpp.

124 {
125  return rval;
126 }

◆ error() [3/4]

static ErrorCode moab::error ( ErrorCode  rval)
inlinestatic

Definition at line 75 of file WriteHDF5Parallel.cpp.

76 {
77  return rval;
78 }

◆ error() [4/4]

static ErrorCode moab::error ( ErrorCode  val)
inlinestatic

Definition at line 23 of file ReorderTool.cpp.

24 {
25  return val;
26 }

◆ fail()

◆ FID_FROM_HALFFACET()

EntityID moab::FID_FROM_HALFFACET ( HFacet  handle)
inline

Definition at line 36 of file HalfFacetRep.cpp.

37 {
38  return ( handle & MB_ID_MASK );
39 }

References MB_ID_MASK.

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

◆ find_map_values()

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 
)
inlinestatic

Definition at line 286 of file TagCompare.hpp.

291 {
292  Range::iterator insert = results.begin();
293  for( ; lower != upper; ++lower )
294  {
295  typename TagMap::const_iterator i = tag_map.find( *lower );
296  if( i != tag_map.end() && compare( i->second ) ) insert = results.insert( insert, *lower );
297  }
298 }

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

◆ find_map_values_equal()

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 
)
inlinestatic

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.

383 {
384  switch( tag_info.get_data_type() )
385  {
386  case MB_TYPE_INTEGER:
387  if( size == sizeof( int ) )
388  find_map_values< TagOneIntEqual, TagMap >( TagOneIntEqual( value ), begin, end, tag_map, results );
389  else
390  find_map_values< TagIntsEqual, TagMap >( TagIntsEqual( value, size ), begin, end, tag_map, results );
391  break;
392 
393  case MB_TYPE_DOUBLE:
394  if( size == sizeof( double ) )
395  find_map_values< TagOneDoubleEqual, TagMap >( TagOneDoubleEqual( value ), begin, end, tag_map,
396  results );
397  else
398  find_map_values< TagDoublesEqual, TagMap >( TagDoublesEqual( value, size ), begin, end, tag_map,
399  results );
400  break;
401 
402  case MB_TYPE_HANDLE:
403  if( size == sizeof( EntityHandle ) )
404  find_map_values< TagOneHandleEqual, TagMap >( TagOneHandleEqual( value ), begin, end, tag_map,
405  results );
406  else
407  find_map_values< TagHandlesEqual, TagMap >( TagHandlesEqual( value, size ), begin, end, tag_map,
408  results );
409  break;
410 
411  default:
412  find_map_values< TagBytesEqual, TagMap >( TagBytesEqual( value, size ), begin, end, tag_map, results );
413  break;
414  }
415 }

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

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

◆ find_map_varlen_values_equal()

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 
)
inlinestatic

Definition at line 417 of file TagCompare.hpp.

424 {
425  switch( tag_info.get_data_type() )
426  {
427  case MB_TYPE_INTEGER:
428  find_map_values< TagVarIntsEqual, TagMap >( TagVarIntsEqual( value, size ), begin, end, tag_map, results );
429  break;
430  case MB_TYPE_DOUBLE:
431  find_map_values< TagVarDoublesEqual, TagMap >( TagVarDoublesEqual( value, size ), begin, end, tag_map,
432  results );
433  break;
434  case MB_TYPE_HANDLE:
435  find_map_values< TagVarHandlesEqual, TagMap >( TagVarHandlesEqual( value, size ), begin, end, tag_map,
436  results );
437  break;
438  default:
439  find_map_values< TagVarBytesEqual, TagMap >( TagVarBytesEqual( value, size ), begin, end, tag_map,
440  results );
441  break;
442  }
443 }

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

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

◆ find_tag_values() [1/2]

template<class Functor , class IteratorType >
static void moab::find_tag_values ( Functor  compare,
IteratorType  begin,
IteratorType  end,
Range results 
)
inlinestatic

Definition at line 268 of file TagCompare.hpp.

269 {
270  Range::iterator insert = results.begin();
271  for( IteratorType i = begin; i != end; ++i )
272  if( compare( i->second ) ) insert = results.insert( insert, i->first );
273 }

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

◆ find_tag_values() [2/2]

template<class Functor , class IteratorType >
static void moab::find_tag_values ( Functor  compare,
IteratorType  begin,
IteratorType  end,
std::vector< EntityHandle > &  results 
)
inlinestatic

Definition at line 276 of file TagCompare.hpp.

280 {
281  for( IteratorType i = begin; i != end; ++i )
282  if( compare( i->second ) ) results.push_back( i->first );
283 }

◆ find_tag_values_equal()

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 
)
inlinestatic

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.

313 {
314  switch( tag_info.get_data_type() )
315  {
316  case MB_TYPE_INTEGER:
317  if( size == sizeof( int ) )
318  find_tag_values< TagOneIntEqual, IteratorType >( TagOneIntEqual( value ), begin, end, results );
319  else
320  find_tag_values< TagIntsEqual, IteratorType >( TagIntsEqual( value, size ), begin, end, results );
321  break;
322 
323  case MB_TYPE_DOUBLE:
324  if( size == sizeof( double ) )
325  find_tag_values< TagOneDoubleEqual, IteratorType >( TagOneDoubleEqual( value ), begin, end, results );
326  else
327  find_tag_values< TagDoublesEqual, IteratorType >( TagDoublesEqual( value, size ), begin, end, results );
328  break;
329 
330  case MB_TYPE_HANDLE:
331  if( size == sizeof( EntityHandle ) )
332  find_tag_values< TagOneHandleEqual, IteratorType >( TagOneHandleEqual( value ), begin, end, results );
333  else
334  find_tag_values< TagHandlesEqual, IteratorType >( TagHandlesEqual( value, size ), begin, end, results );
335  break;
336 
337  default:
338  find_tag_values< TagBytesEqual, IteratorType >( TagBytesEqual( value, size ), begin, end, results );
339  break;
340  }
341 }

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

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

◆ find_tag_varlen_values_equal()

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 
)
inlinestatic

Definition at line 343 of file TagCompare.hpp.

349 {
350  switch( tag_info.get_data_type() )
351  {
352  case MB_TYPE_INTEGER:
353  find_tag_values< TagVarIntsEqual, IteratorType >( TagVarIntsEqual( value, size ), begin, end, results );
354  break;
355  case MB_TYPE_DOUBLE:
356  find_tag_values< TagVarDoublesEqual, IteratorType >( TagVarDoublesEqual( value, size ), begin, end,
357  results );
358  break;
359  case MB_TYPE_HANDLE:
360  find_tag_values< TagVarHandlesEqual, IteratorType >( TagVarHandlesEqual( value, size ), begin, end,
361  results );
362  break;
363  default:
364  find_tag_values< TagVarBytesEqual, IteratorType >( TagVarBytesEqual( value, size ), begin, end, results );
365  break;
366  }
367 }

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

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

◆ FIRST_HANDLE()

◆ get_adjacencies_intersection() [1/2]

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 
)
inlinestatic

Definition at line 1403 of file Core.cpp.

1409 {
1410  std::vector< EntityHandle > results;
1411  ErrorCode rval = moab::get_adjacencies_intersection( mb, begin, end, to_dimension, create_if_missing, results );MB_CHK_ERR( rval );
1412 
1413  if( adj_entities.empty() )
1414  {
1415  std::copy( results.begin(), results.end(), range_inserter( adj_entities ) );
1416  return MB_SUCCESS;
1417  }
1418 
1419  Range::iterator it = adj_entities.begin();
1420  while( it != adj_entities.end() )
1421  {
1422  if( std::find( results.begin(), results.end(), *it ) == results.end() )
1423  it = adj_entities.erase( it );
1424  else
1425  ++it;
1426  }
1427  return MB_SUCCESS;
1428 }

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

◆ get_adjacencies_intersection() [2/2]

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 
)
inlinestatic

Definition at line 1317 of file Core.cpp.

1323 {
1324  const size_t SORT_THRESHOLD = 200;
1325  std::vector< EntityHandle > temp_vec;
1326  std::vector< EntityHandle >::iterator adj_it, w_it;
1327  ErrorCode result = MB_SUCCESS;
1328 
1329  if( begin == end )
1330  {
1331  adj_entities.clear(); // intersection
1332  return MB_SUCCESS;
1333  }
1334 
1335  // First iteration is a special case if input list is empty.
1336  // Rather than returning nothing (intersecting with empty
1337  // input list), we begin with the adjacencies for the first entity.
1338  if( adj_entities.empty() )
1339  {
1340  EntityType entity_type = TYPE_FROM_HANDLE( *begin );
1341  if( to_dimension == CN::Dimension( entity_type ) )
1342  adj_entities.push_back( *begin );
1343  else if( to_dimension == 0 && entity_type != MBPOLYHEDRON )
1344  {
1345  result = mb->get_connectivity( &( *begin ), 1, adj_entities );MB_CHK_ERR( result );
1346  }
1347  else
1348  {
1349  result = mb->a_entity_factory()->get_adjacencies( *begin, to_dimension, create_if_missing, adj_entities );MB_CHK_ERR( result );
1350  }
1351  ++begin;
1352  }
1353 
1354  for( ITER from_it = begin; from_it != end; ++from_it )
1355  {
1356  // running results kept in adj_entities; clear temp_vec, which is working space
1357  temp_vec.clear();
1358 
1359  // get the next set of adjacencies
1360  EntityType entity_type = TYPE_FROM_HANDLE( *from_it );
1361  if( to_dimension == CN::Dimension( entity_type ) )
1362  temp_vec.push_back( *from_it );
1363  else if( to_dimension == 0 && entity_type != MBPOLYHEDRON )
1364  {
1365  result = mb->get_connectivity( &( *from_it ), 1, temp_vec );MB_CHK_ERR( result );
1366  }
1367  else
1368  {
1369  result = mb->a_entity_factory()->get_adjacencies( *from_it, to_dimension, create_if_missing, temp_vec );MB_CHK_ERR( result );
1370  }
1371 
1372  // otherwise intersect with the current set of results
1373  w_it = adj_it = adj_entities.begin();
1374  if( temp_vec.size() * adj_entities.size() < SORT_THRESHOLD )
1375  {
1376  for( ; adj_it != adj_entities.end(); ++adj_it )
1377  if( std::find( temp_vec.begin(), temp_vec.end(), *adj_it ) != temp_vec.end() )
1378  {
1379  *w_it = *adj_it;
1380  ++w_it;
1381  }
1382  }
1383  else
1384  {
1385  std::sort( temp_vec.begin(), temp_vec.end() );
1386  for( ; adj_it != adj_entities.end(); ++adj_it )
1387  if( std::binary_search( temp_vec.begin(), temp_vec.end(), *adj_it ) )
1388  {
1389  *w_it = *adj_it;
1390  ++w_it;
1391  }
1392  }
1393  adj_entities.erase( w_it, adj_entities.end() );
1394 
1395  // we're intersecting, so if there are no more results, we're done
1396  if( adj_entities.empty() ) break;
1397  }
1398 
1399  return MB_SUCCESS;
1400 }

References moab::CN::Dimension(), ErrorCode, mb, MB_CHK_ERR, MB_SUCCESS, MBPOLYHEDRON, and TYPE_FROM_HANDLE().

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

◆ get_adjacencies_union()

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 
)
inlinestatic

Definition at line 1243 of file Core.cpp.

1249 {
1250  const size_t DEFAULT_MAX_BLOCKS_SIZE = 4000;
1251  const size_t MAX_OUTER_ITERATIONS = 100;
1252 
1253  std::vector< EntityHandle > temp_vec, storage;
1254  std::vector< EntityHandle >::const_iterator ti;
1255  ErrorCode result = MB_SUCCESS, tmp_result;
1256  ITER i = begin;
1257  Range::iterator ins;
1258  const EntityHandle* conn;
1259  int conn_len;
1260 
1261  // Just copy any vertices from the input range into the output
1262  size_t remaining = end - begin;
1263  assert( begin + remaining == end );
1264 
1265  // How many entities to work with at once? 2000 or so shouldn't require
1266  // too much memory, but don't iterate in outer loop more than a
1267  // 1000 times (make it bigger if many input entiites.)
1268  const size_t block_size = std::max( DEFAULT_MAX_BLOCKS_SIZE, remaining / MAX_OUTER_ITERATIONS );
1269  while( remaining > 0 )
1270  {
1271  const size_t count = remaining > block_size ? block_size : remaining;
1272  remaining -= count;
1273  temp_vec.clear();
1274  for( size_t j = 0; j < count; ++i, ++j )
1275  {
1276  if( CN::Dimension( TYPE_FROM_HANDLE( *i ) ) == to_dimension )
1277  {
1278  temp_vec.push_back( *i );
1279  }
1280  else if( to_dimension == 0 && TYPE_FROM_HANDLE( *i ) != MBPOLYHEDRON )
1281  {
1282  tmp_result = gMB->get_connectivity( *i, conn, conn_len, false, &storage );
1283  if( MB_SUCCESS != tmp_result )
1284  {
1285  result = tmp_result;
1286  continue;
1287  }
1288  temp_vec.insert( temp_vec.end(), conn, conn + conn_len );
1289  }
1290  else
1291  {
1292  tmp_result = gMB->a_entity_factory()->get_adjacencies( *i, to_dimension, create_if_missing, temp_vec );
1293  if( MB_SUCCESS != tmp_result )
1294  {
1295  result = tmp_result;
1296  continue;
1297  }
1298  }
1299  }
1300 
1301  std::sort( temp_vec.begin(), temp_vec.end() );
1302  ins = adj_entities.begin();
1303  ti = temp_vec.begin();
1304  while( ti != temp_vec.end() )
1305  {
1306  EntityHandle first = *ti;
1307  EntityHandle second = *ti;
1308  for( ++ti; ti != temp_vec.end() && ( *ti - second <= 1 ); ++ti )
1309  second = *ti;
1310  ins = adj_entities.insert( ins, first, second );
1311  }
1312  }
1313  return result;
1314 }

References moab::Range::begin(), moab::CN::Dimension(), ErrorCode, moab::GeomUtil::first(), gMB, moab::Range::insert(), MB_SUCCESS, MBPOLYHEDRON, and TYPE_FROM_HANDLE().

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

◆ get_bit()

static bool moab::get_bit ( int  position,
const unsigned char *  bytes 
)
static

Definition at line 746 of file WriteHDF5Parallel.cpp.

747 {
748  int byte = position / 8;
749  int bit = position % 8;
750  return 0 != ( bytes[byte] & ( ( (unsigned char)1 ) << bit ) );
751 }

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

◆ get_id_type()

static hid_t moab::get_id_type ( )
static

Definition at line 95 of file WriteHDF5.cpp.

96 {
97  if( 8 == sizeof( WriteHDF5::wid_t ) )
98  {
99  if( 8 == sizeof( long ) )
100  return H5T_NATIVE_ULONG;
101  else
102  return H5T_NATIVE_UINT64;
103  }
104  else if( 4 == sizeof( WriteHDF5::wid_t ) )
105  {
106  if( 4 == sizeof( int ) )
107  return H5T_NATIVE_UINT;
108  else
109  return H5T_NATIVE_UINT32;
110  }
111  else
112  {
113  assert( 0 );
114  return (hid_t)-1;
115  }
116 }

◆ get_mesh_set() [1/2]

◆ get_mesh_set() [2/2]

static MeshSet* moab::get_mesh_set ( SequenceManager sm,
EntityHandle  h 
)
inlinestatic

Definition at line 162 of file Core.cpp.

163 {
164  EntitySequence* seq;
165  if( MBENTITYSET != TYPE_FROM_HANDLE( h ) || MB_SUCCESS != sm->find( h, seq ) ) return 0;
166  return reinterpret_cast< MeshSetSequence* >( seq )->get_set( h );
167 }

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

◆ get_tagged() [1/9]

template<class Container >
static ErrorCode moab::get_tagged ( const SequenceManager seqman,
int  mySequenceArray,
Container &  entities,
EntityType  type,
const Range intersect 
)
inlinestatic

Definition at line 518 of file VarLenDenseTag.cpp.

523 {
524  if( !intersect )
525  return get_tagged< Container >( seqman, mySequenceArray, type, entities );
526  else if( MBMAXTYPE == type )
527  return get_tagged< Container >( seqman, mySequenceArray, intersect->begin(), intersect->end(), entities );
528  else
529  {
530  std::pair< Range::iterator, Range::iterator > r = intersect->equal_range( type );
531  return get_tagged< Container >( seqman, mySequenceArray, r.first, r.second, entities );
532  }
533 }

References entities, intersect(), and MBMAXTYPE.

◆ get_tagged() [2/9]

template<class Container >
static ErrorCode moab::get_tagged ( const SequenceManager seqman,
int  mySequenceArray,
EntityType  type,
Container &  entities 
)
inlinestatic

Definition at line 461 of file VarLenDenseTag.cpp.

465 {
466  typename Container::iterator hint = entities.begin();
467  std::pair< EntityType, EntityType > range = type_range( type );
468  TypeSequenceManager::const_iterator i;
469  const VarLenTag *data, *iter, *end;
470  for( EntityType t = range.first; t != range.second; ++t )
471  {
472  const TypeSequenceManager& map = seqman->entity_map( t );
473  for( i = map.begin(); i != map.end(); ++i )
474  {
475  data = reinterpret_cast< const VarLenTag* >( ( *i )->data()->get_tag_data( mySequenceArray ) );
476  if( !data ) continue;
477  end = data + ( *i )->end_handle() - ( *i )->data()->start_handle() + 1;
478  iter = data + ( *i )->start_handle() - ( *i )->data()->start_handle();
479  EntityHandle handle = ( *i )->start_handle();
480  for( ; iter != end; ++iter, ++handle )
481  if( iter->size() ) hint = entities.insert( hint, handle );
482  }
483  }
484 
485  return MB_SUCCESS;
486 }

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

◆ get_tagged() [3/9]

template<class Container >
static ErrorCode moab::get_tagged ( const SequenceManager seqman,
int  mySequenceArray,
Range::const_iterator  begin,
Range::const_iterator  end,
Container &  entities 
)
inlinestatic

Definition at line 489 of file VarLenDenseTag.cpp.

494 {
495  typename Container::iterator hint = entities.begin();
496  RangeSeqIntersectIter iter( const_cast< SequenceManager* >( seqman ) );
497  ErrorCode rval = iter.init( begin, end );
498  const VarLenTag* data;
499  for( ; MB_SUCCESS == rval; rval = iter.step() )
500  {
501  data = reinterpret_cast< const VarLenTag* >( iter.get_sequence()->data()->get_tag_data( mySequenceArray ) );
502  if( !data ) continue;
503 
504  data += iter.get_start_handle() - iter.get_sequence()->data()->start_handle();
505  size_t count = iter.get_end_handle() - iter.get_start_handle() + 1;
506  for( size_t i = 0; i < count; ++i )
507  if( data[i].size() ) hint = entities.insert( hint, iter.get_start_handle() + i );
508  rval = iter.step();
509  }
510 
511  if( MB_FAILURE != rval ) // We get MB_FAILURE at iterator end
512  return rval;
513 
514  return MB_SUCCESS;
515 }

References moab::EntitySequence::data(), entities, 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().

◆ get_tagged() [4/9]

template<class Container >
static void moab::get_tagged ( const SparseTag::MapType mData,
Container &  entities,
EntityType  type,
const Range intersect 
)
inlinestatic

Definition at line 424 of file SparseTag.cpp.

428 {
429  if( !intersect )
430  get_tagged< Container >( mData, type, entities );
431  else if( MBMAXTYPE == type )
432  get_tagged< Container >( mData, intersect->begin(), intersect->end(), entities );
433  else
434  {
435  std::pair< Range::iterator, Range::iterator > r = intersect->equal_range( type );
436  get_tagged< Container >( mData, r.first, r.second, entities );
437  }
438 }

References entities, intersect(), and MBMAXTYPE.

◆ get_tagged() [5/9]

template<class Container >
static void moab::get_tagged ( const SparseTag::MapType mData,
EntityType  type,
Container &  output_range 
)
inlinestatic

Definition at line 389 of file SparseTag.cpp.

390 {
391  SparseTag::MapType::const_iterator iter;
392  typename Container::iterator hint = output_range.begin();
393  if( MBMAXTYPE == type )
394  {
395  for( iter = mData.begin(); iter != mData.end(); ++iter )
396  hint = output_range.insert( hint, iter->first );
397  }
398  else
399  {
400 #ifdef MOAB_HAVE_UNORDERED_MAP
401  for( iter = mData.begin(); iter != mData.end(); ++iter )
402  if( TYPE_FROM_HANDLE( iter->first ) == type ) hint = output_range.insert( hint, iter->first );
403 #else
404  iter = mData.lower_bound( FIRST_HANDLE( type ) );
405  SparseTag::MapType::const_iterator end = mData.lower_bound( LAST_HANDLE( type ) + 1 );
406  for( ; iter != end; ++iter )
407  hint = output_range.insert( hint, iter->first );
408 #endif
409  }
410 }

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

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

◆ get_tagged() [6/9]

template<class Container >
static void moab::get_tagged ( const SparseTag::MapType mData,
Range::const_iterator  begin,
Range::const_iterator  end,
Container &  output_range 
)
inlinestatic

Definition at line 413 of file SparseTag.cpp.

417 {
418  typename Container::iterator hint = output_range.begin();
419  for( Range::const_iterator i = begin; i != end; ++i )
420  if( mData.find( *i ) != mData.end() ) hint = output_range.insert( hint, *i );
421 }

◆ get_tagged() [7/9]

template<class Container >
static void moab::get_tagged ( const VarLenSparseTag::MapType mData,
Container &  entities,
EntityType  type,
const Range intersect 
)
inlinestatic

Definition at line 341 of file VarLenSparseTag.cpp.

345 {
346  if( !intersect )
347  get_tagged< Container >( mData, type, entities );
348  else if( MBMAXTYPE == type )
349  get_tagged< Container >( mData, intersect->begin(), intersect->end(), entities );
350  else
351  {
352  std::pair< Range::iterator, Range::iterator > r = intersect->equal_range( type );
353  get_tagged< Container >( mData, r.first, r.second, entities );
354  }
355 }

References entities, intersect(), and MBMAXTYPE.

◆ get_tagged() [8/9]

template<class Container >
static void moab::get_tagged ( const VarLenSparseTag::MapType mData,
EntityType  type,
Container &  output_range 
)
inlinestatic

Definition at line 306 of file VarLenSparseTag.cpp.

307 {
308  VarLenSparseTag::MapType::const_iterator iter;
309  typename Container::iterator hint = output_range.begin();
310  if( MBMAXTYPE == type )
311  {
312  for( iter = mData.begin(); iter != mData.end(); ++iter )
313  hint = output_range.insert( hint, iter->first );
314  }
315  else
316  {
317 #ifdef MOAB_HAVE_UNORDERED_MAP
318  for( iter = mData.begin(); iter != mData.end(); ++iter )
319  if( TYPE_FROM_HANDLE( iter->first ) == type ) hint = output_range.insert( hint, iter->first );
320 #else
321  iter = mData.lower_bound( FIRST_HANDLE( type ) );
322  VarLenSparseTag::MapType::const_iterator end = mData.lower_bound( LAST_HANDLE( type ) + 1 );
323  for( ; iter != end; ++iter )
324  hint = output_range.insert( hint, iter->first );
325 #endif
326  }
327 }

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

◆ get_tagged() [9/9]

template<class Container >
static void moab::get_tagged ( const VarLenSparseTag::MapType mData,
Range::const_iterator  begin,
Range::const_iterator  end,
Container &  output_range 
)
inlinestatic

Definition at line 330 of file VarLenSparseTag.cpp.

334 {
335  typename Container::iterator hint = output_range.begin();
336  for( Range::const_iterator i = begin; i != end; ++i )
337  if( mData.find( *i ) != mData.end() ) hint = output_range.insert( hint, *i );
338 }

◆ GetInterface()

MB_EXPORT void moab::GetInterface ( MBuuid interface_requested,
UnknownInterface **  iface 
)

Definition at line 114 of file Factory.cpp.

115 {
116  // create an instance of our component factory
117  ComponentFactory server;
118  // ask the component factory to give us the interface we want
119  server.QueryInterface( interface_requested, iface );
120  // if the interface existed, put it on our list
121  if( iface && *iface ) ComponentFactory::objects_in_use.push_front( *iface );
122 }

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

◆ handle_hdf5_error() [1/2]

static herr_t moab::handle_hdf5_error ( void *  data)
static

Definition at line 103 of file ReadHDF5.cpp.

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

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

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

◆ handle_hdf5_error() [2/2]

static herr_t moab::handle_hdf5_error ( void *  data)
static

Definition at line 143 of file WriteHDF5.cpp.

144 {
145  WriteHDF5::HDF5ErrorHandler* h = reinterpret_cast< WriteHDF5::HDF5ErrorHandler* >( data );
146  herr_t result = 0;
147  if( h->func ) result = ( *h->func )( h->data );
148  error( MB_FAILURE );
149  return result;
150 }

References moab::WriteHDF5::HDF5ErrorHandler::data, error(), and moab::WriteHDF5::HDF5ErrorHandler::func.

◆ HDF5_can_append_hyperslabs()

bool moab::HDF5_can_append_hyperslabs ( )

Definition at line 8 of file HDF5Common.cpp.

9 {
10  hsize_t dim = 100;
11  hid_t space = H5Screate_simple( 1, &dim, NULL );
12  bool result = false;
13 
14  HDF5_Error_Func_Type fptr = 0;
15  void* fdata = 0;
16 #if defined( H5Eget_auto_vers ) && H5Eget_auto_vers > 1
17  if( 0 <= H5Eget_auto( H5E_DEFAULT, &fptr, &fdata ) ) H5Eset_auto( H5E_DEFAULT, 0, 0 );
18 #else
19  if( 0 <= H5Eget_auto( &fptr, &fdata ) ) H5Eset_auto( 0, 0 );
20 #endif
21 
22  hsize_t start = 1, count = 5;
23  H5Sselect_hyperslab( space, H5S_SELECT_SET, &start, 0, &count, 0 );
24  start = 20;
25  if( 0 <= H5Sselect_hyperslab( space, H5S_SELECT_APPEND, &start, 0, &count, 0 ) ) result = true;
26 
27  if( fptr )
28  {
29 #if defined( H5Eset_auto_vers ) && H5Eset_auto_vers > 1
30  H5Eset_auto( H5E_DEFAULT, fptr, fdata );
31 #else
32  H5Eset_auto( fptr, fdata );
33 #endif
34  }
35  H5Sclose( space );
36 
37  return result;
38 }

References dim.

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

◆ ID_FROM_HANDLE()

EntityID moab::ID_FROM_HANDLE ( EntityHandle  handle)
inline

Get the entity id out of the handle.

Definition at line 85 of file Internals.hpp.

86 {
87  return ( handle & MB_ID_MASK );
88 }

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(), 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(), moab::Core::id_from_handle(), moab::HalfFacetRep::init_curve(), moab::HalfFacetRep::init_surface(), moab::HalfFacetRep::init_volume(), moab::Intx2Mesh::intersect_meshes(), moab::Core::list_entities(), moab::DualTool::list_entities(), moab::Core::list_entity(), moab::DebugOutput::list_range_real(), moab::HalfFacetRep::mark_halfedges(), 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(), moab::WriteHDF5::print_id_map(), moab::HalfFacetRep::print_tags(), moab::ReadNCDF::read_nodes(), moab::HalfFacetRep::resize_hf_maps(), 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().

◆ insert_in_vector()

static MeshSet::Count moab::insert_in_vector ( const MeshSet::Count  count,
MeshSet::CompactList list,
const EntityHandle  h,
int &  result 
)
inlinestatic

Insert into parent/child list.

Definition at line 103 of file MeshSet.cpp.

107 {
108  switch( count )
109  {
110  case MeshSet::ZERO:
111  list.hnd[0] = h;
112  result = true;
113  return MeshSet::ONE;
114  case MeshSet::ONE:
115  if( list.hnd[0] == h )
116  {
117  result = false;
118  return MeshSet::ONE;
119  }
120  else
121  {
122  result = true;
123  list.hnd[1] = h;
124  return MeshSet::TWO;
125  }
126  case MeshSet::TWO:
127  if( list.hnd[0] == h || list.hnd[1] == h )
128  {
129  result = false;
130  return MeshSet::TWO;
131  }
132  else
133  {
134  EntityHandle* ptr = (EntityHandle*)malloc( 3 * sizeof( EntityHandle ) );
135  ptr[0] = list.hnd[0];
136  ptr[1] = list.hnd[1];
137  ptr[2] = h;
138  list.ptr[0] = ptr;
139  list.ptr[1] = ptr + 3;
140  result = true;
141  return MeshSet::MANY;
142  }
143  case MeshSet::MANY:
144  if( std::find( list.ptr[0], list.ptr[1], h ) != list.ptr[1] )
145  {
146  result = false;
147  }
148  else
149  {
150  int size = list.ptr[1] - list.ptr[0];
151  list.ptr[0] = (EntityHandle*)realloc( list.ptr[0], ( size + 1 ) * sizeof( EntityHandle ) );
152  list.ptr[0][size] = h;
153  list.ptr[1] = list.ptr[0] + size + 1;
154  result = true;
155  }
156  return MeshSet::MANY;
157  }
158 
159  return MeshSet::ZERO;
160 }

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().

◆ INT_IO_ERROR()

static void moab::INT_IO_ERROR ( bool  condition,
unsigned  line 
)
inlinestatic

Definition at line 114 of file Tqdcfr.cpp.

115 {
116  if( !condition )
117  {
118  char buffer[] = __FILE__ " ";
119  sprintf( buffer, "%s:%u", __FILE__, line );
120  fflush( stderr );
121  perror( buffer );
122  abort();
123  }
124 }

References buffer.

◆ intersect() [1/2]

static void moab::intersect ( const mhdf_EntDesc group,
const Range range,
Range result 
)
static

Definition at line 125 of file ReadHDF5.cpp.

126 {
127  Range::const_iterator s, e;
128  s = Range::lower_bound( range.begin(), range.end(), group.start_id );
129  e = Range::lower_bound( s, range.end(), group.start_id + group.count );
130  result.merge( s, e );
131 }

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

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(), dot_children(), dot_contained(), moab::ParallelComm::exchange_tags(), moab::ReadHDF5::find_sets_containing(), 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(), get_tagged(), moab::BitTag::get_tagged(), moab::BitTag::get_tagged_entities(), moab::DenseTag::get_tagged_entities(), moab::SparseTag::get_tagged_entities(), moab::VarLenDenseTag::get_tagged_entities(), moab::VarLenSparseTag::get_tagged_entities(), moab::FBEngine::getEntities(), moab::FBEngine::getNumOfType(), ZoltanPartitioner::include_closure(), moab::ReadHDF5::load_file_partial(), moab::MergeMesh::merge_higher_dimensions(), moab::BitTag::num_tagged_entities(), moab::DenseTag::num_tagged_entities(), moab::SparseTag::num_tagged_entities(), moab::VarLenDenseTag::num_tagged_entities(), moab::VarLenSparseTag::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(), moab::FBEngine::split_surface_with_direction(), moab::MeshTopoUtil::star_next_entity(), moab::ReorderTool::update_set_contents(), moab::WriteGmsh::write_file(), and moab::WriteVtk::write_tags().

◆ intersect() [2/2]

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.

627 {
628  Range::const_pair_iterator r_it[2] = { range1.const_pair_begin(), range2.const_pair_begin() };
629  EntityHandle low_it, high_it;
630 
631  Range lhs;
632  Range::iterator hint = lhs.begin();
633 
634  // terminate the while loop when at least one "start" iterator is at the
635  // end of the list
636  while( r_it[0] != range1.end() && r_it[1] != range2.end() )
637  {
638 
639  if( r_it[0]->second < r_it[1]->first )
640  // 1st subrange completely below 2nd subrange
641  ++r_it[0];
642  else if( r_it[1]->second < r_it[0]->first )
643  // 2nd subrange completely below 1st subrange
644  ++r_it[1];
645 
646  else
647  {
648  // else ranges overlap; first find greater start and lesser end
649  low_it = MAX( r_it[0]->first, r_it[1]->first );
650  high_it = MIN( r_it[0]->second, r_it[1]->second );
651 
652  // insert into result
653  hint = lhs.insert( hint, low_it, high_it );
654 
655  // now find bounds of this insertion and increment corresponding iterator
656  if( high_it == r_it[0]->second ) ++r_it[0];
657  if( high_it == r_it[1]->second ) ++r_it[1];
658  }
659  }
660 
661  return lhs;
662 }

◆ intersect_segment_and_plane_slice()

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.

58 {
59  //
60  // plane eq is normPlane % r + d = 0, or normPlane % r - normPlane%p1 = 0
61  double dd = -normPlane % p1;
62  double valFrom = normPlane % from + dd;
63  double valTo = normPlane % to + dd;
64 
65  if( fabs( valFrom ) < tolerance_segment )
66  {
67  intx_point = from;
68  parPos = 0.;
69  double proj1 = ( intx_point - p1 ) % ( p2 - p1 );
70  double proj2 = ( intx_point - p2 ) % ( p1 - p2 );
71  if( proj1 <= -tolerance_segment || proj2 <= -tolerance_segment ) return false;
72  if( debug_splits ) std::cout << "intx : " << intx_point << "\n";
73  return true;
74  }
75  if( fabs( valTo ) < tolerance_segment )
76  {
77  intx_point = to;
78  parPos = 1;
79  double proj1 = ( intx_point - p1 ) % ( p2 - p1 );
80  double proj2 = ( intx_point - p2 ) % ( p1 - p2 );
81  if( proj1 <= -tolerance_segment || proj2 <= -tolerance_segment ) return false;
82  if( debug_splits ) std::cout << "intx : " << intx_point << "\n";
83  return true;
84  }
85  if( valFrom * valTo > 0 ) return false; // no intersection, although it could be very close
86  // else, it could intersect the plane; check for the slice too.
87  parPos = valFrom / ( valFrom - valTo ); // this is 0 for valFrom 0, 1 for valTo 0
88  intx_point = from + ( to - from ) * parPos;
89  // now check if the intx_point is indeed between p1 and p2 in the slice.
90  double proj1 = ( intx_point - p1 ) % ( p2 - p1 );
91  double proj2 = ( intx_point - p2 ) % ( p1 - p2 );
92  if( proj1 <= -tolerance_segment || proj2 <= -tolerance_segment ) return false;
93 
94  if( debug_splits ) std::cout << "intx : " << intx_point << "\n";
95  return true;
96 }

References debug_splits, and tolerance_segment.

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

◆ IntPairComparator()

bool moab::IntPairComparator ( const std::pair< int, int > &  a,
const std::pair< int, int > &  b 
)

Definition at line 689 of file TempestRemapper.cpp.

690 {
691  if( a.first == b.first )
692  return a.second < b.second;
693  else
694  return a.first < b.first;
695 }

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

◆ is_sorted_unique()

bool moab::is_sorted_unique ( std::vector< unsigned > &  v)

Definition at line 4613 of file ParallelComm.cpp.

4614 {
4615  for( size_t i = 1; i < v.size(); i++ )
4616  if( v[i - 1] >= v[i] ) return false;
4617  return true;
4618 }

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

◆ is_zero_bytes()

static bool moab::is_zero_bytes ( const void *  mem,
size_t  size 
)
static

Definition at line 2266 of file Core.cpp.

2267 {
2268  const char* iter = reinterpret_cast< const char* >( mem );
2269  const char* const end = iter + size;
2270  for( ; iter != end; ++iter )
2271  if( *iter ) return false;
2272  return true;
2273 }

References size.

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

◆ LAND()

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

Definition at line 3807 of file ParallelComm.cpp.

3808 {
3809  return arg1 && arg2;
3810 }

◆ LAST_HANDLE()

◆ LID_FROM_HALFFACET()

int moab::LID_FROM_HALFFACET ( HFacet  handle)
inline

Definition at line 40 of file HalfFacetRep.cpp.

41 {
42  return static_cast< int >( handle >> MB_ID_WIDTH );
43 }

References MB_ID_WIDTH.

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

◆ local_condense()

static void moab::local_condense ( realType u,
int  op,
const sint cm 
)
static

Definition at line 128 of file gs.cpp.

129 {
130  switch( op )
131  {
132  case GS_OP_ADD:
133  LOOP( DO_ADD );
134  break;
135  case GS_OP_MUL:
136  LOOP( DO_MUL );
137  break;
138  case GS_OP_MIN:
139  LOOP( DO_MIN );
140  break;
141  case GS_OP_MAX:
142  LOOP( DO_MAX );
143  break;
144  case GS_OP_BPR:
145  LOOP( DO_BPR );
146  break;
147  }
148 }

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().

◆ local_condense_vec()

static void moab::local_condense_vec ( realType u,
uint  n,
int  op,
const sint cm 
)
static

Definition at line 177 of file gs.cpp.

178 {
179  switch( op )
180  {
181  case GS_OP_ADD:
182  LOOP( DO_ADD );
183  break;
184  case GS_OP_MUL:
185  LOOP( DO_MUL );
186  break;
187  case GS_OP_MIN:
188  LOOP( DO_MIN );
189  break;
190  case GS_OP_MAX:
191  LOOP( DO_MAX );
192  break;
193  case GS_OP_BPR:
194  LOOP( DO_BPR );
195  break;
196  }
197 }

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().

◆ local_uncondense()

static void moab::local_uncondense ( realType u,
const sint cm 
)
static

Definition at line 150 of file gs.cpp.

151 {
152  LOOP( DO_SET );
153 }

References DO_SET, and LOOP.

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

◆ local_uncondense_vec()

static void moab::local_uncondense_vec ( realType u,
uint  n,
const sint cm 
)
static

Definition at line 199 of file gs.cpp.

200 {
201  LOOP( DO_SET );
202 }

References DO_SET, and LOOP.

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

◆ LOR()

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

Definition at line 3812 of file ParallelComm.cpp.

3813 {
3814  return arg1 || arg2;
3815 }

◆ LXOR()

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

Definition at line 3817 of file ParallelComm.cpp.

3818 {
3819  return ( ( arg1 && !arg2 ) || ( !arg1 && arg2 ) );
3820 }

◆ MAX()

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

Definition at line 3822 of file ParallelComm.cpp.

3823 {
3824  return ( arg1 > arg2 ? arg1 : arg2 );
3825 }

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

◆ MBError()

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.

103 {
104  // When this routine is called to handle an existing error (instead of creating a new one),
105  // we need to check if the returned non-success result from a function might be a non-error
106  // condition. If no last error message was ever set, just return the given error code.
107  if( MB_ERROR_TYPE_EXISTING == err_type && "No error" == lastError ) return err_code;
108 
109  MBTraceBackErrorHandler( line, func, file, dir, err_msg, err_type );
110 
111 #ifdef MOAB_HAVE_MPI
112  // If this is called from the main() routine we call MPI_Abort() to allow
113  // the parallel program to be properly shutdown
114  if( strncmp( func, "main", 4 ) == 0 ) MPI_Abort( MPI_COMM_WORLD, err_code );
115 #endif
116 
117  return err_code;
118 }

References lastError, MB_ERROR_TYPE_EXISTING, and MBTraceBackErrorHandler().

◆ MBErrorHandler_Finalize()

void moab::MBErrorHandler_Finalize ( )

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.

41 {
42  if( NULL != errorOutput )
43  {
44  delete errorOutput;
45  errorOutput = NULL;
46  }
47 }

References errorOutput.

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

◆ MBErrorHandler_GetLastError()

void moab::MBErrorHandler_GetLastError ( std::string &  error)

Get information about the last error.

Definition at line 54 of file ErrorHandler.cpp.

55 {
56  error = lastError;
57 }

References error(), and lastError.

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

◆ MBErrorHandler_Init()

void moab::MBErrorHandler_Init ( )

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.

31 {
32  if( NULL == errorOutput )
33  {
34  errorOutput = new( std::nothrow ) ErrorOutput( stderr );
35  assert( NULL != errorOutput );
37  }
38 }

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

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

◆ MBErrorHandler_Initialized()

bool moab::MBErrorHandler_Initialized ( )

Indicates whether MBErrorHandler_Init has been called.

Definition at line 49 of file ErrorHandler.cpp.

50 {
51  return ( NULL != errorOutput );
52 }

References errorOutput.

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

◆ MBTraceBackErrorHandler()

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.

65 {
66  if( NULL == errorOutput ) return;
67 
68  // For a globally fatal error, get world rank of current processor, so that it is only printed
69  // from processor 0 For a per-processor relevant error, set rank of current processor to 0, so
70  // that it is always printed
71  int rank = 0;
72  if( MB_ERROR_TYPE_NEW_GLOBAL == err_type && errorOutput->have_rank() ) rank = errorOutput->get_rank();
73 
74  if( 0 == rank )
75  {
76  // Print the error message for a new error
77  if( MB_ERROR_TYPE_EXISTING != err_type && NULL != err_msg )
78  {
79  errorOutput->print( "--------------------- Error Message ------------------------------------\n" );
80  errorOutput->printf( "%s!\n", err_msg );
81  lastError = err_msg;
82  }
83 
84  // Print a line of stack trace for a new error, or an existing one
85  errorOutput->printf( "%s() line %d in %s%s\n", func, line, dir, file );
86  }
87  else
88  {
89  // Do not print the error message or stack trace, since processor 0 will print them
90  // Sleep 10 seconds before aborting so it will not accidently kill process 0
91  sleep( 10 );
92  abort();
93  }
94 }

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

Referenced by MBError().

◆ measure()

static int moab::measure ( const CartVect v,
double &  result 
)
static

Definition at line 1799 of file OrientedBoxTreeTool.cpp.

1800 {
1801  const double tol = 1e-6;
1802  int dims = 0;
1803  result = 1;
1804  for( int i = 0; i < 3; ++i )
1805  if( v[i] > tol )
1806  {
1807  ++dims;
1808  result *= v[i];
1809  }
1810  return dims;
1811 }

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

◆ mem_to_string()

static std::string moab::mem_to_string ( unsigned long  mem)
static

Definition at line 2069 of file AdaptiveKDTree.cpp.

2070 {
2071  char unit[3] = "B";
2072  if( mem > 9 * 1024 )
2073  {
2074  mem = ( mem + 512 ) / 1024;
2075  strcpy( unit, "kB" );
2076  }
2077  if( mem > 9 * 1024 )
2078  {
2079  mem = ( mem + 512 ) / 1024;
2080  strcpy( unit, "MB" );
2081  }
2082  if( mem > 9 * 1024 )
2083  {
2084  mem = ( mem + 512 ) / 1024;
2085  strcpy( unit, "GB" );
2086  }
2087  char buffer[256];
2088  sprintf( buffer, "%lu %s", mem, unit );
2089  return buffer;
2090 }

References buffer, and unit().

Referenced by moab::AdaptiveKDTree::print().

◆ merge_ranged_ids()

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.

1762 {
1763  typedef WriteHDF5::wid_t wid_t;
1764  assert( 0 == len % 2 );
1765  assert( 0 == result.size() % 2 );
1766  STATIC_ASSERT( sizeof( std::pair< wid_t, wid_t > ) == 2 * sizeof( wid_t ) );
1767 
1768  result.insert( result.end(), range_list, range_list + len );
1769  size_t plen = result.size() / 2;
1770  Range tmp;
1771  for( size_t i = 0; i < plen; i++ )
1772  {
1773  EntityHandle starth = (EntityHandle)result[2 * i];
1774  EntityHandle endh = (EntityHandle)result[2 * i] + (wid_t)result[2 * i + 1] - 1; // id + count - 1
1775  tmp.insert( starth, endh );
1776  }
1777  // Now convert back to std::vector<WriteHDF5::wid_t>, compressed range format
1778  result.resize( tmp.psize() * 2 );
1779  int j = 0;
1780  for( Range::const_pair_iterator pit = tmp.const_pair_begin(); pit != tmp.const_pair_end(); ++pit, j++ )
1781  {
1782  result[2 * j] = pit->first;
1783  result[2 * j + 1] = pit->second - pit->first + 1;
1784  }
1785 }

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().

◆ merge_vector_ids()

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.

1788 {
1789  result.insert( result.end(), list, list + len );
1790 }

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

◆ MIN()

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

Definition at line 3827 of file ParallelComm.cpp.

3828 {
3829  return ( arg1 < arg2 ? arg1 : arg2 );
3830 }

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

◆ MoabVersion()

MB_EXPORT const char* moab::MoabVersion ( )

Definition at line 108 of file Factory.cpp.

109 {
110  return MB_INTERFACE_VERSION;
111 }

References MB_INTERFACE_VERSION.

◆ mpi_err_str()

const char* moab::mpi_err_str ( int  errorcode)

Definition at line 80 of file WriteHDF5Parallel.cpp.

81 {
82  static char buffer[2048];
83  int len = sizeof( buffer );
84  MPI_Error_string( errorcode, buffer, &len );
85  buffer[std::min( (size_t)len, sizeof( buffer ) - 1 )] = '\0';
86  return buffer;
87 }

References buffer.

◆ MULT()

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

Definition at line 3837 of file ParallelComm.cpp.

3838 {
3839  return arg1 * arg2;
3840 }

◆ my_Gatherv()

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.

191 {
192  int nproc, rank, bytes, err;
193  MPI_Comm_size( comm, &nproc );
194  MPI_Comm_rank( comm, &rank );
195  MPI_Type_size( sendtype, &bytes );
196 
197  recvcounts.resize( rank == root ? nproc : 0 );
198  err = MPI_Gather( &sendcount, 1, MPI_INT, &recvcounts[0], 1, MPI_INT, root, comm );
199  if( MPI_SUCCESS != err ) return err;
200 
201  std::vector< int > disp( recvcounts.size() );
202  if( root == rank )
203  {
204  disp[0] = 0;
205  for( int i = 1; i < nproc; ++i )
206  disp[i] = disp[i - 1] + recvcounts[i - 1];
207  recvbuf.resize( bytes * ( disp.back() + recvcounts.back() ) );
208  }
209 
210  return MPI_Gatherv( sendbuf, sendcount, sendtype, &recvbuf[0], &recvcounts[0], &disp[0], sendtype, root, comm );
211 }

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

◆ not_found() [1/3]

static ErrorCode moab::not_found ( const std::string &  )
inlinestatic

Definition at line 41 of file MeshTag.cpp.

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

References MB_TAG_NOT_FOUND.

◆ not_found() [2/3]

static ErrorCode moab::not_found ( const std::string &  ,
EntityHandle   
)
inlinestatic

Definition at line 20 of file DenseTag.cpp.

21 {
22  // MB_TAG_NOT_FOUND could be a non-error condition, do not call MB_SET_ERR on it
23 #if 0
24  if (h)
25  fprintf(stderr, "[Warning]: No dense tag %s value for %s %ld\n",
26  name.c_str(),
27  CN::EntityTypeName(TYPE_FROM_HANDLE(h)),
28  (unsigned long)ID_FROM_HANDLE(h));
29  else
30  fprintf(stderr, "[Warning]: No dense tag %s value for root set\n", name.c_str());
31 #endif
32 
33  return MB_TAG_NOT_FOUND;
34 }

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

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

◆ not_found() [3/3]

static ErrorCode moab::not_found ( std::string  ,
EntityHandle   
)
inlinestatic

Definition at line 21 of file VarLenDenseTag.cpp.

22 {
23 #if 0
24  // MB_TAG_NOT_FOUND could be a non-error condition, do not call MB_SET_ERR on it
25  // Print warning messages for debugging only
26  if (h)
27  fprintf(stderr, "[Warning]: No variable-length dense tag %s value for %s %lu\n",
28  name.c_str(),
29  CN::EntityTypeName(TYPE_FROM_HANDLE(h)),
30  (unsigned long)ID_FROM_HANDLE(h));
31  else
32  fprintf(stderr, "[Warning]: No variable-length dense tag %s value for root set\n", name.c_str());
33 #endif
34 
35  return MB_TAG_NOT_FOUND;
36 }

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

◆ not_root_set()

static ErrorCode moab::not_root_set ( const std::string &  ,
EntityHandle   
)
inlinestatic

Definition at line 16 of file MeshTag.cpp.

17 {
18  // MB_TAG_NOT_FOUND could be a non-error condition, do not call MB_SET_ERR on it
19  // Print warning messages for debugging only
20 #if 0
21  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));
22 #endif
23 
24  return MB_TAG_NOT_FOUND;
25 }

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().

◆ numAdjTriInSet()

int moab::numAdjTriInSet ( Interface mb,
EntityHandle  startEdge,
EntityHandle  set 
)

Definition at line 25 of file SmoothFace.cpp.

26 {
27  std::vector< EntityHandle > adjTri;
28  mb->get_adjacencies( &startEdge, 1, 2, false, adjTri, Interface::UNION );
29  // count how many are in the set
30  int nbInSet = 0;
31  for( size_t i = 0; i < adjTri.size(); i++ )
32  {
33  EntityHandle tri = adjTri[i];
34  if( mb->contains_entities( set, &tri, 1 ) ) nbInSet++;
35  }
36  return nbInSet;
37 }

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

◆ operator!=()

bool moab::operator!= ( const Range r1,
const Range r2 
)
inline

Definition at line 924 of file Range.hpp.

925 {
926  return !( r1 == r2 );
927 }

◆ operator%()

double moab::operator% ( const CartVect u,
const CartVect v 
)
inline

Dot product.

Definition at line 170 of file CartVect.hpp.

171 {
172  return u[0] * v[0] + u[1] * v[1] + u[2] * v[2];
173 }

◆ operator&()

AxisBox moab::operator& ( const AxisBox a,
const AxisBox b 
)
inline

intersect

Definition at line 116 of file AxisBox.hpp.

117 {
118  return AxisBox( a ) &= b;
119 }

◆ operator*() [1/9]

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.

120 {
121  AffineXform result( A );
122  result.accumulate( B );
123  return result;
124 }

References moab::AffineXform::accumulate().

◆ operator*() [2/9]

CartVect moab::operator* ( const CartVect u,
const CartVect v 
)
inline

cross product

Definition at line 164 of file CartVect.hpp.

165 {
166  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] );
167 }

◆ operator*() [3/9]

CartVect moab::operator* ( const CartVect v,
const Matrix3 m 
)
inline

Definition at line 1077 of file Matrix3.hpp.

1078 {
1079  return moab::Matrix::vector_matrix( v, m );
1080 }

References moab::Matrix::vector_matrix().

◆ operator*() [4/9]

CartVect moab::operator* ( const CartVect v,
double  s 
)
inline

Definition at line 227 of file CartVect.hpp.

228 {
229  return CartVect( v[0] * s, v[1] * s, v[2] * s );
230 }

◆ operator*() [5/9]

Matrix3 moab::operator* ( const Matrix3 a,
const Matrix3 b 
)
inline

Definition at line 1051 of file Matrix3.hpp.

1052 {
1053 #ifndef MOAB_HAVE_LAPACK
1054  return Matrix3( a._mat * b._mat );
1055 #else
1056  return Matrix::mmult3( a, b );
1057 #endif
1058 }

◆ operator*() [6/9]

CartVect moab::operator* ( const Matrix3 m,
const CartVect v 
)
inline

Definition at line 1072 of file Matrix3.hpp.

1073 {
1074  return moab::Matrix::matrix_vector( m, v );
1075 }

References moab::Matrix::matrix_vector().

◆ operator*() [7/9]

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.

1062 {
1063  return moab::Matrix::matrix_vector( m, v );
1064 }

References moab::Matrix::matrix_vector().

◆ operator*() [8/9]

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.

1068 {
1069  return moab::Matrix::vector_matrix( v, m );
1070 }

References moab::Matrix::vector_matrix().

◆ operator*() [9/9]

CartVect moab::operator* ( double  s,
const CartVect v 
)
inline

Definition at line 243 of file CartVect.hpp.

244 {
245  return CartVect( v[0] * s, v[1] * s, v[2] * s );
246 }

◆ operator+() [1/6]

CartVect moab::operator+ ( const CartVect u,
const CartVect v 
)
inline

Definition at line 153 of file CartVect.hpp.

154 {
155  return CartVect( u[0] + v[0], u[1] + v[1], u[2] + v[2] );
156 }

◆ operator+() [2/6]

CartVect moab::operator+ ( const CartVect v,
double  s 
)
inline

Definition at line 219 of file CartVect.hpp.

220 {
221  return CartVect( v[0] + s, v[1] + s, v[2] + s );
222 }

◆ operator+() [3/6]

Matrix3 moab::operator+ ( const Matrix3 a,
const Matrix3 b 
)
inline

Definition at line 1027 of file Matrix3.hpp.

1028 {
1029 #ifndef MOAB_HAVE_LAPACK
1030  return Matrix3( a._mat + b._mat );
1031 #else
1032  Matrix3 s( a );
1033  for( int i = 0; i < Matrix3::size; ++i )
1034  s( i ) += b._mat[i];
1035  return s;
1036 #endif
1037 }

◆ operator+() [4/6]

Range::const_iterator moab::operator+ ( const Range::const_iterator it,
EntityID  step 
)
inline

Definition at line 780 of file Range.hpp.

781 {
782  Range::const_iterator tmp( it );
783  return tmp += step;
784 }

◆ operator+() [5/6]

CartVect moab::operator+ ( double  s,
const CartVect v 
)
inline

Definition at line 235 of file CartVect.hpp.

236 {
237  return CartVect( v[0] + s, v[1] + s, v[2] + s );
238 }

◆ operator+() [6/6]

Range::const_iterator moab::operator+ ( EntityID  step,
const Range::const_iterator it 
)
inline

Definition at line 786 of file Range.hpp.

787 {
788  Range::const_iterator tmp( it );
789  return tmp += step;
790 }

◆ operator++() [1/2]

ExoIIElementType& moab::operator++ ( ExoIIElementType type)
inline

prefix increment operator for EntityType

Definition at line 127 of file ExoIIUtil.hpp.

128 {
129  return (ExoIIElementType&)( ++( (int&)type ) );
130 }

◆ operator++() [2/2]

ExoIIElementType moab::operator++ ( ExoIIElementType type,
int   
)
inline

postfix increment operator for EntityType

Definition at line 121 of file ExoIIUtil.hpp.

122 {
123  return (ExoIIElementType)( ( (int&)type )++ );
124 }

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

◆ operator-() [1/9]

CartVect moab::operator- ( const CartVect u,
const CartVect v 
)
inline

Definition at line 158 of file CartVect.hpp.

159 {
160  return CartVect( u[0] - v[0], u[1] - v[1], u[2] - v[2] );
161 }

◆ operator-() [2/9]

CartVect moab::operator- ( const CartVect v)
inline

Definition at line 215 of file CartVect.hpp.

216 {
217  return CartVect( -v[0], -v[1], -v[2] );
218 }

◆ operator-() [3/9]

CartVect moab::operator- ( const CartVect v,
double  s 
)
inline

Definition at line 223 of file CartVect.hpp.

224 {
225  return CartVect( v[0] - s, v[1] - s, v[2] - s );
226 }

◆ operator-() [4/9]

Matrix3 moab::operator- ( const Matrix3 a,
const Matrix3 b 
)
inline

Definition at line 1039 of file Matrix3.hpp.

1040 {
1041 #ifndef MOAB_HAVE_LAPACK
1042  return Matrix3( a._mat - b._mat );
1043 #else
1044  Matrix3 s( a );
1045  for( int i = 0; i < Matrix3::size; ++i )
1046  s( i ) -= b._mat[i];
1047  return s;
1048 #endif
1049 }

◆ operator-() [5/9]

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.

388 {
389  return (MeshSet::hdl_iter::difference_type)a.h - (MeshSet::hdl_iter::difference_type)b.h;
390 }

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

◆ operator-() [6/9]

Range::const_iterator moab::operator- ( const Range::const_iterator it,
EntityID  step 
)
inline

Definition at line 792 of file Range.hpp.

793 {
794  Range::const_iterator tmp( it );
795  return tmp -= step;
796 }

◆ operator-() [7/9]

EntityID moab::operator- ( const Range::const_iterator it1,
const Range::const_iterator it2 
)

Definition at line 793 of file Range.cpp.

794 {
795  assert( !it2.mValue || *it2 >= *it1 );
796  if( it2.mNode == it1.mNode )
797  {
798  return *it2 - *it1;
799  }
800 
801  EntityID result = it1.mNode->second - it1.mValue + 1;
802  for( Range::PairNode* n = it1.mNode->mNext; n != it2.mNode; n = n->mNext )
803  result += n->second - n->first + 1;
804  if( it2.mValue ) // (it2.mNode != &mHead)
805  result += it2.mValue - it2.mNode->first;
806  return result;
807 }

◆ operator-() [8/9]

CartVect moab::operator- ( double  s,
const CartVect v 
)
inline

Definition at line 239 of file CartVect.hpp.

240 {
241  return CartVect( v[0] - s, v[1] - s, v[2] - s );
242 }

◆ operator-() [9/9]

Range::const_iterator moab::operator- ( EntityID  step,
const Range::const_iterator it 
)
inline

Definition at line 798 of file Range.hpp.

799 {
800  Range::const_iterator tmp( it );
801  return tmp -= step;
802 }

◆ operator/()

CartVect moab::operator/ ( const CartVect v,
double  s 
)
inline

Definition at line 231 of file CartVect.hpp.

232 {
233  return CartVect( v[0] / s, v[1] / s, v[2] / s );
234 }

◆ operator<() [1/2]

static bool moab::operator< ( const ProcList a,
const ProcList b 
)
static

Definition at line 6242 of file ParallelComm.cpp.

6243 {
6244  for( int i = 0; i < MAX_SHARING_PROCS; i++ )
6245  {
6246  if( a.procs[i] < b.procs[i] )
6247  return true;
6248  else if( b.procs[i] < a.procs[i] )
6249  return false;
6250  else if( a.procs[i] < 0 )
6251  return false;
6252  }
6253  return false;
6254 }

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

◆ operator<() [2/2]

bool moab::operator< ( Node const &  lhs,
Node const &  rhs 
)

Definition at line 1036 of file TempestRemapper.cpp.

1037 {
1038  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 );
1039 }

◆ operator<<() [1/8]

std::ostream & moab::operator<< ( std::ostream &  s,
const OrientedBox b 
)

Definition at line 45 of file OrientedBox.cpp.

46 {
47  return s << b.center << " + " << b.axes.col( 0 )
48 #if MB_ORIENTED_BOX_UNIT_VECTORS
49  << ":" << b.length[0]
50 #endif
51  << " x " << b.axes.col( 1 )
52 #if MB_ORIENTED_BOX_UNIT_VECTORS
53  << ":" << b.length[1]
54 #endif
55  << " x " << b.axes.col( 2 )
56 #if MB_ORIENTED_BOX_UNIT_VECTORS
57  << ":" << b.length[2]
58 #endif
59  ;
60 }

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

◆ operator<<() [2/8]

std::ostream& moab::operator<< ( std::ostream &  out,
const BoundBox box 
)
inline

Definition at line 158 of file BoundBox.hpp.

159 {
160  out << ( std::string ) "Min: ";
161  out << box.bMin;
162  out << ( std::string ) ", Max: ";
163  out << box.bMax;
164  return out;
165 }

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

◆ operator<<() [3/8]

std::ostream & moab::operator<< ( std::ostream &  s,
const CartVect v 
)

Definition at line 22 of file CartVect.cpp.

23 {
24  return s << '[' << v[0] << ' ' << v[1] << ' ' << v[2] << ']';
25 }

◆ operator<<() [4/8]

std::ostream& moab::operator<< ( std::ostream &  s,
const Range r 
)
inline

Definition at line 917 of file Range.hpp.

918 {
919  r.print( s );
920  return s;
921 }

References moab::Range::print().

◆ operator<<() [5/8]

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

Definition at line 895 of file SequenceManager.cpp.

896 {
897  for( EntityType t = MBVERTEX; t < MBMAXTYPE; ++t )
898  {
899  if( !seq_man.entity_map( t ).empty() )
900  s << std::endl
901  << "****************** " << CN::EntityTypeName( t ) << " ******************" << std::endl
902  << seq_man.entity_map( t ) << std::endl;
903  }
904 
905  return s;
906 }

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

◆ operator<<() [6/8]

std::ostream& moab::operator<< ( std::ostream &  s,
const TypeSequenceManager seq_man 
)

Definition at line 876 of file SequenceManager.cpp.

877 {
878  const SequenceData* prev_data = 0;
879  for( TypeSequenceManager::const_iterator i = seq_man.begin(); i != seq_man.end(); ++i )
880  {
881  const EntitySequence* seq = *i;
882  if( seq->data() != prev_data )
883  {
884  prev_data = seq->data();
885  s << "SequenceData [" << ID_FROM_HANDLE( seq->data()->start_handle() ) << ","
886  << ID_FROM_HANDLE( seq->data()->end_handle() ) << "]" << std::endl;
887  }
888  s << " Sequence [" << ID_FROM_HANDLE( seq->start_handle() ) << "," << ID_FROM_HANDLE( seq->end_handle() )
889  << "]" << std::endl;
890  }
891 
892  return s;
893 }

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

◆ operator<<() [7/8]

std::ostream& moab::operator<< ( std::ostream &  str,
const HomCoord hc 
)
inline

Definition at line 491 of file HomXform.hpp.

492 {
493  str << "(" << hc.i() << "," << hc.j() << "," << hc.k() << ")";
494  return str;
495 }

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

◆ operator<<() [8/8]

std::ostream & moab::operator<< ( std::ostream &  str,
const ScdParData pd 
)

Definition at line 1513 of file ScdInterface.cpp.

1514 {
1515  str << "Partition method = " << ScdParData::PartitionMethodNames[pd.partMethod] << ", gDims = (" << pd.gDims[0]
1516  << "," << pd.gDims[1] << "," << pd.gDims[2] << ")-(" << pd.gDims[3] << "," << pd.gDims[4] << "," << pd.gDims[5]
1517  << "), gPeriodic = (" << pd.gPeriodic[0] << "," << pd.gPeriodic[1] << "," << pd.gPeriodic[2] << "), pDims = ("
1518  << pd.pDims[0] << "," << pd.pDims[1] << "," << pd.pDims[2] << ")" << std::endl;
1519  return str;
1520 }

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

◆ operator==() [1/2]

const bool moab::operator== ( const damsel_err_t &  lhs,
const damsel_err_t &  rhs 
)
inline

Definition at line 128 of file ReadDamsel.hpp.

129 {
130  return lhs.id == rhs.id;
131 }

◆ operator==() [2/2]

bool moab::operator== ( const Range r1,
const Range r2 
)

Definition at line 987 of file Range.cpp.

988 {
989  Range::const_pair_iterator i1, i2;
990  i1 = r1.const_pair_begin();
991  i2 = r2.const_pair_begin();
992  for( ; i1 != r1.const_pair_end(); ++i1, ++i2 )
993  if( i2 == r2.const_pair_end() || i1->first != i2->first || i1->second != i2->second ) return false;
994  return i2 == r2.const_pair_end();
995 }

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

◆ operator|()

AxisBox moab::operator| ( const AxisBox a,
const AxisBox b 
)
inline

unite

Definition at line 122 of file AxisBox.hpp.

123 {
124  return AxisBox( a ) |= b;
125 }

◆ operator||()

bool moab::operator|| ( const AxisBox a,
const AxisBox b 
)
inline

intersects

Definition at line 128 of file AxisBox.hpp.

129 {
130  return a.minimum()[0] <= b.maximum()[0] && a.minimum()[1] <= b.maximum()[1] && a.minimum()[2] <= b.maximum()[2] &&
131  a.maximum()[0] >= b.minimum()[0] && a.maximum()[1] >= b.minimum()[1] && a.maximum()[2] >= b.minimum()[2];
132 }

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

◆ outer_product()

template<typename Vector >
Matrix3 moab::outer_product ( const Vector &  u,
const Vector &  v 
)
inline

Definition at line 1021 of file Matrix3.hpp.

1022 {
1023  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],
1024  u[2] * v[1], u[2] * v[2] );
1025 }

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

◆ PACK()

template<typename T >
static void moab::PACK ( unsigned char *&  buff,
const T val,
size_t  count 
)
inlinestatic

Definition at line 98 of file ParallelComm.cpp.

99 {
100  memcpy( buff, val, count * sizeof( T ) );
101  buff += count * sizeof( T );
102 }

References T.

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

◆ PACK_BYTES()

static void moab::PACK_BYTES ( unsigned char *&  buff,
const void *  val,
int  num 
)
inlinestatic

Definition at line 145 of file ParallelComm.cpp.

146 {
147  PACK_INT( buff, num );
148  PACK_VOID( buff, val, num );
149 }

References PACK_INT(), and PACK_VOID().

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

◆ PACK_DBLS()

static void moab::PACK_DBLS ( unsigned char *&  buff,
const double *  dbl_val,
size_t  num 
)
inlinestatic

Definition at line 115 of file ParallelComm.cpp.

116 {
117  PACK( buff, dbl_val, num );
118  PC( num, " doubles" );
119 }

References PACK(), and PC.

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

◆ PACK_EH()

static void moab::PACK_EH ( unsigned char *&  buff,
const EntityHandle eh_val,
size_t  num 
)
inlinestatic

◆ PACK_INT()

◆ PACK_INTS()

static void moab::PACK_INTS ( unsigned char *&  buff,
const int *  int_val,
size_t  num 
)
inlinestatic

Definition at line 104 of file ParallelComm.cpp.

105 {
106  PACK( buff, int_val, num );
107  PC( num, " ints" );
108 }

References PACK(), and PC.

Referenced by moab::ParallelComm::pack_entities(), PACK_INT(), moab::ParallelComm::pack_remote_handles(), moab::ParallelComm::pack_sets(), moab::ParallelComm::pack_tag(), and moab::ParallelComm::send_recv_entities().

◆ PACK_RANGE()

static void moab::PACK_RANGE ( unsigned char *&  buff,
const Range rng 
)
inlinestatic

Definition at line 151 of file ParallelComm.cpp.

152 {
153  PACK_INT( buff, rng.psize() );
154  Range::const_pair_iterator cit;
155  for( cit = rng.const_pair_begin(); cit != rng.const_pair_end(); ++cit )
156  {
157  EntityHandle eh[2] = { cit->first, cit->second };
158  PACK_EH( buff, eh, 2 );
159  }
160  PC( rng.psize(), "-subranged range" );
161 }

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_tuples()

int pack_tuples ( TupleList tl,
void **  ptr 
)

Definition at line 1853 of file Coupler.cpp.

1854 {
1855  uint mi, ml, mul, mr;
1856  tl->getTupleSize( mi, ml, mul, mr );
1857 
1858  uint n = tl->get_n();
1859 
1860  int sz_buf = 1 + 4 * UINT_PER_UNSIGNED +
1861  tl->get_n() * ( mi + ml * UINT_PER_LONG + mul * UINT_PER_LONG + mr * UINT_PER_REAL );
1862 
1863  uint* buf = (uint*)malloc( sz_buf * sizeof( uint ) );
1864  *ptr = (void*)buf;
1865 
1866  // Copy n
1867  memcpy( buf, &n, sizeof( uint ) ), buf += 1;
1868  // Copy mi
1869  memcpy( buf, &mi, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
1870  // Copy ml
1871  memcpy( buf, &ml, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
1872  // Copy mul
1873  memcpy( buf, &mul, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
1874  // Copy mr
1875  memcpy( buf, &mr, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
1876  // Copy vi_wr
1877  memcpy( buf, tl->vi_rd, tl->get_n() * mi * sizeof( sint ) ), buf += tl->get_n() * mi;
1878  // Copy vl_wr
1879  memcpy( buf, tl->vl_rd, tl->get_n() * ml * sizeof( slong ) ), buf += tl->get_n() * ml * UINT_PER_LONG;
1880  // Copy vul_wr
1881  memcpy( buf, tl->vul_rd, tl->get_n() * mul * sizeof( ulong ) ), buf += tl->get_n() * mul * UINT_PER_LONG;
1882  // Copy vr_wr
1883  memcpy( buf, tl->vr_rd, tl->get_n() * mr * sizeof( realType ) ), buf += tl->get_n() * mr * UINT_PER_REAL;
1884 
1885  return sz_buf;
1886 }

References moab::TupleList::get_n(), moab::TupleList::getTupleSize(), UINT_PER_LONG, UINT_PER_REAL, UINT_PER_UNSIGNED, 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().

◆ PACK_VOID()

static void moab::PACK_VOID ( unsigned char *&  buff,
const void *  val,
size_t  num 
)
inlinestatic

Definition at line 139 of file ParallelComm.cpp.

140 {
141  PACK( buff, reinterpret_cast< const unsigned char* >( val ), num );
142  PC( num, " void" );
143 }

References PACK(), and PC.

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

◆ permute_this()

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.

1030 {
1031  T tmp_conn[MAX_SUB_ENTITIES];
1032  assert( indices_per_ent <= CN::permuteVec[t][dim][MAX_SUB_ENTITIES] );
1033  if( indices_per_ent > CN::permuteVec[t][dim][MAX_SUB_ENTITIES] ) return 1;
1034  short int* tvec = CN::permuteVec[t][dim];
1035  T* pvec = conn;
1036  for( int j = 0; j < num_entries; j++ )
1037  {
1038  for( int i = 0; i < indices_per_ent; i++ )
1039  tmp_conn[tvec[i]] = pvec[i];
1040  memcpy( pvec, tmp_conn, indices_per_ent * sizeof( T ) );
1041  pvec += indices_per_ent;
1042  }
1043 
1044  return 0;
1045 }

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

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

◆ physField()

double moab::physField ( double  x,
double  y,
double  z,
double  factor 
)

Definition at line 14 of file addfield.cpp.

15 {
16 
17  // 1/r^2 decay from {0,0,0}
18  // tjt - changing to 1/r
19  /*
20  double scale = 1.0/factor;
21  out = fabs(x*scale) + fabs(y*scale) + fabs(z*scale);
22  out += 1e-1; // clamp
23  out = 1/out;
24  */
25  double out = factor * sqrt( x * x + y * y + z * z );
26 
27  return out;
28 }

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

◆ plane_cut_box()

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.

668 {
669  switch( BSPTreeBoxIter::side_above_plane( corners_inout, plane ) )
670  {
671  case BSPTreeBoxIter::B0154:
672  plane_cut_edge( cut_face_out[0], corners_inout[3], corners_inout[0], plane );
673  plane_cut_edge( cut_face_out[1], corners_inout[2], corners_inout[1], plane );
674  plane_cut_edge( cut_face_out[2], corners_inout[6], corners_inout[5], plane );
675  plane_cut_edge( cut_face_out[3], corners_inout[7], corners_inout[4], plane );
676  break;
677  case BSPTreeBoxIter::B1265:
678  plane_cut_edge( cut_face_out[0], corners_inout[0], corners_inout[1], plane );
679  plane_cut_edge( cut_face_out[1], corners_inout[3], corners_inout[2], plane );
680  plane_cut_edge( cut_face_out[2], corners_inout[7], corners_inout[6], plane );
681  plane_cut_edge( cut_face_out[3], corners_inout[4], corners_inout[5], plane );
682  break;
683  case BSPTreeBoxIter::B2376:
684  plane_cut_edge( cut_face_out[0], corners_inout[1], corners_inout[2], plane );
685  plane_cut_edge( cut_face_out[1], corners_inout[0], corners_inout[3], plane );
686  plane_cut_edge( cut_face_out[2], corners_inout[4], corners_inout[7], plane );
687  plane_cut_edge( cut_face_out[3], corners_inout[5], corners_inout[6], plane );
688  break;
689  case BSPTreeBoxIter::B3047:
690  plane_cut_edge( cut_face_out[0], corners_inout[2], corners_inout[3], plane );
691  plane_cut_edge( cut_face_out[1], corners_inout[1], corners_inout[0], plane );
692  plane_cut_edge( cut_face_out[2], corners_inout[5], corners_inout[4], plane );
693  plane_cut_edge( cut_face_out[3], corners_inout[6], corners_inout[7], plane );
694  break;
695  case BSPTreeBoxIter::B3210:
696  plane_cut_edge( cut_face_out[0], corners_inout[7], corners_inout[3], plane );
697  plane_cut_edge( cut_face_out[1], corners_inout[6], corners_inout[2], plane );
698  plane_cut_edge( cut_face_out[2], corners_inout[5], corners_inout[1], plane );
699  plane_cut_edge( cut_face_out[3], corners_inout[4], corners_inout[0], plane );
700  break;
701  case BSPTreeBoxIter::B4567:
702  plane_cut_edge( cut_face_out[0], corners_inout[0], corners_inout[4], plane );
703  plane_cut_edge( cut_face_out[1], corners_inout[1], corners_inout[5], plane );
704  plane_cut_edge( cut_face_out[2], corners_inout[2], corners_inout[6], plane );
705  plane_cut_edge( cut_face_out[3], corners_inout[3], corners_inout[7], plane );
706  break;
707  default:
708  return MB_FAILURE; // child is not a box