Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
GlobalTimeHistoryAdder.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/* GlobalTimeHistoryAdder.h (C) 2000-2024 */
9/* */
10/* Class allowing the addition of a global value history. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_GLOBALTIMEHISTORYADDER_H
13#define ARCANE_CORE_GLOBALTIMEHISTORYADDER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/core/ITimeHistoryAdder.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \brief Class allowing the addition of one or more values to a
30 * value history.
31 *
32 * This class will record the curves globally, without support.
33 * That is, the curves will only be linked to the complete domain or the
34 * requested subdomain, unlike MeshTimeHistoryAdder which links the
35 * curves to the desired mesh.
36 *
37 * For a given history name, there can only be one curve of one
38 * or more values per subdomain (and one global one for all
39 * subdomains).
40 *
41 * Example: several curves of pressure averages (let's call them
42 * "avg_pressure") and two subdomains (0 and 1). One value per iteration.
43 * - An "avg_pressure" curve linked to subdomain 0. Each value is the
44 * average of the pressures of each cell in subdomain 0.
45 * - An "avg_pressure" curve linked to subdomain 1. Each value is the
46 * average of the pressures of each cell in subdomain 1.
47 * - An "avg_pressure" curve linked to the complete domain. Each value is the
48 * average of the pressures of each subdomain.
49 *
50 * It can be noted that it is possible to have several curves
51 * independent ones with the same name but linked to different subdomains
52 * (+1 global curve).
53 */
54class ARCANE_CORE_EXPORT GlobalTimeHistoryAdder
55: public ITimeHistoryAdder
56{
57 public:
58
59 /*!
60 * \brief Constructor.
61 *
62 * \param time_history_mng A pointer to an instance of ITimeHistoryMng.
63 */
64 explicit GlobalTimeHistoryAdder(ITimeHistoryMng* time_history_mng);
65 ~GlobalTimeHistoryAdder() override = default;
66
67 public:
68
69 void addValue(const TimeHistoryAddValueArg& thp, Real value) override;
70 void addValue(const TimeHistoryAddValueArg& thp, Int32 value) override;
71 void addValue(const TimeHistoryAddValueArg& thp, Int64 value) override;
72 void addValue(const TimeHistoryAddValueArg& thp, RealConstArrayView values) override;
73 void addValue(const TimeHistoryAddValueArg& thp, Int32ConstArrayView values) override;
74 void addValue(const TimeHistoryAddValueArg& thp, Int64ConstArrayView values) override;
75
76 private:
77
78 ITimeHistoryMng* m_thm;
79};
80
81/*---------------------------------------------------------------------------*/
82/*---------------------------------------------------------------------------*/
83
84} // End namespace Arcane
85
86/*---------------------------------------------------------------------------*/
87/*---------------------------------------------------------------------------*/
88
89#endif
GlobalTimeHistoryAdder(ITimeHistoryMng *time_history_mng)
Constructor.
void addValue(const TimeHistoryAddValueArg &thp, Real value) override
Method allowing the addition of a value to a history.
Class interface allowing the addition of one or more values to a value history.
Class managing a history of values.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int64_t Int64
Signed integer type of 64 bits.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482
ConstArrayView< Int64 > Int64ConstArrayView
C equivalent of a 1D array of 64-bit integers.
Definition UtilsTypes.h:480
double Real
Type representing a real number.
std::int32_t Int32
Signed integer type of 32 bits.
ConstArrayView< Real > RealConstArrayView
C equivalent of a 1D array of reals.
Definition UtilsTypes.h:488