Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
metadata.h
Go to the documentation of this file.
00001 /*! \page metadata I/O and Meta-Data Storage Conventions in MOAB
00002 
00003     

Timothy J. Tautges

00004 00005 \subpage md-contents 00006 00007 \subpage md-tables 00008 */ 00009 00010 /*! \page md-contents Table of Contents 00011 00012 \ref meta-introduction 00013 00014 \ref meta-conventions 00015 00016 \ref meta-options 00017 00018 \ref meta-references 00019 00020 \ref appendixA 00021 00022 \ref appendixB 00023 00024 \ref appendixC 00025 00026 \ref appendixD 00027 00028 \ref appendixE 00029 00030 \section meta-introduction Introduction 00031 00032 The Mesh-Oriented datABase (MOAB) is a library for representing finite element and other types of mesh data [1]. Various types of meta-data are often used in conjunction with a mesh. Examples include boundary condition groupings, material types, and provenance information for the mesh. Because the data model used in MOAB is so abstract, conventions are useful for describing how meta-data is stored into that data model. This document describes those conventions for several types of data commonly found in meshes stored in MOAB. Because the data models used by MOAB and iMesh, the ITAPS mesh interface [2], are so similar, the conventions described here apply almost unmodified to iMesh as well as to MOAB. 00033 00034 The meshes represented in MOAB originate in a variety of forms, including mesh read from files of various formats (e.g. CUBIT “.cub” file, VTK, etc.) as well as mesh written into MOAB directly by various software libraries (e.g. MeshKit). Although there is no standard for naming or storing meta-data with a mesh, there is a great deal of commonality in the types of meta-data typically found with mesh data. This document describes conventions that have been established for commonly encountered meta-data. Various mesh readers implemented in MOAB attempt to read meta-data from a file and write it into the MOAB data model using these conventions. Although there is no requirement to store a given type of meta-data in the form described here, a number of services have been written to handle meta-data using these conventions, no matter the source of the meta-data being processed. 00035 00036 Several specific tools are often used in concert with MOAB and bear special mention here. The CUBIT toolkit generates finite element meshes, and saves them to a native save file (referred to as a “.cub” file) which MOAB is able to read. Reading CUBIT meshes into MOAB through the .cub file format is preferred over other formats, since most other mesh formats written by CUBIT do not save most meta-data. The MeshKit library also generates mesh using CGM and MOAB, and uses the same conventions for storing meshes into MOAB. Finally, MOAB includes a CGM reader which can read a geometric model into a faceted representation in MOAB. Meta-data from all these tools are stored in MOAB using the conventions described here. 00037 00038 The MOAB data model consists of the following basic types: 00039 - Entity: The basic elements of topology, e.g. vertex, edge, triangle, tetrahedron, etc. MOAB represents all types in the finite element zoo, plus polygons and polyhedra. 00040 - Entity %Set: An arbitrary collection of entities and other sets. Sets can have parent/child relations with other sets, and these relations are distinct from “contains” relations. 00041 - Interface: The interface object through which other entities are accessed, in the sense of object-oriented-programming. iMesh refers to the interface as the “root” set. 00042 - Tag: A piece of data that can be assigned a distinct value to each entity and entity set, and to the interface itself. Tags have a prescribed name, size in bytes, and data type; allowed data types are integer, double, entity handle, and byte or opaque. 00043 . 00044 00045 The following section describes each meta-data tag convention in detail; these conventions are also summarized in Table 1. 00046 00047 \ref md-contents "Top" 00048 00049 \section meta-conventions Meta-Data Conventions 00050 00051 Meta-data is stored in MOAB and iMesh in the form of tags applied to either entities or entity sets. For meta-data represented as entity sets, the contents of those sets are determined by the convention, with tags on those sets identifying them with the convention and adding any other semantic data. 00052 00053 Each meta-data convention is described in a subsection below. Each convention begins with a short description of: 00054 00055 - Whether tags associated with the convention are assigned to entities or entity sets 00056 - The tag(s) associated with the convention; information for each tag includes the name, the data type (I=integer, D=double, C=character, H=handle), and the tag length. Tag lengths are specified after an asterisk (*); for example, C*32 implies a tag with character type and length 32. Unspecified lengths correspond to length one. 00057 . 00058 00059

Name

00060 (Data: Entity sets, entities; Tag(s): NAME/C*32) 00061 00062 Character strings are used in many different contexts in applications. MOAB uses the “NAME” tag to store character strings used to name entities. This tag is of byte-type and is of length 32 bytes. Note that the string stored in this tag may or may not be terminated with a NULL character. It is always prudent account for missing NULL terminator, to avoid buffer overflow errors in the application. Applications are free to define their own version of the NAME tag with a longer length, though this definition may conflict with other services attempting to use this tag with the conventional size. Applications needing a string tag with a longer or variable length can also use MOAB’s variable-length tag type, though this will not be compatible with iMesh. 00063 00064

Title

00065 (Data: Entity sets (file or instance); Tag(s): TITLE/C*strlen) 00066 00067 The title tag is meant to hold the overall identifier of a mesh, written at generation time or read from a file generated with a non-MOAB tool. The tag length is variable, and is set by the application directly (by calling the tag_create function) or indirectly (by embedding the title in a file read by MOAB). 00068 00069

Global Identifier

00070 (Data: Entity sets, entities; Tag(s): GLOBAL_ID/I) 00071 00072 Global identifiers are used in many different contexts in applications. Geometric model entities are identified by dimension and id, e.g. “Volume 1”. Mesh vertices and elements are identified similarly in mesh generation codes. Boundary conditions and material types are identified similarly. This tag is used to store such information. This tag is currently stored in a 32-byte integer, though this may change in the future. 00073 00074

Geometric Model Information

00075 (Data: Entity sets; Tag(s): GEOM_DIMENSION/I, GLOBAL_ID/I, NAME/C*32, CATEGORY/C*32, GEOM_SENSE_2(EH[2]), GEOM_SENSE_N_ENTS(EH*N), GEOM_SENSE_N_SENSES(I*N)) 00076 00077 Mesh generation is often performed starting from a geometric model, represented in some form of CAD engine. Many of the meshes used by MOAB are generated based on the CGM library. Geometric models contain both topological information (the topological entities in the geometric model) and shape information (the geometric shape of those entities), as well as other meta-data written to the entities in a model. When a mesh is read from a CUBIT .cub file, meta-data from the geometric model is read and represented in the MOAB data model, as described below. Note that although MOAB reads and represents meta-data associated with the geometric model, it does not represent the geometric model itself. Therefore, shape-related information, e.g. the arc length of an edge or surface normal at a given point, can be retrieved only from the model represented in CGM or another geometric modeling engine. 00078 00079 The information contained in a geometric model, read into and represented in MOAB, consists of: 00080 - Model entities (vertex, edge, face, volume) 00081 - Topological relationships between model entities 00082 - Groups of model entities 00083 - Model entity/group ids 00084 - Model entity/group names 00085 . 00086 00087 The storage of this information into MOAB's data model is described for each type is described below. 00088 00089 - Entities 00090 00091 in the geometric model (VERTEX, EDGE, FACE, VOLUME) are each represented by an entity set1. These sets are tagged with the “GEOM_DIMENSION” tag, with integer value equal to the topological dimension of the entity (VERTEX = 0, EDGE = 1, etc.) These sets contain the mesh owned by the corresponding entity in the geometric model. Note this does not include mesh owned by bounding entities; thus, the set for a FACE will not contain the mesh vertices owned by bounding EDGEs in the geometric model. These sets may or may not contain mesh entities of intermediate dimension, e.g. mesh edges owned by a FACE or faces owned by a VOLUME, depending on the application generating the mesh or the file from which the mesh was read. These sets are all set-types, i.e. the order of entities in the sets is not significant, except in the case of EDGE sets, where order of the mesh vertices and edges corresponds to the relative order of vertices and edges at the time of mesh generation. In MOAB, these sets are non-tracking by default, i.e. entities do not have knowledge of which geometry sets they are members of. 00092 00093 1Body-type entities from CUBIT are not explicitly represented in MOAB. 00094 00095 - Topological Relationships 00096 00097 In the geometric model, each FACE is bounded by zero or more EDGEs; other topological relationships between geometric entities exist in a similar manner. These relationships are embedded in the data model using parent/child relations between entity sets. For example, the entity set corresponding to a FACE will have child sets, each corresponding to a bounding EDGE, and parent sets, each corresponding to a VOLUME bounded by that FACE. The relative order of sets in those parent/child lists is not significant, thus, “loops” bounding a FACE cannot reliably be inferred from this data. 00098 00099 - Groups 00100 00101 Geometric entities are sometimes assigned to application-specific groups. These groups are represented using entity sets, tagged with a “GROUP” tag whose value equals the group id. Group sets are “set”-type, and are not tracking sets. These sets contain the sets corresponding to geometric entities contained in the groups in the geometric model, as well as any mesh entities assigned to the group. 00102 00103 - Sense 00104 00105 A geometric face has a natural orientation, indicated by the direction of the normal to the face; similarly, edges have a natural orientation determined by the direction of the tangent. When faces bound regions, or edges bound faces, they do so with a sense; if a region includes a face with forward sense, that means the face's natural normal direction points out of the volume. If a face includes an edge with forward sense, that means that if one moves along the edge in the direction of its tangent, the material of the face is on the left hand side. The sense of a face (edge) with respect to a region (face) it bounds is stored using tags on the face (edge). 00106 00107 Most models allow a face to be part of only two regions. Therefore, to store the sense of a face with respect to regions including it, a tag with two values is used. This tag is named GEOM_SENSE_2, and has 2 EntityHandle values. The first value corresponds to the entity set for the region for which that face has a forward sense, and the second to the region for which that face has a reverse sense. 00108 00109 Edges can bound more than two faces. Therefore, two variable-length tags are used, one to store the EntityHandles of the faces the edge bounds, and the other to store the sense with which the edge bounds the corresponding face. These tags are named GEOM_SENSE_N_ENTS and GEOM_SENSE_N_SENSES, respectively. These are stored as variable-length tags; see the MOAB user's guide for information on how to work with tags of this type. 00110 00111 The following sense values are used: 00112 - 0: forward 00113 - 1: reverse 00114 - -1: unnknown 00115 . 00116 00117

Material Type

00118 (Data: Entity sets; Tag(s): MATERIAL_SET/I) 00119 00120 Most finite element and other PDE-based analysis codes require a material type for each cell or element in the simulation. MOAB uses entity sets to store this information, in the form of entity sets. The MATERIAL_SET tag is used to identify these sets. The value of this tag is conventionally an integer; in most cases this stores a user-assigned identifier associated with that material. 00121 00122 CUBIT assigns material types using what it calls “element blocks”, with each element block given a user-assigned id number and optionally a name. The CUBIT and Exodus file readers in MOAB read element blocks into MATERIAL_SET sets. 00123 00124 In CUBIT, materials are typically assigned by assigning geometric volumes to element blocks. Therefore, material sets often contain entity sets corresponding to those volumes. Thus, a materrial set in MOAB is unlikely to contain mesh entities directly; rather, that set contains other sets which contain mesh entities. In these cases, mesh entities can be retrieved by passing a “recursive” flag to the appropriate function (MOAB), or by calling the getEntitiesRec extension function (iMesh) provided by MOAB. 00125 00126

Boundary Conditions (Dirichlet, Neumann)

00127 Data: Entity sets; Tag(s): DIRICHLET_SET/I, NEUMANN_SET/I) 00128 00129 Boundary conditions are often specified in terms of geometric model entities, similar to material types. MOAB uses entity sets to store this information as well. The DIRICHLET_SET and NEUMANN_SET tags are used to represent Dirichlet- and Neumann-type boundary condition sets, resp. By convention, Neumann sets usually contain (indirectly) intermediate-dimension entities like edges in a 2D mesh or faces in a 3D mesh, while Dirichlet sets usually contain vertices. In addition, Neumann sets are represented as sets of faces, rather than as sides of elements. Faces can be ordered “forward” or “reverse” with respect to one of the bounding elements, depending on whether the right-hand normal points into or out of the element. Forward-sense faces are added to the Neumann set. Reverse-sense faces are put into a separate set; that set is tagged with the NEUSET_SENSE tag, with value = -1; and that reverse set is added to the Neummann set. 00130 00131

Parallel Mesh Constructs

00132 (Data: Entity sets, entities; Tag(s): PARALLEL_PARTITION/I, PSTATUS/C*1, PARALLEL_SHARED_PROC/I, PARALLEL/SHARED_HANDLE/H, PARALLEL_SHARED_PROCS/I*NP, PARALLEL_SHARED_HANDLES/H*NP) 00133 00134 On a parallel computer, MOAB can represent the mesh on each processor as well as information about entities shared with neighboring processors. Some of this information is also relevant even when the mesh is represented on a serial machine. MOAB uses several tag and set conventions to describe the parallel nature of a mesh. This information is summarized here; for a more complete description of MOAB’s parallel mesh representation and functionality, see [3]. 00135 00136 - Parallel partition, parts 00137 00138 Most parallel mesh applications use a domain decomposition approach, where each processor solves for a subset of the domain. The set of entities solved by a given processor is referred to as a part, and the collection of parts together is called the partition. MOAB stores each part in an entity set, marked with the PARALLEL_PARTITION tag, whose value is the rank of the processor assigned that part; an entity set which contains all part sets is given the PARALLEL_PARTITIONING_TAG_NAME tag, whose value is currently meaningless. The MBZoltan tool included as a tool in MOAB can partition a mesh for parallel solution, and writes the partition to the mesh in the form of parts and partitions. Both these types of sets can be accessed in a serial mesh, e.g. for visualization. 00139 00140 - Part interfaces 00141 00142 When a partitioned mesh has been loaded on a parallel computer, the part on a given processor may share portions of its boundary with parts on other processors. These shared regions are called part interfaces, and are also represented using entity sets. These sets are marked with the PARALLEL_INTERFACE tag, whose value is currently meaningless. 00143 00144 - Shared processor and handle 00145 00146 For entities shared between processors, it is helpful to know locally which other processor shares an entity, and what the entity’s handle is on the remote processor. There are two cases which are useful to distinguish, first where an entity is shared with only one other processor (referred to as shared), and second when a processor is shared by more than one other processor (referred to as multi-shared). Shared entities are given the PARALLEL_SHARED_PROC and PARALLEL_SHARED_HANDLE tags, which store the rank of the sharing processor and the handle of the entity on that processor, respectively. Multi-shared entities are marked with the PARALLEL_SHARED_PROCS and PARALLEL_SHARED_HANDLES tags; these tags have a length NP assigned at compile time in MOAB, with default values of -1 for processor rank and zero for handle (which are each invalid values for the corresponding data). The processors/handles sharing a given entity are then written on the front of the arrays. So, for example, an entity on processor rank 0, shared by processors 1 and 2, would have a PARALLEL_SHARED_PROCS tag whose values would be [1, 2, -1, -1, …], with PARALLEL_SHARED_HANDLES values of [m, n, 0, 0, …], where m and n would be the handles of that entity on processors 1 and 2. The shared versions of these tags are “dense”, with default values which denote unshared entities. The multi-shared tags are sparse tags in MOAB, with no default value. 00147 00148 - Parallel status 00149 00150 In addition to the tags above, MOAB also defines the PSTATUS tag, whose bits contain information about the parallel status of a given entity. Starting with least significant bit, these bits represent whether an entity is 1) not owned, 2) shared, 3) multi-shared, 4) interface, 5) a ghost entity. The first bit being set indicates “not owned” so that the default value for this tag, of zero, corresponds to an owned, unshared entity, which will be the state of most entities on a given processor. 00151 00152

Structured Mesh Parameters

00153 00154 MOAB has a structured mesh interface for creating structured mesh (see “ScdInterface.hpp” header file in MOAB source code). Along with an internal representation that is more memory-efficient (since it does not need to store connectivity), MOAB also creates and tags entity sets with structured mesh parameters, which can be accessed through the normal tag and set interface. The following tags are used: 00155 00156 - BOX_DIMS: This tag stores the ijk coordinates of the lower and upper corner of the structured mesh box(es). 00157 - GLOBAL_BOX_DIMS: If specified when the structured mesh is created, a tag with this name stores the global box dimensions (which may be different than the local box dimensions). 00158 - BOX_PERIODIC: Stores whether the box is periodic in the i (BOX_PERIODIC[0]) and j (BOX_PERIODIC[1]) directions. 00159 - __BOX_SET: Pointer to the ScdBox instance corresponding to this entity set.2 00160 . 00161 Although the structured mesh is not saved as such in HDF5-format files, the entity sets and corresponding tags will be saved and restored. 00162 00163 2The double-underscore in the tag name implies that this tag will not be saved in a file, in this case because the ScdBox instances are not preserved in a file. 00164 00165

Spectral Mesh Constructs

00166 00167 The Spectral Element Method (SEM) is a high-order method, using a polynomial Legendre interpolation basis with Gauss-Lobatto quadrature points, in contrast to the Lagrange basis used in (linear) finite elements. A spectral mesh with order O contains quadrilateral or hexahedral elements comprised of (O+1)d vertices. Spectral meshes are usually represented in one of two ways, either as coarse elements which point to an array of higher-order vertices (and with corner vertices represented in the normal manner), or as linear quads/hexes formed from the higher-order vertices, with each original coarse quad/hex represented by Od fine quads/hexes. Similarly, the spectral variables, which are normally computed at fine vertex positions, are stored either on those vertices, or in lexicographically-ordered arrays on elements (with tag values repeated on neighboring elements). MOAB can read spectral meshes from a variety of formats (at this time, including CAM-SE, HOMME, and Nek5000). Which of the above two representations are controlled by read options and are indicated by certain tags: 00168 00169 - SPECTRAL_MESH: read option indicating that spectral elements should be represented as coarse linear quads/hexes and each element containing an array of lexicographically-ordered vertex handles 00170 00171 - TAG_SPECTRAL_ELEMENTS: read option; if given, spectral variables are represented as lexicographically-ordered arrays on elements 00172 00173 - TAG_SPECTRAL_VERTICES: read option; if given, spectral variables are represented as tags on vertices 00174 00175 - CONN=: in CAM-SE, the connectivity of the spectral mesh is stored by default in a file named “HommeMapping.nc”; this option can be given to read the connectivity from a different file 00176 00177 - SPECTRAL_VERTICES: tag name for array of vertex handles 00178 00179 - SPECTRAL_ORDER: tag name for spectral order, written to file set or (if no file set given) to interface after a spectral mesh is read 00180 00181 . 00182 00183 \ref md-contents "Top" 00184 00185 \section meta-options Reader/Writer Options 00186 00187 All mesh file readers and writers in MOAB take an option string as an argument. By default, the semicolon (“;”) delimits individual options in the option string. Options used in multiple readers are described in this section; the options enabled in specific readers/writers are described in the corresponding appendix at the end of this document. 00188 00189

variable=[,...]

00190 00191 By default, all field data stored with the mesh is read with the mesh, and stored as tags on the associated mesh entities. This option lists specific variables that should be read along with the mesh (note also the “nomesh” option, described elsewhere in this document). The variable name listed will be read into a tag with the same name. For time-dependent variables, the time step number will be appended to the variable name to form the tag name. If no “timestep” or “timeval” option is given, all time steps will be read, resulting in several tags being created. If the “nomesh” option is given, the application must pass the entity set resulting from the original mesh read in to the function, that this set must contain the mesh read only from that file. The mesh in the file is checked against the mesh in the set to verify that the two correspond. The special name “MOAB_ALL_VARIABLES” can be used to indicate that all variables should be read. Multiple variable names can be specified, separated from each other by commas. 00192 00193

nomesh

00194 00195 Indicates that no mesh should be read from the file. This option is used in conjunction with the “variable=” option, to read variables and assign them as tags to a previously-read mesh. If this option is used, applications should pass an entity set to the read function, which should contain the mesh previously read from the file. 00196 00197

timestep=[, ...]

00198 00199 Read the time step number whose time value is equal to or greater than the specified time value, for the specified variable(s). Tag names for the variable(s) will be formed by appending the time step number to the variable name. Multiple time step values can be specified, separated from each other by commas. 00200 00201

timeval=[, ...]

00202 00203 Read the time step number whose time value is equal to or greater than the specified time value, for the 00204 specified variable(s). Tag names for the variable(s) will be formed by appending the time step number 00205 to the variable name. Multiple time step values can be specified, separated from each other by commas. 00206 00207

gather_set[=]

00208 00209 Create a gather set (associated with tag GATHER_SET) on one processor with the specified rank, to duplicate entities on other processors. If the rank is not specified, it will be rank 0 by default. If an invalid rank is passed, no gather set will be created. Gather set is specially used by HOMME, MPAS, and any other unstructured grid. 00210 00211

no_mixed_elements

00212 00213 Indicates that no mixed elements (e.g. pentagons and hexagons) should be created by the MPAS reader. If this option is used, a common parameter maxEdgesPerCell will be computed to be used across all processors (instead of the one reported in the MPAS file header, which is usually 10), and each cell is created with maxEdgesPerCell edges. Any cell that has less actual edges will be padded by duplicating the last vertex in the connectivity array. As a result, all created cells will be in one contiguous chunk. 00214 00215

no_edges

00216 00217 Indicates that no edges should be created and no edge variables will be read. This option can be used when there is no need to read variables on edges. For a huge MPAS file with 65M cells, it can save more than 3GB MOAB internal storage for edge connectivity. 00218 00219 \ref md-contents "Top" 00220 00221 \section meta-references References 00222 00223 [1] T.J. Tautges, R. Meyers, K. Merkley, C. Stimpson, and C. Ernst, MOAB: A Mesh-Oriented Database, Sandia National Laboratories, 2004. 00224 00225 [2] L. Diachin, A. Bauer, B. Fix, J. Kraftcheck, K. Jansen, X. Luo, M. Miller, C. Ollivier-Gooch, M.S. Shephard, T. Tautges, and H. Trease, “Interoperable mesh and geometry tools for advanced petascale simulations,” Journal of Physics: Conference Series, vol. 78, 2007, p. 012015. 00226 [3] T.J. Tautges, J.A. Kraftcheck, N. Bertram, V. Sachdeva, and J. Magerlein, "Mesh Interface Resolution and Ghost Exchange in a Parallel Mesh Representation", In Proceedings of the 2012 IEEE 26th International Parallel and Distributed Processing Symposium Workshops & PhD Forum (IPDPSW '12), 2012. 00227 00228 \ref md-contents "Top" 00229 00230 \section appendixA Appendix A: Summary 00231 00232 \subsection table1 Table 1: Summary of MOAB meta-data conventions. 00233 00234 00235 00236 00237 00238 00239 00240 00241 00242 00243 00244 00245 00246 00247 00248 00249 00250 00251 00252 00253 00254 00255 00256 00257 00258 00259 00260 00261 00262 00268 00269 00270 00271 00272 00273 00274 00275 00276 00277 00278 00279 00280 00281 00282 00283 00284 00285 00286 00287 00288 00289 00290 00291 00292 00293 00294 00295 00296 00297 00298 00299 00300
ConventionApplies to (E=ent, S=set)Tag(s) (type/length)Description
NameE, SNAME/C*32
TitleSTITLE/C*strlenTitle of mesh
Global identifierE, SGLOBAL_ID/I
Geometric topologySGEOM_DIMENSION/I, GLOBAL_ID/I,^ 00263 NAME/C*32, 00264 CATEGORY/C*32. 00265 GEOM_SENSE_2/EH[2], 00266 GEOM_SENSE_N_ENTS/EH*N, 00267 GEOM_SENSE_N_SENSES/I*N%Sets contain mesh owned by that entity; parent/child links to bounded/bounding entities in geometric model
Material typeSMATERIAL_SET/I%Set contains entities or sets assigned a common material type
Boundary conditionSDIRICHLET_SET/I, NEUMANN_SET/I%Set contains entities or sets assigned a particular boundary condition; neumann sets usually contain edges (2D) or faces (3D)
Parallel mesh constructsE, SPARALLEL_MESH_PARTITIONING/I, PARALLEL_PARTITION/I, PSTATUS/C*1, PARALLEL_SHARED_PROC/I, PARALLEL/SHARED_HANDLE/H, PARALLEL_SHARED_PROCS/I*NP, PARALLEL_SHARED_HANDLES/H*NP Data which describes parallel mesh
Structured mesh constructsSBOX_DIMS/I*6, GLOBAL_BOX_DIMS/I*6, BOX_PERIODIC/2*I, __BOX_SET/OData describing structured mesh
Spectral mesh constructs E, SSPECTRAL_ORDER/I, SPECTRAL_VERTICES/I*(O+1)^2Data marking spectral mesh constructs
00301 00302 \ref meta-introduction "Back to Introduction" 00303 00304 \subsection table2 Table 2: Summary of MOAB conventional tag names, types, and purposes. Data types are I=integer, D=double, C=character, H=entity handle,O=opaque. Data type with *x denote length of x elements of that data type. 00305 00306 00307 00308 00309 00310 00311 00312 00313 00314 00315 00316 00317 00318 00319 00320 00321 00322 00323 00324 00325 00326 00327 00328 00329 00330 00331 00332 00333 00334 00335 00336 00337 00338 00339 00340 00341 00342 00343 00344 00345 00346 00347 00348 00349 00350 00351 00352 00353 00354 00355 00356 00357 00358 00359 00360 00361 00362 00363 00364 00365 00366 00367 00368 00369 00370 00371 00372 00373 00374 00375 00376 00377 00378 00379 00380 00381 00382 00383 00384 00385 00386 00387 00388 00389 00390 00391 00392 00393 00394 00395 00396 00397 00398 00399 00400 00401 00402 00403 00404 00405 00406 00407 00408 00409 00410 00411 00412 00413 00414 00415 00416 00417 00418 00419 00420 00421 00422 00423 00424 00425 00426 00427 00428 00429 00430 00431 00432 00433 00434 00435 00436 00437 00438 00439 00440 00441 00442 00443 00444 00445
Tag nameData typeApplies to (E=entity, S=set)Purpose
BOX_DIMSI*6SLower and upper ijk dimensions of box, ordered (ilo, jlo, klo, ihi, jhi, khi)
BOX_PERIODICI*2SIndicates whether box is periodic in i (BOX_PERIODIC[0]) or j (BOX_PERIODIC[1])
__BOX_SETOSPointer to corresponding ScdBox instance
CATEGORYC*32SString describing purpose of set; examples include “group”, “vertex”, “edge”, “surface”, “volume”
DIRICHLET_SET ISOEntities or sets with common boundary condition
GEOM_DIMENSIONISIdentifies mesh entities resolving a given geometric model entity
GEOM_SENSE_2EH*2S Stored on face-type geometric topology sets, values store regions having forward and reverse sense
GEOM_SENSE_N_ENTSEH*NSStored on edge-type geometric topology sets, values store faces whose senses are stored in GEOM_SENSE_N_SENSES.
GEOM_SENSE_N_SENSESI*NSStored on edge-type geometric topology sets, values store senses of the edge with respect to faces stored in GEOM_SENSE_N_ENTS.
GLOBAL_IDIE,SApplication-specific entity id
MATERIAL_SETISEntities or sets grouped by material type
NAMEC*32E, SUser-assigned entity name(s); multiple names delimited with ?
NEUMANN_SETISEntities or sets with common boundary condition
PARALLEL_PARTITION ISRepresent a part in a partition
PARALLEL_MESH_PARTITIONINGISRepresents a partition of the mesh for parallel solution, which is a collection of parts
__PARALLEL_SHARED_HANDLEHE, S Handle of this entity/set on sharing processor
__PARALLEL_SHARED_PROCIE,SRank of other processor sharing this entity/set
__PARALLEL_SHARED_HANDLESH*NPE,SHandles of this entity/set on sharing processors
__PARALLEL_SHARED_PROCSI*NPE,SRanks of other processors sharing this entity/set
__PARALLEL_STATUSC*1E,SBit-field indicating various parallel information
SPECTRAL_ORDERIS Order of a spectral mesh
SPECTRAL_VERTICESH*(O+1)^dE Vertices comprising a spectral element, ordered lexicographically; here, O=value of SPECTRAL_ORDER tag.
00446 00447 \ref md-contents "Top" 00448 00449 \section appendixB Appendix B: CCMIO (Star-CD, Star-CCM+) Reader/Writer Conventions 00450 00451 \subsection table3 Table 3: Translation between CCMIO options and MOAB tags. 00452 00453 00454 00455 00456 00457 00458 00459 00460 00461 00462 00463 00464 00465 00466 00467 00468 00469 00470 00471 00472 00473 00474 00475 00476 00477 00478 00479 00480 00481 00482 00483 00484 00485 00486 00487 00488 00489 00490 00491 00492 00493 00494 00495 00496 00497 00498 00499 00500 00501 00502 00503 00504 00505 00506 00507 00508 00509 00510 00511 00512 00513 00514 00515 00516 00517 00518 00519 00520 00521 00522 00523 00524 00525 00526 00527 00528 00529 00530 00531 00532 00533 00534 00535 00536 00537 00538 00539 00540 00541
%Set TypeCCMIO ConstructMOAB Tag Name, Type
File set / InterfaceTitle (option)“Title” (C*32)
CreatingProgram“CreatingProgram” (C*32)
Material setsIndexMATERIAL_SET
Label1NAME
MaterialId“MaterialId” (I)
Radiation“Radiation” (I)
PorosityId“PorosityId” (I)
SpinId“SpinId” (I)
GroupId“GroupId” (I)
ColorIdx“ColorIdx” (I)
ProcessorId“ProcessorId” (I)
LightMaterial“LightMaterial” (I)
FreeSurfaceMaterial“Thickness” (F)
Thickness“Thickness” (F)
MaterialType“MaterialType” (C*32)
Neumann setsIndexNEUMANN_SET
LabelNEUMANN_SET
BoundaryNameNAME
BoundaryType“BoundaryType” (C*32)
ProstarRegionNumber“ProstarRegionNumber” (I)
00542 00543 Notes: 00544 1. If no name is present, labels the material group with “MaterialX”, where X is the index of that group. 00545 00546 \ref md-contents "Top" 00547 00548 \section appendixC Appendix C: ExodusII Reader/Writer Conventions 00549 00550 \subsection table4 Table 4: Translation between ExodusII constructs and MOAB tags. 00551 00552 00553 00554 00555 00556 00557 00558 00559 00560 00561 00562 00563 00564 00565 00566 00567 00568 00569 00570 00571 00572 00573 00574 00575 00576 00577 00578 00579 00580 00581 00582 00583 00584 00585 00586 00587 00588 00589 00590 00591 00592 00593 00594 00595 00596 00597 00598 00599
Data TypeExodusII ConstructMOAB Tag Name, Type
QA records“qaRecord” (C*(v))2
Material setsBlock numberMATERIAL_SET
Block element typeEntity type, # vertices per entity
Dirichlet sets3Nodeset numberDIRICHLET_SET
Distribution factors“distFactor” (D*(v))1
Neumann setsSideset numberNEUMANN_SET
Neumann sets, reverse faces33Distribution factors“distFactor” (D*(v))1
SidesSENSE
Nodes, elementsnode_num_map, elem_mapGLOBAL_ID on nodes/elements
00600 00601 Notes: 00602 -# Variable-length tag used for distribution factors; length for each set is the number of entities in 00603 each set, such that there is one distribution factor for each entity in the set. 00604 -# QA records are stored as variable-length tags on file set specified on read. Tag is a 00605 concatenation of QA record strings into a single string, with '\0' used to delimit lines. 00606 -# MOAB represents sidesets as sets of faces, rather than as sides of elements. Faces can be 00607 ordered “forward” or “reverse” with respect to one of the bounding elements, depending on 00608 whether the right-hand normal points into or out of the element. Forward-sense faces are added 00609 to the Neumann set. Reverse-sense faces are put into a separate set; that set is tagged with the SENSE tag, with value = -1; and that reverse set is added to the Neummann set. 00610 . 00611 00612 \ref md-contents "Top" 00613 00614 \section appendixD Appendix D: NC (Climate Data) Reader/Writer Conventions 00615 00616 The climate data reader in MOAB reads files with the '.nc' filename extension. By default, this reader 00617 reads the whole mesh in the file and creates it as structured mesh in MOAB, with the mesh accessible 00618 through MOAB's structured mesh interface. By default, all variables and timesteps are read from the 00619 file, and written as tags on the mesh vertices from that file. This behavior is controlled by the 00620 “variable”, “nomesh”, “timestep”, and “timeval” options described earlier in this document. If MOAB 00621 is compiled for parallel execution and configured with a pnetcdf reader, the mesh is read in parallel, 00622 with a 1D or 2D decomposition designed to balance read performance and communication interface 00623 size (for details on the partitioning method used, see the src/io/ReadNC.cpp source file). 00624 00625 Mesh is put into the entity set provided to the load_file function. This entity set is also annotated with 00626 various tags representing information read from the file. These tags are described in Table 5. 00627 00628 Reading unstructured NC files in the HOMME format is also supported. Currently a trivial 00629 element-based partition is the only option for parallel reading. As the data is unstructured, it is necessary to have a connectivity file to define the vertex adjacencies. The default convention is to have a file called HommeMapping.nc in the same directory as the the variable data file. If this convention is not followed, the connectivity file can be specified with the option -O CONN=”/path/to/connectivity.nc”. An example of mbconvert using the parallel read capability is shown below: 00630 00631 mpiexec -np 2 tools/mbconvert -O TRIVIAL -O DEBUG_IO=1 -o DEBUG_IO=9 -o PARALLEL=WRITE_PART /nfs2/hayes6/meshlab/homme_data/camrun.cam2.h0.0000-01-01-16200.nc output.h5m 00632 00633 Several other things to note about reading climate data files into MOAB: 00634 - Time-dependent variables: MOAB currently has no mechanism for time-dependent tags. Therefore, time-dependent variables are represented using one tag per timestep, with the tag name set as the variable name plus the timestep index. Thus, the first few timesteps for the variable TEMPERATURE would be represented in tags named TEMPERATURE0, TEMPERATURE1, etc. 00635 - Cell- and face-centered variables: The climate data reader currently does not do cell- and face- 00636 centered variables correctly. 00637 . 00638 \subsection table5 Table 5: Summary of MOAB conventional tag names, types, and purposes. Data types are I=integer, D=double, C=character, H=entity handle. Data type with *x denote length of x elements of that data type; data type with *var denote variable-length tag. Tag names with two underscores prepended (“__”) denote tags not written to a file by MOAB. 00639 00640 00641 00642 00643 00644 00645 00646 00647 00648 00649 00650 00651 00652 00653 00654 00655 00656 00657 00658 00659 00660 00661 00662 00663 00666 00667 00668 00669 00670 00671 00674 00675 00676 00678 00679 00680 00683 00684 00685 00687 00688 00689 00693 00694 00695 00696 00697 00698 00708 00709 00710 00711 00712 00713 00719 00720 00721 00722 00723 00724 00726 00727 00728 00730 00732 00733 00738 00739 00740 00742 00743 00744 00749 00750 00751 00753 00755 00756 00761 00762 00763 00765 00767 00768 00771 00772 00773 00775 00777 00778 00783 00784 00785 00787 00789 00790 00794 00795
Tag name Data type Applies to (E=entity, S=set) Purpose
__NUM_DIMS ISThe number of dimensions in the netcdf file.
__NUM_VARSISThe number of variables in the netcdf file.
__DIM_NAMES C*varSThe dimension names, concatenated into a 00664 character string, with '\0' terminating each name. 00665
__DIM_LENS I*varSA vector of integers, storing the length of 00672 each dimension. 00673
__VAR_NAMES 00677 C*varSThe variable names, concatenated into a 00681 character string, with '\0' terminating each name. 00682
00686 (I or D)*varSFor each dimension, the values for the dimension. 00690 The data type for this tag corresponds to that in the 00691 netcdf file. The length of this tag is the number of 00692 values stored for the dimension in the netcdf file.
___LOC_MIN_MAX(I or D)*2SThe indices (0-based) of the local min and max 00699 values of dimension stored locally. For spatial 00700 dimensions like lon or lat, this will store the 00701 minimum and maximum indices in the local partition 00702 of the grid. For dimensions like time, where each 00703 processor represents the entire dimension, this will 00704 likely store 0 and the number of values for that 00705 dimension. Only one of ___LOC_VALS and 00706 ___LOC_MIN_MAX can be used for a given 00707 dimension.
___LOC_VAL (I or D)*varSThe indices (0-based) of the dimension stored 00714 locally. This tag only makes sense for dimensions 00715 that can be read in multiple pieces, such as time. 00716 Only one of ___LOC_VALS and 00717 ___LOC_MIN_MAX can be used for a given 00718 dimension.
___GLOBAL_MIN_MAX(I or D)*2SThe indices (0-based) of the global min and max 00725 values of dimension.
___DIMS 00729 H*n 00731 SFor each variable, this tag stores the tag 00734 handles for the n dimensions defining this variable, 00735 in netcdf ordering (last dimension varying fastest). 00736 The size of this tag is n * sizeof(TagHandle). 00737
00741 (data type)EValues of the variable for timestep 00745 for vertices. The data type of this tag corresponds 00746 to that of the variable from the netcdf file. 00747 Timestep index is 0-based. 00748
__GLOBAL_ATTRIBS 00752 C*var 00754 SThe global attributes, concatenated into a character 00757 string, with ‘\0’ terminating each attribute name, ‘;’ 00758 separating the data type and value, and ‘;’ 00759 separating one name/data type/value from the next. 00760
__GLOBAL_ATTRIBS_LEN 00764 I*var 00766 SA vector of integers, marking the end position of 00769 each attribute (name/data type/value) in __GLOBAL_ATTRIBS tag. 00770
___ATTRIBS 00774 C*var 00776 SThe variable attributes, concatenated into a 00779 character string, with ‘\0’ terminating each attribute 00780 name, ‘;’ separating the data type and value, and ‘;’ 00781 separating one name/data type/value from the next. 00782
___ATTRIBS_LEN 00786 I*var 00788 SA vector of integers, marking the end position of 00791 each attribute (name/data type/value) in 00792 ___ATTRIBS tags 00793
00796 00797 \ref md-contents "Top" 00798 00799 \section appendixE Appendix E: Nek5000 Reader/Writer Conventions 00800 00801 Nek5000, or Nek, is a code that uses the spectral element method to model fluid, heat transfer, 00802 electromagnetics, and other physics. Nek uses unstructured hexahedral meshes, with each hex element 00803 resolved by a structured grid of “Gauss Lebato Legendre” (GLL) points. Nek can read meshes through 00804 MOAB, and can output physics variables and GLL points through MOAB as well. 00805 00806 Since fluid is a single material in Nek, no material sets are needed. Boundary conditions are mapped to 00807 Nek's cbc array using Neumann sets and a user-provided “usr_moab2nek” subroutine (for an example 00808 of this subroutine, see examples/moab/pipe.usr in the Nek source code). GLL point locations and fluid 00809 variables on those points are stored in tags on the hex elements. All hex elements have the same 00810 number of GLL points. The number of GLL points in each direction is stored in a tag on the mesh 00811 instance. These tags are described in Table 6. 00812 00813 GLL point locations and fluid variables are stored in lexicographic order, similar to their storage order 00814 inside the Nek code. 00815 00816 \subsection table6 Table 6: Summary of MOAB conventional tag names, types, and purposes for Nek. Data types are I=integer, D=double, C=character, H=entity handle. Data type with *x denote length of x elements of that data type; data type with *var denote variable-length tag. Tag names with two underscores prepended (“__”) denote tags not written to a file by MOAB. 00817 00818 00819 00820 00821 00822 00823 00824 00825 00826 00827 00828 00831 00832 00833 00834 00835 00836 00839 00840 00841 00842 00843 00844 00845 00846 00847 00848 00849 00850 00851 00852 00853 00854 00855 00856 00858 00859 00860 00861 00862 00863 00865 00866 00867 00868 00869 00870 00872 00873 00874 00875 00876 00877 00880 00881 00882 00883 00884 00885 00888 00889
Tag name Data TypeApplies to (E=entity, S=set)Purpose
SEM_DIMSI*3SThe dimensions of the GLL mesh in each hex 00829 element. 00830
SEM_XD*nx*ny*nzEX position of GLL points (having nx*ny*nz 00837 values) 00838
SEM_YD*nx*ny*nzEY position of GLL points (having nx*ny*nz values)
SEM_ZD*nx*ny*nzEZ position of GLL points (having nx*ny*nz values)
VEL_XD*nx*ny*nzEFluid velocities in the x direction for GLL point 00857 array (having nx*ny*nz values)
VEL_YD*nx*ny*nzEFluid velocities in the y direction for GLL point 00864 array (having nx*ny*nz values)
VEL_ZD*nx*ny*nzEFluid velocities in the z direction for GLL point 00871 array (having nx*ny*nz values)
TEMPD*nx*ny*nzEFluid temperature for GLL point array (having 00878 nx*ny*nz values) 00879
PRESSD*nx*ny*nzEFluid pressure for GLL point array (having 00886 nx*ny*nz values) 00887
00890 \ref md-contents "Top" 00891 */ 00892 00893 /*! \page md-tables List of Tables 00894 \ref table1 00895 00896 \ref table2 00897 00898 \ref table3 00899 00900 \ref table4 00901 00902 \ref table5 00903 00904 \ref table6 00905 00906 */
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines