Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
GeometricConnectic.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* GeometricConnectic.h (C) 2000-2026 */
9/* */
10/* Connectivities of 2D/3D elements. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13#ifndef ARCANE_GEOMETRIC_GEOMETRICCONNECTIC_H
14#define ARCANE_GEOMETRIC_GEOMETRICCONNECTIC_H
15/*---------------------------------------------------------------------------*/
16/*---------------------------------------------------------------------------*/
17
19
20#include "arcane/geometry/GeometricGlobal.h"
21
22#ifdef __GNUC__
23#define ARCANE_UNUSED_ATTRIBUTE __attribute__((unused))
24#else
25#define ARCANE_UNUSED_ATTRIBUTE
26#endif
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31namespace Arcane::geometric
32{
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
37/*!
38 * \brief Local connectivity structure
39 *
40 * These three arrays allow locating the neighbors of the cell base mesh elements
41 * for local numbering.
42 *
43 * For a quadrilateral cell:
44 * -----------------------------
45 *
46 * Definition of NodeConnectic2D
47 *
48 * -> vertex 0 belongs to faces 0,1,2
49 * -> vertex 1 belongs to faces 0,2,4
50 *
51 * and so on.... and of course, everything is "in order".
52 *
53 * Definition of FaceConnectic2D
54 *
55 * -> face 0 is composed of vertices 0,3
56 * -> face 1 is composed of vertices 0,4
57 *
58 * the order of vertices defines the direction of the normal
59 * external to the cell through the face.
60 *
61 * Definition of SVCFaceConnectic2D
62 *
63 * -> the internal face of the control volume sub-domain is composed
64 * of the center, the center of a face
65 * It contributes positively to one node and negatively to another
66 */
67/*---------------------------------------------------------------------------*/
68/*---------------------------------------------------------------------------*/
69/*---------------------------------------------------------------------------*/
70/*---------------------------------------------------------------------------*/
71
72/*!
73 * \brief Local cell connectivity structures
74 *
75 * returns the local number in the cell of the face vertices
76 *
77 * the vertices are numbered such that they define the
78 * normal external to the cell.
79 *
80 */
81struct FaceConnectic
82{
83 public:
84
85 Integer nbNode() const { return m_nb_node; }
86 Integer node(Integer i) const { return m_node[i]; }
87
88 public:
89
90 FaceConnectic()
91 : m_nb_node(0)
92 {
93 m_node[0] = NULL_ITEM_ID;
94 m_node[1] = NULL_ITEM_ID;
95 m_node[2] = NULL_ITEM_ID;
96 m_node[3] = NULL_ITEM_ID;
97 m_node[4] = NULL_ITEM_ID;
98 m_node[5] = NULL_ITEM_ID;
99 }
100
101 FaceConnectic(Integer n0, Integer n1, Integer n2,
102 Integer n3, Integer n4, Integer n5)
103 : m_nb_node(6)
104 {
105 m_node[0] = n0;
106 m_node[1] = n1;
107 m_node[2] = n2;
108 m_node[3] = n3;
109 m_node[4] = n4;
110 m_node[5] = n5;
111 }
112
113 FaceConnectic(Integer n0, Integer n1, Integer n2, Integer n3, Integer n4)
114 : m_nb_node(5)
115 {
116 m_node[0] = n0;
117 m_node[1] = n1;
118 m_node[2] = n2;
119 m_node[3] = n3;
120 m_node[4] = n4;
121 }
122
123 FaceConnectic(Integer n0, Integer n1, Integer n2, Integer n3)
124 : m_nb_node(4)
125 {
126 m_node[0] = n0;
127 m_node[1] = n1;
128 m_node[2] = n2;
129 m_node[3] = n3;
130 }
131
132 FaceConnectic(Integer n0, Integer n1, Integer n2)
133 : m_nb_node(3)
134 {
135 m_node[0] = n0;
136 m_node[1] = n1;
137 m_node[2] = n2;
138 }
139
140 FaceConnectic(Integer n0, Integer n1)
141 : m_nb_node(2)
142 {
143 m_node[0] = n0;
144 m_node[1] = n1;
145 }
146
147 private:
148
149 Integer m_node[6];
150 Integer m_nb_node;
151};
152
153/*---------------------------------------------------------------------------*/
154/*---------------------------------------------------------------------------*/
155
156/*!
157 * \brief Local cell connectivity structures.
158 *
159 * returns the local number in the cell of the edge vertices
160 * and the local number of the cell faces supported by the edge.
161 *
162 * the face numbering is such that the surface defined by
163 * (c1,m,c2,bQ) --- where c1 and c2 represent the midpoints of the
164 * first and second face, m the midpoint of the edge, and bQ
165 * the barycenter of the cell --- is oriented positively from s1
166 * to s2.
167 */
168struct EdgeConnectic
169{
170 public:
171
172 Integer nbNode() const { return 2; }
173
174 EdgeConnectic()
175 {
176 m_node[0] = NULL_ITEM_ID;
177 m_node[1] = NULL_ITEM_ID;
178 m_face[0] = NULL_ITEM_ID;
179 m_face[1] = NULL_ITEM_ID;
180 }
181
182 EdgeConnectic(Integer n0, Integer n1, Integer f0, Integer f1)
183 {
184 m_node[0] = n0;
185 m_node[1] = n1;
186 m_face[0] = f0;
187 m_face[1] = f1;
188 }
189
190 public:
191
192 inline Integer node(Integer i) const { return m_node[i]; }
193 inline Integer face(Integer i) const { return m_face[i]; }
194
195 private:
196
197 Integer m_node[2];
198 Integer m_face[2];
199};
200
201/*---------------------------------------------------------------------------*/
202/*---------------------------------------------------------------------------*/
203
204/*!
205 * \brief Local cell connectivity structures
206 *
207 * returns the local number in the cell of the 3 edges and 3 faces
208 * connected to the vertex and the definition of the associated triad (n0,n1,n2,n3)
209 */
210struct NodeConnectic
211{
212 public:
213
214 NodeConnectic()
215 {
216 m_edge[0] = NULL_ITEM_ID;
217 m_edge[1] = NULL_ITEM_ID;
218 m_edge[2] = NULL_ITEM_ID;
219 m_face[0] = NULL_ITEM_ID;
220 m_face[1] = NULL_ITEM_ID;
221 m_face[2] = NULL_ITEM_ID;
222 m_node[0] = m_node[1] = m_node[2] = m_node[3] = NULL_ITEM_ID;
223 }
224 // 3D
225 NodeConnectic(Integer e0, Integer e1, Integer e2,
226 Integer f0, Integer f1, Integer f2,
227 Integer n0, Integer n1, Integer n2, Integer n3)
228 {
229 m_edge[0] = e0;
230 m_edge[1] = e1;
231 m_edge[2] = e2;
232 m_face[0] = f0;
233 m_face[1] = f1;
234 m_face[2] = f2;
235 m_node[0] = n0, m_node[1] = n1, m_node[2] = n2, m_node[3] = n3;
236 }
237
238 // 2D
239 NodeConnectic(Integer f0, Integer f1,
240 Integer n0, Integer n1, Integer n2)
241 {
242 m_face[0] = f0;
243 m_face[1] = f1;
244 m_node[0] = n0, m_node[1] = n1, m_node[2] = n2;
245 }
246
247 public:
248
249 inline Integer edge(Integer i) const { return m_edge[i]; }
250 inline Integer face(Integer i) const { return m_face[i]; }
251 inline Integer node(Integer i) const { return m_node[i]; }
252
253 private:
254
255 Integer m_edge[3];
256 Integer m_face[3];
257 Integer m_node[4];
258};
259
260/*---------------------------------------------------------------------------*/
261/*---------------------------------------------------------------------------*/
262
263/*!
264 * \brief Local cell and svc connectivity structures
265 *
266 * Returns the definition of an internal face (faces of the svc(s) not
267 * contained in the faces of the cell) as well as the two nodes
268 * separated by this face
269 */
270struct SVCFaceConnectic
271{
272 public:
273
274 SVCFaceConnectic()
275 : m_edge(0)
276 , m_face1(0)
277 , m_face2(0)
278 , m_node_pos(0)
279 , m_node_neg(0)
280 {}
281
282 // 3D
283 SVCFaceConnectic(Integer face1, Integer edge, Integer face2,
284 Integer node_pos, Integer node_neg)
285 : m_edge(edge)
286 , m_face1(face1)
287 , m_face2(face2)
288 , m_node_pos(node_pos)
289 , m_node_neg(node_neg)
290 {
291 }
292
293 // 2D
294 SVCFaceConnectic(Integer face1, Integer node_pos, Integer node_neg)
295 : m_edge(NULL_ITEM_LOCAL_ID)
296 , m_face1(face1)
297 , m_face2(NULL_ITEM_LOCAL_ID)
298 , m_node_pos(node_pos)
299 , m_node_neg(node_neg)
300 {
301 }
302
303 inline Integer edge() const { return m_edge; }
304 inline Integer firstFace() const { return m_face1; }
305 inline Integer secondFace() const { return m_face2; }
306 inline Integer positiveNode() const { return m_node_pos; }
307 inline Integer negativeNode() const { return m_node_neg; }
308
309 private:
310
311 Integer m_edge;
312 Integer m_face1;
313 Integer m_face2;
314 Integer m_node_pos;
315 Integer m_node_neg;
316};
317
318/*---------------------------------------------------------------------------*/
319/*---------------------------------------------------------------------------*/
320
321// constant arrays for hexahedrons
322//------------------------------------------
323
324// hexahedron node association
325const Integer hexa_node_association[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
326
327// for each node, we give the 3 edges and 3 faces it is connected to
328const NodeConnectic hexa_node_connectic[8] ARCANE_UNUSED_ATTRIBUTE = {
329 NodeConnectic(/* Edges */ 0, 3, 4, /* Faces */ 0, 1, 2, /* Nodes */ 0, 1, 3, 4),
330 NodeConnectic(/* Edges */ 1, 0, 5, /* Faces */ 0, 2, 4, /* Nodes */ 1, 2, 0, 5),
331 NodeConnectic(/* Edges */ 2, 1, 6, /* Faces */ 0, 4, 5, /* Nodes */ 2, 3, 1, 6),
332 NodeConnectic(/* Edges */ 3, 2, 7, /* Faces */ 0, 5, 1, /* Nodes */ 3, 0, 2, 7),
333 NodeConnectic(/* Edges */ 11, 8, 4, /* Faces */ 3, 2, 1, /* Nodes */ 4, 7, 5, 0),
334 NodeConnectic(/* Edges */ 8, 9, 5, /* Faces */ 3, 4, 2, /* Nodes */ 5, 4, 6, 1),
335 NodeConnectic(/* Edges */ 9, 10, 6, /* Faces */ 3, 5, 4, /* Nodes */ 6, 5, 7, 2),
336 NodeConnectic(/* Edges */ 10, 11, 7, /* Faces */ 3, 1, 5, /* Nodes */ 7, 6, 4, 3)
337};
338
339// for each edge, we give the 2 nodes that compose it and the 2 faces it is connected to
340const EdgeConnectic hexa_edge_connectic[12] ARCANE_UNUSED_ATTRIBUTE = {
341 EdgeConnectic(0, 1, 0, 2), EdgeConnectic(1, 2, 0, 4), EdgeConnectic(2, 3, 0, 5), EdgeConnectic(3, 0, 0, 1),
342 EdgeConnectic(0, 4, 2, 1), EdgeConnectic(1, 5, 4, 2), EdgeConnectic(2, 6, 5, 4), EdgeConnectic(3, 7, 1, 5),
343 EdgeConnectic(4, 5, 2, 3), EdgeConnectic(5, 6, 4, 3), EdgeConnectic(6, 7, 5, 3), EdgeConnectic(7, 4, 1, 3)
344};
345
346// for each face, we give the nodes that compose it
347const FaceConnectic hexa_face_connectic[6] ARCANE_UNUSED_ATTRIBUTE = {
348 FaceConnectic(0, 3, 2, 1), FaceConnectic(0, 4, 7, 3), FaceConnectic(0, 1, 5, 4),
349 FaceConnectic(4, 5, 6, 7), FaceConnectic(1, 2, 6, 5), FaceConnectic(2, 3, 7, 6)
350};
351
352// Generated by calcul.rb
353const SVCFaceConnectic hexa_svc_face_connectic[12] ARCANE_UNUSED_ATTRIBUTE = {
354 SVCFaceConnectic(4, 1, 0, 1, 2),
355 SVCFaceConnectic(1, 11, 3, 4, 7),
356 SVCFaceConnectic(5, 7, 1, 3, 7),
357 SVCFaceConnectic(3, 9, 4, 5, 6),
358 SVCFaceConnectic(2, 0, 0, 0, 1),
359 SVCFaceConnectic(3, 10, 5, 6, 7),
360 SVCFaceConnectic(4, 6, 5, 2, 6),
361 SVCFaceConnectic(2, 5, 4, 1, 5),
362 SVCFaceConnectic(5, 2, 0, 2, 3),
363 SVCFaceConnectic(1, 4, 2, 0, 4),
364 SVCFaceConnectic(0, 3, 1, 0, 3),
365 SVCFaceConnectic(3, 8, 2, 4, 5)
366};
367
368// constant arrays for pyramids
369//------------------------------------------
370
371const Integer pyra_node_association[8] = { 0, 1, 2, 3, 4, 4, 4, 4 };
372
373const NodeConnectic pyra_node_connectic[8] ARCANE_UNUSED_ATTRIBUTE = {
374 NodeConnectic(/* Edges */ 0, 3, 4, /* Faces */ 0, 1, 2, /* Nodes */ 0, 1, 3, 4),
375 NodeConnectic(/* Edges */ 1, 0, 5, /* Faces */ 0, 2, 3, /* Nodes */ 1, 2, 0, 4),
376 NodeConnectic(/* Edges */ 2, 1, 6, /* Faces */ 0, 3, 4, /* Nodes */ 2, 3, 1, 4),
377 NodeConnectic(/* Edges */ 3, 2, 7, /* Faces */ 0, 4, 1, /* Nodes */ 3, 0, 2, 4),
378 NodeConnectic(/* Edges */ 11, 8, 4, /* Faces */ 5, 2, 1, /* Nodes */ 4, 1, 0, 3),
379 NodeConnectic(/* Edges */ 8, 9, 5, /* Faces */ 5, 3, 2, /* Nodes */ 4, 2, 1, 0),
380 NodeConnectic(/* Edges */ 9, 10, 6, /* Faces */ 5, 4, 3, /* Nodes */ 4, 3, 2, 1),
381 NodeConnectic(/* Edges */ 10, 11, 7, /* Faces */ 5, 1, 4, /* Nodes */ 4, 0, 3, 2)
382};
383
384const EdgeConnectic pyra_edge_connectic[12] ARCANE_UNUSED_ATTRIBUTE = {
385 EdgeConnectic(0, 1, 0, 2),
386 EdgeConnectic(1, 2, 0, 3),
387 EdgeConnectic(2, 3, 0, 4),
388 EdgeConnectic(3, 0, 0, 1),
389 EdgeConnectic(0, 4, 2, 1),
390 EdgeConnectic(1, 4, 3, 2),
391 EdgeConnectic(2, 4, 4, 3),
392 EdgeConnectic(3, 4, 1, 4),
393 EdgeConnectic(4, 4, 2, 5),
394 EdgeConnectic(4, 4, 3, 5),
395 EdgeConnectic(4, 4, 4, 5),
396 EdgeConnectic(4, 4, 1, 5)
397};
398
399const FaceConnectic pyra_face_connectic[6] ARCANE_UNUSED_ATTRIBUTE = {
400 FaceConnectic(0, 3, 2, 1),
401 FaceConnectic(0, 4, 3),
402 FaceConnectic(0, 1, 4),
403 FaceConnectic(1, 2, 4),
404 FaceConnectic(2, 3, 4),
405 FaceConnectic(4, 4, 4)
406};
407
408// Generated by calcul.rb and modified to remove null faces
409const SVCFaceConnectic pyra_svc_face_connectic[8] ARCANE_UNUSED_ATTRIBUTE = {
410 SVCFaceConnectic(4, 2, 0, 2, 3),
411 SVCFaceConnectic(2, 0, 0, 0, 1),
412 SVCFaceConnectic(4, 7, 1, 3, 4),
413 SVCFaceConnectic(2, 5, 3, 1, 4),
414 SVCFaceConnectic(3, 1, 0, 1, 2),
415 SVCFaceConnectic(3, 6, 4, 2, 4),
416 SVCFaceConnectic(1, 4, 2, 0, 4),
417 SVCFaceConnectic(0, 3, 1, 0, 3)
418};
419
420// constant tables for pentadra
421//-------------------------------------------
422
423const Integer penta_node_association[6] = { 0, 1, 2, 3, 4, 5 };
424
425const NodeConnectic penta_node_connectic[6] ARCANE_UNUSED_ATTRIBUTE = {
426 NodeConnectic(/* Edges */ 0, 2, 3, /* Faces */ 0, 1, 2, /* Nodes */ 0, 1, 2, 3),
427 NodeConnectic(/* Edges */ 1, 0, 4, /* Faces */ 0, 2, 4, /* Nodes */ 1, 2, 0, 4),
428 NodeConnectic(/* Edges */ 2, 1, 5, /* Faces */ 0, 4, 1, /* Nodes */ 2, 0, 1, 5),
429 NodeConnectic(/* Edges */ 8, 6, 3, /* Faces */ 3, 2, 1, /* Nodes */ 3, 5, 4, 0),
430 NodeConnectic(/* Edges */ 6, 7, 4, /* Faces */ 3, 4, 2, /* Nodes */ 4, 3, 5, 1),
431 NodeConnectic(/* Edges */ 7, 8, 5, /* Faces */ 3, 1, 4, /* Nodes */ 5, 4, 3, 2)
432};
433
434const EdgeConnectic penta_edge_connectic[9] ARCANE_UNUSED_ATTRIBUTE = {
435 EdgeConnectic(0, 1, 0, 2), EdgeConnectic(1, 2, 0, 4), EdgeConnectic(2, 0, 1, 0), EdgeConnectic(0, 3, 1, 2),
436 EdgeConnectic(1, 4, 2, 4), EdgeConnectic(2, 5, 4, 1), EdgeConnectic(3, 4, 2, 3), EdgeConnectic(4, 5, 4, 3),
437 EdgeConnectic(5, 3, 1, 3)
438};
439
440const FaceConnectic penta_face_connectic[5] ARCANE_UNUSED_ATTRIBUTE = {
441 FaceConnectic(0, 2, 1), FaceConnectic(0, 3, 5, 2), FaceConnectic(0, 1, 4, 3),
442 FaceConnectic(3, 4, 5), FaceConnectic(1, 2, 5, 4)
443};
444
445// Generated by calcul.rb
446const SVCFaceConnectic penta_svc_face_connectic[9] ARCANE_UNUSED_ATTRIBUTE = {
447 SVCFaceConnectic(1, 8, 3, 3, 5),
448 SVCFaceConnectic(4, 5, 1, 2, 5),
449 SVCFaceConnectic(0, 2, 1, 0, 2),
450 SVCFaceConnectic(4, 1, 0, 1, 2),
451 SVCFaceConnectic(3, 6, 2, 3, 4),
452 SVCFaceConnectic(2, 4, 4, 1, 4),
453 SVCFaceConnectic(2, 0, 0, 0, 1),
454 SVCFaceConnectic(1, 3, 2, 0, 3),
455 SVCFaceConnectic(3, 7, 4, 4, 5)
456};
457
458// constant tables for tetrahedra
459//-------------------------------------------
460
461const Integer tetra_node_association[4] = { 0, 1, 2, 3 };
462
463const NodeConnectic tetra_node_connectic[4] ARCANE_UNUSED_ATTRIBUTE = {
464 NodeConnectic(/* Edges */ 0, 2, 3, /* Faces */ 0, 1, 2, /* Nodes */ 0, 1, 2, 3),
465 NodeConnectic(/* Edges */ 1, 0, 4, /* Faces */ 0, 2, 3, /* Nodes */ 1, 2, 0, 3),
466 NodeConnectic(/* Edges */ 2, 1, 5, /* Faces */ 0, 3, 1, /* Nodes */ 2, 0, 1, 3),
467 NodeConnectic(/* Edges */ 3, 5, 4, /* Faces */ 1, 3, 2, /* Nodes */ 3, 0, 2, 1)
468};
469
470const EdgeConnectic tetra_edge_connectic[6] ARCANE_UNUSED_ATTRIBUTE = {
471 EdgeConnectic(0, 1, 0, 2), EdgeConnectic(1, 2, 0, 3), EdgeConnectic(2, 0, 0, 1), EdgeConnectic(0, 3, 1, 2),
472 EdgeConnectic(1, 3, 2, 3), EdgeConnectic(2, 3, 1, 3)
473};
474
475const FaceConnectic tetra_face_connectic[4] ARCANE_UNUSED_ATTRIBUTE = {
476 FaceConnectic(0, 2, 1), FaceConnectic(0, 3, 2), FaceConnectic(0, 1, 3),
477 FaceConnectic(3, 1, 2)
478};
479
480// Generated by calcul.rb
481const SVCFaceConnectic tetra_svc_face_connectic[6] ARCANE_UNUSED_ATTRIBUTE = {
482 SVCFaceConnectic(0, 2, 1, 0, 2),
483 SVCFaceConnectic(2, 4, 3, 1, 3),
484 SVCFaceConnectic(2, 0, 0, 0, 1),
485 SVCFaceConnectic(1, 3, 2, 0, 3),
486 SVCFaceConnectic(3, 5, 1, 2, 3),
487 SVCFaceConnectic(3, 1, 0, 1, 2)
488};
489
490// constant tables for pentagonal prisms
491//-----------------------------------------------------------
492
493const Integer wedge7_node_association[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
494
495const NodeConnectic wedge7_node_connectic[10] ARCANE_UNUSED_ATTRIBUTE = {
496 NodeConnectic(/* Edges */ 0, 4, 10, /* Faces */ 0, 6, 2, /* Nodes */ 0, 1, 4, 5),
497 NodeConnectic(/* Edges */ 1, 0, 11, /* Faces */ 0, 2, 3, /* Nodes */ 1, 2, 0, 6),
498 NodeConnectic(/* Edges */ 2, 1, 12, /* Faces */ 0, 3, 4, /* Nodes */ 2, 3, 1, 7),
499 NodeConnectic(/* Edges */ 3, 2, 13, /* Faces */ 0, 4, 5, /* Nodes */ 3, 4, 2, 8),
500 NodeConnectic(/* Edges */ 4, 3, 14, /* Faces */ 0, 5, 6, /* Nodes */ 4, 0, 3, 9),
501 NodeConnectic(/* Edges */ 9, 5, 10, /* Faces */ 1, 2, 6, /* Nodes */ 5, 9, 6, 0),
502 NodeConnectic(/* Edges */ 5, 6, 11, /* Faces */ 1, 3, 2, /* Nodes */ 6, 5, 7, 1),
503 NodeConnectic(/* Edges */ 6, 7, 12, /* Faces */ 1, 4, 3, /* Nodes */ 7, 6, 8, 2),
504 NodeConnectic(/* Edges */ 7, 8, 13, /* Faces */ 1, 5, 4, /* Nodes */ 8, 7, 9, 3),
505 NodeConnectic(/* Edges */ 8, 9, 14, /* Faces */ 1, 6, 5, /* Nodes */ 9, 8, 5, 4)
506};
507
508const EdgeConnectic wedge7_edge_connectic[15] ARCANE_UNUSED_ATTRIBUTE = {
509 EdgeConnectic(0, 1, 0, 2), EdgeConnectic(1, 2, 0, 3), EdgeConnectic(2, 3, 0, 4), EdgeConnectic(3, 4, 0, 5),
510 EdgeConnectic(4, 0, 0, 6), EdgeConnectic(5, 6, 2, 1), EdgeConnectic(6, 7, 3, 1), EdgeConnectic(7, 8, 4, 1),
511 EdgeConnectic(8, 9, 5, 1), EdgeConnectic(9, 5, 6, 1), EdgeConnectic(0, 5, 6, 2), EdgeConnectic(1, 6, 2, 3),
512 EdgeConnectic(2, 7, 3, 4), EdgeConnectic(3, 8, 4, 5), EdgeConnectic(4, 9, 5, 6)
513};
514
515const FaceConnectic wedge7_face_connectic[7] ARCANE_UNUSED_ATTRIBUTE = {
516 FaceConnectic(0, 4, 3, 2, 1), FaceConnectic(5, 6, 7, 8, 9), FaceConnectic(0, 1, 6, 5),
517 FaceConnectic(1, 2, 7, 6), FaceConnectic(2, 3, 8, 7), FaceConnectic(3, 4, 9, 8),
518 FaceConnectic(4, 0, 5, 9)
519};
520
521// Generated by calcul.rb
522const SVCFaceConnectic wedge7_svc_face_connectic[15] ARCANE_UNUSED_ATTRIBUTE = {
523 SVCFaceConnectic(6, 9, 1, 5, 9),
524 SVCFaceConnectic(1, 8, 5, 8, 9),
525 SVCFaceConnectic(1, 6, 3, 6, 7),
526 SVCFaceConnectic(4, 13, 5, 3, 8),
527 SVCFaceConnectic(4, 2, 0, 2, 3),
528 SVCFaceConnectic(2, 0, 0, 0, 1),
529 SVCFaceConnectic(1, 7, 4, 7, 8),
530 SVCFaceConnectic(1, 5, 2, 5, 6),
531 SVCFaceConnectic(3, 1, 0, 1, 2),
532 SVCFaceConnectic(6, 10, 2, 0, 5),
533 SVCFaceConnectic(2, 11, 3, 1, 6),
534 SVCFaceConnectic(3, 12, 4, 2, 7),
535 SVCFaceConnectic(0, 4, 6, 0, 4),
536 SVCFaceConnectic(5, 14, 6, 4, 9),
537 SVCFaceConnectic(5, 3, 0, 3, 4)
538};
539
540// constant tables for hexagonal prisms
541//-----------------------------------------------------------
542
543const Integer wedge8_node_association[12] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
544const NodeConnectic wedge8_node_connectic[12] ARCANE_UNUSED_ATTRIBUTE = {
545 NodeConnectic(/* Edges */ 0, 5, 12, /* Faces */ 0, 7, 2, /* Nodes */ 0, 1, 5, 6),
546 NodeConnectic(/* Edges */ 1, 0, 13, /* Faces */ 0, 2, 3, /* Nodes */ 1, 2, 0, 7),
547 NodeConnectic(/* Edges */ 2, 1, 14, /* Faces */ 0, 3, 4, /* Nodes */ 2, 3, 1, 8),
548 NodeConnectic(/* Edges */ 3, 2, 15, /* Faces */ 0, 4, 5, /* Nodes */ 3, 4, 2, 9),
549 NodeConnectic(/* Edges */ 4, 3, 16, /* Faces */ 0, 5, 6, /* Nodes */ 4, 5, 3, 10),
550 NodeConnectic(/* Edges */ 5, 4, 17, /* Faces */ 0, 6, 7, /* Nodes */ 5, 0, 4, 11),
551 NodeConnectic(/* Edges */ 11, 6, 12, /* Faces */ 1, 2, 7, /* Nodes */ 6, 11, 7, 0),
552 NodeConnectic(/* Edges */ 6, 7, 13, /* Faces */ 1, 3, 2, /* Nodes */ 7, 6, 8, 1),
553 NodeConnectic(/* Edges */ 7, 8, 14, /* Faces */ 1, 4, 3, /* Nodes */ 8, 7, 9, 2),
554 NodeConnectic(/* Edges */ 8, 9, 15, /* Faces */ 1, 5, 4, /* Nodes */ 9, 8, 10, 3),
555 NodeConnectic(/* Edges */ 9, 10, 16, /* Faces */ 1, 6, 5, /* Nodes */ 10, 9, 11, 4),
556 NodeConnectic(/* Edges */ 10, 11, 17, /* Faces */ 1, 7, 6, /* Nodes */ 11, 10, 6, 5)
557};
558
559const EdgeConnectic wedge8_edge_connectic[18] ARCANE_UNUSED_ATTRIBUTE = {
560 EdgeConnectic(0, 1, 0, 2), EdgeConnectic(1, 2, 0, 3),
561 EdgeConnectic(2, 3, 0, 4), EdgeConnectic(3, 4, 0, 5),
562 EdgeConnectic(4, 5, 0, 6), EdgeConnectic(5, 0, 0, 7),
563 EdgeConnectic(6, 7, 2, 1), EdgeConnectic(7, 8, 3, 1),
564 EdgeConnectic(8, 9, 4, 1), EdgeConnectic(9, 10, 5, 1),
565 EdgeConnectic(10, 11, 6, 1), EdgeConnectic(11, 6, 7, 1),
566 EdgeConnectic(0, 6, 7, 2), EdgeConnectic(1, 7, 2, 3),
567 EdgeConnectic(2, 8, 3, 4), EdgeConnectic(3, 9, 4, 5),
568 EdgeConnectic(4, 10, 5, 6), EdgeConnectic(5, 11, 6, 7)
569
570};
571
572const FaceConnectic wedge8_face_connectic[8] ARCANE_UNUSED_ATTRIBUTE = {
573 FaceConnectic(0, 5, 4, 3, 2, 1), FaceConnectic(6, 7, 8, 9, 10, 11),
574 FaceConnectic(0, 1, 7, 6), FaceConnectic(1, 2, 8, 7),
575 FaceConnectic(2, 3, 9, 8), FaceConnectic(3, 4, 10, 9),
576 FaceConnectic(4, 5, 11, 10), FaceConnectic(5, 0, 6, 11)
577};
578
579// Generated by calcul.rb
580const SVCFaceConnectic wedge8_svc_face_connectic[18] ARCANE_UNUSED_ATTRIBUTE = {
581 SVCFaceConnectic(1, 9, 5, 9, 10),
582 SVCFaceConnectic(1, 8, 4, 8, 9),
583 SVCFaceConnectic(7, 12, 2, 0, 6),
584 SVCFaceConnectic(7, 11, 1, 6, 11),
585 SVCFaceConnectic(6, 17, 7, 5, 11),
586 SVCFaceConnectic(4, 15, 5, 3, 9),
587 SVCFaceConnectic(2, 13, 3, 1, 7),
588 SVCFaceConnectic(0, 5, 7, 0, 5),
589 SVCFaceConnectic(1, 10, 6, 10, 11),
590 SVCFaceConnectic(1, 6, 2, 6, 7),
591 SVCFaceConnectic(6, 4, 0, 4, 5),
592 SVCFaceConnectic(5, 16, 6, 4, 10),
593 SVCFaceConnectic(4, 2, 0, 2, 3),
594 SVCFaceConnectic(2, 0, 0, 0, 1),
595 SVCFaceConnectic(1, 7, 3, 7, 8),
596 SVCFaceConnectic(3, 1, 0, 1, 2),
597 SVCFaceConnectic(5, 3, 0, 3, 4),
598 SVCFaceConnectic(3, 14, 4, 2, 8)
599};
600
601// constant tables for quadrangles
602//---------------------------------------------
603
604// nodes of the quadrangle
605const Integer quad_node_association[4] = { 0, 1, 2, 3 };
606
607// for each node, the 2 faces it is connected to are given
608const NodeConnectic quad_node_connectic[4] ARCANE_UNUSED_ATTRIBUTE = {
609 NodeConnectic(/* Faces */ 0, 3, /* Nodes */ 0, 1, 3),
610 NodeConnectic(/* Faces */ 1, 0, /* Nodes */ 1, 2, 0),
611 NodeConnectic(/* Faces */ 2, 1, /* Nodes */ 2, 3, 1),
612 NodeConnectic(/* Faces */ 3, 2, /* Nodes */ 3, 0, 2),
613};
614
615// for each face, the 2 nodes that compose it are given
616const FaceConnectic quad_face_connectic[4] ARCANE_UNUSED_ATTRIBUTE = {
617 FaceConnectic(0, 1), FaceConnectic(1, 2), FaceConnectic(2, 3), FaceConnectic(3, 0)
618};
619
620// Generated by calcul.rb
621const SVCFaceConnectic quad_svc_face_connectic[4] ARCANE_UNUSED_ATTRIBUTE = {
622 SVCFaceConnectic(0, 0, 1),
623 SVCFaceConnectic(1, 1, 2),
624 SVCFaceConnectic(2, 2, 3),
625 SVCFaceConnectic(3, 3, 0),
626};
627// constant tables for triangles
628//------------------------------------------
629
630const Integer triangle_node_association[4] = { 0, 1, 2, 0 };
631
632const NodeConnectic triangle_node_connectic[4] ARCANE_UNUSED_ATTRIBUTE = {
633 NodeConnectic(/* Faces */ 0, 3, /* Nodes */ 0, 1, 3),
634 NodeConnectic(/* Faces */ 1, 0, /* Nodes */ 1, 2, 0),
635 NodeConnectic(/* Faces */ 2, 1, /* Nodes */ 2, 0, 1),
636 NodeConnectic(/* Faces */ 3, 2, /* Nodes */ 0, 0, 2),
637};
638
639const FaceConnectic triangle_face_connectic[4] ARCANE_UNUSED_ATTRIBUTE = {
640 FaceConnectic(0, 1),
641 FaceConnectic(1, 2),
642 FaceConnectic(2, 0),
643 FaceConnectic(0, 0),
644
645};
646
647// Generated by calcul.rb
648const SVCFaceConnectic triangle_svc_face_connectic[4] ARCANE_UNUSED_ATTRIBUTE = {
649 SVCFaceConnectic(0, 0, 1),
650 SVCFaceConnectic(1, 1, 2),
651 SVCFaceConnectic(2, 2, 0),
652 SVCFaceConnectic(3, 0, 0),
653};
654
655/*---------------------------------------------------------------------------*/
656/*---------------------------------------------------------------------------*/
657
658/*!
659 * \brief Table of 12 real-type elements. Used for weighting
660 * the nodes of the cells (the largest having 12 nodes)
661 */
662struct LocalCellNodeReal
663{
664 private:
665
666 Real m_node[12];
667
668 public:
669
670 inline Real node(Integer i) const { return m_node[i]; }
671
672 public:
673
674 LocalCellNodeReal(Real a0, Real a1, Real a2, Real a3,
675 Real a4, Real a5, Real a6, Real a7,
676 Real a8, Real a9, Real a10, Real a11)
677 {
678 m_node[0] = a0;
679 m_node[1] = a1;
680 m_node[2] = a2;
681 m_node[3] = a3;
682 m_node[4] = a4;
683 m_node[5] = a5;
684 m_node[6] = a6;
685 m_node[7] = a7;
686 m_node[8] = a8;
687 m_node[9] = a9;
688 m_node[10] = a10;
689 m_node[11] = a11;
690 }
691
692 public:
693
694 Real sum() const
695 {
696 return (m_node[0] + m_node[1] + m_node[2] + m_node[3] + m_node[4] + m_node[5] + m_node[6] + m_node[7] + m_node[8] + m_node[9] + m_node[10] + m_node[11]);
697 }
698};
699
700/*---------------------------------------------------------------------------*/
701/*---------------------------------------------------------------------------*/
702
703} // namespace Arcane::geometric
704
705/*---------------------------------------------------------------------------*/
706/*---------------------------------------------------------------------------*/
707
708#endif
Declarations of Arcane's general types.
Int32 Integer
Type representing an integer.
double Real
Type representing a real number.
Local cell connectivity structures.
Local connectivity structure.
Local cell connectivity structures.
Local cell and svc connectivity structures.