14#include "arcane/utils/TraceAccessor.h"
16#include "arcane/geometry/GeomElement.h"
17#include "arcane/geometry/GeomShapeView.h"
18#include "arcane/geometry/CellConnectivity.h"
24namespace Arcane::geometric
35class GeomShapeConnectivity
39 GeomShapeConnectivity()
41 for (
int i = 0; i < NB_BASIC_ITEM_TYPE; ++i)
42 GeomShapeView::global_cell_connectivity[i] = 0;
44 GeomShapeView::global_cell_connectivity[IT_NullType] = &m_null_connectivity;
45 GeomShapeView::global_cell_connectivity[IT_Vertex] = &m_vertex_connectivity;
46 GeomShapeView::global_cell_connectivity[IT_Line2] = &m_line2_connectivity;
47 GeomShapeView::global_cell_connectivity[IT_Triangle3] = &m_triangle3_connectivity;
48 GeomShapeView::global_cell_connectivity[IT_Quad4] = &m_quad4_connectivity;
49 GeomShapeView::global_cell_connectivity[IT_Pentagon5] = &m_pentagon5_connectivity;
50 GeomShapeView::global_cell_connectivity[IT_Hexagon6] = &m_hexagon6_connectivity;
51 GeomShapeView::global_cell_connectivity[IT_Tetraedron4] = &m_tetraedron4_connectivity;
52 GeomShapeView::global_cell_connectivity[IT_Pyramid5] = &m_pyramid5_connectivity;
53 GeomShapeView::global_cell_connectivity[IT_Pentaedron6] = &m_pentaedron6_connectivity;
54 GeomShapeView::global_cell_connectivity[IT_Hexaedron8] = &m_hexaedron8_connectivity;
55 GeomShapeView::global_cell_connectivity[IT_Heptaedron10] = &m_heptaedron10_connectivity;
56 GeomShapeView::global_cell_connectivity[IT_Octaedron12] = &m_octaedron12_connectivity;
80initializeConnectivity()
82 if (global_connectivity)
91CellConnectivity* GeomShapeView::global_cell_connectivity[NB_BASIC_ITEM_TYPE];
92GeomShapeConnectivity* GeomShapeView::global_connectivity = 0;
100class GeomShapeStdBuilder
101:
public GeomShapeMutableView
105 GeomShapeStdBuilder(
const GeomShapeMutableView& gsv)
106 : GeomShapeMutableView(gsv)
121 Real3(0.25 * (node(id1).x + node(id2).x + node(id3).x + node(id4).x),
122 0.25 * (node(id1).y + node(id2).y + node(id3).y + node(id4).y),
123 0.25 * (node(id1).z + node(id2).z + node(id3).z + node(id4).z)));
130 Real3(0.5 * (node(id1).x + node(id2).x),
131 0.5 * (node(id1).y + node(id2).y),
140initFromHexa(HexaElementConstView hexa, GeomShape& geom_cell)
142 _setNullItem(IT_Hexaedron8);
147 geom_cell._setArray(*
this);
154initFromQuad(QuadElementConstView quad, GeomShape& geom_cell)
156 _setNullItem(IT_Quad4);
161 geom_cell._setArray(*
this);
471 Real3 c = nul_vector;
473 for (
Integer i = 0; i < 8; ++i) {
478 setCenter(0.125 * c);
481 _addFaceD(0, 0, 3, 2, 1);
482 _addFaceD(1, 0, 4, 7, 3);
483 _addFaceD(2, 0, 1, 5, 4);
484 _addFaceD(3, 4, 5, 6, 7);
485 _addFaceD(4, 1, 2, 6, 5);
486 _addFaceD(5, 2, 3, 7, 6);
500 Real3 c = nul_vector;
502 for (
Integer i = 0; i < 4; ++i) {
524 view._setNullItem(IT_Hexaedron8);
543 view._setNullItem(IT_Quad4);
Class managing a 3-dimensional real vector.
void computeNodePositionFromQuad(QuadElementConstView quad)
In 2D, calculates the positions from the quad quad.
void computeNodePositionFromHexa(HexaElementConstView hexa)
In 3D, calculates the positions from the hexahedron hexa.
const Real3 node(Integer i) const
Position of the i-th node of the shape.
void fillSubZoneHexaedron8(Hexaedron8ElementView svc, Integer i)
Fills svc with the information of the i-th control sub-volume.
void fillSubZoneOctaedron12(Hexaedron8ElementView svc, Integer i)
Fills svc with the information of the i-th control sub-volume.
const Real3 face(Integer i) const
Position of the center of the i-th face of the shape.
void fillSubZoneQuad4(Quad4ElementView svc, Integer i)
Fills svc with the information of the i-th control sub-volume.
ARCANE_DEPRECATED_122 void initFromHexa(HexaElementConstView hexa, GeomShape &geom_cell)
const Real3 edge(Integer i) const
Position of the center of the i-th edge of the shape.
ARCANE_DEPRECATED_122 void initFromQuad(QuadElementConstView hexa, GeomShape &geom_cell)
void fillSubZoneHeptaedron10(Hexaedron8ElementView svc, Integer i)
Fills svc with the information of the i-th control sub-volume.
void fillSubZoneHexagon6(Quad4ElementView svc, Integer i)
Fills svc with the information of the i-th control sub-volume.
void fillSubZonePentaedron6(Hexaedron8ElementView svc, Integer i)
Fills svc with the information of the i-th control sub-volume.
void fillSubZoneTriangle3(Quad4ElementView svc, Integer i)
Fills svc with the information of the i-th control sub-volume.
void fillSubZoneTetraedron4(Hexaedron8ElementView svc, Integer i)
Fills svc with the information of the i-th control sub-volume.
Face face() const
Associated face (null if none).
const Real3 center() const
Position of the center of the shape.
const NodeConnectic & nodeConnectic(Integer i) const
Node connectivity information.
void fillSubZonePyramid5(Hexaedron8ElementView svc, Integer i)
Fills svc with the information of the i-th control sub-volume.
void fillSubZonePentagon5(Quad4ElementView svc, Integer i)
Fills svc with the information of the i-th control sub-volume.
void fillSubZoneElement(HexaElementView hexa, Integer i)
Fills hexa with the information of the i-th sub-control volume.
Integer nodeAssociation(Integer i) const
Local number of the vertex associated with the sub-control volume.
Hexaedron8ShapeView initFromHexaedron8(Hexaedron8ElementConstView hexa)
Initializes the shape with a hexahedron hexa and returns a view of it.
Quad4ShapeView initFromQuad4(Quad4ElementConstView quad)
Initializes the shape with a quadrangle quad and returns a view of it.
GeomShapeMutableView toMutableView()
Modifiable view of this instance.
Connectivity information for geometric elements of type GeomType::Heptaedron10.
Connectivity information for geometric elements of type GeomType::Hexaedron8.
Constant view on geometric elements of type GeomType::Hexaedron8.
void init(const Real3 &a0, const Real3 &a1, const Real3 &a2, const Real3 &a3, const Real3 &a4, const Real3 &a5, const Real3 &a6, const Real3 &a7)
Initializes the view with the coordinates passed as arguments.
Specific view on geometric shapes of type GeomType::Hexaedron8.
Connectivity information for geometric elements of type GeomType::Hexagon6.
Connectivity information for geometric elements of type GeomType::Line2.
Connectivity information for geometric elements of type IT_NullType.
Connectivity information for geometric elements of type GeomType::Octaedron12.
Connectivity information for geometric elements of type GeomType::Pentaedron6.
Connectivity information for geometric elements of type GeomType::Pentagon5.
Connectivity information for geometric elements of type GeomType::Pyramid5.
Connectivity information for geometric elements of type GeomType::Quad4.
Constant view on geometric elements of type GeomType::Quad4.
Modifiable view on geometric elements of type GeomType::Quad4.
void init(const Real3 &a0, const Real3 &a1, const Real3 &a2, const Real3 &a3)
Initializes the view with the coordinates passed as arguments.
Specific view on geometric shapes of type GeomType::Quad4.
Connectivity information for geometric elements of type GeomType::Tetraedron4.
Connectivity information for geometric elements of type GeomType::Triangle3.
Connectivity information for geometric elements of type GeomType::Vertex.
Int32 Integer
Type representing an integer.
Local cell connectivity structures.