Loading [MathJax]/extensions/tex2jax.js
Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MBTagConventions.hpp
Go to the documentation of this file.
1 /** 2  * MOAB, a Mesh-Oriented datABase, is a software component for creating, 3  * storing and accessing finite element mesh data. 4  * 5  * Copyright 2004 Sandia Corporation. Under the terms of Contract 6  * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government 7  * retains certain rights in this software. 8  * 9  * This library is free software; you can redistribute it and/or 10  * modify it under the terms of the GNU Lesser General Public 11  * License as published by the Free Software Foundation; either 12  * version 2.1 of the License, or (at your option) any later version. 13  * 14  */ 15  16 #ifndef MB_TAG_CONVENTIONS_HPP 17 #define MB_TAG_CONVENTIONS_HPP 18  19 //! Conventional tag names used for some often-used sets 20  21 /* MATERIAL_SET_TAG_NAME tag: 22  * Represents sets of elements having a common material (corresponds to 23  * element blocks in ExodusII) 24  * size = sizeof(int) 25  * type = int 26  * value = integer id for this set (block id from ExodusII) 27  * default value = -1 28  */ 29 #define MATERIAL_SET_TAG_NAME "MATERIAL_SET" 30  31 /* DIRICHLET_SET_TAG_NAME tag: 32  * Represents dirichlet-type boundary condition, usually contains only mesh vertices 33  * (corresponds to nodesets in ExodusII) 34  * size = sizeof(int) 35  * type = int 36  * value = integer id for this set (nodeset id from ExodusII) 37  * default value = -1 38  */ 39 #define DIRICHLET_SET_TAG_NAME "DIRICHLET_SET" 40  41 /* NEUMANN_SET_TAG_NAME tag: 42  * Represents neumann-type boundary condition, usually contains elements with dimension 43  * one lower than those found in material sets (i.e. edges in FE quad/tri models, quads/tris 44  * in FE hex/tet models) (corresponds to sidesets in ExodusII) 45  * size = sizeof(int) 46  * type = int 47  * value = integer id for this set (sideset id from ExodusII) 48  * default value = -1 49  */ 50 #define NEUMANN_SET_TAG_NAME "NEUMANN_SET" 51  52 /* HAS_MID_NODES_TAG_NAM tag: 53  * Flags telling whether elements in a given set have mid-(edge, face, region) vertices/nodes; 54  * index 0 is a place holder, so this datum can be indexed by dimension, e.g. has_mid_nodes[dim] 55  * indicates whether mesh entities of dimension dim have mid nodes 56  * size = 4*sizeof(int) 57  * type = int[4] 58  * value = 1 (has mid nodes), 0 (does not have mid nodes) 59  * default value = [-1, -1, -1, -1] 60  */ 61 #define HAS_MID_NODES_TAG_NAME "HAS_MID_NODES" 62  63 /* GEOM_DIMENSION tag: 64  * Represents entities "owned" by a given topological entity in a geometric model 65  * size = sizeof(int) 66  * type = int 67  * value = dimension of geom entity 68  * default value = -1 69  */ 70 #define GEOM_DIMENSION_TAG_NAME "GEOM_DIMENSION" 71  72 /* MESH_TRANSFORM tag: 73  * Represents homogeneous transform to be applied to mesh; used in ExodusII writer to apply 74  * transform before writing nodal coordinates 75  * size = 16*sizeof(double) 76  * type = double[16] 77  * value = 4x4 homogenous transform matrix 78  */ 79 #define MESH_TRANSFORM_TAG_NAME "MESH_TRANSFORM" 80  81 /* GLOBAL_ID tag: 82  * Represents global id of entities (sets or mesh entities); this id is different than the id 83  * embedded in the entity handle 84  * size = sizeof(int) 85  * type = int 86  * value = global id 87  * default value = 0 // not -1 to allow gids stored in unsigned data types 88  */ 89 #define GLOBAL_ID_TAG_NAME "GLOBAL_ID" 90  91 /* CATEGORY tag: 92  * String name indicating generic "category" if the entity to which it is assigned (usually 93  * sets); used e.g. to indicate a set represents geometric vertex/edge/face/region, 94  * dual surface/curve, etc. 95  * size = CATEGORY_TAG_NAME_LENGTH (defined below) 96  * type = char[CATEGORY_TAG_NAME_LENGTH] 97  * value = NULL-terminated string denoting category name 98  */ 99 #define CATEGORY_TAG_NAME "CATEGORY" 100 #define CATEGORY_TAG_SIZE 32 101  102 /* NAME tag: 103  * A fixed length NULL-padded string containing a name. 104  * All values should be assumed to be of type char[NAME_TAG_SIZE]. 105  * The string need not be null terminated. All values used for 106  * storing or searching for a value must be padded with '\0' chars. 107  */ 108 #define NAME_TAG_NAME "NAME" 109 #define NAME_TAG_SIZE 32 110  111 /* BLOCK_HEADER: tag 112  * A fixex lenght tag containg block header data 113  * BlockColor, MaterialId and BlockDimension 114  */ 115 #define BLOCK_HEADER "BLOCK_HEADER" 116  117 /* BLOCK_ATTRIBUTES: tag 118  * A varible lenght tag of doubles 119  * Tag contains attributes set to BlockSet in cubit file 120  */ 121 #define BLOCK_ATTRIBUTES "BLOCK_ATTRIBUTES" 122  123 #ifndef MB_PARALLEL_CONVENTIONS_H 124 #define MB_PARALLEL_CONVENTIONS_H 125  126 /** Tag conventions for naming parallel things. Note this header 127  * file belongs in the main MOAB directory because even serial 128  * applications (e.g. partitioners) may write tags for use in 129  * parallel applications. 130  */ 131  132 /** \brief Global identifier for interface mesh 133  * 134  * An integer identifier common to the corresponding mesh entity 135  * instances on each processor for a mesh entity on the interface. 136  */ 137 #define PARALLEL_GID_TAG_NAME "GLOBAL_ID" 138  139 /** \brief Tag on a meshset representing a parallel partition. 140  * 141  * When the mesh is partitioned for use in a parallel environment, 142  * the each CPUs partiiton of the mesh is stored in a meshset with 143  * this tag. The value of the tag is an integer "part identifier". 144  */ 145 #define PARALLEL_PARTITION_TAG_NAME "PARALLEL_PARTITION" 146 #define PARALLEL_PART_TAG_NAME PARALLEL_PARTITION_TAG_NAME 147  148 /** \brief Tag that groups the set of parts/partitions that are 149  * a covering of the mesh. 150  * 151  * This tag labels an entity set for which the child sets are part(ition)s 152  * that together are a single partitioning of the mesh. I.e. There should 153  * be no mesh entity that is contained in more than one child part(ition) 154  * set, and typically every mesh entity of the dimenion used to partition 155  * the mesh is contained in exactly one of the child sets. 156  * 157  * The data for this tag is a single integer value. The value of 158  * the tag is undefined. 159  */ 160 #define PARALLEL_PARITIONING_TAG_NAME "PARALLEL_MESH_PARITIONING" 161  162 /** \brief Tag storing which other processor a given entity is shared with 163  * 164  * This single-valued tag implies an entity is shared with one other proc 165  */ 166 #define PARALLEL_SHARED_PROC_TAG_NAME "__PARALLEL_SHARED_PROC" 167  168 /** \brief Tag storing which other processorS a given entity is shared with 169  * 170  * This multiple-valued tag implies an entity is shared with multiple 171  * other processors. Length of tag is application-dependent, and depends on 172  * what the maximum number of processors is which share an entity 173  */ 174 #define PARALLEL_SHARED_PROCS_TAG_NAME "__PARALLEL_SHARED_PROCS" 175  176 /** \brief Tag storing the handle of a shared entity on the other proc 177  * 178  * This single-valued tag implies an entity is shared with one other proc 179  */ 180 #define PARALLEL_SHARED_HANDLE_TAG_NAME "__PARALLEL_SHARED_HANDLE" 181  182 /** \brief Tag storing handles of a shared entity on other processors 183  * 184  * This multiple-valued tag implies an entity is shared with multiple 185  * other processors. Length of tag is application-dependent, and depends on 186  * what the maximum number of processors is which share an entity 187  */ 188 #define PARALLEL_SHARED_HANDLES_TAG_NAME "__PARALLEL_SHARED_HANDLES" 189  190 /** \brief Tag storing parallel status (as bits in this tag) 191  * 192  * This tag stores various aspects of parallel status in bits; see also 193  * #define's following, to be used in bit mask operations. If an entity is 194  * not shared with any other processors, the pstatus is 0, otherwise it's > 0 195  * 196  * bit 0: !owned (0=owned, 1=not owned) 197  * bit 1: shared (0=not shared, 1=shared) 198  * bit 2: multishared (shared by > 2 procs; 0=not shared, 1=shared) 199  * bit 3: interface (0=not interface, 1=interface) 200  * bit 4: ghost (0=not ghost, 1=ghost) 201  * default value = 0 202  */ 203 #define PARALLEL_STATUS_TAG_NAME "__PARALLEL_STATUS" 204  205 #define PSTATUS_NOT_OWNED 0x1 206 #define PSTATUS_SHARED 0x2 207 #define PSTATUS_MULTISHARED 0x4 208 #define PSTATUS_INTERFACE 0x8 209 // note, these numbers are in hex, so 0x10 is the 4th bit, or 2^4. 210 #define PSTATUS_GHOST 0x10 211  212 #define PSTATUS_AND 0x1 213 #define PSTATUS_OR 0x2 214 #define PSTATUS_NOT 0x3 215 #endif 216  217 #endif