Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
MeshArea.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/* MeshArea.h (C) 2000-2025 */
9/* */
10/* Mesh area. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_MESHAREA_H
13#define ARCANE_CORE_MESHAREA_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/core/IMeshArea.h"
18#include "arcane/core/ItemGroup.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29/*!
30 * \brief Mesh area.
31 */
32class ARCANE_CORE_EXPORT MeshArea
33: public IMeshArea
34{
35 public:
36
37 explicit MeshArea(IMesh* mesh);
38 ~MeshArea() override;
39
40 public:
41
42 //! Associated sub-domain
43 ISubDomain* subDomain() override;
44
45 //! Associated trace manager
46 ITraceMng* traceMng() override;
47
48 //! Mesh to which the area belongs
49 IMesh* mesh() override;
50
51 public:
52
53 //! Number of mesh nodes
54 Integer nbNode() override;
55
56 //! Number of mesh edges
57 virtual Integer nbEdge();
58
59 //! Number of mesh faces
60 virtual Integer nbFace();
61
62 //! Number of mesh cells
63 Integer nbCell() override;
64
65 //! Number of elements of type \a ik
66 virtual Integer nbItem(eItemKind ik);
67
68 public:
69
70 //! Group of all nodes
71 NodeGroup allNodes() override;
72
73 //! Group of all edges
74 virtual EdgeGroup allEdges();
75
76 //! Group of all faces
77 virtual FaceGroup allFaces();
78
79 //! Group of all cells
80 CellGroup allCells() override;
81
82 //! Group of all entities of type \a item_kind
83 virtual ItemGroup allItems(eItemKind item_kind);
84
85 //! Group of all nodes belonging to the domain
86 NodeGroup ownNodes() override;
87
88 //! Group of all edges belonging to the domain
89 virtual EdgeGroup ownEdges();
90
91 //! Group of all faces belonging to the domain
92 virtual FaceGroup ownFaces();
93
94 //! Group of all cells belonging to the domain
95 virtual CellGroup ownCells() override;
96
97 //! Group of all entities belonging to the sub-domain of type \a item_kind
98 virtual ItemGroup ownItems(eItemKind item_kind);
99
100 public:
101
102 void setArea(const NodeGroup& nodes, const CellGroup& cells);
103
104 protected:
105
106 IMesh* m_mesh = nullptr;
107 ISubDomain* m_sub_domain = nullptr;
108 ITraceMng* m_trace_mng = nullptr;
109 NodeGroup m_all_nodes;
110 EdgeGroup m_all_edges;
111 FaceGroup m_all_faces;
112 CellGroup m_all_cells;
113};
114
115/*---------------------------------------------------------------------------*/
116/*---------------------------------------------------------------------------*/
117
118} // namespace Arcane
119
120/*---------------------------------------------------------------------------*/
121/*---------------------------------------------------------------------------*/
122
123#endif
Interface of a mesh area.
Definition IMeshArea.h:38
Interface of the subdomain manager.
Definition ISubDomain.h:75
Mesh entity group.
Definition ItemGroup.h:51
virtual ItemGroup allItems(eItemKind item_kind)
Group of all entities of type item_kind.
Definition MeshArea.cc:141
ISubDomain * subDomain() override
Associated sub-domain.
Definition MeshArea.cc:51
virtual EdgeGroup ownEdges()
Group of all edges belonging to the domain.
Definition MeshArea.cc:167
virtual FaceGroup ownFaces()
Group of all faces belonging to the domain.
Definition MeshArea.cc:171
virtual EdgeGroup allEdges()
Group of all edges.
Definition MeshArea.cc:129
ITraceMng * traceMng() override
Associated trace manager.
Definition MeshArea.cc:60
virtual Integer nbEdge()
Number of mesh edges.
Definition MeshArea.cc:91
IMesh * mesh() override
Mesh to which the area belongs.
Definition MeshArea.cc:69
virtual ItemGroup ownItems(eItemKind item_kind)
Group of all entities belonging to the sub-domain of type item_kind.
Definition MeshArea.cc:179
virtual Integer nbFace()
Number of mesh faces.
Definition MeshArea.cc:95
virtual Integer nbItem(eItemKind ik)
Number of elements of type ik.
Definition MeshArea.cc:103
virtual FaceGroup allFaces()
Group of all faces.
Definition MeshArea.cc:133
virtual CellGroup ownCells() override
Group of all cells belonging to the domain.
Definition MeshArea.cc:175
CellGroup allCells() override
Group of all cells.
Definition MeshArea.cc:137
NodeGroup allNodes() override
Group of all nodes.
Definition MeshArea.cc:125
NodeGroup ownNodes() override
Group of all nodes belonging to the domain.
Definition MeshArea.cc:163
Integer nbNode() override
Number of mesh nodes.
Definition MeshArea.cc:87
Integer nbCell() override
Number of mesh cells.
Definition MeshArea.cc:99
ItemGroupT< Cell > CellGroup
Group of cells.
Definition ItemTypes.h:184
ItemGroupT< Face > FaceGroup
Group of faces.
Definition ItemTypes.h:179
ItemGroupT< Edge > EdgeGroup
Group of edges.
Definition ItemTypes.h:174
ItemGroupT< Node > NodeGroup
Group of nodes.
Definition ItemTypes.h:168
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
eItemKind
Mesh entity type.