Mesh Oriented datABase
(version 5.6.0)
An array-based unstructured mesh library
Types.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 MOAB_TYPES_HPP
17
#define MOAB_TYPES_HPP
18
19
#ifdef __cplusplus
20
#include "
moab/EntityType.hpp
"
21
#include "
moab/EntityHandle.hpp
"
22
#endif
23
24
#include "
moab/win32_config.h
"
25
26
/**\name Types and names
27
* Types used in the MOAB interface
28
*/
29
/*@{*/
30
31
#ifdef __cplusplus
32
namespace
moab
33
{
34
#endif
35
36
/** MOAB error codes */
37
enum
MOAB_EXPORT
ErrorCode
38
{
39
MB_SUCCESS
= 0,
40
MB_INDEX_OUT_OF_RANGE
= 1,
41
MB_TYPE_OUT_OF_RANGE
= 2,
42
MB_MEMORY_ALLOCATION_FAILED
= 3,
43
MB_ENTITY_NOT_FOUND
= 4,
44
MB_MULTIPLE_ENTITIES_FOUND
= 5,
45
MB_TAG_NOT_FOUND
= 6,
46
MB_FILE_DOES_NOT_EXIST
= 7,
47
MB_FILE_WRITE_ERROR
= 8,
48
MB_NOT_IMPLEMENTED
= 9,
49
MB_ALREADY_ALLOCATED
= 10,
50
MB_VARIABLE_DATA_LENGTH
= 11,
51
MB_INVALID_SIZE
= 12,
52
MB_UNSUPPORTED_OPERATION
= 13,
53
MB_UNHANDLED_OPTION
= 14,
54
MB_STRUCTURED_MESH
= 15,
55
MB_FAILURE = 16
56
};
57
58
#ifdef __cplusplus
59
/** Array of error code strings corresponding to ErrorCode enum values */
60
extern
const
char
*
const
ErrorCodeStr[];
61
#endif
62
63
/** Misc. integer constants, declared in enum for portability */
64
enum
Constants
65
{
66
MB_VARIABLE_LENGTH
= -1
/**< Length value for variable-length tags */
67
};
68
69
/** Specify storage type for tags. See MOAB users guide for more information. */
70
enum
MOAB_EXPORT
TagType
71
{
72
MB_TAG_BIT
= 0,
/**< Tag size specified in bits, tag value is 8 bits or less */
73
MB_TAG_SPARSE
= 1 << 0,
/**< Storage optimized for tags on a few entities */
74
MB_TAG_DENSE
= 1 << 1,
/**< Storage optimized for tags on most entities of a type */
75
MB_TAG_MESH
= 1 << 2,
/**< Storage for tags on no entities, only the root set/whole mesh. */
76
MB_TAG_BYTES
= 1 << 3,
/**< Size is in number of bytes rather than number of values of \c DataType */
77
MB_TAG_VARLEN
= 1 << 4,
/**< Create variable-length tag */
78
MB_TAG_CREAT
= 1 << 5,
/**< Create tag if it does not already exist */
79
MB_TAG_EXCL
= 1 << 6,
/**< Fail if TAG_CREATE and tag already exists */
80
MB_TAG_STORE
= 1 << 7,
/**< Fail if tag exists and has different storage type */
81
MB_TAG_ANY
= 1 << 8,
/**< Do not fail if size, type, or default value do not match. */
82
MB_TAG_NOOPQ
= 1 << 9,
/**< Do not accept MB_TYPE_OPAQUE as a match for any type. */
83
MB_TAG_DFTOK = 1 << 10
/**< Do not fail for mismatched default values */
84
/**< MB_TAG_CNVRT = 1<<11, Convert storage type if it does not match */
85
};
86
87
/** Specify data type for tags. */
88
enum
MOAB_EXPORT
DataType
89
{
90
MB_TYPE_OPAQUE
= 0,
/**< byte array */
91
MB_TYPE_INTEGER
= 1,
/**< native 'int' type */
92
MB_TYPE_DOUBLE
= 2,
/**< native 'double' type */
93
MB_TYPE_BIT
= 3,
/**< mandatory type for tags with MB_TAG_BIT storage */
94
MB_TYPE_HANDLE
= 4,
/**< EntityHandle */
95
MB_MAX_DATA_TYPE =
MB_TYPE_HANDLE
96
};
97
98
#ifdef __cplusplus
99
/** Array of data type strings corresponding to DataType enum values */
100
extern
const
char
*
const
DataTypeStr[];
101
#endif
102
103
/** Used to reference tags; since they're so different from entities, we
104
* use void** instead of a uint to prevent them from being confused as
105
* entity handles.
106
*/
107
#ifdef __cplusplus
108
class
TagInfo;
109
typedef
TagInfo*
Tag
;
110
#else
111
struct
TagInfo;
112
typedef
struct
TagInfo*
Tag
;
113
#endif
114
115
/** Meshset options: properties for meshset creation.
116
* Values are bit flags that may be combined with a bitwise OR (|)
117
*/
118
enum
MOAB_EXPORT
EntitySetProperty
119
{
120
MESHSET_TRACK_OWNER
= 0x1,
/**< create entity to meshset adjacencies */
121
MESHSET_SET
= 0x2,
/**< set contents are unique */
122
MESHSET_ORDERED = 0x4
/**< order of set contents is preserved */
123
};
124
125
enum
MOAB_EXPORT
SenseType
126
{
127
SENSE_INVALID
= -2,
/**< default, invalid, not defined */
128
SENSE_REVERSE
= -1,
/**< reversed */
129
SENSE_BOTH
= 0,
/**< both senses valid */
130
SENSE_FORWARD = 1
/**< forward */
131
};
132
133
#ifdef __cplusplus
134
/** Array of sense type strings corresponding to SenseType enum values */
135
extern
const
char
*
const
*
const
SenseTypeStr;
136
#endif
137
138
#ifdef __cplusplus
139
}
/* namespace moab */
140
#endif
141
142
/*@}*/
143
144
#endif
src
moab
Types.hpp
Generated on Wed Jun 3 2026 02:04:41 for Mesh Oriented datABase by
1.9.1.