Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
CellConnectivity.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 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/* CellConnectivity.cc (C) 2000-2014 */
9/* */
10/* Informations sur la connectivité d'une maille. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14//#include "arcane/geometric/IGeometric.h"
15#include "arcane/geometric/CellConnectivity.h"
16//#include "arcane/geometric/CellGeom.h"
17//#include "arcane/geometric/CellGeomList.h"
18
19#include "arcane/AbstractItemOperationByBasicType.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24ARCANE_BEGIN_NAMESPACE
25GEOMETRIC_BEGIN_NAMESPACE
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33inline void CellConnectivity::
34_setEdgeDirectConnectic()
35{
36 if (m_edge_connectic){
37 // Cas 3D
38 for( Integer i=0, n=nbEdge(); i<n; ++i ){
39 m_edge_direct_connectic[(i*2)] = m_edge_connectic[i].node(0);
40 m_edge_direct_connectic[(i*2)+1] = m_edge_connectic[i].node(1);
41 }
42 }
43 else{
44 // Cas 2D.
45 // Dans ce cas les arêtes sont numérotés en fonction des noeuds.
46 for( Integer i=0, n=nbEdge(); i<n; ++i ){
47 m_edge_direct_connectic[(i*2)] = i;
48 m_edge_direct_connectic[(i*2)+1] = (i+1) % n;
49 }
50 }
51}
52
53/*---------------------------------------------------------------------------*/
54/*---------------------------------------------------------------------------*/
55
56void NullConnectivity::
57_init()
58{
59 _setEdgeDirectConnectic();
60}
61
62void VertexConnectivity::
63_init()
64{
65 _setEdgeDirectConnectic();
66}
67
68void Line2Connectivity::
69_init()
70{
71 _setEdgeDirectConnectic();
72}
73
74void Pentagon5Connectivity::
75_init()
76{
77 _setEdgeDirectConnectic();
78 // TODO
79}
80
81void Hexagon6Connectivity::
82_init()
83{
84 _setEdgeDirectConnectic();
85 // TODO
86}
87
88void Hexaedron8Connectivity::
89_init()
90{
91 using namespace Arcane::geometric;
92
93 m_nb_sub_zone = 8;
94 m_node_connectic = hexa_node_connectic;
95 m_edge_connectic = hexa_edge_connectic;
96 m_face_connectic = hexa_face_connectic;
97 m_node_association = hexa_node_association;
98
99 m_svc_face_connectic = hexa_svc_face_connectic;
100 m_nb_svc_face = sizeof(hexa_svc_face_connectic) / sizeof(hexa_svc_face_connectic[0]);
101
102 m_edge_node_sub_zone_id[0] = 1;
103 m_edge_node_sub_zone_id[1] = 3;
104 m_edge_node_sub_zone_id[2] = 4;
105 m_face_node_sub_zone_id[0] = 2;
106 m_face_node_sub_zone_id[1] = 7;
107 m_face_node_sub_zone_id[2] = 5;
108
109 _setEdgeDirectConnectic();
110}
111
112void Pyramid5Connectivity::
113_init()
114{
115 using namespace Arcane::geometric;
116
117 m_nb_sub_zone = 8;
118 m_node_connectic = pyra_node_connectic;
119 m_edge_connectic = pyra_edge_connectic;
120 m_face_connectic = pyra_face_connectic;
121 m_node_association = pyra_node_association;
122 m_svc_face_connectic = pyra_svc_face_connectic;
123 m_nb_svc_face = sizeof(pyra_svc_face_connectic) / sizeof(pyra_svc_face_connectic[0]);
124 m_edge_node_sub_zone_id[0] = 1;
125 m_edge_node_sub_zone_id[1] = 3;
126 m_edge_node_sub_zone_id[2] = 4;
127 m_face_node_sub_zone_id[0] = 2;
128 m_face_node_sub_zone_id[1] = 7;
129 m_face_node_sub_zone_id[2] = 5;
130
131 _setEdgeDirectConnectic();
132}
133
134void Pentaedron6Connectivity::
135_init()
136{
137 using namespace Arcane::geometric;
138
139 m_nb_sub_zone = 6;
140 m_node_connectic = penta_node_connectic;
141 m_edge_connectic = penta_edge_connectic;
142 m_face_connectic = penta_face_connectic;
143 m_node_association = penta_node_association;
144 m_svc_face_connectic = penta_svc_face_connectic;
145 m_nb_svc_face = sizeof(penta_svc_face_connectic) / sizeof(penta_svc_face_connectic[0]);
146 m_edge_node_sub_zone_id[0] = 1;
147 m_edge_node_sub_zone_id[1] = 3;
148 m_edge_node_sub_zone_id[2] = 4;
149 m_face_node_sub_zone_id[0] = 2;
150 m_face_node_sub_zone_id[1] = 7;
151 m_face_node_sub_zone_id[2] = 5;
152
153 _setEdgeDirectConnectic();
154}
155
156void Tetraedron4Connectivity::
157_init()
158{
159 using namespace Arcane::geometric;
160
161 m_nb_sub_zone = 4;
162 m_node_connectic = tetra_node_connectic;
163 m_edge_connectic = tetra_edge_connectic;
164 m_face_connectic = tetra_face_connectic;
165 m_node_association = tetra_node_association;
166
167 m_svc_face_connectic = tetra_svc_face_connectic;
168 m_nb_svc_face = sizeof(tetra_svc_face_connectic) /sizeof(tetra_svc_face_connectic[0]);
169 m_edge_node_sub_zone_id[0] = 1;
170 m_edge_node_sub_zone_id[1] = 3;
171 m_edge_node_sub_zone_id[2] = 4;
172 m_face_node_sub_zone_id[0] = 2;
173 m_face_node_sub_zone_id[1] = 7;
174 m_face_node_sub_zone_id[2] = 5;
175
176 _setEdgeDirectConnectic();
177}
178
179void Heptaedron10Connectivity::
180_init()
181{
182 using namespace Arcane::geometric;
183
184 m_nb_sub_zone = 10;
185 m_node_connectic = wedge7_node_connectic;
186 m_edge_connectic = wedge7_edge_connectic;
187 m_face_connectic = wedge7_face_connectic;
188 m_node_association = wedge7_node_association;
189
190 m_svc_face_connectic = wedge7_svc_face_connectic;
191 m_nb_svc_face = sizeof(wedge7_svc_face_connectic) / sizeof(wedge7_svc_face_connectic[0]);
192 m_edge_node_sub_zone_id[0] = 1;
193 m_edge_node_sub_zone_id[1] = 3;
194 m_edge_node_sub_zone_id[2] = 4;
195 m_face_node_sub_zone_id[0] = 2;
196 m_face_node_sub_zone_id[1] = 7;
197 m_face_node_sub_zone_id[2] = 5;
198
199 _setEdgeDirectConnectic();
200}
201
202void Octaedron12Connectivity::
203_init()
204{
205 using namespace Arcane::geometric;
206
207 m_nb_sub_zone = 12;
208 m_node_connectic = wedge8_node_connectic;
209 m_edge_connectic = wedge8_edge_connectic;
210 m_face_connectic = wedge8_face_connectic;
211 m_node_association = wedge8_node_association;
212
213 m_svc_face_connectic = wedge8_svc_face_connectic;
214 m_nb_svc_face = sizeof(wedge8_svc_face_connectic) / sizeof(wedge8_svc_face_connectic[0]);
215 m_edge_node_sub_zone_id[0] = 1;
216 m_edge_node_sub_zone_id[1] = 3;
217 m_edge_node_sub_zone_id[2] = 4;
218 m_face_node_sub_zone_id[0] = 2;
219 m_face_node_sub_zone_id[1] = 7;
220 m_face_node_sub_zone_id[2] = 5;
221
222 _setEdgeDirectConnectic();
223}
224
225void Quad4Connectivity::
226_init()
227{
228 using namespace Arcane::geometric;
229
230 m_nb_sub_zone = 4;
231 m_node_connectic = quad_node_connectic;
232 m_edge_connectic = 0;
233 m_face_connectic = quad_face_connectic;
234 m_node_association = quad_node_association;
235
236 m_svc_face_connectic = quad_svc_face_connectic;
237 m_nb_svc_face = sizeof(quad_svc_face_connectic) /sizeof(quad_svc_face_connectic[0]);
238 m_edge_node_sub_zone_id[0] = 0;
239 m_edge_node_sub_zone_id[1] = 0;
240 m_edge_node_sub_zone_id[2] = 0;
241 m_face_node_sub_zone_id[0] = 1;
242 m_face_node_sub_zone_id[1] = 3;
243 m_face_node_sub_zone_id[2] = 0;
244
245 _setEdgeDirectConnectic();
246}
247
248void Triangle3Connectivity::
249_init()
250{
251 using namespace Arcane::geometric;
252
253 m_nb_sub_zone = 4;
254 m_node_connectic = triangle_node_connectic;
255 m_edge_connectic = 0;
256 m_face_connectic = triangle_face_connectic;
257 m_node_association = triangle_node_association;
258
259 m_svc_face_connectic = triangle_svc_face_connectic;
260 m_nb_svc_face = sizeof(triangle_svc_face_connectic)/sizeof(triangle_svc_face_connectic[0]);
261 m_edge_node_sub_zone_id[0] = 0;
262 m_edge_node_sub_zone_id[1] = 0;
263 m_edge_node_sub_zone_id[2] = 0;
264 m_face_node_sub_zone_id[0] = 1;
265 m_face_node_sub_zone_id[1] = 3;
266 m_face_node_sub_zone_id[2] = 0;
267
268 _setEdgeDirectConnectic();
269}
270
271/*---------------------------------------------------------------------------*/
272/*---------------------------------------------------------------------------*/
273
274GEOMETRIC_END_NAMESPACE
275ARCANE_END_NAMESPACE
276
277/*---------------------------------------------------------------------------*/
278/*---------------------------------------------------------------------------*/
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120