Dune Core Modules (2.4.2)

geldesc.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef __GRAPE_ELDESC_H__
4#define __GRAPE_ELDESC_H__
5
6#if HAVE_GRAPE
7
8#include "ghmesh.hh"
9
10#ifndef GRAPE_DIM
11#define GRAPE_DIM 3
12#endif
13
14#if GRAPE_DIM==3
15typedef HELEMENT3D HELEMENT;
16typedef ELEMENT3D ELEMENT;
17typedef HMESH3D HMESH;
18typedef HMESH GRAPEMESH;
19typedef GENMESH3D GENMESHnD;
20typedef HELEMENT3D_DESCRIPTION H_ELEMENT_DESCRIPTION;
21typedef ELEMENT3D_DESCRIPTION ELEMENT_DESCRIPTION;
22typedef F_HDATA3D F_DATA;
23typedef F_HEL_INFO3D F_EL_INFO;
24#define HMesh HMesh3d
25#define GenMesh GenMesh3d
26#define GrapeMesh HMesh
27#else
28typedef HELEMENT2D HELEMENT;
29typedef ELEMENT2D ELEMENT;
30typedef GENMESH2D GENMESHnD;
31typedef HELEMENT2D_DESCRIPTION H_ELEMENT_DESCRIPTION;
32typedef ELEMENT2D_DESCRIPTION ELEMENT_DESCRIPTION;
33typedef F_HEL_INFO2D F_EL_INFO;
34
35// definitions for using HPMesh2d
36typedef HPMESH2D HMESH;
37typedef F_HPDATA2D F_DATA;
38#define HMesh HPMesh2d
39
40// definitions for using Mesh2d
41//typedef HMESH2D HMESH;
42//typedef F_HDATA2D F_DATA;
43//#define HMesh HMesh2d
44
45typedef HMESH GRAPEMESH;
46#define GenMesh GenMesh2d
47#define GrapeMesh HMesh
48#endif
49
50/**************************************************************************/
51/* element types, see dune/grid/common/grid.hh and grapegriddisplay.hh */
52enum GR_ElementType
53{gr_vertex=6,gr_line=7,
54 // here consecutive numbering from zero that this numbers can be used
55 // in an array starting from 0
56 gr_triangle=0, gr_quadrilateral=1,gr_tetrahedron=2,
57 gr_pyramid=3, gr_prism=4, gr_hexahedron=5,
58 gr_iso_triangle=8, gr_iso_quadrilateral=9,
59 gr_unknown=127};
60enum { numberOfUsedGrapeElementTypes = 6 };
61
62/*****************************************************************************
63* HELEMENT2D_DESCRIPTION for Triangles *
64*****************************************************************************/
65
66
67static HELEMENT2D_DESCRIPTION triangle_description;
68
69static double triangle_local_coordinate_vector_0[3] = {0.,0.,0.};
70static double triangle_local_coordinate_vector_1[3] = {1.,0.,0.};
71static double triangle_local_coordinate_vector_2[3] = {0.,1.,0.};
72
73static G_CONST double *triangle_local_coordinate_system[3] = {triangle_local_coordinate_vector_0,
74 triangle_local_coordinate_vector_1,
75 triangle_local_coordinate_vector_2};
76
77/* inheritance-rules:
78 2 0 1
79 /\ /| |\
80 / \ C0 / | | \ C1
81 / \ => / | | \
82 / \ / | | \
83 0--------1 1----2 2----0
84 */
85
86// NOTE: To be revised
87static VINHERIT inheritance_rule_in_child_0[3];
88static VINHERIT inheritance_rule_in_child_1[3];
89
90static double pweight_point_0_or_1[1] = {1.0};
91
92static int pindex_point_0_in_child_0[1] = {2};
93static VINHERIT vinherit_point_0_in_child_0 = {1,
94 pindex_point_0_in_child_0,
95 pweight_point_0_or_1};
96
97
98static int pindex_point_1_in_child_0[1] = {0};
99static VINHERIT vinherit_point_1_in_child_0 = {1,
100 pindex_point_1_in_child_0,
101 pweight_point_0_or_1};
102
103static int pindex_point_0_in_child_1[1] = {1};
104static VINHERIT vinherit_point_0_in_child_1 = {1,
105 pindex_point_0_in_child_1,
106 pweight_point_0_or_1};
107
108static int pindex_point_1_in_child_1[1] = {2};
109static VINHERIT vinherit_point_1_in_child_1 = {1,
110 pindex_point_1_in_child_1,
111 pweight_point_0_or_1};
112
113static int pindex_point_2[2] = {0 ,1 };
114static double pweight_point_2[2] = {0.5,0.5};
115static VINHERIT vinherit_point_2 = {2,pindex_point_2,pweight_point_2};
116
117
118/*****************************************************************************
119******************************************************************************
120** **
121** Die HEL_DESCR Routinen "neighbour, boundary, check_inside, **
122** world2coord, coord2world" **
123** **
124******************************************************************************
125*****************************************************************************/
126
127inline static HELEMENT2D * triangle_neighbour(HELEMENT2D *el, int np, int flag,
128
129 double * coord, double * xyz, MESH_ELEMENT_FLAGS p) {
130 printf(" neighbour nicht implementiert \n");
131 return el ;
132}
133
134inline int triangle_boundary(HELEMENT2D * el, int np) {
135 return ((DUNE_ELEM *)el->user_data)->bnd[np] ;
136}
137
138/***********************************************************************
139*
140* the functions check_inside, world2coord and coord2world
141* work for all types of elements
142*
143***********************************************************************/
144
145/* the 2d versions */
146inline int el_check_inside(HELEMENT2D * e, const double * coord)
147{
148 DUNE_DAT * dat = (DUNE_DAT *) ((HMESH2D *) e->mesh)->user_data;
149 return dat->check_inside((DUNE_ELEM *) e->user_data, coord);
150}
151
152inline int world2coord(HELEMENT2D * e, const double * xyz,double * coord)
153{
154 DUNE_DAT * dat = (DUNE_DAT *) ((HMESH2D *) e->mesh)->user_data;
155 return dat->wtoc((DUNE_ELEM *) e->user_data, xyz, coord);
156}
157
158inline void coord2world(HELEMENT2D * e, const double * coord,double * xyz)
159{
160 DUNE_DAT * dat = (DUNE_DAT *) ((HMESH2D *) e->mesh)->user_data;
161 dat->ctow((DUNE_ELEM *) e->user_data, coord, xyz);
162}
163
164/* the 3d versions */
165inline int el_check_inside_3d(HELEMENT3D * e, double * coord)
166{
167 DUNE_DAT * dat = (DUNE_DAT *) ((HMESH3D *) e->mesh)->user_data;
168 return dat->check_inside((DUNE_ELEM *) e->user_data, coord);
169}
170
171inline static int world2coord_3d(HELEMENT3D * e, const double * xyz,
172 double * coord)
173{
174 DUNE_DAT * dat = (DUNE_DAT *) ((HMESH3D *) e->mesh)->user_data;
175 return dat->wtoc((DUNE_ELEM *) e->user_data, xyz, coord);
176}
177
178inline static void coord2world_3d(HELEMENT3D * e, const double * coord,
179 double * xyz)
180{
181 DUNE_DAT * dat = (DUNE_DAT *) ((HMESH3D *) e->mesh)->user_data;
182 dat->ctow((DUNE_ELEM *) e->user_data, coord, xyz);
183}
184
185/*****************************************************************************
186* HELEMENT2D_DESCRIPTION for Quadrilaterals *
187*****************************************************************************/
188
189/****************************************************************************/
190/* Eckpunkte :
191 *
192 *
193 * (0,1) 3---------2 (1,1)
194 * | |
195 * | |
196 * | |
197 * | |
198 * | |
199 * (0,0) 0---------1 (1,0)
200 *
201 * this is the dune local coordinate system
202 ***************************************************************************/
203
204static bool Grape_ReferenceElementsInitialized = false ;
205
206static HELEMENT2D_DESCRIPTION quadrilateral_description;
207
208static double quadrilateral_local_coordinate_vector_0[3] = {0.,0.,0.};
209static double quadrilateral_local_coordinate_vector_1[3] = {1.,0.,0.};
210static double quadrilateral_local_coordinate_vector_2[3] = {1.,1.,0.};
211static double quadrilateral_local_coordinate_vector_3[3] = {0.,1.,0.};
212
213static G_CONST double *quadrilateral_local_coordinate_system[4] = {quadrilateral_local_coordinate_vector_0,
214 quadrilateral_local_coordinate_vector_1,quadrilateral_local_coordinate_vector_2,
215 quadrilateral_local_coordinate_vector_3};
216
217
218
219/*****************************************************************************
220* HELEMENT3D_DESCRIPTION for Tetrahedra *
221*****************************************************************************/
222
223static HELEMENT3D_DESCRIPTION tetra_description;
224
225/* vertex indices of the polygons (faces) for a tetrahedron */
226static int t_v0_e[3] = {1,3,2}, t_v1_e[3] = {0,2,3};
227static int t_v2_e[3] = {0,3,1}, t_v3_e[3] = {0,1,2};
228
229/* polygon adjacencies for a tetrahedron */
230static int t_p0_e[3] = {2,1,3}, t_p1_e[3] = {3,0,2};
231static int t_p2_e[3] = {1,0,3}, t_p3_e[3] = {2,0,1};
232
233/* local coordinates of the vertices for a tetrahedron in barycentric
234 * coords */
235//static double t_c0[4] = {1.,0.,0.,0.}, t_c1[4] = {0.,1.,0.,0.};
236//static double t_c2[4] = {0.,0.,1.,0.}, t_c3[4] = {0.,0.,0.,1.};
237/* local coordinates of the vertices for a tetrahedron */
238static double t_c0[3] = {0.,0.,0.}, t_c1[3] = {1.,0.,0.};
239static double t_c2[3] = {0.,1.,0.}, t_c3[3] = {0.,0.,1.};
240
241static int tetra_polygon_length[4] = {3, 3, 3, 3};
242static G_CONST int *tetra_vertex_e[4] = {t_v0_e,t_v1_e,t_v2_e,t_v3_e};
243static G_CONST int *tetra_next_polygon_e[4] = {t_p0_e,t_p1_e,t_p2_e,t_p3_e};
244static G_CONST double *tetra_local_coordinate_system[4] = {t_c0,t_c1,t_c2,t_c3};
245
246/*****************************************************************************
247******************************************************************************
248** **
249** Die HEL_DESCR Routinen "neighbour, boundary, check_inside, **
250** world2coord, coord2world" **
251** **
252******************************************************************************
253*****************************************************************************/
254
255inline static HELEMENT3D * dummy_neighbour(HELEMENT3D *el, int np, int flag,
256
257 double * coord, double * xyz, MESH_ELEMENT_FLAGS p) {
258
259 printf(" neighbour nicht implementiert \n");
260 return el ;
261
262}
263
264inline static int wrap_boundary(HELEMENT3D * el, int np)
265{
266 return ((DUNE_ELEM *)el->user_data)->bnd[np] ;
267}
268
269/*****************************************************************************
270* HELEMENT3D_DESCRIPTION for Hexahedra *
271*****************************************************************************/
272/****************************************************************************/
273/* Eckpunkte und Seitenflaechen in GRAPE:
274 * 7---------6
275 * /. /|
276 * / . 1 / |
277 * / . / |
278 * 4---------5 | <-- 4 (hinten)
279 * 5 --> | . | 3 |
280 * | 3.....|...2
281 * | . | /
282 * | . 2 | / <-- 0 (unten)
283 * |. |/
284 * 0---------1
285 *
286 * this is the GRAPE local coordinate system
287 *
288 ***************************************************************************
289 *
290 * Eckpunkte und Seitenflaechen in DUNE:
291 *
292 * 6---------7
293 * /. /|
294 * / . 5 / |
295 * / . / |
296 * 4---------5 | <-- 3 (hinten)
297 * 0 --> | . | 1 |
298 * | 2.....|...3
299 * | . | /
300 * | . 2 | / <-- 4 (unten)
301 * |. |/
302 * 0---------1
303 *
304 * this is the DUNE local coordinate system
305 ***************************************************************************/
306static HELEMENT3D_DESCRIPTION cube_description;
307
308
309static VEC3 cc1={0.,0.,0.},cc2={1.,0.,0.},cc3={1.,1.,0.},cc4={0.,1.,0.},
310 cc5={0.,0.,1.},cc6={1.,0.,1.},cc7={1.,1.,1.},cc8={0.,1.,1.};
311static G_CONST double *cube_local_coordinate_system[8] = {cc1,cc2,cc3,cc4,cc5,cc6,cc7,cc8};
312// how many polygons on which face
313static int cube_polygon_length[6] = {4,4,4,4,4,4};
314// vertices of the faces
315static int cv1[4]={0,3,2,1},cv2[4]={4,5,6,7},cv3[4]={0,1,5,4},
316 cv4[4]={1,2,6,5},cv5[4]={2,3,7,6},cv6[4]={0,4,7,3};
317static G_CONST int *cube_polygon_vertex[6] = {cv1,cv2,cv3,cv4,cv5,cv6};
318static int cn1[4]={5,4,3,2},cn2[4]={2,3,4,5},cn3[4]={0,3,1,5},
319 cn4[4]={0,4,1,2},cn5[4]={0,5,1,3},cn6[4]={2,1,4,0};
320static G_CONST int *cube_polygon_neighbour[6] = {cn1,cn2,cn3,cn4,cn5,cn6};
321
322
323/*****************************************************************************/
324/*****************************************************************************/
325/*****************************************************************************/
326/*****************************************************************************/
327/*****************************************************************************/
328/*****************************************************************************
329* HELEMENT3D_DESCRIPTION for Pyramids *
330*****************************************************************************/
331static HELEMENT3D_DESCRIPTION pyra_description;
332
333static VEC3 pyc1={0.,0.,0.},pyc2={1.,0.,0.},pyc3={1.,1.,0.},
334 pyc4={0.,1.,0.},pyc5={0.,0.,1.};
335static G_CONST double *pyra_local_coordinate_system[5] = {pyc1,pyc2,pyc3,pyc4,pyc5};
336
337static int pyra_polygon_length[5] = {4,3,3,3,3};
338static int pyv1[4]={0,1,2,3},pyv2[3]={0,4,1},pyv3[3]={1,4,2},
339 pyv4[3]={2,4,3} ,pyv5[3]={0,3,4};
340static G_CONST int *pyra_polygon_vertex[5] = {pyv1,pyv2,pyv3,pyv4,pyv5};
341
342static int pyn1[4]={5,4,3,2},pyn2[3]={0,2,4},pyn3[3]={0,3,1},
343 pyn4[3]={0,4,2} ,pyn5[3]={0,1,3};
344static G_CONST int *pyra_polygon_neighbour[5] = {pyn1,pyn2,pyn3,pyn4,pyn5};
345
346/*****************************************************************************/
347/*****************************************************************************/
348/*****************************************************************************/
349/*****************************************************************************/
350/*****************************************************************************/
351/*****************************************************************************/
352/*****************************************************************************
353* HELEMENT3D_DESCRIPTION for Prism *
354*****************************************************************************/
355static HELEMENT3D_DESCRIPTION prism_description;
356
357static VEC3 prc1={0.,0.,0.},prc2={1.,0.,0.},prc3={0.,1.,0.},
358 prc4={0.,0.,1.},prc5={1.,0.,1.},prc6={0.,1.,1.};
359static G_CONST double *prism_local_coordinate_system[6] = {prc1,prc2,prc3,prc4,prc5,prc6};
360
361// how many polygons on which face
362static int prism_polygon_length[5] = {3,4,4,4,3};
363
364// vertices of the faces
365static int prv1[3]={0,1,2}, prv2[4]={0,1,4,3},prv3[4]={1,2,5,4},
366 prv4[4]={2,0,3,5},prv5[3]={3,4,5};
367
368static G_CONST int *prism_polygon_vertex[5] = {prv1,prv2,prv3,prv4,prv5};
369
370static int prn1[4]={5,4,3,2},prn2[4]={2,3,4,5},prn3[4]={0,3,1,5},
371 prn4[4]={0,4,1,2},prn5[4]={0,5,1,3},prn6[4]={2,1,4,0};
372static G_CONST int *prism_polygon_neighbour[6] = {prn1,prn2,prn3,prn4,prn5,prn6};
373
374/* Standard description */
375/****************************************************************************/
376/* fill the upper reference elements */
377inline void setupReferenceElements()
378{
379 if( ! Grape_ReferenceElementsInitialized )
380 {
381 /* fill the helement description in 2D*/
382
383 triangle_description.dindex = gr_triangle; // index of description
384 triangle_description.number_of_vertices = 3;
385 /* dimension of local coords */
386 triangle_description.dimension_of_coord = GRAPE_DIM;
387 triangle_description.coord = triangle_local_coordinate_system;
388 triangle_description.parametric_degree = 1;
389 triangle_description.world_to_coord = world2coord;
390 triangle_description.coord_to_world = coord2world;
391 triangle_description.check_inside = el_check_inside;
392 triangle_description.neighbour = triangle_neighbour;
393 triangle_description.boundary = triangle_boundary;
394
395
396 quadrilateral_description.dindex = gr_quadrilateral; // index of description
397 quadrilateral_description.number_of_vertices = 4;
398 quadrilateral_description.dimension_of_coord = GRAPE_DIM;
399 quadrilateral_description.coord = quadrilateral_local_coordinate_system;
400 quadrilateral_description.parametric_degree = 1;
401 quadrilateral_description.world_to_coord = world2coord;
402 quadrilateral_description.coord_to_world = coord2world;
403 quadrilateral_description.check_inside = el_check_inside;
404 quadrilateral_description.neighbour = triangle_neighbour;
405 quadrilateral_description.boundary = triangle_boundary;
406
407 /* fill the helement description in 3D*/
408
409 tetra_description.dindex = gr_tetrahedron; // index of description
410 tetra_description.number_of_vertices = 4;
411 tetra_description.number_of_polygons = 4; // i.e. number of faces
412 tetra_description.polygon_length = tetra_polygon_length;
413 tetra_description.polygon_vertex = tetra_vertex_e;
414 tetra_description.polygon_neighbour = tetra_next_polygon_e;
415 tetra_description.dimension_of_coord = 3; // GRAPE_DIM
416 tetra_description.coord = tetra_local_coordinate_system;
417 tetra_description.parametric_degree = 1;
418 tetra_description.world_to_coord = world2coord_3d;
419 tetra_description.coord_to_world = coord2world_3d;
420 tetra_description.check_inside = el_check_inside_3d;
421 tetra_description.neighbour = dummy_neighbour;
422 tetra_description.boundary = wrap_boundary;
423 tetra_description.get_boundary_vertex_estimate = NULL;
424 tetra_description.get_boundary_face_estimate = NULL;
425 tetra_description.coord_of_parent = NULL;
426
427 /* pyramid */
428 pyra_description.dindex = gr_pyramid; // index of description , see element type
429 pyra_description.number_of_vertices = 5;
430 pyra_description.number_of_polygons = 5; // i.e. number of faces
431 pyra_description.polygon_length = pyra_polygon_length;
432 pyra_description.polygon_vertex = pyra_polygon_vertex;
433 pyra_description.polygon_neighbour = pyra_polygon_neighbour;
434 pyra_description.dimension_of_coord = 3; // GRAPE_DIM
435 pyra_description.coord = pyra_local_coordinate_system;
436 pyra_description.parametric_degree = 1;
437 pyra_description.world_to_coord = world2coord_3d;
438 pyra_description.coord_to_world = coord2world_3d;
439 pyra_description.check_inside = el_check_inside_3d;
440 pyra_description.neighbour = dummy_neighbour;
441 pyra_description.boundary = wrap_boundary;
442 pyra_description.get_boundary_vertex_estimate = NULL;
443 pyra_description.get_boundary_face_estimate = NULL;
444 pyra_description.coord_of_parent = NULL;
445
446 /* prism */
447 prism_description.dindex = gr_prism; // index of description
448 prism_description.number_of_vertices = 6;
449 prism_description.number_of_polygons = 5; // i.e. number of faces
450 prism_description.polygon_length = prism_polygon_length;
451 prism_description.polygon_vertex = prism_polygon_vertex;
452 prism_description.polygon_neighbour = prism_polygon_neighbour;
453 prism_description.dimension_of_coord = 3; // GRAPE_DIM
454 prism_description.coord = prism_local_coordinate_system;
455 prism_description.parametric_degree = 1;
456 prism_description.world_to_coord = world2coord_3d;
457 prism_description.coord_to_world = coord2world_3d;
458 prism_description.check_inside = el_check_inside_3d;
459 prism_description.neighbour = dummy_neighbour;
460 prism_description.boundary = wrap_boundary;
461 prism_description.get_boundary_vertex_estimate = NULL;
462 prism_description.get_boundary_face_estimate = NULL;
463 prism_description.coord_of_parent = NULL;
464
465 /* Hexahedrons */
466 cube_description.dindex = gr_hexahedron; // index of description
467 cube_description.number_of_vertices = 8;
468 cube_description.number_of_polygons = 6; // i.e. number of faces
469 cube_description.polygon_length = cube_polygon_length;
470 cube_description.polygon_vertex = cube_polygon_vertex;
471 cube_description.polygon_neighbour = cube_polygon_neighbour;
472 cube_description.dimension_of_coord = 3; // GRAPE_DIM
473 cube_description.coord = cube_local_coordinate_system;
474 cube_description.parametric_degree = 1;
475 cube_description.world_to_coord = world2coord_3d;
476 cube_description.coord_to_world = coord2world_3d;
477 cube_description.check_inside = el_check_inside_3d;
478 cube_description.neighbour = dummy_neighbour;
479 cube_description.boundary = wrap_boundary;
480 cube_description.get_boundary_vertex_estimate = NULL;
481 cube_description.get_boundary_face_estimate = NULL;
482 cube_description.coord_of_parent = NULL;
483
484
485 /* inheritance rules */
486 inheritance_rule_in_child_0[0] = vinherit_point_0_in_child_0;
487 inheritance_rule_in_child_0[1] = vinherit_point_1_in_child_0;
488 inheritance_rule_in_child_0[2] = vinherit_point_2;
489
490 inheritance_rule_in_child_1[0] = vinherit_point_0_in_child_1;
491 inheritance_rule_in_child_1[1] = vinherit_point_1_in_child_1;
492 inheritance_rule_in_child_1[2] = vinherit_point_2;
493
494 Grape_ReferenceElementsInitialized = true ;
495 }
496}
497
498//vector holding the descriptions enumerated after it's index
499static void *
500elementDescriptions[numberOfUsedGrapeElementTypes] = {
501 (void *) &triangle_description,
502 (void *) &quadrilateral_description,
503 (void *) &tetra_description,
504 (void *) &pyra_description,
505 (void *) &prism_description,
506 (void *) &cube_description
507};
508
509// the mapping of the reference elements
510static const int dune2GrapeDefaultMap[MAX_EL_DOF] = {0,1,2,3,4,5,6,7};
511static const int * dune2GrapeTriangle = dune2GrapeDefaultMap;
512static const int * dune2GrapeTetrahedron = dune2GrapeDefaultMap;
513static const int * dune2GrapePrism = dune2GrapeDefaultMap;
514
515// for quads the vertices 2,3 are swaped
516static const int dune2GrapeQuadrilateral[MAX_EL_DOF] = {0,1,3,2,4,5,6,7};
517// for hexas the vertices 2,3 and 6,7 are swaped
518static const int dune2GrapeHexahedron[MAX_EL_DOF] = {0,1,3,2,4,5,7,6};
519
520// For pyramids the vertices 2,3 are swapped (in the generic geometries)
521static const int dune2GrapePyramid[ MAX_EL_DOF ] = {0,1,3,2,4,5,6,7};
522
523// mapping from dune to grape
524static const int *
525dune2GrapeVertex[numberOfUsedGrapeElementTypes] = {
526 dune2GrapeTriangle ,
527 dune2GrapeQuadrilateral ,
528 dune2GrapeTetrahedron,
529 dune2GrapePyramid ,
530 dune2GrapePrism ,
531 dune2GrapeHexahedron
532};
534// face mappings
536
537// the mapping of the reference faces
538static const int dune2GrapeDefaultFace[MAX_EL_FACE] = {0,1,2,3,4,5};
539
540// triangle face mapping
541static const int dune2GrapeTriangleFace[MAX_EL_FACE] = {2,1,0,3,4,5};
542
543// tetrahedron face mapping
544static const int dune2GrapeTetrahedronFace[MAX_EL_FACE] = {3,2,1,0,4,5};
545
546// hexahedron face mapping
547static const int dune2GrapeHexahedronFace[MAX_EL_FACE] = {5,3,2,4,0,1};
548
549// using default mapping here
550static const int * dune2GrapeQuadrilateralFace = dune2GrapeDefaultFace;
551static const int * dune2GrapePrismFace = dune2GrapeDefaultFace;
552static const int * dune2GrapePyramidFace = dune2GrapeDefaultFace;
553
554// mapping from dune to grape
555static const int *
556dune2GrapeFace[numberOfUsedGrapeElementTypes] = {
557 dune2GrapeTriangleFace ,
558 dune2GrapeQuadrilateralFace ,
559 dune2GrapeTetrahedronFace,
560 dune2GrapePyramidFace ,
561 dune2GrapePrismFace ,
562 dune2GrapeHexahedronFace
563};
564
565static H_ELEMENT_DESCRIPTION * getElementDescription( int type )
566{
567 assert( type >= 0 );
568 assert( type < numberOfUsedGrapeElementTypes );
569 return (H_ELEMENT_DESCRIPTION * )elementDescriptions[type];
570}
571#endif
572
573#endif
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)