Mesh Oriented datABase
(version 5.5.1)
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
extern
const
char
*
const
ErrorCodeStr[];
60
#endif
61
62
/** Misc. integer constants, declared in enum for portability */
63
enum
Constants
64
{
65
MB_VARIABLE_LENGTH
= -1
/**< Length value for variable-length tags */
66
};
67
68
/** Specify storage type for tags. See MOAB users guide for more information. */
69
enum
MOAB_EXPORT
TagType
70
{
71
MB_TAG_BIT
= 0,
/**< Tag size specified in bits, tag value is 8 bits or less */
72
MB_TAG_SPARSE
= 1 << 0,
/**< Storage optimized for tags on a few entities */
73
MB_TAG_DENSE
= 1 << 1,
/**< Storage optimized for tags on most entities of a type */
74
MB_TAG_MESH
= 1 << 2,
/**< Storage for tags on no entities, only the root set/whole mesh. */
75
MB_TAG_BYTES
= 1 << 3,
/**< Size is in number of bytes rather than number of values of \c DataType */
76
MB_TAG_VARLEN
= 1 << 4,
/**< Create variable-length tag */
77
MB_TAG_CREAT
= 1 << 5,
/**< Create tag if it does not already exist */
78
MB_TAG_EXCL
= 1 << 6,
/**< Fail if TAG_CREATE and tag already exists */
79
MB_TAG_STORE
= 1 << 7,
/**< Fail if tag exists and has different storage type */
80
MB_TAG_ANY
= 1 << 8,
/**< Do not fail if size, type, or default value do not match. */
81
MB_TAG_NOOPQ
= 1 << 9,
/**< Do not accept MB_TYPE_OPAQUE as a match for any type. */
82
MB_TAG_DFTOK = 1 << 10
/**< Do not fail for mismatched default values */
83
/**< MB_TAG_CNVRT = 1<<11, Convert storage type if it does not match */
84
};
85
86
/** Specify data type for tags. */
87
enum
MOAB_EXPORT
DataType
88
{
89
MB_TYPE_OPAQUE
= 0,
/**< byte array */
90
MB_TYPE_INTEGER
= 1,
/**< native 'int' type */
91
MB_TYPE_DOUBLE
= 2,
/**< native 'double' type */
92
MB_TYPE_BIT
= 3,
/**< mandatory type for tags with MB_TAG_BIT storage */
93
MB_TYPE_HANDLE
= 4,
/**< EntityHandle */
94
MB_MAX_DATA_TYPE =
MB_TYPE_HANDLE
95
};
96
97
#ifdef __cplusplus
98
extern
const
char
*
const
DataTypeStr[];
99
#endif
100
101
/** Used to reference tags; since they're so different from entities, we
102
* use void** instead of a uint to prevent them from being confused as
103
* entity handles.
104
*/
105
#ifdef __cplusplus
106
class
TagInfo;
107
typedef
TagInfo*
Tag
;
108
#else
109
struct
TagInfo;
110
typedef
struct
TagInfo*
Tag
;
111
#endif
112
113
/** Meshset options: properties for meshset creation.
114
* Values are bit flags that may be combined with a bitwise OR (|)
115
*/
116
enum
MOAB_EXPORT
EntitySetProperty
117
{
118
MESHSET_TRACK_OWNER
= 0x1,
/**< create entity to meshset adjacencies */
119
MESHSET_SET
= 0x2,
/**< set contents are unique */
120
MESHSET_ORDERED = 0x4
/**< order of set contents is preserved */
121
};
122
123
enum
MOAB_EXPORT
SenseType
124
{
125
SENSE_INVALID
= -2,
/**< default, invalid, not defined */
126
SENSE_REVERSE
= -1,
/**< reversed */
127
SENSE_BOTH
= 0,
/**< both senses valid */
128
SENSE_FORWARD = 1
/**< forward */
129
};
130
131
#ifdef __cplusplus
132
extern
const
char
*
const
*
const
SenseTypeStr;
133
#endif
134
135
#ifdef __cplusplus
136
}
/* namespace moab */
137
#endif
138
139
/*@}*/
140
141
#endif
src
moab
Types.hpp
Generated on Tue Oct 29 2024 02:05:51 for Mesh Oriented datABase by
1.9.1.