Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
CellConnectivity.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 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.h (C) 2000-2026 */
9/* */
10/* Information on the connectivity of a cell. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_GEOMETRIC_CELLCONNECTIVITY_H
13#define ARCANE_GEOMETRIC_CELLCONNECTIVITY_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/geometry/GeomType.h"
18#include "arcane/geometry/GeometricConnectic.h"
19#include "arcane/geometry/ItemStaticInfo.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane::geometric
25{
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29using namespace Arcane;
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
33
34/*!
35 * \ingroup ArcaneGeometric
36 * \brief Information on the connectivity of a cell.
37 */
38class CellConnectivity
39{
40 public:
41
42 CellConnectivity(Integer nb_node, Integer nb_edge, Integer nb_face, GeomType cell_type)
43 : m_nb_node(nb_node)
44 , m_nb_edge(nb_edge)
45 , m_nb_face(nb_face)
46 , m_cell_type(cell_type)
47 {
48 }
50 public:
51
52 Integer nbNode() const { return m_nb_node; }
53 Integer nbEdge() const { return m_nb_edge; }
54 Integer nbFace() const { return m_nb_face; }
55
56 //! Number of control sub-volumes
57 Integer nbSubZone() const { return m_nb_sub_zone; }
58 //! Number of internal SVC faces
60 const Integer* nodeAssociation() const { return m_node_association; }
61 const NodeConnectic* nodeConnectic() const { return m_node_connectic; }
62 const EdgeConnectic* edgeConnectic() const { return m_edge_connectic; }
63 const FaceConnectic* faceConnectic() const { return m_face_connectic; }
64 const SVCFaceConnectic* SCVFaceConnectic() const { return m_svc_face_connectic; }
65 //! Cell type (GeomType::Quad4, GeomType::Hexaedron8, ...)
66 GeomType cellType() const { return m_cell_type; }
67
68 protected:
69
70 Integer m_nb_sub_zone = 0; //!< Number of control sub-volumes
71 Integer m_nb_svc_face = 0; //!< Number of internal SVC faces
72 //! Local number of the vertex associated with the control sub-volume
73 const Integer* m_node_association = nullptr;
74 const NodeConnectic* m_node_connectic = nullptr;
75 const EdgeConnectic* m_edge_connectic = nullptr;
76 const FaceConnectic* m_face_connectic = nullptr;
77 const SVCFaceConnectic* m_svc_face_connectic = nullptr;
78
79 public:
80
81 //! Local numbers in the control sub-volumes
83 Integer m_face_node_sub_zone_id[3];
84 //! Connectic for edges
86
87 protected:
88
89 Integer m_nb_node;
90 Integer m_nb_edge;
91 Integer m_nb_face;
92 Int32* m_edge_first_node = nullptr;
93 Int32* m_edge_second_node = nullptr;
94 GeomType m_cell_type;
95
96 protected:
97
98 inline void _setEdgeDirectConnectic();
99};
100
101/*---------------------------------------------------------------------------*/
102/*---------------------------------------------------------------------------*/
103/*!
104 * \ingroup ArcaneGeometric
105 * \brief Connectivity information for geometric elements of type IT_NullType.
106 */
107class NullConnectivity
108: public CellConnectivity
109{
110 public:
111
112 NullConnectivity()
113 : CellConnectivity(0, 0, 0, GeomType::NullType)
114 {
115 _init();
116 }
117
118 public:
119
120 Integer nbNode() const { return 0; }
121 Integer nbEdge() const { return 0; }
122 Integer nbFace() const { return 0; }
123
124 public:
125 private:
126
127 void _init();
128};
129
130/*---------------------------------------------------------------------------*/
131/*---------------------------------------------------------------------------*/
132
133#include "arcane/geometry/GeneratedConnectivity.h"
134
135/*---------------------------------------------------------------------------*/
136/*---------------------------------------------------------------------------*/
137
138} // namespace Arcane::geometric
139
140/*---------------------------------------------------------------------------*/
141/*---------------------------------------------------------------------------*/
142
143#endif
static const Integer MAX_CELL_EDGE
Maximum number of edges per cell.
Integer m_edge_direct_connectic[ItemStaticInfo::MAX_CELL_EDGE *2]
Connectic for edges.
Integer m_nb_sub_zone
Number of control sub-volumes.
GeomType cellType() const
Cell type (GeomType::Quad4, GeomType::Hexaedron8, ...).
const Integer * m_node_association
Local number of the vertex associated with the control sub-volume.
Integer nbSubZoneFace() const
Number of internal SVC faces.
Integer m_edge_node_sub_zone_id[3]
Local numbers in the control sub-volumes.
Integer nbSubZone() const
Number of control sub-volumes.
Enumeration specifying the type of polygon or polyhedron associated with a geometric element or shape...
Definition GeomType.h:42
@ NullType
Null element.
Definition GeomType.h:48
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
std::int32_t Int32
Signed integer type of 32 bits.
Local cell connectivity structures.
Local connectivity structure.
Local cell connectivity structures.
Local cell and svc connectivity structures.