Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
MeshAccessor.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/* MeshAccessor.h (C) 2000-2025 */
9/* */
10/* Access to mesh information. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_MESHACCESSOR_H
13#define ARCANE_CORE_MESHACCESSOR_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
19#include "arcane/core/MeshHandle.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30class ISubDomain;
31class IMesh;
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
36/*!
37 * \brief Access to mesh information.
38 * \ingroup Mesh
39 */
40class ARCANE_CORE_EXPORT MeshAccessor
41{
42 public:
43
44 ARCCORE_DEPRECATED_2020("Use constructor with MeshHande")
45 MeshAccessor(ISubDomain* sd);
46 MeshAccessor(IMesh* mesh);
47 MeshAccessor(const MeshHandle& mesh_handle);
48
49 public:
50
51 //! Returns the number of cells in the mesh
52 Integer nbCell() const;
53 //! Returns the number of faces in the mesh
54 Integer nbFace() const;
55 //! Returns the number of edges in the mesh
56 Integer nbEdge() const;
57 //! Returns the number of nodes in the mesh
58 Integer nbNode() const;
59
60 //! Returns the coordinates of the mesh nodes
62
63 //! Returns the group containing all nodes
64 NodeGroup allNodes() const;
65 //! Returns the group containing all edges
66 EdgeGroup allEdges() const;
67 //! Returns the group containing all faces
68 FaceGroup allFaces() const;
69 //! Returns the group containing all cells
70 CellGroup allCells() const;
71 //! Returns the group containing all boundary faces.
72 FaceGroup outerFaces() const;
73 /*! \brief Returns the group containing all nodes specific to this domain.
74 *
75 * In sequential mode, this is allNodes(). In parallel mode, it is
76 * all nodes that are not ghost nodes. The set of ownNodes() groups from all
77 * sub-domains forms a partition of the global mesh.
78 */
79 NodeGroup ownNodes() const;
80 /*! \brief Returns the group containing all cells specific to this domain.
81 *
82 * In sequential mode, this is allCells(). In parallel mode, it is
83 * all cells that are not ghost cells. The set of ownCells() groups from all
84 * sub-domains forms a partition of the global mesh.
85 */
86 CellGroup ownCells() const;
87 /*! \brief Group containing all faces specific to this domain.
88 *
89 * In sequential mode, this is allFaces(). In parallel mode, it is
90 * all faces that are not ghost faces. The set of ownFaces() groups from all
91 * sub-domains forms a partition of the global mesh.
92 */
93 FaceGroup ownFaces() const;
94 /*! \brief Group containing all edges specific to this domain.
95 *
96 * In sequential mode, this is allEdges(). In parallel mode, it is
97 * all edges that are not ghost edges. The set of ownEdges() groups from all
98 * sub-domains forms a partition of the global mesh.
99 */
100 EdgeGroup ownEdges() const;
101
102 public:
103
104 inline IMesh* mesh() const { return m_mesh_handle.mesh(); }
105 inline const MeshHandle& meshHandle() const { return m_mesh_handle; }
106
107 private:
108
109 MeshHandle m_mesh_handle;
110};
111
112/*---------------------------------------------------------------------------*/
113/*---------------------------------------------------------------------------*/
114
115} // End namespace Arcane
116
117/*---------------------------------------------------------------------------*/
118/*---------------------------------------------------------------------------*/
119
120#endif
Declarations of types on entities.
Interface of the subdomain manager.
Definition ISubDomain.h:75
EdgeGroup allEdges() const
Returns the group containing all edges.
EdgeGroup ownEdges() const
Group containing all edges specific to this domain.
FaceGroup ownFaces() const
Group containing all faces specific to this domain.
CellGroup allCells() const
Returns the group containing all cells.
CellGroup ownCells() const
Returns the group containing all cells specific to this domain.
FaceGroup allFaces() const
Returns the group containing all faces.
Integer nbNode() const
Returns the number of nodes in the mesh.
NodeGroup ownNodes() const
Returns the group containing all nodes specific to this domain.
NodeGroup allNodes() const
Returns the group containing all nodes.
Integer nbEdge() const
Returns the number of edges in the mesh.
Integer nbCell() const
Returns the number of cells in the mesh.
Integer nbFace() const
Returns the number of faces in the mesh.
FaceGroup outerFaces() const
Returns the group containing all boundary faces.
VariableNodeReal3 & nodesCoordinates() const
Returns the coordinates of the mesh nodes.
Handle on a mesh.
Definition MeshHandle.h:48
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
MeshVariableScalarRefT< Node, Real3 > VariableNodeReal3
Coordinate type quantity at node.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.