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 | 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< EntityHandle > | AdjacencyVector |
typedef herr_t(* | HDF5_Error_Func_Type) (void *) |
typedef std::pair< EntityHandle, EntityHandle > | MeshSetRange |
typedef std::pair< EntityType, EntityType > | DimensionPair |
typedef ErrorCode(* | EvalFcn) (const double *params, const double *field, const int ndim, const int num_tuples, double *work, double *result) |
typedef ErrorCode(* | JacobianFcn) (const double *params, const double *verts, const int nverts, const int ndim, double *work, double *result) |
typedef ErrorCode(* | IntegrateFcn) (const double *field, const double *verts, const int nverts, const int ndim, const int num_tuples, double *work, double *result) |
typedef ErrorCode(* | InitFcn) (const double *verts, const int nverts, double *&work) |
typedef int(* | InsideFcn) (const double *verts, const int ndims, const double tol) |
typedef ErrorCode(* | ReverseEvalFcn) (EvalFcn eval, JacobianFcn jacob, InsideFcn ins, const double *posn, const double *verts, const int nverts, const int ndim, const double iter_tol, const double inside_tol, double *work, double *params, int *is_inside) |
typedef ErrorCode(* | NormalFcn) (const int ientDim, const int facet, const int nverts, const double *verts, double normal[3]) |
typedef unsigned long | EntityHandle |
typedef long | EntityID |
typedef std::vector< EntityHandle > | HandleVec |
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< EntityHandle > | TagHandlesLess |
typedef TagVarTypeLess< EntityHandle > | TagVarHandlesLess |
typedef TagOneTypeEqual< EntityHandle > | TagOneHandleEqual |
typedef TagOneTypeLess< EntityHandle > | TagOneHandleLess |
typedef TagTypeEqual< double > | TagDoublesEqual |
typedef TagVarTypeEqual< double > | TagVarDoublesEqual |
typedef TagTypeLess< double > | TagDoublesLess |
typedef TagVarTypeLess< double > | TagVarDoublesLess |
typedef TagOneTypeEqual< double > | TagOneDoubleEqual |
typedef TagOneTypeLess< double > | TagOneDoubleLess |
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::Edge * | split_edge (BSPTreePoly::Vertex *&new_vtx, BSPTreePoly::Edge *into_edge) |
static BSPTreePoly::Face * | split_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 MeshSet * | get_mesh_set (const SequenceManager *sm, EntityHandle h) |
static MeshSet * | get_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, int len, 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... | |
ExoIIElementType & | operator++ (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 EntityHandle * | resize_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... | |
double | angle_robust (CartVect u, 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< T > | operator* (const Matrix3 &m, const std::vector< T > &v) |
template<typename T > | |
std::vector< T > | operator* (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::array< int, 3 > &a, const std::array< int, 3 > &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 ErrorOutput * | errorOutput = 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] |
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.
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
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
Cells - Entityset like coillections of tetrahedra which define contiguous material properties
cell_flags 1 REGIONS 1 Pyrex end_cell_flags
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
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,
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.
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: *******
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 *******
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); }
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 );
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 *******
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.
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 std::vector< EntityHandle > moab::AdjacencyVector |
Definition at line 29 of file AEntityFactory.hpp.
typedef std::pair< EntityType, EntityType > moab::DimensionPair |
typedef unsigned long moab::EntityHandle |
Definition at line 43 of file EntityHandle.hpp.
typedef long moab::EntityID |
Definition at line 48 of file EntityHandle.hpp.
typedef ErrorCode( * moab::EvalFcn) (const double *params, const double *field, const int ndim, const int num_tuples, double *work, double *result) |
Definition at line 14 of file ElemEvaluator.hpp.
typedef RangeMap< EntityHandle, EntityHandle, 0 > moab::HandleMap |
Definition at line 40 of file ParallelComm.hpp.
typedef std::vector< EntityHandle > moab::HandleVec |
Definition at line 30 of file Forward.hpp.
typedef herr_t( * moab::HDF5_Error_Func_Type) (void *) |
Definition at line 14 of file HDF5Common.hpp.
typedef EntityHandle moab::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.
typedef ErrorCode( * moab::InitFcn) (const double *verts, const int nverts, double *&work) |
Definition at line 36 of file ElemEvaluator.hpp.
typedef int( * moab::InsideFcn) (const double *verts, const int ndims, const double tol) |
Definition at line 38 of file ElemEvaluator.hpp.
typedef ErrorCode( * moab::IntegrateFcn) (const double *field, const double *verts, const int nverts, const int ndim, const int num_tuples, double *work, double *result) |
Definition at line 28 of file ElemEvaluator.hpp.
typedef ErrorCode( * moab::JacobianFcn) (const double *params, const double *verts, const int nverts, const int ndim, double *work, double *result) |
Definition at line 21 of file ElemEvaluator.hpp.
typedef std::pair< EntityHandle, EntityHandle > moab::MeshSetRange |
Definition at line 429 of file MeshSet.cpp.
typedef ErrorCode( * moab::NormalFcn) (const int ientDim, const int facet, const int nverts, const double *verts, double normal[3]) |
Definition at line 53 of file ElemEvaluator.hpp.
typedef ErrorCode( * moab::ReverseEvalFcn) (EvalFcn eval, JacobianFcn jacob, InsideFcn ins, const double *posn, const double *verts, const int nverts, const int ndim, const double iter_tol, const double inside_tol, double *work, double *params, int *is_inside) |
Definition at line 40 of file ElemEvaluator.hpp.
typedef TagTypeEqual< double > moab::TagDoublesEqual |
Definition at line 258 of file TagCompare.hpp.
typedef TagTypeLess< double > moab::TagDoublesLess |
Definition at line 260 of file TagCompare.hpp.
typedef TagBytesEqual moab::TagHandlesEqual |
Definition at line 251 of file TagCompare.hpp.
typedef TagTypeLess< EntityHandle > moab::TagHandlesLess |
Definition at line 253 of file TagCompare.hpp.
typedef TagBytesEqual moab::TagIntsEqual |
Definition at line 244 of file TagCompare.hpp.
typedef TagTypeLess< int > moab::TagIntsLess |
Definition at line 246 of file TagCompare.hpp.
typedef TagOneTypeEqual< double > moab::TagOneDoubleEqual |
Definition at line 262 of file TagCompare.hpp.
typedef TagOneTypeLess< double > moab::TagOneDoubleLess |
Definition at line 263 of file TagCompare.hpp.
typedef TagOneTypeEqual< EntityHandle > moab::TagOneHandleEqual |
Definition at line 255 of file TagCompare.hpp.
typedef TagOneTypeLess< EntityHandle > moab::TagOneHandleLess |
Definition at line 256 of file TagCompare.hpp.
typedef TagOneTypeEqual< int > moab::TagOneIntEqual |
Definition at line 248 of file TagCompare.hpp.
typedef TagOneTypeLess< int > moab::TagOneIntLess |
Definition at line 249 of file TagCompare.hpp.
typedef TagVarTypeEqual< double > moab::TagVarDoublesEqual |
Definition at line 259 of file TagCompare.hpp.
typedef TagVarTypeLess< double > moab::TagVarDoublesLess |
Definition at line 261 of file TagCompare.hpp.
Definition at line 252 of file TagCompare.hpp.
typedef TagVarTypeLess< EntityHandle > moab::TagVarHandlesLess |
Definition at line 254 of file TagCompare.hpp.
Definition at line 245 of file TagCompare.hpp.
typedef TagVarTypeLess< int > moab::TagVarIntsLess |
Definition at line 247 of file TagCompare.hpp.
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 |
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
51 MAX_SUB_ENTITY_VERTICES = 9
52 };
Enumerator | |
---|---|
abq_assembly_undefined | |
abq_assembly_ambiguous | |
abq_assembly_name |
Definition at line 286 of file ReadABAQUS.hpp.
287 { 288 abq_assembly_undefined = 0, 289 abq_assembly_ambiguous, 290 abq_assembly_name 291 };
Enumerator | |
---|---|
abq_element_undefined | |
abq_element_ambiguous | |
abq_element_elset | |
abq_element_type |
Definition at line 301 of file ReadABAQUS.hpp.
302 { 303 abq_element_undefined = 0, 304 abq_element_ambiguous, 305 abq_element_elset, 306 abq_element_type 307 };
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.
310 { 311 abq_eletype_unsupported = 0, 312 abq_eletype_dc3d8, 313 abq_eletype_c3d8r, 314 abq_eletype_dcc3d8, 315 abq_eletype_c3d4, 316 abq_eletype_dc3d4, 317 abq_eletype_ds4 318 };
Enumerator | |
---|---|
abq_elset_undefined | |
abq_elset_ambiguous | |
abq_elset_elset | |
abq_elset_generate | |
abq_elset_instance |
Definition at line 330 of file ReadABAQUS.hpp.
331 { 332 abq_elset_undefined = 0, 333 abq_elset_ambiguous, 334 abq_elset_elset, 335 abq_elset_generate, 336 abq_elset_instance 337 };
Enumerator | |
---|---|
abq_instance_undefined | |
abq_instance_ambiguous | |
abq_instance_name | |
abq_instance_part |
Definition at line 278 of file ReadABAQUS.hpp.
279 { 280 abq_instance_undefined = 0, 281 abq_instance_ambiguous, 282 abq_instance_name, 283 abq_instance_part 284 };
Definition at line 252 of file ReadABAQUS.hpp.
253 { 254 abq_undefined = 0, 255 abq_unsupported, 256 abq_ambiguous, 257 abq_heading, 258 abq_part, 259 abq_end_part, 260 abq_assembly, 261 abq_end_assembly, 262 abq_node, 263 abq_element, 264 abq_nset, 265 abq_elset, 266 abq_instance, 267 abq_end_instance, 268 abq_solid_section 269 };
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, 245 abq_blank_line, 246 abq_comment_line, 247 abq_keyword_line, 248 abq_data_line, 249 abq_eof 250 };
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, 296 abq_node_ambiguous, 297 abq_node_nset, 298 abq_node_system 299 };
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, 323 abq_nset_ambiguous, 324 abq_nset_nset, 325 abq_nset_elset, 326 abq_nset_generate, 327 abq_nset_instance 328 };
Enumerator | |
---|---|
abq_part_undefined | |
abq_part_ambiguous | |
abq_part_name |
Definition at line 271 of file ReadABAQUS.hpp.
272 { 273 abq_part_undefined = 0, 274 abq_part_ambiguous, 275 abq_part_name 276 };
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.
340 { 341 abq_solid_section_undefined = 0, 342 abq_solid_section_ambiguous, 343 abq_solid_section_elset, 344 abq_solid_section_matname 345 };
enum moab::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 { 20 MB_ERROR_TYPE_NEW_GLOBAL = 0, 21 MB_ERROR_TYPE_NEW_LOCAL = 1, 22 MB_ERROR_TYPE_EXISTING = 2 23 };
Definition at line 25 of file ExoIIInterface.hpp.
26 { 27 EXOII_SPHERE = 0, 28 EXOII_SPRING, 29 EXOII_BAR, 30 EXOII_BAR2, 31 EXOII_BAR3, 32 EXOII_BEAM, 33 EXOII_BEAM2, 34 EXOII_BEAM3, 35 EXOII_TRUSS, 36 EXOII_TRUSS2, 37 EXOII_TRUSS3, 38 EXOII_TRI, 39 EXOII_TRI3, 40 EXO_SHELL3, 41 EXOII_TRI6, 42 EXOII_TRI7, 43 EXOII_QUAD, 44 EXOII_QUAD4, 45 EXOII_QUAD5, 46 EXOII_QUAD8, 47 EXOII_QUAD9, 48 EXOII_SHELL, 49 EXOII_SHELL4, 50 EXOII_SHELL5, 51 EXOII_SHELL8, 52 EXOII_SHELL9, 53 EXOII_TETRA, 54 EXOII_TETRA4, 55 EXOII_TET4, 56 EXOII_TETRA8, 57 EXOII_TETRA10, 58 EXOII_TETRA14, 59 EXOII_PYRAMID, 60 EXOII_PYRAMID5, 61 EXOII_PYRAMID10, 62 EXOII_PYRAMID13, 63 EXOII_PYRAMID18, 64 EXOII_WEDGE, 65 EXOII_KNIFE, 66 EXOII_HEX, 67 EXOII_HEX8, 68 EXOII_HEX9, 69 EXOII_HEX20, 70 EXOII_HEX27, 71 EXOII_HEXSHELL, 72 EXOII_POLYGON, 73 EXOII_POLYHEDRON, 74 EXOII_MAX_ELEM_TYPE 75 };
enum moab::GEOMTYPE |
Enumerator | |
---|---|
HISURFACE | |
HI3DCURVE | |
HI2DCURVE |
Definition at line 28 of file HiReconstruction.hpp.
29 { 30 HISURFACE, 31 HI3DCURVE, 32 HI2DCURVE 33 };
enum moab::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, 113 valid_unsupported 114 };
enum moab::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.
227 { 228 MB_MESG_ANY = MPI_ANY_TAG, 229 MB_MESG_ENTS_ACK, 230 MB_MESG_ENTS_SIZE, 231 MB_MESG_ENTS_LARGE, 232 MB_MESG_REMOTEH_ACK, 233 MB_MESG_REMOTEH_SIZE, 234 MB_MESG_REMOTEH_LARGE, 235 MB_MESG_TAGS_ACK, 236 MB_MESG_TAGS_SIZE, 237 MB_MESG_TAGS_LARGE 238 };
enum moab::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 };
enum moab::QualityType |
Definition at line 18 of file VerdictWrapper.hpp.
19 {
20 // order exactly from HexMetricVals
21 MB_UNDEFINED_QUALITY = -1,
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 };
T moab::ADD | ( | const T & | arg1, |
const T & | arg2 | ||
) |
Definition at line 3832 of file ParallelComm.cpp.
3833 {
3834 return arg1 + arg2;
3835 }
|
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().
|
static |
Definition at line 50 of file ReadHDF5Dataset.cpp.
51 {
52 return std::pair< int, int >();
53 }
Referenced by moab::ReadHDF5Dataset::ReadHDF5Dataset().
Interior angle between two vectors.
Definition at line 207 of file CartVect.hpp.
208 {
209 double tmp = ( u % v ) / std::sqrt( ( u % u ) * ( v % v ) );
210 if( tmp > 1. ) tmp = 1.;
211 if( tmp < -1. ) tmp = -1.;
212 return std::acos( tmp );
213 }
Referenced by moab::IntxUtils::enforce_convexity(), moab::GeomQueryTool::get_normal(), moab::SmoothFace::init_gradient(), interior_point(), moab::IntxUtils::oriented_spherical_angle(), moab::ReadSmf::rot(), VerdictVector::rotate(), moab::AffineXform::rotation(), moab::IntxAreaUtils::spherical_angle(), v_quad_maximum_angle(), v_quad_minimum_angle(), VerdictVector::vector_angle(), VerdictVector::vector_angle_quick(), and vectorRotate().
Interior angle between two vectors.
Definition at line 216 of file CartVect.hpp.
217 {
218 u.normalize();
219 v.normalize();
220
221 double tmp = ( u % v ) ;
222 if( tmp - 1. >= - 1.e-12 )
223 {
224 double dist = (u - v).length();
225 return dist; // approximate sin(x) with x for very small dist
226 }
227
228 if( tmp < -1. ) tmp = -1.;
229 return std::acos( tmp );
230 }
References length(), and moab::CartVect::normalize().
Referenced by moab::IntxAreaUtils::area_spherical_triangle_lHuiller().
bool moab::angleCompare | ( | angleAndIndex | lhs, |
angleAndIndex | rhs | ||
) |
Definition at line 115 of file IntxUtils.cpp.
116 {
117 return lhs.angle < rhs.angle;
118 }
References moab::angleAndIndex::angle.
Referenced by moab::IntxUtils::SortAndRemoveDoubles2().
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().
|
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.
result.center | As input, the approximate center of the box. As output, the exact center of the box. |
result.axes | As 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. |
points | The 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, and moab::Matrix3::swapcol().
Referenced by moab::OrientedBox::compute_from_covariance_data(), and moab::OrientedBox::compute_from_vertices().
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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.
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().
|
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 }
|
static |
Definition at line 1746 of file WriteHDF5Parallel.cpp.
1747 {
1748 if( !len )
1749 {
1750 result.clear();
1751 return;
1752 }
1753
1754 result.resize( len * 2 );
1755 Range tmp;
1756 for( size_t i = 0; i < len; i++ )
1757 tmp.insert( (EntityHandle)buffer[i] );
1758 result.resize( tmp.psize() * 2 );
1759 int j = 0;
1760 for( Range::const_pair_iterator pit = tmp.const_pair_begin(); pit != tmp.const_pair_end(); ++pit, j++ )
1761 {
1762 result[2 * j] = pit->first;
1763 result[2 * j + 1] = pit->second - pit->first + 1;
1764 }
1765 }
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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.
|
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().
|
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().
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.
|
static |
Definition at line 937 of file BSPTree.cpp.
938 {
939 return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
940 }
Referenced by moab::GeomUtil::box_hex_overlap(), moab::GeomUtil::box_linear_elem_overlap(), moab::GeomUtil::box_tet_overlap(), moab::GeomUtil::box_tet_overlap_edge(), moab::SmoothFace::ray_intersection_correct(), moab::BSPTree::Plane::set(), VerdictVector::vector_angle(), and moab::BSPTreeBoxIter::volume().
|
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().
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().
Definition at line 123 of file WriteHDF5.cpp.
124 {
125 return rval;
126 }
Definition at line 75 of file WriteHDF5Parallel.cpp.
76 {
77 return rval;
78 }
Definition at line 23 of file ReorderTool.cpp.
24 {
25 return val;
26 }
void moab::fail | ( | const char * | fmt, |
... | |||
) |
Definition at line 14 of file TupleList.cpp.
15 {
16 va_list ap;
17 va_start( ap, fmt );
18 vfprintf( stderr, fmt, ap );
19 va_end( ap );
20 exit( 1 );
21 }
Referenced by moab::TupleList::buffer::buffer_init_(), moab::TupleList::buffer::buffer_reserve_(), moab::gs_data::gs_data_op_many(), moab::gs_data::gs_data_op_vec(), moab::TupleList::initialize(), moab::ReadNCDF::load_file(), main(), moab::WriteNCDF::open_file(), moab::WriteSLAC::open_file(), moab::ReadNCDF::read_elements(), moab::ReadNCDF::read_exodus_header(), moab::ReadNCDF::read_nodes(), moab::ReadNCDF::read_polyhedra_faces(), moab::ReadNCDF::read_qa_string(), moab::ReadNCDF::read_tag_values(), moab::TupleList::resize(), moab::ReadNCDF::update(), moab::WriteNCDF::write_BCs(), moab::WriteNCDF::write_elementblocks(), moab::WriteNCDF::write_exodus_integer_variable(), moab::WriteNCDF::write_file(), moab::WriteSLAC::write_file(), moab::WriteSLAC::write_matsets(), moab::WriteSLAC::write_nodes(), moab::WriteNCDF::write_nodes(), moab::WriteNCDF::write_poly_faces(), and moab::WriteNCDF::write_qa_string().
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().
|
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().
|
inlinestatic |
Find all entities for which a tag has a specific value
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().
|
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().
|
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().
|
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 }
|
inlinestatic |
Find all entities for which a tag has a specific value
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().
|
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().
|
inline |
Definition at line 74 of file Internals.hpp.
75 {
76 return ( ( (EntityHandle)type ) << MB_ID_WIDTH ) | MB_START_ID;
77 }
References MB_ID_WIDTH, and MB_START_ID.
Referenced by moab::MeshSet::FIRST_OF_DIM(), moab::MeshSet::get_entities_by_type(), moab::MeshSetSequence::get_parent_child_meshsets(), get_tagged(), moab::AEntityFactory::get_zero_to_n_elements(), and moab::MeshSet::num_entities_by_type().
|
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.
|
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().
|
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().
|
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().
|
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 }
|
inlinestatic |
Definition at line 155 of file Core.cpp.
156 {
157 const EntitySequence* seq;
158 if( MBENTITYSET != TYPE_FROM_HANDLE( h ) || MB_SUCCESS != sm->find( h, seq ) ) return 0;
159 return reinterpret_cast< const MeshSetSequence* >( seq )->get_set( h );
160 }
References moab::SequenceManager::find(), MB_SUCCESS, MBENTITYSET, and TYPE_FROM_HANDLE().
Referenced by moab::Core::add_child_meshset(), moab::Core::add_child_meshsets(), moab::Core::add_entities(), moab::Core::add_parent_child(), moab::Core::add_parent_meshset(), moab::Core::add_parent_meshsets(), moab::Core::clear_meshset(), moab::Core::contains_entities(), moab::Core::delete_entities(), moab::Core::get_meshset_options(), moab::Core::intersect_meshset(), moab::Core::remove_child_meshset(), moab::Core::remove_entities(), moab::Core::remove_parent_child(), moab::Core::remove_parent_meshset(), moab::Core::replace_entities(), moab::Core::set_meshset_options(), moab::Core::subtract_meshset(), and moab::Core::unite_meshset().
|
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().
|
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.
|
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(), and type_range().
|
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().
|
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.
|
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().
|
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 }
|
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.
|
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().
|
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 }
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().
|
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().
|
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.
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().
|
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().
|
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().
|
inlinestatic |
Definition at line 114 of file Tqdcfr.cpp.
115 {
116 if( !condition )
117 {
118 char buffer[] = __FILE__ " ";
119 snprintf( buffer, strlen(buffer), "%s:%u", __FILE__, line );
120 fflush( stderr );
121 perror( buffer );
122 abort();
123 }
124 }
References buffer.
|
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 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 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 }
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().
bool moab::IntPairComparator | ( | const std::array< int, 3 > & | a, |
const std::array< int, 3 > & | b | ||
) |
Definition at line 696 of file TempestRemapper.cpp.
697 {
698 if( std::get< 1 >( a ) == std::get< 1 >( b ) )
699 return std::get< 2 >( a ) < std::get< 2 >( b );
700 else
701 return std::get< 1 >( a ) < std::get< 1 >( b );
702 }
Referenced by moab::TempestRemapper::convert_overlap_mesh_sorted_by_source().
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().
|
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().
T moab::LAND | ( | const T & | arg1, |
const T & | arg2 | ||
) |
Definition at line 3807 of file ParallelComm.cpp.
3808 {
3809 return arg1 && arg2;
3810 }
|
inline |
Definition at line 79 of file Internals.hpp.
80 {
81 return ( (EntityHandle)( type + 1 ) << MB_ID_WIDTH ) - 1;
82 }
References MB_ID_WIDTH.
Referenced by moab::MeshSet::get_entities_by_type(), moab::RangeSetIterator::get_next_by_dimension(), moab::RangeSetIterator::get_next_by_type(), moab::MeshSet::get_non_set_entities(), get_tagged(), moab::AEntityFactory::get_zero_to_n_elements(), moab::MeshSet::LAST_OF_DIM(), and moab::MeshSet::num_entities_by_type().
|
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().
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().
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().
Definition at line 150 of file gs.cpp.
151 { 152 LOOP( DO_SET ); 153 }
Referenced by moab::gs_data::gs_data_op(), and moab::gs_data::gs_data_op_many().
Definition at line 199 of file gs.cpp.
200 { 201 LOOP( DO_SET ); 202 }
Referenced by moab::gs_data::gs_data_op_vec().
T moab::LOR | ( | const T & | arg1, |
const T & | arg2 | ||
) |
Definition at line 3812 of file ParallelComm.cpp.
3813 {
3814 return arg1 || arg2;
3815 }
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 }
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().
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().
void moab::MBErrorHandler_Finalize | ( | ) |
Finalize MOAB error handler (e.g. delete the utility object for printing error output)
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().
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().
void moab::MBErrorHandler_Init | ( | ) |
Initialize MOAB error handler (e.g. create a utility object for printing error output)
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 );
36 errorOutput->use_world_rank();
37 }
38 }
References errorOutput, and moab::ErrorOutput::use_world_rank().
Referenced by moab::Core::initialize(), and main().
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().
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().
|
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(), and moab::OrientedBoxTreeTool::recursive_stats().
|
static |
Definition at line 2067 of file AdaptiveKDTree.cpp.
2068 {
2069 char unit[3] = "B";
2070 if( mem > 9 * 1024 )
2071 {
2072 mem = ( mem + 512 ) / 1024;
2073 strcpy( unit, "kB" );
2074 }
2075 if( mem > 9 * 1024 )
2076 {
2077 mem = ( mem + 512 ) / 1024;
2078 strcpy( unit, "MB" );
2079 }
2080 if( mem > 9 * 1024 )
2081 {
2082 mem = ( mem + 512 ) / 1024;
2083 strcpy( unit, "GB" );
2084 }
2085 char buffer[256];
2086 snprintf( buffer, 256, "%lu %s", mem, unit );
2087 return buffer;
2088 }
References buffer, and unit().
Referenced by moab::AdaptiveKDTree::print().
|
static |
Definition at line 1767 of file WriteHDF5Parallel.cpp.
1768 {
1769 typedef WriteHDF5::wid_t wid_t;
1770 assert( 0 == len % 2 );
1771 assert( 0 == result.size() % 2 );
1772 STATIC_ASSERT( sizeof( std::pair< wid_t, wid_t > ) == 2 * sizeof( wid_t ) );
1773
1774 result.insert( result.end(), range_list, range_list + len );
1775 size_t plen = result.size() / 2;
1776 Range tmp;
1777 for( size_t i = 0; i < plen; i++ )
1778 {
1779 EntityHandle starth = (EntityHandle)result[2 * i];
1780 EntityHandle endh = (EntityHandle)result[2 * i] + (wid_t)result[2 * i + 1] - 1; // id + count - 1
1781 tmp.insert( starth, endh );
1782 }
1783 // Now convert back to std::vector<WriteHDF5::wid_t>, compressed range format
1784 result.resize( tmp.psize() * 2 );
1785 int j = 0;
1786 for( Range::const_pair_iterator pit = tmp.const_pair_begin(); pit != tmp.const_pair_end(); ++pit, j++ )
1787 {
1788 result[2 * j] = pit->first;
1789 result[2 * j + 1] = pit->second - pit->first + 1;
1790 }
1791 }
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().
|
static |
Definition at line 1793 of file WriteHDF5Parallel.cpp.
1794 {
1795 result.insert( result.end(), list, list + len );
1796 }
Referenced by moab::WriteHDF5Parallel::unpack_set().
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().
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.
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.
T moab::MULT | ( | const T & | arg1, |
const T & | arg2 | ||
) |
Definition at line 3837 of file ParallelComm.cpp.
3838 {
3839 return arg1 * arg2;
3840 }
|
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().
|
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.
|
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().
|
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().
|
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().
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.
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 }
|
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().
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 }
Definition at line 1180 of file Matrix3.hpp.
1181 {
1182 return moab::Matrix::vector_matrix( v, m );
1183 }
References moab::Matrix::vector_matrix().
Definition at line 244 of file CartVect.hpp.
245 {
246 return CartVect( v[0] * s, v[1] * s, v[2] * s );
247 }
Definition at line 1154 of file Matrix3.hpp.
1155 {
1156 #ifdef MOAB_HAVE_EIGEN3
1157 return Matrix3( a._mat * b._mat );
1158 #else
1159 return Matrix::mmult3( a, b );
1160 #endif
1161 }
Definition at line 1175 of file Matrix3.hpp.
1176 {
1177 return moab::Matrix::matrix_vector( m, v );
1178 }
References moab::Matrix::matrix_vector().
|
inline |
Definition at line 1164 of file Matrix3.hpp.
1165 {
1166 return moab::Matrix::matrix_vector( m, v );
1167 }
References moab::Matrix::matrix_vector().
|
inline |
Definition at line 1170 of file Matrix3.hpp.
1171 {
1172 return moab::Matrix::vector_matrix( v, m );
1173 }
References moab::Matrix::vector_matrix().
Definition at line 260 of file CartVect.hpp.
261 {
262 return CartVect( v[0] * s, v[1] * s, v[2] * s );
263 }
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 }
Definition at line 236 of file CartVect.hpp.
237 {
238 return CartVect( v[0] + s, v[1] + s, v[2] + s );
239 }
Definition at line 1130 of file Matrix3.hpp.
1131 {
1132 #ifdef MOAB_HAVE_EIGEN3
1133 return Matrix3( a._mat + b._mat );
1134 #else
1135 Matrix3 s( a );
1136 for( int i = 0; i < Matrix3::size; ++i )
1137 s( i ) += b._mat[i];
1138 return s;
1139 #endif
1140 }
|
inline |
Definition at line 252 of file CartVect.hpp.
253 {
254 return CartVect( v[0] + s, v[1] + s, v[2] + s );
255 }
|
inline |
|
inline |
prefix increment operator for EntityType
Definition at line 127 of file ExoIIUtil.hpp.
128 {
129 return (ExoIIElementType&)( ++( (int&)type ) );
130 }
|
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++().
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 }
Definition at line 232 of file CartVect.hpp.
233 {
234 return CartVect( -v[0], -v[1], -v[2] );
235 }
Definition at line 240 of file CartVect.hpp.
241 {
242 return CartVect( v[0] - s, v[1] - s, v[2] - s );
243 }
Definition at line 1142 of file Matrix3.hpp.
1143 {
1144 #ifdef MOAB_HAVE_EIGEN3
1145 return Matrix3( a._mat - b._mat );
1146 #else
1147 Matrix3 s( a );
1148 for( int i = 0; i < Matrix3::size; ++i )
1149 s( i ) -= b._mat[i];
1150 return s;
1151 #endif
1152 }
|
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.
|
inline |
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 }
Definition at line 256 of file CartVect.hpp.
257 {
258 return CartVect( v[0] - s, v[1] - s, v[2] - s );
259 }
|
inline |
Definition at line 248 of file CartVect.hpp.
249 {
250 return CartVect( v[0] / s, v[1] / s, v[2] / s );
251 }
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.
bool moab::operator< | ( | Node const & | lhs, |
Node const & | rhs | ||
) |
Definition at line 1044 of file TempestRemapper.cpp.
1045 {
1046 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 );
1047 }
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.
|
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.
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 }
|
inline |
Definition at line 917 of file Range.hpp.
918 {
919 r.print( s );
920 return s;
921 }
References moab::Range::print().
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, and MBVERTEX.
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().
|
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().
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.
|
inline |
Definition at line 128 of file ReadDamsel.hpp.
129 {
130 return lhs.id == rhs.id;
131 }
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().
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().
|
inline |
Definition at line 1124 of file Matrix3.hpp.
1125 {
1126 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],
1127 u[2] * v[1], u[2] * v[2] );
1128 }
Referenced by moab::OrientedBox::compute_from_covariance_data(), moab::OrientedBox::compute_from_vertices(), moab::OrientedBox::covariance_data_from_tris(), and moab::AffineXform::rotation().
|
inlinestatic |
Definition at line 98 of file ParallelComm.cpp.
99 {
100 memcpy( buff, val, count * sizeof( T ) );
101 buff += count * sizeof( T );
102 }
Referenced by PACK_DBLS(), PACK_EH(), PACK_INTS(), and PACK_VOID().
|
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().
|
inlinestatic |
Definition at line 115 of file ParallelComm.cpp.
116 {
117 PACK( buff, dbl_val, num );
118 PC( num, " doubles" );
119 }
Referenced by moab::ParallelComm::pack_entities().
|
inlinestatic |
Definition at line 125 of file ParallelComm.cpp.
126 {
127 PACK( buff, eh_val, num );
128 PC( num, " handles" );
129 }
Referenced by moab::ParallelComm::pack_entities(), moab::ParallelComm::pack_entity_seq(), PACK_RANGE(), moab::ParallelComm::pack_remote_handles(), moab::ParallelComm::pack_sets(), moab::ParallelComm::pack_tag(), moab::ParallelComm::send_recv_entities(), and moab::ParallelComm::settle_intersection_points().
|
inlinestatic |
Definition at line 110 of file ParallelComm.cpp.
111 { 112 PACK_INTS( buff, &int_val, 1 ); 113 }
References PACK_INTS().
Referenced by moab::ParallelComm::pack_buffer(), PACK_BYTES(), moab::ParallelComm::pack_entities(), moab::ParallelComm::pack_entity_seq(), PACK_RANGE(), moab::ParallelComm::pack_remote_handles(), moab::ParallelComm::pack_sets(), moab::ParallelComm::pack_tag(), moab::ParallelComm::pack_tags(), and moab::ParallelComm::settle_intersection_points().
|
inlinestatic |
Definition at line 104 of file ParallelComm.cpp.
105 {
106 PACK( buff, int_val, num );
107 PC( num, " ints" );
108 }
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().
|
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().
int pack_tuples | ( | TupleList * | tl, |
void ** | ptr | ||
) |
Definition at line 1851 of file Coupler.cpp.
1852 {
1853 uint mi, ml, mul, mr;
1854 tl->getTupleSize( mi, ml, mul, mr );
1855
1856 uint n = tl->get_n();
1857
1858 int sz_buf = 1 + 4 * UINT_PER_UNSIGNED +
1859 tl->get_n() * ( mi + ml * UINT_PER_LONG + mul * UINT_PER_LONG + mr * UINT_PER_REAL );
1860
1861 uint* buf = (uint*)malloc( sz_buf * sizeof( uint ) );
1862 *ptr = (void*)buf;
1863
1864 // Copy n
1865 memcpy( buf, &n, sizeof( uint ) ), buf += 1;
1866 // Copy mi
1867 memcpy( buf, &mi, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
1868 // Copy ml
1869 memcpy( buf, &ml, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
1870 // Copy mul
1871 memcpy( buf, &mul, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
1872 // Copy mr
1873 memcpy( buf, &mr, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
1874 // Copy vi_wr
1875 memcpy( buf, tl->vi_rd, tl->get_n() * mi * sizeof( sint ) ), buf += tl->get_n() * mi;
1876 // Copy vl_wr
1877 memcpy( buf, tl->vl_rd, tl->get_n() * ml * sizeof( slong ) ), buf += tl->get_n() * ml * UINT_PER_LONG;
1878 // Copy vul_wr
1879 memcpy( buf, tl->vul_rd, tl->get_n() * mul * sizeof( ulong ) ), buf += tl->get_n() * mul * UINT_PER_LONG;
1880 // Copy vr_wr
1881 memcpy( buf, tl->vr_rd, tl->get_n() * mr * sizeof( realType ) ), buf += tl->get_n() * mr * UINT_PER_REAL;
1882
1883 return sz_buf;
1884 }
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().
|
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 }
Referenced by PACK_BYTES(), moab::ParallelComm::pack_sets(), and moab::ParallelComm::pack_tag().
|
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, and moab::CN::permuteVec.
Referenced by moab::CN::permuteThis().
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().
|
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.
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
709 }
710
711 return MB_SUCCESS;
712 }
References moab::BSPTreeBoxIter::B0154, moab::BSPTreeBoxIter::B1265, moab::BSPTreeBoxIter::B2376, moab::BSPTreeBoxIter::B3047, moab::BSPTreeBoxIter::B3210, moab::BSPTreeBoxIter::B4567, MB_SUCCESS, plane_cut_edge(), and moab::BSPTreeBoxIter::side_above_plane().
Referenced by moab::BSPTreeBoxIter::down(), moab::BSPTreeBoxIter::step(), and moab::BSPTreeBoxIter::step_to_first_leaf().
|
inlinestatic |
Clip an edge using a plane.
Given an edge from keep_end_coords to cut_end_coords, cut the edge using the passed plane, such that cut_end_coords is updated with a new location on the plane, and old_coords_out contains the original value of cut_end_coords.
Definition at line 641 of file BSPTree.cpp.
645 {
646 const CartVect start( keep_end_coords ), end( cut_end_coords );
647 const CartVect norm( plane.norm );
648 CartVect xsect_point;
649
650 const CartVect m = end - start;
651 const double t = -( norm % start + plane.coeff ) / ( norm % m );
652 assert( t > 0.0 && t < 1.0 );
653 xsect_point = start + t * m;
654
655 end.get( old_coords_out );
656 xsect_point.get( cut_end_coords );
657 }
References moab::BSPTree::Plane::coeff, moab::CartVect::get(), and moab::BSPTree::Plane::norm.
Referenced by plane_cut_box().
|
inlinestatic |
reverse of plane_cut_box
Definition at line 722 of file BSPTree.cpp.
725 {
726 switch( BSPTreeBoxIter::side_on_plane( corners_inout, plane ) )
727 {
728 case BSPTreeBoxIter::B0154:
729 copy_coords( corners_inout[0], cut_face_in[0] );
730 copy_coords( corners_inout[1], cut_face_in[1] );
731 copy_coords( corners_inout[5], cut_face_in[2] );
732 copy_coords( corners_inout[4], cut_face_in[3] );
733 break;
734 case BSPTreeBoxIter::B1265:
735 copy_coords( corners_inout[1], cut_face_in[0] );
736 copy_coords( corners_inout[2], cut_face_in[1] );
737 copy_coords( corners_inout[6], cut_face_in[2] );
738 copy_coords( corners_inout[5], cut_face_in[3] );
739 break;
740 case BSPTreeBoxIter::B2376:
741 copy_coords( corners_inout[2], cut_face_in[0] );
742 copy_coords( corners_inout[3], cut_face_in[1] );
743 copy_coords( corners_inout[7], cut_face_in[2] );
744 copy_coords( corners_inout[6], cut_face_in[3] );
745 break;
746 case BSPTreeBoxIter::B3047:
747 copy_coords( corners_inout[3], cut_face_in[0] );
748 copy_coords( corners_inout[0], cut_face_in[1] );
749 copy_coords( corners_inout[4], cut_face_in[2] );
750 copy_coords( corners_inout[7], cut_face_in[3] );
751 break;
752 case BSPTreeBoxIter::B3210:
753 copy_coords( corners_inout[3], cut_face_in[0] );
754 copy_coords( corners_inout[2], cut_face_in[1] );
755 copy_coords( corners_inout[1], cut_face_in[2] );
756 copy_coords( corners_inout[0], cut_face_in[3] );
757 break;
758 case BSPTreeBoxIter::B4567:
759 copy_coords( corners_inout[4], cut_face_in[0] );
760 copy_coords( corners_inout[5], cut_face_in[1] );
761 copy_coords( corners_inout[6], cut_face_in[2] );
762 copy_coords( corners_inout[7], cut_face_in[3] );
763 break;
764 default:
765 return MB_FAILURE; // child is not a box
766 }
767
768 return MB_SUCCESS;
769 }
References moab::BSPTreeBoxIter::B0154, moab::BSPTreeBoxIter::B1265, moab::BSPTreeBoxIter::B2376, moab::BSPTreeBoxIter::B3047, moab::BSPTreeBoxIter::B3210, moab::BSPTreeBoxIter::B4567, copy_coords(), MB_SUCCESS, and moab::BSPTreeBoxIter::side_on_plane().
Referenced by moab::BSPTreeBoxIter::step(), and moab::BSPTreeBoxIter::up().
|
static |
Definition at line 67 of file BSPTree.cpp.
68 {
69 const unsigned side_verts[6][3] = { { 0, 3, 1 }, { 4, 5, 7 }, { 0, 1, 4 }, { 1, 2, 5 }, { 2, 3, 6 }, { 3, 0, 7 } };
70 // If we assume planar sides, then the box is the intersection
71 // of 6 half-spaces defined by the planes of the sides.
72 const CartVect pt( point );
73 for( unsigned s = 0; s < 6; ++s )
74 {
75 CartVect v0( corners[side_verts[s][0]] );
76 CartVect v1( corners[side_verts[s][1]] );
77 CartVect v2( corners[side_verts[s][2]] );
78 CartVect N = ( v1 - v0 ) * ( v2 - v0 );
79 if( ( v0 - pt ) % N < 0 ) return false;
80 }
81 return true;
82 }
Referenced by moab::BSPTreeBoxIter::initialize().
|
static |
Find closest point on line.
Find the point on the line for which a line trough the input point p and the result position is orthogonal to the input line.
p | The point for which to find the perpendicular |
b | A point on the line |
m | The direction of the line |
Definition at line 73 of file OrientedBox.cpp.
76 {
77 #if MB_ORIENTED_BOX_UNIT_VECTORS
78 double t = ( m % ( p - b ) );
79 #else
80 double t = ( m % ( p - b ) ) / ( m % m );
81 #endif
82 return Util::is_finite( t ) ? t : 0.0;
83 }
References moab::Util::is_finite().
Referenced by box_from_axes().
void moab::print_buff | ( | unsigned char * | ch, |
int | size | ||
) |
Definition at line 867 of file ParallelComm.cpp.
868 {
869 for( int i = 0; i < size; i++ )
870 std::cout << ch[i];
871 std::cout << "\n";
872 }
References size.
|
static |
Definition at line 232 of file DebugOutput.cpp.
233 {
234 assert( end > begin );
235 // begin with a space
236 *buffer = ' ';
237 char* b1 = buffer + 1;
238 // print begin-end, but keep track of where each peice is written
239 char* e1 = b1 + snprintf( b1, len, "%lu", begin );
240 *e1 = '-';
241 char* b2 = e1 + 1;
242 char* e2 = b2 + snprintf( b2, len, "%lu", end );
243 // if the printed strings for both numbers don't contain the same
244 // number of digits, don't do anything more
245 if( e1 - b1 == e2 - b2 )
246 {
247 // see how many leading digits the two numbers have in common
248 char* p = b2;
249 while( *p && *p == *b1 )
250 {
251 ++p;
252 ++b1;
253 }
254 // remove common shared leading digits from second number
255 if( p > b2 && *p )
256 {
257 // shift second value down so that common leading digits are not repeated
258 while( *p )
259 {
260 *b2 = *p;
261 ++b2;
262 ++p;
263 }
264 e2 = b2;
265 }
266 }
267 // add trailing comma
268 *e2 = ',';
269 ++e2;
270 *e2 = '\0';
271 }
References buffer.
Referenced by moab::DebugOutput::list_ints_real(), and moab::DebugOutput::list_range_real().
void moab::print_sequences | ( | const SequenceManager & | seqman | ) |
Definition at line 908 of file SequenceManager.cpp.
909 {
910 std::cout << seqman << std::endl;
911 }
void moab::print_sequences | ( | const TypeSequenceManager & | seqman | ) |
Definition at line 913 of file SequenceManager.cpp.
914 {
915 std::cout << seqman << std::endl;
916 }
|
static |
Definition at line 213 of file WriteHDF5Parallel.cpp.
214 {
215 const unsigned VB = 2;
216 if( str->get_verbosity() < VB ) return;
217
218 Tag gid, did, bid, sid, nid;
219 gid = iFace->globalId_tag();
220 iFace->tag_get_handle( GEOM_DIMENSION_TAG_NAME, 1, MB_TYPE_INTEGER, did );
221 iFace->tag_get_handle( MATERIAL_SET_TAG_NAME, 1, MB_TYPE_INTEGER, bid );
222 iFace->tag_get_handle( DIRICHLET_SET_TAG_NAME, 1, MB_TYPE_INTEGER, nid );
223 iFace->tag_get_handle( NEUMANN_SET_TAG_NAME, 1, MB_TYPE_INTEGER, sid );
224 Range typesets[10];
225 const char* typenames[] = { "Block ", "Sideset ", "NodeSet", "Vertex", "Curve",
226 "Surface", "Volume", "Body", "Other" };
227 for( Range::iterator riter = sets.begin(); riter != sets.end(); ++riter )
228 {
229 unsigned dim, id; //, oldsize;
230 if( MB_SUCCESS == iFace->tag_get_data( bid, &*riter, 1, &id ) )
231 dim = 0;
232 else if( MB_SUCCESS == iFace->tag_get_data( sid, &*riter, 1, &id ) )
233 dim = 1;
234 else if( MB_SUCCESS == iFace->tag_get_data( nid, &*riter, 1, &id ) )
235 dim = 2;
236 else if( MB_SUCCESS == iFace->tag_get_data( did, &*riter, 1, &dim ) )
237 {
238 id = 0;
239 iFace->tag_get_data( gid, &*riter, 1, &id );
240 dim += 3;
241 }
242 else
243 {
244 id = *riter;
245 dim = 9;
246 }
247
248 // oldsize = typesets[dim].size();
249 typesets[dim].insert( id );
250 // assert(typesets[dim].size() - oldsize == 1);
251 }
252 for( int ii = 0; ii < 9; ++ii )
253 {
254 char tmp[64];
255 snprintf( tmp, 64, "%s (%lu) ", typenames[ii], (unsigned long)typesets[ii].size() );
256 str->print( VB, tmp, typesets[ii] );
257 }
258 str->printf( VB, "Total: %lu\n", (unsigned long)sets.size() );
259 }
References moab::Range::begin(), dim, DIRICHLET_SET_TAG_NAME, moab::Range::end(), GEOM_DIMENSION_TAG_NAME, moab::DebugOutput::get_verbosity(), moab::Interface::globalId_tag(), moab::Range::insert(), MATERIAL_SET_TAG_NAME, MB_SUCCESS, MB_TYPE_INTEGER, NEUMANN_SET_TAG_NAME, moab::DebugOutput::print(), moab::DebugOutput::printf(), size, moab::Range::size(), moab::Interface::tag_get_data(), and moab::Interface::tag_get_handle().
Referenced by moab::WriteHDF5Parallel::create_meshset_tables().
void moab::putElementField | ( | Interface * | mbi, |
const char * | tagname, | ||
double | factor | ||
) |
Definition at line 30 of file addfield.cpp.
31 {
32 Range elems;
33
34 mbi->get_entities_by_dimension( 0, 3, elems );
35
36 const double defVal = 0.;
37 Tag fieldTag;
38 ErrorCode rval = mbi->tag_get_handle( tagname, 1, MB_TYPE_DOUBLE, fieldTag, MB_TAG_DENSE | MB_TAG_CREAT, &defVal );
39 assert( MB_SUCCESS == rval );
40 #ifdef NDEBUG
41 if( MB_SUCCESS == rval )
42 {
43 }; // Line to avoid compiler warning about unused variable
44 #endif
45
46 int numElems = elems.size();
47
48 for( int i = 0; i < numElems; i++ )
49 {
50 // cout << elems[i] << endl;
51 EntityHandle elem = elems[i];
52
53 double xyz[3];
54 mbi->get_coords( &elem, 1, xyz );
55
56 double fieldValue = physField( xyz[0], xyz[1], xyz[2], factor );
57
58 mbi->tag_set_data( fieldTag, &elem, 1, &fieldValue );
59 }
60 }
References ErrorCode, moab::Interface::get_coords(), moab::Interface::get_entities_by_dimension(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, physField(), moab::Range::size(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by main().
void moab::putSpectralElementField | ( | Interface * | mbi, |
int | dim, | ||
int | np, | ||
const char * | tagname, | ||
double | factor | ||
) |
Definition at line 62 of file addfield.cpp.
63 {
64 Range elems;
65
66 mbi->get_entities_by_dimension( 0, dim, elems );
67
68 const int ndofperE = np * np;
69 double* defDouble = new double[ndofperE];
70 Tag fieldTag;
71 ErrorCode rval =
72 mbi->tag_get_handle( tagname, ndofperE, MB_TYPE_DOUBLE, fieldTag, MB_TAG_DENSE | MB_TAG_CREAT, &defDouble );
73 std::cout << "rval = " << rval << std::endl;
74 assert( MB_SUCCESS == rval || rval == MB_ALREADY_ALLOCATED );
75 #ifdef NDEBUG
76 if( MB_SUCCESS == rval || rval == MB_ALREADY_ALLOCATED )
77 {
78 }; // Line to avoid compiler warning about unused variable
79 #endif
80
81 int numElems = elems.size();
82 std::vector< double > tData( ndofperE, 0.0 );
83
84 for( int i = 0; i < numElems; i++ )
85 {
86 EntityHandle elem = elems[i];
87
88 double xyz[3];
89 mbi->get_coords( &elem, 1, xyz );
90
91 double fieldValue = physField( xyz[0], xyz[1], xyz[2], factor );
92 for( int j = 0; j < ndofperE; ++j )
93 tData[j] = fieldValue; // same value evaluated at the center; could modify it to use
94 // GLL points ?
95
96 mbi->tag_set_data( fieldTag, &elem, 1, &tData[0] );
97 }
98
99 delete[] defDouble;
100 tData.clear();
101 }
References dim, ErrorCode, moab::Interface::get_coords(), moab::Interface::get_entities_by_dimension(), MB_ALREADY_ALLOCATED, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, physField(), moab::Range::size(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by main().
void moab::putVertexField | ( | Interface * | mbi, |
const char * | tagname, | ||
double | factor | ||
) |
Definition at line 103 of file addfield.cpp.
104 {
105 Range verts;
106
107 mbi->get_entities_by_type( 0, MBVERTEX, verts );
108
109 const double defVal = 0.;
110 Tag fieldTag;
111 mbi->tag_get_handle( tagname, 1, MB_TYPE_DOUBLE, fieldTag, MB_TAG_DENSE | MB_TAG_CREAT, &defVal );
112
113 int numVerts = verts.size();
114 for( int i = 0; i < numVerts; i++ )
115 {
116 EntityHandle vert = verts[i]; //?
117
118 double vertPos[3];
119 mbi->get_coords( &vert, 1, vertPos );
120
121 double fieldValue = physField( vertPos[0], vertPos[1], vertPos[2], factor );
122
123 mbi->tag_set_data( fieldTag, &vert, 1, &fieldValue );
124 }
125 }
References moab::Interface::get_coords(), moab::Interface::get_entities_by_type(), MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, MBVERTEX, physField(), moab::Range::size(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by main().
|
inline |
Definition at line 60 of file VerdictWrapper.hpp.
61 {
62 switch( qtype )
63 {
64 case MB_UNDEFINED_QUALITY:
65 return "MB_UNDEFINED_QUALITY";
66 case MB_EDGE_RATIO:
67 return "MB_EDGE_RATIO";
68 case MB_MAX_EDGE_RATIO:
69 return "MB_MAX_EDGE_RATIO";
70 case MB_SKEW:
71 return "MB_SKEW";
72 case MB_TAPER:
73 return "MB_TAPER";
74 case MB_VOLUME:
75 return "MB_VOLUME";
76 case MB_STRETCH:
77 return "MB_STRETCH";
78 case MB_DIAGONAL:
79 return "MB_DIAGONAL";
80 case MB_DIMENSION:
81 return "MB_DIMENSION";
82 case MB_ODDY:
83 return "MB_ODDY";
84 case MB_MED_ASPECT_FROBENIUS:
85 return "MB_MED_ASPECT_FROBENIUS";
86 case MB_MAX_ASPECT_FROBENIUS:
87 return "MB_MAX_ASPECT_FROBENIUS";
88 case MB_CONDITION:
89 return "MB_CONDITION";
90 case MB_JACOBIAN:
91 return "MB_JACOBIAN";
92 case MB_SCALED_JACOBIAN:
93 return "MB_SCALED_JACOBIAN";
94 case MB_SHEAR:
95 return "MB_SHEAR";
96 case MB_SHAPE:
97 return "MB_SHAPE";
98 case MB_RELATIVE_SIZE_SQUARED:
99 return "MB_RELATIVE_SIZE_SQUARED";
100 case MB_SHAPE_AND_SIZE:
101 return "MB_SHAPE_AND_SIZE";
102 case MB_SHEAR_AND_SIZE:
103 return "MB_SHEAR_AND_SIZE";
104 case MB_DISTORTION:
105 return "MB_DISTORTION";
106 case MB_LENGTH:
107 return "MB_LENGTH";
108 case MB_RADIUS_RATIO:
109 return "MB_RADIUS_RATIO";
110 case MB_ASPECT_BETA:
111 return "MB_ASPECT_BETA";
112 case MB_ASPECT_RATIO:
113 return "MB_ASPECT_RATIO";
114 case MB_ASPECT_GAMMA:
115 return "MB_ASPECT_GAMMA";
116 case MB_MINIMUM_ANGLE:
117 return "MB_MINIMUM_ANGLE";
118 case MB_COLLAPSE_RATIO:
119 return "MB_COLLAPSE_RATIO";
120 case MB_WARPAGE:
121 return "MB_WARPAGE";
122 case MB_AREA:
123 return "MB_AREA";
124 case MB_MAXIMUM_ANGLE:
125 return "MB_MAXIMUM_ANGLE";
126 default:
127 return "MB_QUALITY_COUNT";
128 }
129 }
References MB_AREA, MB_ASPECT_BETA, MB_ASPECT_GAMMA, MB_ASPECT_RATIO, MB_COLLAPSE_RATIO, MB_CONDITION, MB_DIAGONAL, MB_DIMENSION, MB_DISTORTION, MB_EDGE_RATIO, MB_JACOBIAN, MB_LENGTH, MB_MAX_ASPECT_FROBENIUS, MB_MAX_EDGE_RATIO, MB_MAXIMUM_ANGLE, MB_MED_ASPECT_FROBENIUS, MB_MINIMUM_ANGLE, MB_ODDY, MB_RADIUS_RATIO, MB_RELATIVE_SIZE_SQUARED, MB_SCALED_JACOBIAN, MB_SHAPE, MB_SHAPE_AND_SIZE, MB_SHEAR, MB_SHEAR_AND_SIZE, MB_SKEW, MB_STRETCH, MB_TAPER, MB_UNDEFINED_QUALITY, MB_VOLUME, and MB_WARPAGE.
|
inlinestatic |
Definition at line 240 of file ParallelComm.cpp.
241 {
242 return 2 * sizeof( EntityHandle ) * rng.psize() + sizeof( int );
243 }
References moab::Range::psize().
Referenced by moab::ParallelComm::estimate_sets_buffer_size(), and moab::ParallelComm::pack_sets().
|
inline |
Definition at line 1632 of file WriteHDF5.cpp.
1637 {
1638 output_id_list.clear();
1639 if( begin == end )
1640 {
1641 ranged_list = false;
1642 return MB_SUCCESS;
1643 }
1644
1645 // First try ranged format, but give up if we reach the
1646 // non-range format size.
1647 RangeMap< EntityHandle, WriteHDF5::wid_t >::iterator ri = idMap.begin();
1648
1649 const size_t num_handles = count_num_handles( begin, end );
1650 // If we end up with more than this many range blocks, then
1651 // we're better off just writing the set as a simple list
1652 size_t pairs_remaining = num_handles / 2;
1653 for( HandleRangeIter pi = begin; pi != end; ++pi )
1654 {
1655 EntityHandle h = pi->first;
1656 WriteHDF5::wid_t local_mapped_from_subrange = 0;
1657 while( h <= pi->second )
1658 {
1659 ri = idMap.lower_bound( ri, idMap.end(), h );
1660 if( ri == idMap.end() || ri->begin > h )
1661 {
1662 ++h;
1663 continue;
1664 }
1665
1666 WriteHDF5::wid_t n = pi->second - pi->first + 1 - local_mapped_from_subrange;
1667 if( n > ri->count ) n = ri->count;
1668
1669 WriteHDF5::wid_t id = ri->value + ( h - ri->begin );
1670 // see if we can go to the end of the range
1671 if( id + n > ri->value + ri->count ) // we have to reduce n, because we cannot go over next subrange
1672 {
1673 if( ri->value + ri->count - id > 0 ) n = ri->value + ri->count - id;
1674 }
1675
1676 // See if we can append it to the previous range
1677 if( !output_id_list.empty() && output_id_list[output_id_list.size() - 2] + output_id_list.back() == id )
1678 {
1679 output_id_list.back() += n;
1680 }
1681
1682 // If we ran out of space, (or set is empty) just do list format
1683 else if( !pairs_remaining )
1684 {
1685 ranged_list = false;
1686 output_id_list.resize( num_handles );
1687 range_to_id_list_templ( begin, end, idMap, &output_id_list[0] );
1688 output_id_list.erase( std::remove( output_id_list.begin(), output_id_list.end(), 0u ),
1689 output_id_list.end() );
1690 return MB_SUCCESS;
1691 }
1692
1693 //
1694 else
1695 {
1696 --pairs_remaining;
1697 output_id_list.push_back( id );
1698 output_id_list.push_back( n );
1699 }
1700 local_mapped_from_subrange += n; // we already mapped so many
1701 h += n;
1702 }
1703 }
1704
1705 ranged_list = true;
1706 return MB_SUCCESS;
1707 }
References moab::RangeMap< KeyType, ValType, NullVal >::back(), moab::RangeMap< KeyType, ValType, NullVal >::begin(), count_num_handles(), moab::RangeMap< KeyType, ValType, NullVal >::end(), moab::RangeMap< KeyType, ValType, NullVal >::lower_bound(), MB_SUCCESS, and range_to_id_list_templ().
Referenced by moab::WriteHDF5::range_to_blocked_list().
|
inline |
Definition at line 1589 of file WriteHDF5.cpp.
1593 {
1594 ErrorCode rval = MB_SUCCESS;
1595 RangeMap< EntityHandle, WriteHDF5::wid_t >::iterator ri = idMap.begin();
1596 WriteHDF5::wid_t* i = array;
1597 for( HandleRangeIter pi = begin; pi != end; ++pi )
1598 {
1599 EntityHandle h = pi->first;
1600 while( h <= pi->second )
1601 {
1602 ri = idMap.lower_bound( ri, idMap.end(), h );
1603 if( ri == idMap.end() || ri->begin > h )
1604 {
1605 rval = MB_ENTITY_NOT_FOUND;
1606 *i = 0;
1607 ++i;
1608 ++h;
1609 continue;
1610 }
1611
1612 // compute the last available value of the found target range (ri iterator)
1613 WriteHDF5::wid_t last_valid_input_value_in_current_map_range = ri->begin + ri->count - 1;
1614 // limit the number of steps we do on top of h so we do not overflow the output range
1615 // span
1616 WriteHDF5::wid_t step_until = std::min( last_valid_input_value_in_current_map_range, pi->second );
1617 WriteHDF5::wid_t n = step_until - h + 1;
1618 assert( n > 0 ); // We must at least step 1
1619
1620 WriteHDF5::wid_t id = ri->value + ( h - ri->begin );
1621 for( WriteHDF5::wid_t j = 0; j < n; ++i, ++j )
1622 *i = id + j;
1623 h += n;
1624 }
1625 }
1626
1627 assert( i == array + count_num_handles( begin, end ) );
1628 return rval;
1629 }
References moab::RangeMap< KeyType, ValType, NullVal >::begin(), count_num_handles(), moab::RangeMap< KeyType, ValType, NullVal >::end(), ErrorCode, moab::RangeMap< KeyType, ValType, NullVal >::lower_bound(), MB_ENTITY_NOT_FOUND, and MB_SUCCESS.
Referenced by range_to_blocked_list_templ(), and moab::WriteHDF5::range_to_id_list().
|
inlinestatic |
Definition at line 1179 of file BSPTree.cpp.
1185 {
1186 const double epsilon = 1e-12;
1187
1188 // begin with inifinite ray
1189 t_enter = 0.0;
1190 t_exit = std::numeric_limits< double >::infinity();
1191
1192 // cut ray such that we keep only the portion contained
1193 // in each halfspace
1194 for( PlaneIter i = begin; i != end; ++i )
1195 {
1196 CartVect norm( i->norm );
1197 double coeff = i->coeff;
1198 double den = norm % ray_dir;
1199 if( fabs( den ) < epsilon )
1200 { // ray is parallel to plane
1201 if( i->above( ray_pt.array() ) ) return false; // ray entirely outside half-space
1202 }
1203 else
1204 {
1205 double t_xsect = ( -coeff - ( norm % ray_pt ) ) / den;
1206 // keep portion of ray/segment below plane
1207 if( den > 0 )
1208 {
1209 if( t_xsect < t_exit ) t_exit = t_xsect;
1210 }
1211 else
1212 {
1213 if( t_xsect > t_enter ) t_enter = t_xsect;
1214 }
1215 }
1216 }
1217
1218 return t_exit >= t_enter;
1219 }
References moab::CartVect::array().
Referenced by moab::BSPTreeIter::intersect_ray(), and moab::BSPTreeBoxIter::intersect_ray().
MB_EXPORT void moab::ReleaseInterface | ( | UnknownInterface * | iface | ) |
Definition at line 141 of file Factory.cpp.
142 {
143 if( !iface ) return;
144 // remove this object from our list and delete it
145 ComponentFactory::objects_in_use.remove( iface );
146 delete iface;
147 }
References iface, and moab::ComponentFactory::objects_in_use.
|
inlinestatic |
Remvoe from parent/child list.
Definition at line 162 of file MeshSet.cpp.
166 {
167 switch( count )
168 {
169 case MeshSet::ZERO:
170 result = false;
171 return MeshSet::ZERO;
172 case MeshSet::ONE:
173 if( h == list.hnd[0] )
174 {
175 result = true;
176 return MeshSet::ZERO;
177 }
178 else
179 {
180 result = false;
181 return MeshSet::ONE;
182 }
183 case MeshSet::TWO:
184 if( h == list.hnd[0] )
185 {
186 list.hnd[0] = list.hnd[1];
187 result = true;
188 return MeshSet::ONE;
189 }
190 else if( h == list.hnd[1] )
191 {
192 result = true;
193 return MeshSet::ONE;
194 }
195 else
196 {
197 result = false;
198 return MeshSet::TWO;
199 }
200 case MeshSet::MANY: {
201 EntityHandle *i, *j, *p;
202 i = std::find( list.ptr[0], list.ptr[1], h );
203 if( i == list.ptr[1] )
204 {
205 result = false;
206 return MeshSet::MANY;
207 }
208
209 result = true;
210 p = list.ptr[1] - 1;
211 while( i != p )
212 {
213 j = i + 1;
214 *i = *j;
215 i = j;
216 }
217 int size = p - list.ptr[0];
218 if( size == 2 )
219 {
220 p = list.ptr[0];
221 list.hnd[0] = p[0];
222 list.hnd[1] = p[1];
223 free( p );
224 return MeshSet::TWO;
225 }
226 else
227 {
228 list.ptr[0] = (EntityHandle*)realloc( list.ptr[0], size * sizeof( EntityHandle ) );
229 list.ptr[1] = list.ptr[0] + size;
230 return MeshSet::MANY;
231 }
232 }
233 }
234
235 return MeshSet::ZERO;
236 }
References moab::MeshSet::CompactList::hnd, moab::MeshSet::MANY, moab::MeshSet::ONE, moab::MeshSet::CompactList::ptr, size, moab::MeshSet::TWO, and moab::MeshSet::ZERO.
Referenced by main(), moab::MeshSet::remove_child(), and moab::MeshSet::remove_parent().
|
static |
Resize MeshSet::CompactList. Returns pointer to storage.
Definition at line 390 of file MeshSet.cpp.
391 {
392 if( count <= 2 )
393 {
394 if( new_list_size <= 2 )
395 {
396 count = (MeshSet::Count)new_list_size;
397 return clist.hnd;
398 }
399 else
400 {
401 EntityHandle* list = (EntityHandle*)malloc( new_list_size * sizeof( EntityHandle ) );
402 list[0] = clist.hnd[0];
403 list[1] = clist.hnd[1];
404 clist.ptr[0] = list;
405 clist.ptr[1] = list + new_list_size;
406 count = MeshSet::MANY;
407 return list;
408 }
409 }
410 else if( new_list_size > 2 )
411 {
412 if( new_list_size > (size_t)( clist.ptr[1] - clist.ptr[0] ) )
413 clist.ptr[0] = (EntityHandle*)realloc( clist.ptr[0], new_list_size * sizeof( EntityHandle ) );
414 clist.ptr[1] = clist.ptr[0] + new_list_size;
415 count = MeshSet::MANY;
416 return clist.ptr[0];
417 }
418 else
419 {
420 EntityHandle* list = clist.ptr[0];
421 clist.hnd[0] = list[0];
422 clist.hnd[1] = list[1];
423 free( list );
424 count = (MeshSet::Count)new_list_size;
425 return clist.hnd;
426 }
427 }
References moab::MeshSet::CompactList::hnd, moab::MeshSet::MANY, and moab::MeshSet::CompactList::ptr.
Referenced by moab::MeshSet::convert(), moab::range_tool< pair_iter_t >::ranged_insert_entities(), moab::range_tool< pair_iter_t >::ranged_remove_entities(), moab::range_tool< pair_iter_t >::vector_insert_entities(), vector_insert_vector(), vector_remove_range(), vector_remove_ranges(), and vector_remove_vector().
|
inline |
Definition at line 1048 of file CN.cpp.
1049 {
1050 T tmp_conn[MAX_SUB_ENTITIES];
1051 assert( indices_per_ent <= CN::revPermuteVec[t][dim][MAX_SUB_ENTITIES] );
1052 if( indices_per_ent > CN::revPermuteVec[t][dim][MAX_SUB_ENTITIES] ) return 1;
1053 short int* tvec = CN::revPermuteVec[t][dim];
1054 T* pvec = conn;
1055 for( int j = 0; j < num_entries; j++ )
1056 {
1057 for( int i = 0; i < indices_per_ent; i++ )
1058 tmp_conn[i] = pvec[tvec[i]];
1059 memcpy( pvec, tmp_conn, indices_per_ent * sizeof( T ) );
1060 pvec += indices_per_ent;
1061 }
1062
1063 return 0;
1064 }
References dim, MAX_SUB_ENTITIES, and moab::CN::revPermuteVec.
Referenced by moab::CN::revPermuteThis().
|
static |
Definition at line 739 of file WriteHDF5Parallel.cpp.
740 {
741 int byte = position / 8;
742 int bit = position % 8;
743 bytes[byte] |= ( ( (unsigned char)1 ) << bit );
744 }
Referenced by moab::WriteHDF5Parallel::create_tag_tables().
|
static |
Definition at line 2159 of file ReadHDF5.cpp.
2163 {
2164 if( ranged )
2165 {
2166 if( !content_len || id_map.empty() ) return false;
2167
2168 const long* j = contents;
2169 const long* const end = contents + content_len;
2170 assert( content_len % 2 == 0 );
2171 while( j != end )
2172 {
2173 long start = *( j++ );
2174 long count = *( j++ );
2175 if( id_map.intersects( start, count ) ) return true;
2176 }
2177 }
2178 else
2179 {
2180 const long* const end = contents + content_len;
2181 for( const long* i = contents; i != end; ++i )
2182 if( id_map.exists( *i ) ) return true;
2183 }
2184
2185 return false;
2186 }
References moab::RangeMap< KeyType, ValType, NullVal >::empty(), moab::RangeMap< KeyType, ValType, NullVal >::exists(), and moab::RangeMap< KeyType, ValType, NullVal >::intersects().
Referenced by moab::ReadHDF5::find_sets_containing().
|
static |
Definition at line 218 of file CN.cpp.
226 {
227 int parent_num_verts = CN::VerticesPerEntity( parent_type );
228 int side_indices[8];
229 assert( sizeof( side_indices ) / sizeof( side_indices[0] ) >= (size_t)child_num_verts );
230
231 for( int i = 0; i < child_num_verts; i++ )
232 {
233 side_indices[i] = std::find( parent_conn, parent_conn + parent_num_verts, child_conn[i] ) - parent_conn;
234 if( side_indices[i] == parent_num_verts ) return -1;
235 }
236
237 return CN::SideNumber( parent_type, &side_indices[0], child_num_verts, child_dim, side_no, sense, offset );
238 }
References moab::CN::SideNumber(), and moab::CN::VerticesPerEntity().
Referenced by iMOAB_GetPointerToSurfaceBC(), MBCN_SideNumberInt(), MBCN_SideNumberLong(), MBCN_SideNumberUint(), MBCN_SideNumberUlong(), MBCN_SideNumberVoid(), moab::CN::SideNumber(), and moab::HigherOrderFactory::tag_for_deletion().
|
static |
Split triangles by which side of a plane they are on.
Given a plane specified as a bisecting plane normal to one of the axes of a box, split triangles based on which side of the plane they are on.
instance | MOAB instance |
box | The oriented box containing all the entities |
axis | The axis for which the split plane is orthogonal |
entities | The entities intersecting plane |
left_list | Output, entities to the left of the plane |
right_list | Output, entities to the right of the plane |
Definition at line 167 of file OrientedBoxTreeTool.cpp.
173 {
174 ErrorCode rval;
175 left_list.clear();
176 right_list.clear();
177
178 std::vector< CartVect > coords;
179 for( Range::reverse_iterator i = entities.rbegin(); i != entities.rend(); ++i )
180 {
181 const EntityHandle* conn = NULL;
182 int conn_len = 0;
183 rval = instance->get_connectivity( *i, conn, conn_len );
184 if( MB_SUCCESS != rval ) return rval;
185
186 coords.resize( conn_len );
187 rval = instance->get_coords( conn, conn_len, coords[0].array() );
188 if( MB_SUCCESS != rval ) return rval;
189
190 CartVect centroid( 0.0 );
191 for( int j = 0; j < conn_len; ++j )
192 centroid += coords[j];
193 centroid /= conn_len;
194
195 if( ( box.axis( axis ) % ( centroid - box.center ) ) < 0.0 )
196 left_list.insert( *i );
197 else
198 right_list.insert( *i );
199 }
200
201 return MB_SUCCESS;
202 }
References moab::OrientedBoxTreeTool::box(), moab::Range::clear(), entities, ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::Range::insert(), moab::OrientedBoxTreeTool::instance, and MB_SUCCESS.
Referenced by moab::OrientedBoxTreeTool::build_tree().
|
static |
Definition at line 546 of file BSPTreePoly.cpp.
547 {
548 // split edge, creating new edge
549 BSPTreePoly::Edge* new_edge = new BSPTreePoly::Edge( new_vtx, into_edge->end() );
550 into_edge->endPtr->set_vertex( new_vtx ); // This call might delete new_vtx
551
552 // update coedge loops in faces
553 if( into_edge->forwardPtr )
554 {
555 new_edge->forwardPtr = new BSPTreePoly::EdgeUse( new_edge );
556 new_edge->forwardPtr->insert_after( into_edge->forwardPtr );
557 }
558 if( into_edge->reversePtr )
559 {
560 new_edge->reversePtr = new BSPTreePoly::EdgeUse( new_edge );
561 new_edge->reversePtr->insert_before( into_edge->reversePtr );
562 }
563
564 return new_edge;
565 }
References moab::BSPTreePoly::Edge::end(), moab::BSPTreePoly::Edge::endPtr, moab::BSPTreePoly::Edge::forwardPtr, moab::BSPTreePoly::EdgeUse::insert_after(), moab::BSPTreePoly::EdgeUse::insert_before(), moab::BSPTreePoly::Edge::reversePtr, and moab::BSPTreePoly::VertexUse::set_vertex().
Referenced by moab::BSPTreePoly::cut_polyhedron().
|
static |
Definition at line 567 of file BSPTreePoly.cpp.
568 {
569 BSPTreePoly::Face* face = start->facePtr;
570 assert( face == end->facePtr );
571 BSPTreePoly::Face* new_face = new BSPTreePoly::Face;
572 BSPTreePoly::EdgeUse* keep_start = start->prevPtr;
573 BSPTreePoly::EdgeUse* keep_end = end->nextPtr;
574 for( BSPTreePoly::EdgeUse* ptr = start; ptr != keep_end; ptr = ptr->nextPtr )
575 {
576 if( face->usePtr == ptr ) face->usePtr = keep_start;
577 ptr->facePtr = new_face;
578 }
579 new_face->usePtr = start;
580 BSPTreePoly::Edge* edge = new BSPTreePoly::Edge( start->start(), end->end() );
581 edge->forwardPtr = new BSPTreePoly::EdgeUse( edge );
582 edge->reversePtr = new BSPTreePoly::EdgeUse( edge );
583
584 edge->forwardPtr->facePtr = face;
585 edge->forwardPtr->prevPtr = keep_start;
586 keep_start->nextPtr = edge->forwardPtr;
587 edge->forwardPtr->nextPtr = keep_end;
588 keep_end->prevPtr = edge->forwardPtr;
589
590 edge->reversePtr->facePtr = new_face;
591 edge->reversePtr->nextPtr = start;
592 start->prevPtr = edge->reversePtr;
593 edge->reversePtr->prevPtr = end;
594 end->nextPtr = edge->reversePtr;
595
596 return new_face;
597 }
References moab::BSPTreePoly::EdgeUse::end(), moab::BSPTreePoly::EdgeUse::facePtr, moab::BSPTreePoly::EdgeUse::nextPtr, moab::BSPTreePoly::EdgeUse::prevPtr, moab::BSPTreePoly::EdgeUse::start(), and moab::BSPTreePoly::Face::usePtr.
Referenced by moab::BSPTreePoly::cut_polyhedron().
|
static |
Definition at line 317 of file OrientedBoxTreeTool.cpp.
323 {
324 left.clear();
325 right.clear();
326
327 std::list< OrientedBoxTreeTool::SetData >::const_iterator i;
328 for( i = sets.begin(); i != sets.end(); ++i )
329 {
330 CartVect centroid( i->box_data.center / i->box_data.area );
331 if( ( box.axis( axis ) % ( centroid - box.center ) ) < 0.0 )
332 left.push_back( *i );
333 else
334 right.push_back( *i );
335 }
336
337 return MB_SUCCESS;
338 }
References moab::OrientedBoxTreeTool::box(), and MB_SUCCESS.
Referenced by moab::OrientedBoxTreeTool::build_sets().
moab::STATIC_ASSERT | ( | (sizeof(DatasetVals)==3 *sizeof(long)) | ) |
moab::STATIC_ASSERT | ( | sizeof(unsigned long) >=sizeof(EntityHandle) | ) |
Referenced by merge_ranged_ids().
|
inlinestatic |
Definition at line 1878 of file OrientedBoxTreeTool.cpp.
1879 {
1880 sum /= count;
1881 sqr /= count;
1882 return sqrt( sqr - sum * sum );
1883 }
References sum().
Referenced by moab::OrientedBoxTreeTool::stats(), and TriStats::write_results().
|
inlinestatic |
Definition at line 33 of file FileOptions.cpp.
34 {
35 return !*s;
36 }
Referenced by moab::FileOptions::compare(), moab::FileOptions::FileOptions(), moab::FileOptions::get_int_option(), moab::FileOptions::get_ints_option(), moab::FileOptions::get_null_option(), moab::FileOptions::get_real_option(), moab::FileOptions::get_reals_option(), moab::FileOptions::get_str_option(), and moab::FileOptions::get_strs_option().
|
static |
Definition at line 914 of file BSPTree.cpp.
915 { 916 result[0] = a[0] - b[0]; 917 result[1] = a[1] - b[1]; 918 result[2] = a[2] - b[2]; 919 }
Referenced by moab::BSPTreeBoxIter::volume().
subtract range2 from this, placing the results in the return range
Definition at line 664 of file Range.cpp.
665 {
666 const bool braindead = false;
667
668 if( braindead )
669 {
670 // brain-dead implementation right now
671 Range res( range1 );
672 for( Range::const_iterator rit = range2.begin(); rit != range2.end(); ++rit )
673 res.erase( *rit );
674
675 return res;
676 }
677 else
678 {
679 Range lhs( range1 );
680
681 Range::pair_iterator r_it0 = lhs.pair_begin();
682 Range::const_pair_iterator r_it1 = range2.const_pair_begin();
683
684 // terminate the while loop when at least one "start" iterator is at the
685 // end of the list
686 while( r_it0 != lhs.end() && r_it1 != range2.end() )
687 {
688 // case a: pair wholly within subtracted pair
689 if( r_it0->first >= r_it1->first && r_it0->second <= r_it1->second )
690 {
691 Range::PairNode* rtmp = r_it0.node();
692 ++r_it0;
693 lhs.delete_pair_node( rtmp );
694 }
695 // case b: pair overlaps upper part of subtracted pair
696 else if( r_it0->first <= r_it1->second && r_it0->first >= r_it1->first )
697 {
698 r_it0->first = r_it1->second + 1;
699 ++r_it1;
700 }
701 // case c: pair overlaps lower part of subtracted pair
702 else if( r_it0->second >= r_it1->first && r_it0->second <= r_it1->second )
703 {
704 r_it0->second = r_it1->first - 1;
705 ++r_it0;
706 }
707 // case d: pair completely surrounds subtracted pair
708 else if( r_it0->first < r_it1->first && r_it0->second > r_it1->second )
709 {
710 Range::PairNode* new_node =
711 alloc_pair( r_it0.node(), r_it0.node()->mPrev, r_it0->first, r_it1->first - 1 );
712 new_node->mPrev->mNext = new_node->mNext->mPrev = new_node;
713 r_it0.node()->first = r_it1->second + 1;
714 ++r_it1;
715 }
716 else
717 {
718 while( r_it0->second < r_it1->first && r_it0 != lhs.end() )
719 ++r_it0;
720 if( r_it0 == lhs.end() ) break;
721 while( r_it1->second < r_it0->first && r_it1 != range2.end() )
722 ++r_it1;
723 }
724 }
725
726 return lhs;
727 }
728 }
Referenced by moab::ParallelComm::assign_global_ids(), moab::GeomTopoTool::check_model(), moab::Core::clean_up_failed_read(), moab::TempestRemapper::ComputeOverlapMesh(), moab::WriteHDF5Parallel::create_meshset_tables(), DeformMeshRemap::deform_master(), moab::Core::delete_entities(), moab::ReadHDF5::delete_non_side_elements(), moab::ReadParallel::delete_nonlocal_entities(), dot_get_sets(), dot_nodes(), moab::ParallelComm::exchange_owned_mesh(), moab::ParallelComm::exchange_owned_meshs(), moab::Intx2Mesh::filterByMask(), DeformMeshRemap::find_other_sets(), moab::DualTool::foc_get_ents(), moab::DualTool::fsr_get_fourth_quad(), moab::WriteHDF5Parallel::gather_interface_meshes(), moab::WriteNCDF::gather_mesh_information(), moab::MeshTopoUtil::get_bridge_adjacencies(), moab::Core::get_entities_by_type_and_tag(), moab::DualTool::get_opposite_verts(), moab::ParallelComm::get_sent_ents(), moab::FBEngine::getAdjacentEntities(), moab::TempestRemapper::GetOverlapAugmentedEntities(), moab::FBEngine::gsubtract(), iMOAB_DeregisterApplication(), iMOAB_ReceiveMesh(), iMOAB_UpdateMeshInfo(), moab::MeshSet::intersect(), moab::Tqdcfr::load_file(), moab::Coupler::locate_points(), main(), moab::MergeMesh::merge_all(), moab::DualTool::next_loop_vertex(), moab::Tqdcfr::read_nodes(), moab::ReadNCDF::read_nodesets(), moab::ReadHDF5::read_set_ids_recursive(), moab::ReadNCDF::read_sidesets(), moab::ParCommGraph::receive_mesh(), ZoltanPartitioner::repartition(), moab::ParallelComm::resolve_shared_sets(), moab::DualTool::rev_atomic_pillow(), moab::ParallelComm::send_entities(), moab::FBEngine::separate(), moab::Core::serial_load_file(), moab::FBEngine::smooth_new_intx_points(), moab::MeshTopoUtil::split_entity_nonmanifold(), moab::FBEngine::split_internal_edge(), moab::ParCommGraph::split_owned_range(), moab::ParallelComm::tag_iface_entities(), moab::DualTool::traverse_hyperplane(), moab::WriteVtk::write_elems(), and moab::IODebugTrack::~IODebugTrack().
|
static |
Definition at line 922 of file BSPTree.cpp.
923 { 924 result[0] = a[0] + b[0] + c[0] + d[0]; 925 result[1] = a[1] + b[1] + c[1] + d[1]; 926 result[2] = a[2] + b[2] + c[2] + d[2]; 927 }
Referenced by moab::StatData::Ratio::accum(), moab::StatData::Stat< T >::accum(), stat_set::add(), moab::SimpleStat< T >::add(), moab::TypeSequenceManager::append_memory_use(), moab::HiReconstruction::check_barycentric_coords(), moab::TagInfo::check_valid_sizes(), stat_set::clear(), moab::GeomTopoTool::get_bounding_coords(), moab::SequenceManager::get_number_entities(), moab::MeshSetSequence::get_per_entity_memory_use(), hash_build_2(), hash_build_3(), inner(), moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::is_contained(), TriStats::leaf(), lobatto_to_legendre(), main(), ZoltanPartitioner::mbInitializePoints(), measure(), mxv_r(), obbvis_create(), moab::GeomQueryTool::point_in_volume(), moab::GeomQueryTool::point_in_volume_slow(), moab::TupleList::radix_offsets(), moab::BSPTreePoly::Face::signed_volume(), std_dev(), std_dev(), moab::BSPTreeBoxIter::volume(), and TriStats::write_results().
|
static |
Definition at line 168 of file Tqdcfr.cpp.
169 {
170 unsigned char tmp, *cdat = (unsigned char*)data;
171 tmp = cdat[0];
172 cdat[0] = cdat[3], cdat[3] = tmp;
173 tmp = cdat[1];
174 cdat[1] = cdat[2], cdat[2] = tmp;
175 }
Referenced by moab::Tqdcfr::FREADIA().
|
static |
Definition at line 155 of file Tqdcfr.cpp.
156 {
157 unsigned char tmp, *cdat = (unsigned char*)data;
158 tmp = cdat[0];
159 cdat[0] = cdat[7], cdat[7] = tmp;
160 tmp = cdat[1];
161 cdat[1] = cdat[6], cdat[6] = tmp;
162 tmp = cdat[2];
163 cdat[2] = cdat[5], cdat[5] = tmp;
164 tmp = cdat[3];
165 cdat[3] = cdat[4], cdat[4] = tmp;
166 }
Referenced by moab::Tqdcfr::FREADDA().
|
inline |
Get the type out of the handle. Can do a simple shift because handles are unsigned (therefore shifting fills with zero's)
Definition at line 92 of file Internals.hpp.
93 {
94 return static_cast< EntityType >( handle >> MB_ID_WIDTH );
95 }
References MB_ID_WIDTH.
Referenced by moab::Skinner::add_adjacency(), moab::AEntityFactory::add_adjacency(), moab::Core::adjacencies_iterate(), moab::Range::all_of_dimension(), moab::Range::all_of_type(), moab::VerdictWrapper::all_quality_measures(), moab::WriteHDF5::assign_ids(), moab::SweptElementData::calc_num_entities(), moab::ScdElementData::calc_num_entities(), moab::HigherOrderFactory::center_node_exist(), moab::Core::check_adjacencies(), moab::AEntityFactory::check_equiv_entities(), moab::SequenceManager::check_valid_entities(), moab::BitTag::clear_data(), moab::Core::connect_iterate(), moab::DualTool::construct_dual_cells(), moab::DualTool::construct_dual_edges(), moab::DualTool::construct_dual_faces(), moab::DualTool::construct_dual_vertices(), moab::SpectralMeshTool::convert_to_coarse(), moab::ParallelComm::create_interface_sets(), moab::Skinner::create_side(), moab::Core::delete_entities(), moab::SequenceManager::delete_entities(), moab::SequenceManager::delete_entity(), moab::ReadHDF5::delete_non_side_elements(), moab::MeshSet::DIM_FROM_HANDLE(), moab::Core::dimension_from_handle(), ent_not_found(), moab::AEntityFactory::entities_equivalent(), moab::ParallelComm::estimate_ents_buffer_size(), moab::WriteHDF5Parallel::exchange_file_ids(), moab::Skinner::face_reversed(), moab::SequenceManager::find(), moab::VarLenDenseTag::find_entities_with_value(), moab::DenseTag::find_entities_with_value(), moab::RangeSeqIntersectIter::find_invalid_range(), moab::Skinner::find_skin_vertices(), moab::Skinner::find_skin_vertices_2D(), moab::Skinner::find_skin_vertices_3D(), moab::WriteSLAC::gather_interior_exterior(), moab::WriteNCDF::gather_mesh_information(), moab::WriteSLAC::gather_mesh_information(), moab::WriteTemplate::gather_mesh_information(), moab::WriteUtil::gather_nodes_from_elements(), moab::Core::get_adjacencies(), moab::AEntityFactory::get_adjacencies(), moab::WriteUtil::get_adjacencies(), get_adjacencies_intersection(), get_adjacencies_union(), moab::MeshTopoUtil::get_bridge_adjacencies(), moab::Core::get_connectivity(), moab::Core::get_coords(), moab::BitTag::get_data(), moab::AEntityFactory::get_down_adjacency_elements(), moab::AEntityFactory::get_down_adjacency_elements_poly(), moab::AEntityFactory::get_element(), moab::WriteUtil::get_element_connect(), moab::AEntityFactory::get_elements(), moab::MeshSet::get_entities_by_type(), moab::BitTag::get_entities_with_bits(), moab::WriteUtil::get_entity_list_pointers(), moab::ParallelComm::get_local_handles(), moab::SequenceManager::get_memory_use(), moab::TypeSequenceManager::get_memory_use(), get_mesh_set(), moab::WriteCCMIO::get_neuset_elems(), moab::WriteSLAC::get_neuset_elems(), moab::WriteTemplate::get_neuset_elems(), moab::VectorSetIterator::get_next_arr(), moab::RangeSetIterator::get_next_by_dimension(), moab::RangeSetIterator::get_next_by_type(), moab::MeshSet::get_non_set_entities(), moab::ReadUtil::get_ordered_vertices(), moab::ScdElementData::get_params(), moab::SweptElementData::get_params(), moab::ScdVertexData::get_params(), moab::SweptVertexData::get_params(), moab::ScdElementData::get_params_connectivity(), moab::SweptElementData::get_params_connectivity(), moab::MeshSetSequence::get_parent_child_meshsets(), moab::WriteNCDF::get_sideset_elems(), get_tagged(), moab::BitTag::get_tagged(), moab::AEntityFactory::get_up_adjacency_elements(), moab::WriteSLAC::get_valid_sides(), moab::WriteTemplate::get_valid_sides(), moab::WriteNCDF::get_valid_sides(), moab::AEntityFactory::get_vertices(), moab::Core::high_order_node(), moab::Skinner::initialize(), moab::AdaptiveKDTree::intersect_children_with_elems(), moab::DualTool::is_blind(), moab::TypeSequenceManager::is_free_handle(), moab::TypeSequenceManager::last_free_handle(), moab::RayIntersectSets::leaf(), moab::Core::list_entities(), moab::DualTool::list_entities(), moab::Core::list_entity(), moab::DebugOutput::list_range_real(), moab::AEntityFactory::merge_adjust_adjacencies(), moab::Core::merge_entities(), moab::SequenceManager::new_sequence_size(), not_found(), not_root_set(), moab::AEntityFactory::notify_change_connectivity(), moab::AEntityFactory::notify_create_entity(), moab::AEntityFactory::notify_delete_entity(), moab::MeshSet::num_entities_by_type(), moab::Range::num_of_dimension(), moab::Range::num_of_type(), moab::MeshSet::not_type_test::operator()(), moab::MeshSet::type_test::operator()(), moab::DualTool::order_chord(), moab::ParallelComm::pack_entities(), moab::ParallelComm::pack_entity_seq(), moab::ParallelComm::pack_sets(), ZoltanPartitioner::partition_owned_cells(), moab::MergeMesh::perform_merge(), moab::ParallelComm::print_buffer(), moab::Core::print_database(), moab::WriteHDF5::print_id_map(), moab::VerdictWrapper::quality_measure(), moab::OrientedBoxTreeTool::ray_intersect_triangles(), moab::AEntityFactory::remove_adjacency(), moab::AEntityFactory::remove_all_adjacencies(), moab::BitTag::remove_data(), moab::SequenceManager::replace_subsequence(), moab::GeomTopoTool::restore_topology_from_adjacency(), moab::Core::set_connectivity(), moab::Core::set_coords(), moab::BitTag::set_data(), moab::Core::side_element(), moab::Core::side_number(), moab::OrientedBoxTreeTool::sphere_intersect_triangles(), moab::MeshTopoUtil::split_entities_manifold(), moab::Range::str_rep(), moab::EntitySequence::type(), moab::Core::type_from_handle(), moab::BitTag::unpack(), moab::RangeSeqIntersectIter::update_entity_sequence(), moab::ParallelComm::update_remote_data(), moab::ParallelComm::update_remote_data_old(), moab::WriteCCMIO::write_cells_and_faces(), moab::WriteVtk::write_elems(), and moab::WriteVtk::write_tag().
|
inlinestatic |
Definition at line 524 of file TagCompare.hpp.
525 {
526 if( type == MBMAXTYPE )
527 return std::pair< EntityType, EntityType >( MBVERTEX, MBMAXTYPE );
528 else
529 {
530 EntityType next = type;
531 ++next;
532 return std::pair< EntityType, EntityType >( type, next );
533 }
534 }
References MBMAXTYPE, and MBVERTEX.
Referenced by moab::VarLenDenseTag::find_entities_with_value(), moab::DenseTag::find_entities_with_value(), moab::BitTag::get_entities_with_bits(), get_tagged(), moab::BitTag::get_tagged(), and moab::DenseTag::get_tagged_entities().
Get unit vector in same direction.
Definition at line 266 of file CartVect.hpp.
267 {
268 const double len = v.length();
269 return CartVect( v[0] / len, v[1] / len, v[2] / len );
270 }
References moab::CartVect::length().
Referenced by mem_to_string().
unite two ranges, placing the results in the return range
Definition at line 773 of file Range.hpp.
774 {
775 Range r( r1 );
776 r.insert( r2.begin(), r2.end() );
777 return r;
778 }
References moab::Range::begin(), moab::Range::end(), and moab::Range::insert().
Referenced by ZoltanPartitioner::repartition(), and moab::FBEngine::separate().
|
inlinestatic |
Definition at line 91 of file ParallelComm.cpp.
92 {
93 memcpy( val, buff, count * sizeof( T ) );
94 buff += count * sizeof( T );
95 }
Referenced by UNPACK_DBLS(), UNPACK_EH(), UNPACK_INTS(), and UNPACK_VOID().
|
inlinestatic |
Definition at line 180 of file ParallelComm.cpp.
181 { 182 UNPACK_DBLS( buff, &dbl_val, 1 ); 183 }
References UNPACK_DBLS().
Referenced by moab::ParallelComm::print_buffer().
|
inlinestatic |
Definition at line 174 of file ParallelComm.cpp.
175 {
176 UNPACK( buff, dbl_val, num );
177 UPC( num, " doubles" );
178 }
Referenced by moab::ParallelComm::print_buffer(), moab::ParallelComm::settle_intersection_points(), UNPACK_DBL(), and moab::ParallelComm::unpack_entities().
|
inlinestatic |
Definition at line 185 of file ParallelComm.cpp.
186 {
187 UNPACK( buff, eh_val, num );
188 UPC( num, " handles" );
189 }
Referenced by moab::ParallelComm::print_buffer(), moab::ParallelComm::send_recv_entities(), moab::ParallelComm::settle_intersection_points(), moab::ParallelComm::unpack_entities(), UNPACK_RANGE(), moab::ParallelComm::unpack_remote_handles(), moab::ParallelComm::unpack_sets(), and moab::ParallelComm::unpack_tags().
|
inlinestatic |
Definition at line 169 of file ParallelComm.cpp.
170 { 171 UNPACK_INTS( buff, &int_val, 1 ); 172 }
References UNPACK_INTS().
Referenced by moab::ParallelComm::print_buffer(), moab::ParallelComm::settle_intersection_points(), moab::ParallelComm::unpack_entities(), UNPACK_RANGE(), moab::ParallelComm::unpack_remote_handles(), moab::ParallelComm::unpack_sets(), moab::ParallelComm::unpack_tags(), and UNPACK_TYPE().
|
inlinestatic |
Definition at line 163 of file ParallelComm.cpp.
164 {
165 UNPACK( buff, int_val, num );
166 UPC( num, " ints" );
167 }
Referenced by moab::ParallelComm::print_buffer(), moab::ParallelComm::send_recv_entities(), moab::ParallelComm::unpack_entities(), UNPACK_INT(), moab::ParallelComm::unpack_sets(), and moab::ParallelComm::unpack_tags().
|
inlinestatic |
Definition at line 213 of file ParallelComm.cpp.
214 {
215 int num_subs;
216 EntityHandle eh[2];
217 UNPACK_INT( buff, num_subs );
218 for( int i = 0; i < num_subs; i++ )
219 {
220 UPC( num_subs, "-subranged range" );
221 UNPACK_EH( buff, eh, 2 );
222 rng.insert( eh[0], eh[1] );
223 }
224 }
References moab::Range::insert(), UNPACK_EH(), UNPACK_INT(), and UPC.
Referenced by moab::ParallelComm::unpack_sets().
void unpack_tuples | ( | void * | ptr, |
TupleList ** | tlp | ||
) |
Definition at line 1887 of file Coupler.cpp.
1888 {
1889 TupleList* tl = new TupleList();
1890 *tlp = tl;
1891
1892 uint nt;
1893 unsigned mit, mlt, mult, mrt;
1894 uint* buf = (uint*)ptr;
1895
1896 // Get n
1897 memcpy( &nt, buf, sizeof( uint ) ), buf += 1;
1898 // Get mi
1899 memcpy( &mit, buf, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
1900 // Get ml
1901 memcpy( &mlt, buf, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
1902 // Get mul
1903 memcpy( &mult, buf, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
1904 // Get mr
1905 memcpy( &mrt, buf, sizeof( unsigned ) ), buf += UINT_PER_UNSIGNED;
1906
1907 // Initialize tl
1908 tl->initialize( mit, mlt, mult, mrt, nt );
1909 tl->enableWriteAccess();
1910 tl->set_n( nt );
1911
1912 uint mi, ml, mul, mr;
1913 tl->getTupleSize( mi, ml, mul, mr );
1914
1915 // Get vi_rd
1916 memcpy( tl->vi_wr, buf, tl->get_n() * mi * sizeof( sint ) ), buf += tl->get_n() * mi;
1917 // Get vl_rd
1918 memcpy( tl->vl_wr, buf, tl->get_n() * ml * sizeof( slong ) ), buf += tl->get_n() * ml * UINT_PER_LONG;
1919 // Get vul_rd
1920 memcpy( tl->vul_wr, buf, tl->get_n() * mul * sizeof( ulong ) ), buf += tl->get_n() * mul * UINT_PER_LONG;
1921 // Get vr_rd
1922 memcpy( tl->vr_wr, buf, tl->get_n() * mr * sizeof( realType ) ), buf += tl->get_n() * mr * UINT_PER_REAL;
1923
1924 tl->disableWriteAccess();
1925 return;
1926 }
References moab::TupleList::disableWriteAccess(), moab::TupleList::enableWriteAccess(), moab::TupleList::get_n(), moab::TupleList::getTupleSize(), moab::TupleList::initialize(), moab::TupleList::set_n(), UINT_PER_LONG, UINT_PER_REAL, UINT_PER_UNSIGNED, moab::TupleList::vi_wr, moab::TupleList::vl_wr, moab::TupleList::vr_wr, and moab::TupleList::vul_wr.
Referenced by moab::Coupler::get_matching_entities(), and main().
|
inlinestatic |
Definition at line 205 of file ParallelComm.cpp.
206 {
207 int int_type = MBMAXTYPE;
208 UNPACK_INT( buff, int_type );
209 type = static_cast< EntityType >( int_type );
210 assert( type >= MBVERTEX && type <= MBMAXTYPE );
211 }
References MBMAXTYPE, MBVERTEX, and UNPACK_INT().
Referenced by moab::ParallelComm::print_buffer(), and moab::ParallelComm::unpack_entities().
|
inlinestatic |
Definition at line 199 of file ParallelComm.cpp.
200 {
201 UNPACK( buff, reinterpret_cast< unsigned char* >( val ), num );
202 UPC( num, " void" );
203 }
Referenced by moab::ParallelComm::unpack_sets().
|
inline |
Definition at line 163 of file WriteHDF5Parallel.cpp.
164 {
165 /* Nothing to do */
166 }
Referenced by moab::WriteHDF5Parallel::negotiate_type_list().
|
static |
Insert unsorted array of handles into vector-based MeshSet
Definition at line 1036 of file MeshSet.cpp.
1042 {
1043 const size_t orig_size = count < MeshSet::MANY ? (int)count : clist.ptr[1] - clist.ptr[0];
1044 EntityHandle* list = resize_compact_list( count, clist, orig_size + vect_size );
1045 if( adj )
1046 for( size_t i = 0; i < vect_size; ++i )
1047 adj->add_adjacency( vect[i], my_handle, false );
1048 memcpy( list + orig_size, vect, sizeof( EntityHandle ) * vect_size );
1049 return MB_SUCCESS;
1050 }
References moab::AEntityFactory::add_adjacency(), moab::MeshSet::MANY, MB_SUCCESS, moab::MeshSet::CompactList::ptr, and resize_compact_list().
Referenced by moab::MeshSet::insert_entity_vector().
|
static |
Remove Range of handles fromr vector-based MeshSet
Definition at line 913 of file MeshSet.cpp.
918 {
919 EntityHandle* list;
920 size_t list_size;
921 if( count < MeshSet::MANY )
922 {
923 list = clist.hnd;
924 list_size = count;
925 }
926 else
927 {
928 list = clist.ptr[0];
929 list_size = clist.ptr[1] - clist.ptr[0];
930 }
931
932 const EntityHandle* const list_end = list + list_size;
933 EntityHandle* list_write = list;
934 for( const EntityHandle* list_read = list; list_read != list_end; ++list_read )
935 {
936 if( range.find( *list_read ) == range.end() )
937 { // keep
938 *list_write = *list_read;
939 ++list_write;
940 }
941 else if( adj )
942 {
943 adj->remove_adjacency( *list_read, my_handle );
944 }
945 }
946
947 resize_compact_list( count, clist, list_write - list );
948 return MB_SUCCESS;
949 }
References moab::Range::end(), moab::Range::find(), moab::MeshSet::CompactList::hnd, moab::MeshSet::MANY, MB_SUCCESS, moab::MeshSet::CompactList::ptr, moab::AEntityFactory::remove_adjacency(), and resize_compact_list().
Referenced by moab::MeshSet::remove_entity_ranges().
|
static |
Remove range-based MeshSet contents from vector-based MeshSet
Definition at line 951 of file MeshSet.cpp.
957 {
958 EntityHandle* list;
959 size_t list_size;
960 if( count < MeshSet::MANY )
961 {
962 list = clist.hnd;
963 list_size = count;
964 }
965 else
966 {
967 list = clist.ptr[0];
968 list_size = clist.ptr[1] - clist.ptr[0];
969 }
970
971 const EntityHandle *const list_end = list + list_size, *const input_end = pair_list + 2 * num_pairs;
972 EntityHandle* list_write = list;
973 for( const EntityHandle* list_read = list; list_read != list_end; ++list_read )
974 {
975 const EntityHandle* ptr = std::lower_bound( pair_list, input_end, *list_read );
976 if( ( ptr != input_end && ( *ptr == *list_read || ( ptr - pair_list ) % 2 ) ) && // if in delete list
977 std::find( list_read + 1, list_end, *list_read ) == list_end )
978 { // and is last occurance in list
979 // only remove adj if no previous occurance
980 if( adj && std::find( list, list_write, *list_read ) == list_write )
981 adj->remove_adjacency( *list_read, my_handle );
982 }
983 else
984 {
985 *list_write = *list_read;
986 ++list_write;
987 }
988 }
989
990 resize_compact_list( count, clist, list_write - list );
991 return MB_SUCCESS;
992 }
References moab::MeshSet::CompactList::hnd, moab::MeshSet::MANY, MB_SUCCESS, moab::MeshSet::CompactList::ptr, moab::AEntityFactory::remove_adjacency(), and resize_compact_list().
Referenced by moab::MeshSet::remove_entity_ranges().
|
static |
Remove unsorted array of handles from vector-based MeshSet
Definition at line 994 of file MeshSet.cpp.
1000 {
1001 EntityHandle* list;
1002 size_t list_size;
1003 if( count < MeshSet::MANY )
1004 {
1005 list = clist.hnd;
1006 list_size = count;
1007 }
1008 else
1009 {
1010 list = clist.ptr[0];
1011 list_size = clist.ptr[1] - clist.ptr[0];
1012 }
1013
1014 const EntityHandle *const list_end = list + list_size, *const input_end = vect + vect_size;
1015 EntityHandle* list_write = list;
1016 for( const EntityHandle* list_read = list; list_read != list_end; ++list_read )
1017 {
1018 if( std::find( vect, input_end, *list_read ) != input_end && // if in delete list
1019 std::find( list_read + 1, list_end, *list_read ) == list_end )
1020 { // and is last occurance in list
1021 // only remove adj if no previous occurance?
1022 if( adj ) // && std::find(list, list_write, *list_read) == list_write)
1023 adj->remove_adjacency( *list_read, my_handle );
1024 }
1025 else
1026 {
1027 *list_write = *list_read;
1028 ++list_write;
1029 }
1030 }
1031
1032 resize_compact_list( count, clist, list_write - list );
1033 return MB_SUCCESS;
1034 }
References moab::MeshSet::CompactList::hnd, moab::MeshSet::MANY, MB_SUCCESS, moab::MeshSet::CompactList::ptr, moab::AEntityFactory::remove_adjacency(), and resize_compact_list().
Referenced by moab::MeshSet::remove_entity_vector().
|
static |
Definition at line 1584 of file IntxUtils.cpp.
1585 {
1586 // to check, the point has to be between a and b on a great arc, and between c and d on a const
1587 // lat circle
1588 CartVect s( x, y, z );
1589 CartVect n1 = a * b;
1590 CartVect n2 = a * s;
1591 CartVect n3 = s * b;
1592 if( n1 % n2 < 0 || n1 % n3 < 0 ) return false;
1593
1594 // do the same for c, d, s, in plane z=0
1595 c[2] = d[2] = s[2] = 0.; // bring everything in the same plane, z=0;
1596
1597 n1 = c * d;
1598 n2 = c * s;
1599 n3 = s * d;
1600 if( n1 % n2 < 0 || n1 % n3 < 0 ) return false;
1601
1602 return true;
1603 }
Referenced by moab::IntxUtils::intersect_great_circle_arc_with_clat_arc().
Definition at line 18 of file SmoothFace.cpp.
19 {
20 if( ( fabs( p1[0] - p2[0] ) < tolerance ) && ( fabs( p1[1] - p2[1] ) < tolerance ) &&
21 ( fabs( p1[2] - p2[2] ) < tolerance ) )
22 return true;
23 return false;
24 }
References tolerance.
Referenced by moab::SmoothFace::facet_area_coordinate().
unsigned int moab::__PACK_count = 0 |
Definition at line 55 of file ParallelComm.cpp.
unsigned int moab::__PACK_num = 0 |
Definition at line 55 of file ParallelComm.cpp.
std::string moab::__PACK_string |
Definition at line 56 of file ParallelComm.cpp.
unsigned int moab::__UNPACK_count = 0 |
Definition at line 55 of file ParallelComm.cpp.
unsigned int moab::__UNPACK_num = 0 |
Definition at line 55 of file ParallelComm.cpp.
std::string moab::__UNPACK_string |
Definition at line 56 of file ParallelComm.cpp.
const char* const moab::AFFINE_XFORM_TAG_NAME = "AFFINE_TRANSFORM" |
Definition at line 36 of file AffineXform.cpp.
Referenced by moab::AffineXform::get_tag().
const char* const moab::AXIS_BOX_TAG_NAME = "AXIS_BOX" |
Definition at line 29 of file AxisBox.cpp.
Referenced by moab::AxisBox::get_tag().
const char* const moab::BLOCK_NODESET_OFFSET_TAG_NAME = "BLOCK_NODESET_OFFSET" |
Definition at line 103 of file Tqdcfr.cpp.
Referenced by moab::Tqdcfr::convert_nodesets_sidesets().
const char* const moab::BLOCK_SIDESET_OFFSET_TAG_NAME = "BLOCK_SIDESET_OFFSET" |
Definition at line 104 of file Tqdcfr.cpp.
Referenced by moab::Tqdcfr::convert_nodesets_sidesets().
|
static |
= { { 0, 1, 5, 4 }, { 1, 2, 6, 5 }, { 2, 3, 7, 6 }, { 3, 0, 4, 7 }, { 3, 2, 1, 0 }, { 4, 5, 6, 7 } }
Definition at line 1248 of file BSPTree.cpp.
Referenced by moab::BoxPlaneIter::BoxPlaneIter().
const int* const* const* const moab::cub_elem_order_map = exodus_elem_order_map |
Definition at line 101 of file Tqdcfr.cpp.
Referenced by moab::Tqdcfr::read_elements().
bool moab::debug = false |
Definition at line 45 of file DualTool.cpp.
Referenced by moab::ReadMCNP5::average_with_existing_tally(), moab::DualTool::construct_dual(), moab::DualTool::construct_dual_hyperplanes(), moab::ReadMCNP5::create_elements(), moab::ReadMCNP5::create_vertices(), DeformMeshRemap::execute(), moab::Skinner::find_geometric_skin(), get_file_options(), moab::Coupler::get_matching_entities(), moab::ReadMCNP5::get_mesh_plane(), moab::ReadMCNP5::get_tally_particle(), moab::ReadParallel::load_file(), moab::ReadNASTRAN::load_file(), moab::Tqdcfr::load_file(), moab::ReadMCNP5::load_one_file(), moab::SpatialLocator::locate_points(), main(), moab::Tqdcfr::ModelEntry::print_block_headers(), moab::Tqdcfr::ModelEntry::print_geom_headers(), moab::Tqdcfr::ModelEntry::print_group_headers(), moab::Tqdcfr::ModelEntry::print_nodeset_headers(), moab::Tqdcfr::ModelEntry::print_sideset_headers(), moab::Tqdcfr::read_elements(), moab::Tqdcfr::read_file_header(), moab::ReadMCNP5::read_file_header(), moab::ReadMCNP5::read_mesh_planes(), moab::Tqdcfr::read_meta_data(), moab::Tqdcfr::ModelEntry::read_metadata_info(), moab::Tqdcfr::read_model_entries(), moab::ReadNASTRAN::read_node(), moab::Tqdcfr::read_nodes(), moab::Tqdcfr::read_nodeset(), moab::Tqdcfr::read_sideset(), moab::ReadMCNP5::read_tally_header(), moab::ReadParallel::ReadParallel(), and moab::DualTool::traverse_hyperplane().
bool moab::debug_ap = false |
Definition at line 46 of file DualTool.cpp.
Referenced by moab::DualTool::atomic_pillow(), moab::DualTool::face_open_collapse(), moab::DualTool::face_shrink(), moab::DualTool::rev_atomic_pillow(), moab::DualTool::rev_face_shrink(), and moab::DualTool::traverse_hyperplane().
bool moab::debug_splits = false |
Definition at line 46 of file FBEngine.cpp.
Referenced by area_coordinates(), moab::FBEngine::BreakTriangle2(), moab::FBEngine::compute_intersection_points(), moab::FBEngine::create_new_gedge(), moab::FBEngine::divide_triangle(), intersect_segment_and_plane_slice(), moab::FBEngine::separate(), moab::FBEngine::split_bedge_at_new_mesh_node(), moab::FBEngine::split_boundary(), moab::FBEngine::split_edge_at_mesh_node(), moab::FBEngine::split_edge_at_point(), moab::FBEngine::split_internal_edge(), moab::FBEngine::split_surface(), and moab::FBEngine::split_surface_with_direction().
const bool moab::Debug_surf_eval = false |
Definition at line 45 of file FBEngine.cpp.
Referenced by moab::FBEngine::initializeSmoothing().
bool moab::debug_surf_eval1 = false |
Definition at line 39 of file SmoothFace.cpp.
Referenced by moab::SmoothFace::init_bezier_edge(), and moab::SmoothFace::init_gradient().
const bool moab::DEFAULT_BCAST_DUPLICATE_READS = true |
Definition at line 81 of file ReadHDF5.cpp.
Referenced by moab::ReadHDF5::set_up_read().
const bool moab::DEFAULT_BCAST_SUMMARY = true |
Definition at line 75 of file ReadHDF5.cpp.
Referenced by moab::ReadHDF5::set_up_read().
const bool moab::DEFAULT_BLOCKED_COORDINATE_IO = false |
Definition at line 68 of file ReadHDF5.cpp.
Referenced by moab::ReadHDF5::set_up_read().
const size_t moab::DEFAULT_HYPERSLAB_SELECTION_LIMIT = 200 |
Definition at line 31 of file ReadHDF5Dataset.cpp.
Referenced by moab::ReadHDF5Dataset::default_hyperslab_selection_limit().
const int moab::DEFAULT_MAX_EDGES_PER_CELL = 10 |
Definition at line 21 of file NCHelperESMF.cpp.
Referenced by moab::NCHelperMPAS::create_gather_set_cells(), moab::NCHelperESMF::create_local_cells(), moab::NCHelperMPAS::create_local_cells(), moab::NCHelperESMF::init_mesh_vals(), and moab::NCHelperMPAS::init_mesh_vals().
const int moab::DEFAULT_PRECISION = 10 |
Definition at line 18 of file WriteGmsh.cpp.
Referenced by moab::WriteGmsh::write_file(), moab::WriteSmf::write_file(), moab::WriteSTL::write_file(), and moab::WriteVtk::write_file().
const char moab::DEFAULT_SEPARATOR = ';' |
Definition at line 31 of file FileOptions.cpp.
Referenced by moab::FileOptions::FileOptions().
const bool moab::DEFAULT_STRICT = true |
Definition at line 49 of file WriteVtk.cpp.
Referenced by moab::WriteVtk::write_file().
const char moab::DEFAULT_TAG_NAME[] = "OBB" |
Definition at line 45 of file OrientedBoxTreeTool.cpp.
Referenced by main(), and moab::OrientedBoxTreeTool::OrientedBoxTreeTool().
int moab::dum[] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 } |
Definition at line 30 of file HomXform.cpp.
Referenced by moab::DualTool::check_1d_loop_edge(), moab::IntxUtils::deep_copy_set_with_quads(), moab::MeshTopoUtil::equivalent_entities(), moab::EvalSet::evaluate_reverse(), moab::LinearTet::evaluate_reverse(), moab::ScdInterface::find_boxes(), moab::DualTool::fs_check_quad_sense(), moab::WriteSLAC::gather_interior_exterior(), moab::AEntityFactory::get_associated_meshsets(), moab::DualTool::get_dual_entities(), moab::AEntityFactory::get_element(), moab::AEntityFactory::get_up_adjacency_elements(), moab::Core::high_order_node(), moab::Core::list_entity(), main(), moab::ReadNC::parse_options(), moab::ParallelComm::resolve_shared_sets(), moab::SpectralMeshTool::spectral_order_tag(), moab::HigherOrderFactory::tag_for_deletion(), moab::ScdInterface::tag_shared_vertices(), test_hex_nat_coords(), and moab::Intx2MeshOnSphere::update_tracer_data().
const unsigned char moab::E = CN::MID_EDGE_BIT |
Definition at line 952 of file MBCNArrays.hpp.
Referenced by moab::IntxAreaUtils::area_spherical_triangle_lHuiller(), moab::MeshGeneration::BrickInstance(), moab::IntxUtils::EdgeIntxRllCs(), moab::IntxUtils::intersect_great_circle_arc_with_clat_arc(), and moab::IntxUtils::intersect_great_circle_arcs().
const int moab::EDGES_PER_CELL = 6 |
Definition at line 17 of file NCHelperGCRM.cpp.
Referenced by moab::NCHelperGCRM::create_local_edges(), moab::NCHelperGCRM::create_mesh(), moab::NCHelperGCRM::create_padded_gather_set_cells(), and moab::NCHelperGCRM::create_padded_local_cells().
|
static |
Definition at line 27 of file ErrorHandler.cpp.
Referenced by MBErrorHandler_Finalize(), MBErrorHandler_Init(), MBErrorHandler_Initialized(), and MBTraceBackErrorHandler().
const unsigned char moab::F = CN::MID_FACE_BIT |
Definition at line 953 of file MBCNArrays.hpp.
Referenced by moab::MeshGeneration::BrickInstance().
const char* moab::face_start_token = "f" |
Definition at line 51 of file ReadOBJ.cpp.
const char moab::geom_category[][CATEGORY_TAG_SIZE] = { "Vertex\0", "Curve\0", "Surface\0", "Volume\0", "Group\0" } |
Definition at line 60 of file ReadOBJ.cpp.
Referenced by moab::ReadOBJ::create_new_object().
const char* const moab::geom_name[] = { "Vertex\0", "Curve\0", "Surface\0", "Volume\0" } |
Definition at line 57 of file ReadOBJ.cpp.
Referenced by moab::ReadOBJ::create_new_object().
const char moab::GEOM_SENSE_2_TAG_NAME[] = "GEOM_SENSE_2" |
Definition at line 37 of file GeomTopoTool.cpp.
Referenced by moab::GeomTopoTool::check_face_sense_tag().
const char moab::GEOM_SENSE_N_ENTS_TAG_NAME[] = "GEOM_SENSE_N_ENTS" |
Definition at line 39 of file GeomTopoTool.cpp.
Referenced by moab::GeomTopoTool::check_edge_sense_tags().
const char moab::GEOM_SENSE_N_SENSES_TAG_NAME[] = "GEOM_SENSE_N_SENSES" |
Definition at line 40 of file GeomTopoTool.cpp.
Referenced by moab::GeomTopoTool::check_edge_sense_tags().
const char* moab::group_start_token = "g" |
Definition at line 49 of file ReadOBJ.cpp.
const int moab::hex_27_node_order[] |
= { 0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 9, 13, 10, 14, 15, 16, 19, 17, 18, 24, 20, 23, 21, 22, 25, 26 }
Definition at line 23 of file GmshUtil.cpp.
|
static |
Definition at line 84 of file Interface.hpp.
Referenced by moab::ComponentFactory::QueryInterface(), and moab::Core::QueryInterface().
|
static |
= MBuuid( 0xf4f6605e, 0x2a7e, 0x4760, 0xbb, 0x06, 0xb9, 0xed, 0x27, 0xe9, 0x4a, 0xec )
uuid for an unknown interface this can be used to either return a default interface or a NULL interface
Definition at line 92 of file UnknownInterface.hpp.
Referenced by moab::ComponentFactory::QueryInterface(), and moab::Core::QueryInterface().
const char moab::IMPLICIT_COMPLEMENT_NAME[] = "impl_complement" |
Definition at line 44 of file GeomTopoTool.cpp.
Referenced by moab::GeomTopoTool::setup_implicit_complement().
|
static |
Definition at line 78 of file ReadCCMIO.cpp.
|
static |
Definition at line 75 of file ReadCCMIO.cpp.
|
static |
Definition at line 74 of file ReadCCMIO.cpp.
|
static |
Definition at line 81 of file WriteCCMIO.cpp.
Referenced by moab::WriteCCMIO::create_ccmio_structure().
|
static |
Definition at line 76 of file ReadCCMIO.cpp.
|
static |
Definition at line 77 of file ReadCCMIO.cpp.
|
static |
Definition at line 28 of file ErrorHandler.cpp.
Referenced by MBError(), MBErrorHandler_GetLastError(), and MBTraceBackErrorHandler().
|
static |
Definition at line 49 of file Tqdcfr.cpp.
Referenced by moab::ReadVtk::load_file(), moab::Tqdcfr::load_file(), moab::Tqdcfr::parse_acis_attribs(), moab::Tqdcfr::read_block(), moab::Tqdcfr::read_elements(), moab::Tqdcfr::BlockHeader::read_info_header(), and moab::Tqdcfr::GeomHeader::read_info_header().
const int moab::MAX_BCAST_SIZE = ( 1 << 28 ) |
Definition at line 52 of file ParallelComm.cpp.
Referenced by moab::ParallelComm::broadcast_entities().
const int moab::MAX_NODES = 28 |
Definition at line 85 of file GmshUtil.cpp.
Referenced by moab::GmshUtil::get_gmsh_type().
const int moab::MAXSIZE = 200 |
Definition at line 51 of file HalfFacetRep.hpp.
Referenced by moab::HalfFacetRep::collect_and_compare(), moab::HalfFacetRep::init_surface(), and moab::HalfFacetRep::init_volume().
const int moab::mb_to_gmsh_type[][MAX_NODES] |
= { TWENTYEIGHT_ZEROS, { 0, 0, 1, 8, 26, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 2, 0, 0, 9, 0, 0, 20, 21, 0, 22, 0, 0, 23, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 3, 0, 0, 0, 16, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, TWENTYEIGHT_ZEROS, { 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 19, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, TWENTYEIGHT_ZEROS, { 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 12 }, TWENTYEIGHT_ZEROS, TWENTYEIGHT_ZEROS, TWENTYEIGHT_ZEROS }
Definition at line 86 of file GmshUtil.cpp.
Referenced by moab::GmshUtil::get_gmsh_type().
const int moab::mb_to_vtk_type[][3] |
= { { 1, 0, 0 }, { 3, 21, 0 }, { 5, 22, 0 }, { 9, 23, 28 }, { 7, 0, 0 }, { 10, 24, 0 }, { 14, 27, 0 }, { 13, 26, 0 }, { 0, 0, 0 }, { 12, 25, 29 }, { 42, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 } }
Definition at line 111 of file VtkUtil.cpp.
Referenced by moab::VtkUtil::get_vtk_type().
|
static |
Definition at line 49 of file Tqdcfr.cpp.
Referenced by moab::ReadVtk::load_file(), moab::Tqdcfr::load_file(), moab::Tqdcfr::read_block(), and moab::Tqdcfr::BlockHeader::read_info_header().
std::vector< ParallelComm::Buffer* > moab::msgs |
Definition at line 54 of file ParallelComm.cpp.
Referenced by moab::ParallelComm::exchange_ghost_cells(), moab::ParallelComm::exchange_owned_mesh(), moab::ParallelComm::recv_entities(), moab::ParallelComm::send_entities(), and moab::ParallelComm::send_recv_entities().
|
static |
Definition at line 90 of file VerdictWrapper.cpp.
Referenced by moab::VerdictWrapper::quality_name().
|
static |
= {
"MBVERTEX",
"MBEDGE",
"MBTRI",
"MBQUAD",
"MBPOLYGON",
"MBTET",
"MBPYRAMID",
"MBPRISM",
"MBKNIFE",
"MBHEX",
"MBPOLYHEDRON",
"MBENTITYSET",
}
Definition at line 125 of file VerdictWrapper.cpp.
Referenced by moab::VerdictWrapper::entity_type_name().
|
static |
= { 0, 1, 13, 22, 0, 14, 0, 1, 1, 20, 0, 0, }
Definition at line 76 of file VerdictWrapper.cpp.
Referenced by moab::VerdictWrapper::num_qualities().
const char moab::OBB_GSET_TAG_NAME[] = "OBB_GSET" |
Definition at line 42 of file GeomTopoTool.cpp.
Referenced by moab::GeomTopoTool::GeomTopoTool().
const char moab::OBB_ROOT_TAG_NAME[] = "OBB_ROOT" |
Definition at line 41 of file GeomTopoTool.cpp.
Referenced by moab::GeomTopoTool::GeomTopoTool().
const char* moab::object_start_token = "o" |
Definition at line 48 of file ReadOBJ.cpp.
const char* moab::PARTITIONING_PCOMM_TAG_NAME = "__PRTN_PCOMM" |
Name of tag used to store ParallelComm Index on mesh paritioning sets
Definition at line 296 of file ParallelComm.cpp.
Referenced by moab::ParallelComm::get_pcomm(), and moab::ParallelComm::set_partitioning().
const double moab::pideg = acos( -1.0 ) / 180.0 |
Definition at line 22 of file NCHelperESMF.cpp.
Referenced by moab::NCHelperESMF::create_local_vertices(), moab::NCHelperDomain::create_mesh(), moab::NCHelperHOMME::create_mesh(), and moab::NCHelperScrip::create_mesh().
const unsigned moab::pixel[] = { 0, 1, 3, 2 } |
Definition at line 44 of file VtkUtil.cpp.
|
static |
= { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1 }, { 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
Definition at line 25 of file VerdictWrapper.cpp.
Referenced by moab::VerdictWrapper::possible_quality(), and moab::VerdictWrapper::quality_measure().
const int moab::pri_15_node_order[] |
= { 0, 1, 2, 3, 4, 5, 6, 8, 9, 7, 10, 11, 12, 14, 13 }
Definition at line 32 of file GmshUtil.cpp.
const int moab::pyr_13_node_order[] |
= { 0, 1, 2, 3, 4, 5, 8, 9, 6, 10, 7, 11, 12 }
Definition at line 36 of file GmshUtil.cpp.
const unsigned moab::qhex[] |
= { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 16, 17, 18, 19, 12, 13, 14, 15, 23, 21, 20, 22, 24, 25, 26 }
Definition at line 52 of file VtkUtil.cpp.
const unsigned char moab::R = CN::MID_REGION_BIT |
Definition at line 954 of file MBCNArrays.hpp.
Referenced by moab::IntxAreaUtils::area_on_sphere(), moab::IntxAreaUtils::area_spherical_element(), moab::DGMSolver::backsolve(), moab::DGMSolver::backsolve_polyfit_safeguarded(), moab::IntxUtils::EdgeIntxRllCs(), moab::IntxUtils::global_gnomonic_projection(), moab::IntxUtils::gnomonic_projection(), moab::IntxUtils::gnomonic_unroll(), moab::IntxUtils::intersect_great_circle_arc_with_clat_arc(), moab::IntxUtils::intersect_great_circle_arcs(), main(), moab::IntxAreaUtils::positive_orientation(), moab::IntxUtils::reverse_gnomonic_projection(), moab::IntxUtils::ScaleToRadius(), tensor_c1(), tensor_c2(), tensor_c3(), tensor_r1(), tensor_r2(), tensor_r3(), moab::IntxUtils::transform_coordinates(), and moab::BoundBox::update_box_spherical_elem().
const unsigned moab::SSVB = 3 |
Definition at line 1457 of file WriteHDF5Parallel.cpp.
Referenced by moab::WriteHDF5Parallel::communicate_shared_set_ids(), and moab::WriteHDF5Parallel::print_set_sharing_data().
const int moab::tet_10_node_order[] = { 0, 1, 2, 3, 4, 5, 6, 7, 9, 8 } |
Definition at line 28 of file GmshUtil.cpp.
const int moab::TIME_STR_LEN = 11 |
Definition at line 55 of file WriteNCDF.cpp.
Referenced by moab::WriteNCDF::time_and_date(), and moab::WriteNCDF::write_header().
static double moab::tolerance = 0.01 |
Definition at line 38 of file FBEngine.cpp.
Referenced by moab::GeomUtil::bounding_boxes_overlap(), moab::GeomUtil::bounding_boxes_overlap_2d(), moab::GeomUtil::box_point_overlap(), moab::GeomUtil::box_tri_overlap(), moab::GeomUtil::boxes_overlap(), moab::GeomUtil::closest_location_on_tri(), moab::OrientedBoxTreeTool::closest_to_location(), moab::TempestRemapper::ConstructCoveringSet(), moab::FBEngine::getPntRayIntsct(), moab::Intx2Mesh::intersect_meshes_kdtree(), moab::AxisBox::intersects(), main(), moab::NCHelper::Node3D::operator<(), moab::SmoothFace::project_to_facets_main(), moab::OrientedBoxTreeTool::ray_intersect_boxes(), moab::OrientedBoxTreeTool::ray_intersect_sets(), moab::OrientedBoxTreeTool::ray_intersect_triangles(), moab::ParallelComm::settle_intersection_points(), moab::FBEngine::split_surface_with_direction(), moab::SmoothCurve::u_from_position(), within_tolerance(), and VerdictVector::within_tolerance().
double moab::tolerance_segment = 0.01 |
Definition at line 39 of file FBEngine.cpp.
Referenced by area_coordinates(), moab::FBEngine::compute_intersection_points(), and intersect_segment_and_plane_slice().
const int moab::UNUSED_SIZE = 0 |
Definition at line 29 of file SequenceManager.cpp.
Referenced by moab::SequenceManager::release_tag_array(), and moab::SequenceManager::reserve_tag_array().
const char* moab::vertex_start_token = "v" |
Definition at line 50 of file ReadOBJ.cpp.
const unsigned moab::voxel[] = { 0, 1, 3, 2, 4, 5, 7, 6 } |
Definition at line 45 of file VtkUtil.cpp.
const char* const moab::vtk_type_names[] |
= {
"bit", "char", "unsigned_char", "short", "unsigned_short", "int", "unsigned_int",
"long", "unsigned_long", "float", "double", "vtkIdType", 0 }
Definition at line 175 of file ReadVtk.cpp.
Referenced by moab::ReadVtk::vtk_read_field(), moab::ReadVtk::vtk_read_field_attrib(), moab::ReadVtk::vtk_read_polydata(), moab::ReadVtk::vtk_read_rectilinear_grid(), moab::ReadVtk::vtk_read_scalar_attrib(), moab::ReadVtk::vtk_read_structured_grid(), moab::ReadVtk::vtk_read_tensor_attrib(), moab::ReadVtk::vtk_read_texture_attrib(), moab::ReadVtk::vtk_read_unstructured_grid(), and moab::ReadVtk::vtk_read_vector_attrib().
const unsigned moab::wedge[] |
= { 0, 2, 1, 3, 5, 4, 8, 7, 6, 14, 13, 12, 9, 11, 10, 17, 16, 15 }
Definition at line 46 of file VtkUtil.cpp.