Arcane  4.2.3.0
Developer documentation
Loading...
Searching...
No Matches
MeshStats.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/* MeshStats.h (C) 2000-2026 */
9/* */
10/* Statistics on the mesh. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_MESHSTATS_H
13#define ARCANE_CORE_MESHSTATS_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/TraceAccessor.h"
18
20#include "arcane/core/IMeshStats.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane
26{
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31class IMesh;
32class IParallelMng;
34
35/*---------------------------------------------------------------------------*/
36/*---------------------------------------------------------------------------*/
42class ARCANE_CORE_EXPORT MeshStats
43: public TraceAccessor
44, public IMeshStats
45{
46 friend IMeshStats;
47
48 public:
49
50 ARCANE_DEPRECATED_REASON("Y2026: Use MeshStats(ITraceMng*, IMesh*) instead")
51 MeshStats(ITraceMng* msg, IMesh* mesh, IParallelMng* pm);
52
53 private:
54
55 MeshStats(ITraceMng* msg, IMesh* mesh);
56
57 public:
58
59 void dumpStats() override;
60
61 void dumpGraphStats() override;
62
63 private:
64
65 IMesh* m_mesh = nullptr;
66 IParallelMng* m_parallel_mng = nullptr;
67
68 private:
69
70 template <typename T>
71 void _dumpStats();
72
73 template <typename T>
74 void _computeElementsOnGroup(Int64ArrayView nb_type, Int64ArrayView nb_kind, Integer istat);
75
76 template <typename T>
77 void _statLabel(const String& name);
78
79 void _computeElementsOnGroup(Int64ArrayView nb_type, Int64ArrayView nb_kind,
80 ItemGroup group, Integer istat);
81
82 void _printInfo(const String& name, Int64 nb_local,
83 Int64 nb_local_min, Integer min_rank,
84 Int64 nb_local_max, Integer max_rank,
85 Int64 nb_global, Integer nb_rank);
86 void _computeNeighboorsComm();
87 void _dumpLegacyConnectivityMemoryUsage();
88 void _dumpIncrementalConnectivityMemoryUsage();
89 void _dumpCommunicatingRanks();
90};
91
92/*---------------------------------------------------------------------------*/
93/*---------------------------------------------------------------------------*/
94
95} // End namespace Arcane
96
97/*---------------------------------------------------------------------------*/
98/*---------------------------------------------------------------------------*/
99
100#endif
Declarations of Arcane's general types.
Interface of the parallelism manager for a subdomain.
Mesh entity group.
Definition ItemGroup.h:51
void dumpStats() override
Prints mesh information.
Definition MeshStats.cc:83
void dumpGraphStats() override
Prints mesh graph information.
Definition MeshStats.cc:93
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
ArrayView< Int64 > Int64ArrayView
C equivalent of a 1D array of 64-bit integers.
Definition UtilsTypes.h:445
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.