Arcane  4.1.12.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-2024 */
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/*---------------------------------------------------------------------------*/
37
38class ARCANE_CORE_EXPORT MeshStats
39: public TraceAccessor
40, public IMeshStats
41{
42 public:
43
44 MeshStats(ITraceMng* msg, IMesh* mesh, IParallelMng* pm);
45
46 public:
47
48 void dumpStats() override;
49
50 void dumpGraphStats() override;
51
52 private:
53
54 IMesh* m_mesh = nullptr;
55 IParallelMng* m_parallel_mng = nullptr;
56
57 private:
58
59 template <typename T>
60 void _dumpStats();
61
62 template <typename T>
63 void _computeElementsOnGroup(Int64ArrayView nb_type, Int64ArrayView nb_kind, Integer istat);
64
65 template <typename T>
66 void _statLabel(const String& name);
67
68 void _computeElementsOnGroup(Int64ArrayView nb_type, Int64ArrayView nb_kind,
69 ItemGroup group, Integer istat);
70
71 void _printInfo(const String& name, Int64 nb_local,
72 Int64 nb_local_min, Integer min_rank,
73 Int64 nb_local_max, Integer max_rank,
74 Int64 nb_global, Integer nb_rank);
75 void _computeNeighboorsComm();
76 void _dumpLegacyConnectivityMemoryUsage();
77 void _dumpIncrementalConnectivityMemoryUsage();
78 void _dumpCommunicatingRanks();
79};
80
81/*---------------------------------------------------------------------------*/
82/*---------------------------------------------------------------------------*/
83
84} // End namespace Arcane
85
86/*---------------------------------------------------------------------------*/
87/*---------------------------------------------------------------------------*/
88
89#endif
Declarations of Arcane's general types.
Interface of a class providing mesh information.
Definition IMeshStats.h:33
Interface of the parallelism manager for a subdomain.
Mesh entity group.
Definition ItemGroup.h:51
void dumpStats() override
Prints mesh information.
Definition MeshStats.cc:63
void dumpGraphStats() override
Prints mesh graph information.
Definition MeshStats.cc:73
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:451
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.