12#ifndef ARCANE_GEOMETRIC_GEOMSHAPEVIEW_H
13#define ARCANE_GEOMETRIC_GEOMSHAPEVIEW_H
17#include "arcane/utils/ITraceMng.h"
18#include "arcane/utils/ArrayView.h"
19#include "arcane/utils/Real3.h"
21#include "arcane/core/Item.h"
23#include "arcane/geometry/GeometricConnectic.h"
24#include "arcane/geometry/GeomElement.h"
25#include "arcane/geometry/CellConnectivity.h"
26#include "arcane/geometry/GeomShapeMutableView.h"
31namespace Arcane::geometric
59class ARCANE_GEOMETRY_EXPORT GeomShapeView
61 friend class GeomShapeMng;
62 friend class GeomShape;
63 friend class GeomShapeConnectivity;
68 static GeomShapeConnectivity* global_connectivity;
72 static void initializeConnectivity();
80 , m_cell_connectivity(global_cell_connectivity[IT_NullType])
87#include "arcane/geometry/GeneratedGeomShapeViewDeclarations.h"
99 ARCANE_DEPRECATED_122
void initFromHexa(HexaElementConstView hexa, GeomShape& geom_cell);
103 ARCANE_DEPRECATED_122
void initFromQuad(QuadElementConstView hexa, GeomShape& geom_cell);
114 return m_node_ptr[i];
120 return m_face_ptr[i];
126 return *m_center_ptr;
132 return 0.5 * (
node(m_cell_connectivity->m_edge_direct_connectic[(i * 2)]) +
node(m_cell_connectivity->m_edge_direct_connectic[(i * 2) + 1]));
147 m_node_ptr = node_ptr;
148 m_face_ptr = face_ptr;
149 m_center_ptr = center_ptr;
154 ARCANE_RESTRICT
const Real3* m_node_ptr;
155 ARCANE_RESTRICT
const Real3* m_face_ptr;
156 ARCANE_RESTRICT
const Real3* m_center_ptr;
176 return m_cell_connectivity->nodeConnectic()[i];
182 return m_cell_connectivity->edgeConnectic()[i];
188 return m_cell_connectivity->faceConnectic()[i];
194 return m_cell_connectivity->nbSubZone();
200 return m_cell_connectivity->nbSubZoneFace();
206 return m_cell_connectivity->nodeAssociation()[i];
211 return m_cell_connectivity->SCVFaceConnectic()[i];
217 return m_cell_connectivity->m_edge_node_sub_zone_id[i];
222 return m_cell_connectivity->m_face_node_sub_zone_id[i];
236 return m_cell_connectivity->cellType();
243 m_cell_connectivity = global_cell_connectivity[
item.type()];
244 m_item_internal = ItemCompatibility::_itemInternal(
item);
247 void _setNullItem(
int item_type)
249 m_item_internal = ItemInternal::nullItem();
250 m_cell_connectivity = global_cell_connectivity[item_type];
264:
public GeomShapeView
279:
public GeomShapeView
284 explicit GeomShape3DView(
const GeomShapeView& rhs)
295#include "arcane/geometry/GeneratedGeomShapeView.h"
306#include "arcane/geometry/GeomShape.h"
Base class for a mesh element.
Class managing a 3-dimensional real vector.
Information on the connectivity of a cell.
View on 2D geometric shape.
Constant view on a geometric shape GeomShape.
const EdgeConnectic & edgeConnectic(Integer i) const
Edge connectivity information.
const Real3 node(Integer i) const
Position of the i-th node of the shape.
Integer edgeNodeSubZoneId(Integer i) const
Local numbers within the sub-control volumes.
const Real3 face(Integer i) const
Position of the center of the i-th face of the shape.
GeomType geomType() const
Geometric type of the shape.
Cell cell() const
Associated cell (null if none).
Integer nbSvcFace() const
Number of internal SVC faces.
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)
Integer nbSubZone() const
Number of sub-control volumes.
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.
const FaceConnectic & faceConnectic(Integer i) const
Face connectivity information.
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.
Item item() const
Associated entity (null if none).
Enumeration specifying the type of polygon or polyhedron associated with a geometric element or shape...
Int32 Integer
Type representing an integer.
Local cell connectivity structures.
Local connectivity structure.
Local cell connectivity structures.
Local cell and svc connectivity structures.