Arcane  4.1.12.0
Developer 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
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
52 Integer nbCell() const;
54 Integer nbFace() const;
56 Integer nbEdge() const;
58 Integer nbNode() const;
59
62
64 NodeGroup allNodes() const;
66 EdgeGroup allEdges() const;
68 FaceGroup allFaces() const;
70 CellGroup allCells() const;
72 FaceGroup outerFaces() const;
79 NodeGroup ownNodes() const;
86 CellGroup ownCells() const;
93 FaceGroup ownFaces() const;
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.