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();
77 : m_cell_connectivity(global_cell_connectivity[IT_NullType])
78 , m_item_internal(ItemInternal::nullItem())
84#include "arcane/geometry/GeneratedGeomShapeViewDeclarations.h"
100 ARCANE_DEPRECATED_122
void initFromQuad(QuadElementConstView hexa, GeomShape& geom_cell);
114 return m_face_ptr[i];
120 return *m_center_ptr;
126 return 0.5 * (
node(m_cell_connectivity->m_edge_direct_connectic[(i * 2)]) +
node(m_cell_connectivity->m_edge_direct_connectic[(i * 2) + 1]));
139 void _setArray(
const Real3* node_ptr,
const Real3* face_ptr,
const Real3* center_ptr)
141 m_node_ptr = node_ptr;
142 m_face_ptr = face_ptr;
143 m_center_ptr = center_ptr;
148 ARCANE_RESTRICT
const Real3* m_node_ptr =
nullptr;
149 ARCANE_RESTRICT
const Real3* m_face_ptr =
nullptr;
150 ARCANE_RESTRICT
const Real3* m_center_ptr =
nullptr;
159 constexpr const Real3POD* _nodeView()
const {
return (
Real3POD*)(m_node_ptr); }
170 return m_cell_connectivity->nodeConnectic()[i];
176 return m_cell_connectivity->edgeConnectic()[i];
182 return m_cell_connectivity->faceConnectic()[i];
188 return m_cell_connectivity->nbSubZone();
194 return m_cell_connectivity->nbSubZoneFace();
200 return m_cell_connectivity->nodeAssociation()[i];
205 return m_cell_connectivity->SCVFaceConnectic()[i];
211 return m_cell_connectivity->m_edge_node_sub_zone_id[i];
216 return m_cell_connectivity->m_face_node_sub_zone_id[i];
230 return m_cell_connectivity->cellType();
237 m_cell_connectivity = global_cell_connectivity[
item.type()];
238 m_item_internal = ItemCompatibility::_itemInternal(
item);
241 void _setNullItem(
int item_type)
243 m_item_internal = ItemInternal::nullItem();
244 m_cell_connectivity = global_cell_connectivity[item_type];
258:
public GeomShapeView
263 explicit GeomShape2DView(
const GeomShapeView& rhs)
273:
public GeomShapeView
289#include "arcane/geometry/GeneratedGeomShapeView.h"
300#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 3D geometric shape.
Constant view on a geometric shape GeomShape.
const EdgeConnectic & edgeConnectic(Integer i) const
Edge connectivity information.
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).
constexpr const Real3 node(Integer i) const
Position of the i-th node of the shape.
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.