42 {ST1, 1, 1, 2, 2, 1, 0},
43 {ST2, 2, 1, 4, 4, 4, 1},
44 {ST3, 3, 1, 8, 8, 12, 6},
45 {BAR2, 1, 1, 2, 2, 1, 0},
46 {BAR3, 1, 2, 3, 2, 1, 0},
47 {TRI3, 2, 1, 3, 3, 3, 1},
48 {TRI6, 2, 2, 6, 3, 3, 1},
49 {QUAD4, 2, 1, 4, 4, 4, 1},
50 {QUAD8, 2, 2, 8, 4, 4, 1},
51 {QUAD9, 2, 2, 9, 4, 4, 1},
52 {TET4, 3, 1, 4, 4, 6, 4},
53 {TET10, 3, 2, 10, 4, 6, 4},
54 {PYRIMID5, 3, 1, 5, 5, 8, 5},
55 {PYRIMID14,3, 2, 14, 5, 8, 5},
56 {PRISM6, 3, 1, 6, 6, 9, 5},
57 {PRISM15, 3, 2, 15, 6, 9, 5},
58 {PRISM18, 3, 2, 18, 6, 9, 5},
59 {HEX8, 3, 1, 8, 8, 12, 6},
60 {HEX20, 3, 2, 20, 8, 12, 6},
61 {HEX27, 3, 2, 27, 8, 12, 6}
65 if ( _parent)
return root()->get_addr(
i,
j);
68 if ( i<0 || i>=size_of_items())
72 int offset = ( _strd == 1) ? (
j*_cap) :
j;
73 return ((
const int*)_ptr)+offset+
i*_strd;
81 if ( !is_structured()) {
82 _nitems = nitems; _ngitems = ngitems;
83 _pane->refresh_connectivity();
86 _nitems = dimension(); _ngitems = ngitems;
87 if ( initialized()) _pane->refresh_connectivity();
102 "Only unstructured meshes supports inheritance without ghost");
105 if ( sizes==NULL)
return 0;
108 case ST1: n=sizes[0]-1;
break;
109 case ST2: n=(sizes[0]-1)*(sizes[1]-1);
break;
110 case ST3: n=(sizes[0]-1)*(sizes[1]-1)*(sizes[2]-1);
break;
123 if ( sizes==NULL)
return 0;
127 case ST2: n=(sizes[0]-1)*(sizes[1]-1)-
129 case ST3: n=(sizes[0]-1)*(sizes[1]-1)*(sizes[2]-1)-
145 if ( sizes==NULL)
return 0;
149 case ST2: n=(sizes[0]-1-2*
_ngitems)*(sizes[1]-1-2*_ngitems);
break;
150 case ST3: n=(sizes[0]-1-2*
_ngitems)*(sizes[1]-1-2*_ngitems)*
164 "Only unstructured meshes supports inheritance without ghost");
167 if ( sizes==NULL)
return 0;
169 case ST1:
return sizes[0];
170 case ST2:
return sizes[0]*sizes[1];
171 case ST3:
return sizes[0]*sizes[1]*sizes[2];
184 if ( sizes==NULL)
return 0;
187 case ST2:
return sizes[0]*sizes[1]-
189 case ST3:
return sizes[0]*sizes[1]*sizes[2]-
204 if ( sizes==NULL)
return 0;
207 case ST2:
return (sizes[0]-2*_ngitems)*(sizes[1]-2*
_ngitems);
208 case ST3:
return (sizes[0]-2*_ngitems)*(sizes[1]-2*
_ngitems)*
209 (sizes[2]-2*_ngitems);
219 if ( !is_structured()) {
223 int ndims = dimension();
226 copy_array( p, strd, ndims);
230 _pane->refresh_connectivity();
239 while (aname[idx]==
'0') idx++;
240 if ( aname[idx]==
'2')
242 if ( aname[idx]==
'3')
246 while (aname[idx]==
'0') idx++;
247 if ( aname[idx]==
'3')
249 if ( aname[idx]==
'6')
253 while (aname[idx]==
'0') idx++;
254 if ( aname[idx]==
'4')
256 if ( aname[idx]==
'8')
258 if ( aname[idx]==
'9')
262 while (aname[idx]==
'0') idx++;
263 if ( aname[idx]==
'4')
265 if ( aname[idx]==
'1' && aname[idx+1]==
'0')
270 while (aname[idx]==
'0') idx++;
271 if ( aname[idx]==
'8')
273 if ( aname[idx]==
'2') {
274 if ( aname[idx+1]==
'0')
276 if ( aname[idx+1]==
'7')
281 while (aname[idx]==
'0') idx++;
282 if ( aname[idx]==
'5') {
286 if ( aname[idx]==
'6') {
291 if ( aname[idx]==
'1') {
292 if ( aname[idx+1] ==
'4') {
297 if ( aname[idx+1] ==
'5') {
302 if ( aname[idx+1] ==
'8') {
309 while (aname[idx]==
'0') idx++;
310 if ( aname[idx]==
'6') {
315 if ( aname[idx]==
'1') {
316 if ( aname[idx+1] ==
'5') {
321 if ( aname[idx+1] ==
'8') {
328 if ( aname[idx++]==
't') {
329 while (aname[idx]==
'0') idx++;
330 if ( aname[idx]==
'3')
333 if ( aname[idx]==
'2')
336 if ( aname[idx]==
'1')
Size size_of_ghost_elements() const
Get the number of ghost elements.
int _ngitems
Size of ghost items.
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language.
const int * pointer() const
Get a constant pointer to the connectivity array.
void set_pointer(void *p, int strd, int cap, int offset, bool is_const)
Set the physical address of the attribute values.
Contains the prototypes for the Pane object.
bool is_structured() const
Determine whether the mesh is quadratic.
#define COM_assertion_msg(EX, msg)
const void * get_addr(int i, int j=0) const
Obtain the address of the jth component of the ith item, where 0<=i<size_of_items.
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
Size size_of_ghost_nodes() const
Get the number of ghost nodes.
real *8 function offset(vNorm, x2, y2, z2)
Size size_of_ghost_nodes() const
Get the number of ghost nodes of the owner pane.
static const int * get_size_info(const std::string &aname)
Obtain the size info of pre-defined connectivity.
Encapsulates the states of an exception.
unsigned int Size
Unsighed int.
int size_of_ghost_items() const
Obtain the number of ghost items in the attribute.
Size size_of_nodes() const
Get the total number of nodes (including ghost nodes) of the owner pane.
bool ignore_ghost() const
Pane * _pane
Pointer to its owner pane.
Size size_of_real_elements() const
Get the number of real elements.
void set_pointer(void *p, int strd, int cap, bool is_const)
Set pointer of connectivity table.
This file contains a set of routines for error assertion.
void set_offset(Size offset)
Set the index of the first element.
Contains the prototype of Connectivity.
void set_size(int nitems, int ngitems=0)
Set the size of items and ghost items.
int size_of_real_items() const
Obtain the number of real items in the attribute.
unsigned int Size
Unsighed int.
void set_size(int nitems, int ngitems=0)
Set the size of items and ghost items.
Size size_of_real_nodes() const
Get the number of real nodes in the pane (excluding ghost nodes).
#define append_frame(s, frame)
Macro for appending the information about the given frame to the string s.
Size size_of_nodes() const
Get the total number of nodes in the pane (including ghost nodes).
const int * get_addr(int i, int j=0) const
Obtain the address of the jth component of the ith item, where 0<=i<size_of_items.
void * allocate(int strd, int cap, bool force)
Allocate memory for the attribute.
Size size_of_elements() const
Get the total number of elements (including ghost elements) in the table.
static const int _sizes[TYPE_MAX_CONN][SIZE_MAX_CONN]
Size size_of_real_nodes() const
Get the number of real nodes of the owner pane.
int size_of_items() const
Obtain the number of items in the attribute.