15#include "arcane/geometric/CellConnectivity.h"
19#include "arcane/AbstractItemOperationByBasicType.h"
25GEOMETRIC_BEGIN_NAMESPACE
33inline void CellConnectivity::
34_setEdgeDirectConnectic()
36 if (m_edge_connectic){
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);
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;
56void NullConnectivity::
59 _setEdgeDirectConnectic();
62void VertexConnectivity::
65 _setEdgeDirectConnectic();
68void Line2Connectivity::
71 _setEdgeDirectConnectic();
74void Pentagon5Connectivity::
77 _setEdgeDirectConnectic();
81void Hexagon6Connectivity::
84 _setEdgeDirectConnectic();
88void Hexaedron8Connectivity::
91 using namespace Arcane::geometric;
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;
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]);
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;
109 _setEdgeDirectConnectic();
112void Pyramid5Connectivity::
115 using namespace Arcane::geometric;
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;
131 _setEdgeDirectConnectic();
134void Pentaedron6Connectivity::
137 using namespace Arcane::geometric;
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;
153 _setEdgeDirectConnectic();
156void Tetraedron4Connectivity::
159 using namespace Arcane::geometric;
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;
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;
176 _setEdgeDirectConnectic();
179void Heptaedron10Connectivity::
182 using namespace Arcane::geometric;
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;
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;
199 _setEdgeDirectConnectic();
202void Octaedron12Connectivity::
205 using namespace Arcane::geometric;
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;
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;
222 _setEdgeDirectConnectic();
225void Quad4Connectivity::
228 using namespace Arcane::geometric;
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;
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;
245 _setEdgeDirectConnectic();
248void Triangle3Connectivity::
251 using namespace Arcane::geometric;
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;
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;
268 _setEdgeDirectConnectic();
274GEOMETRIC_END_NAMESPACE