Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ITimeHistoryMngInternal.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/* ITimeHistoryMngInternal.h (C) 2000-2025 */
9/* */
10/* Internal class interface managing a history of values. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_INTERNAL_ITIMEHISTORYMNGINTERNAL_H
13#define ARCANE_CORE_INTERNAL_ITIMEHISTORYMNGINTERNAL_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19#include "arcane/core/ITimeHistoryMng.h"
20#include "arcane/core/IPropertyMng.h"
21#include "arcane/core/Directory.h"
22#include "arcane/core/MeshHandle.h"
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27namespace Arcane
28{
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
34
35/*---------------------------------------------------------------------------*/
36/*---------------------------------------------------------------------------*/
37
42class ARCANE_CORE_EXPORT TimeHistoryAddValueArgInternal
43{
44 public:
45
46 explicit TimeHistoryAddValueArgInternal(const TimeHistoryAddValueArg& thp)
47 : m_thp(thp)
48 , m_mesh_handle()
49 {}
50
51 TimeHistoryAddValueArgInternal(const TimeHistoryAddValueArg& thp, const MeshHandle& mesh_handle)
52 : m_thp(thp)
53 , m_mesh_handle(mesh_handle)
54 {}
55
56 TimeHistoryAddValueArgInternal(const String& name, bool end_time, Integer subdomain_id)
57 : m_thp(name, end_time, subdomain_id)
58 , m_mesh_handle()
59 {}
60
61 public:
62
63 const TimeHistoryAddValueArg& timeHistoryAddValueArg() const { return m_thp; }
64 const MeshHandle& meshHandle() const { return m_mesh_handle; }
65
66 private:
67
69 MeshHandle m_mesh_handle;
70};
71
72/*---------------------------------------------------------------------------*/
73/*---------------------------------------------------------------------------*/
74
78class ARCANE_CORE_EXPORT ITimeHistoryMngInternal
79{
80 public:
81
82 virtual ~ITimeHistoryMngInternal() = default;
83
84 public:
85
92 virtual void addValue(const TimeHistoryAddValueArgInternal& thpi, Real value) = 0;
93
100 virtual void addValue(const TimeHistoryAddValueArgInternal& thpi, Int32 value) = 0;
101
108 virtual void addValue(const TimeHistoryAddValueArgInternal& thpi, Int64 value) = 0;
109
116 virtual void addValue(const TimeHistoryAddValueArgInternal& thpi, RealConstArrayView values) = 0;
117
124 virtual void addValue(const TimeHistoryAddValueArgInternal& thpi, Int32ConstArrayView values) = 0;
125
132 virtual void addValue(const TimeHistoryAddValueArgInternal& thpi, Int64ConstArrayView values) = 0;
133
137 virtual void addNowInGlobalTime() = 0;
138
142 virtual void updateGlobalTimeCurve() = 0;
143
147 virtual void resizeArrayAfterRestore() = 0;
148
156 virtual void dumpCurves(ITimeHistoryCurveWriter2* writer) = 0;
157
161 virtual void dumpHistory() = 0;
162
166 virtual void updateMetaData() = 0;
167
175 virtual void readVariables(IMeshMng* mesh_mng, IMesh* default_mesh) = 0;
176
183
189 virtual void removeCurveWriter(const String& name) = 0;
190
197
201 virtual bool isShrinkActive() const = 0;
205 virtual void setShrinkActive(bool is_active) = 0;
206
214 virtual bool active() const = 0;
219 virtual void setActive(bool is_active) = 0;
220
227 virtual bool isDumpActive() const = 0;
231 virtual void setDumpActive(bool is_active) = 0;
232
237 virtual bool isMasterIO() = 0;
238
249 virtual bool isMasterIOOfSubDomain() = 0;
250
254 virtual bool isNonIOMasterCurvesEnabled() = 0;
255
261 virtual bool isIOMasterWriteOnly() = 0;
262
268 virtual void setIOMasterWriteOnly(bool is_active) = 0;
269
275 virtual void addObservers(IPropertyMng* prop_mng) = 0;
276
284 virtual void editOutputPath(const Directory& directory) = 0;
285
296};
297
298/*---------------------------------------------------------------------------*/
299/*---------------------------------------------------------------------------*/
300
301} // End namespace Arcane
302
303/*---------------------------------------------------------------------------*/
304/*---------------------------------------------------------------------------*/
305
306#endif
Declarations of types used in Arcane.
Class managing a directory.
Definition Directory.h:36
Mesh manager interface.
Definition IMeshMng.h:41
Interface of the property manager.
Interface for the internal part of a value history manager.
virtual bool isIOMasterWriteOnly()=0
Method allowing to know if only the master process calls the writers.
virtual void setIOMasterWriteOnly(bool is_active)=0
Method allowing to define if only the master process calls the writers.
virtual bool isMasterIOOfSubDomain()=0
Method allowing to know if our process is the writer for our subdomain. In the case where replication...
virtual bool isMasterIO()=0
Method allowing to know if our process is the writer.
virtual bool isShrinkActive() const =0
Returns a boolean indicating if the history is compressed.
virtual void updateGlobalTimeCurve()=0
Method allowing the GlobalTime array to be copied into the global GlobalTime variable.
virtual void addObservers(IPropertyMng *prop_mng)=0
Method allowing observers saving the history before a checkpoint to be added.
virtual void setDumpActive(bool is_active)=0
Sets the output activation status.
virtual void dumpCurves(ITimeHistoryCurveWriter2 *writer)=0
Method allowing curves to be written using the provided writer.
virtual void dumpHistory()=0
Method allowing all curves to be written using all registered writers.
virtual bool isNonIOMasterCurvesEnabled()=0
Method allowing to know if all processes can have a value history.
virtual void addValue(const TimeHistoryAddValueArgInternal &thpi, Int32ConstArrayView values)=0
Method allowing values to be added to a history.
virtual void setShrinkActive(bool is_active)=0
Sets the boolean indicating if the history is compressed.
virtual void resizeArrayAfterRestore()=0
Method allowing the value arrays to be resized after a restart.
virtual void setActive(bool is_active)=0
Sets the activation status.
virtual void editOutputPath(const Directory &directory)=0
Method allowing the curve output directory to be changed.
virtual void addValue(const TimeHistoryAddValueArgInternal &thpi, RealConstArrayView values)=0
Method allowing values to be added to a history.
virtual void addValue(const TimeHistoryAddValueArgInternal &thpi, Int64ConstArrayView values)=0
Method allowing values to be added to a history.
virtual ~ITimeHistoryMngInternal()=default
Releases resources.
virtual void iterationsAndValues(const TimeHistoryAddValueArgInternal &thpi, UniqueArray< Int32 > &iterations, UniqueArray< Real > &values)=0
Method allowing the iterations and values of a history to be outputted.
virtual bool active() const =0
Indicates the activation status.
virtual void applyTransformation(ITimeHistoryTransformer *v)=0
Applies the transformation v to all curves.
virtual void readVariables(IMeshMng *mesh_mng, IMesh *default_mesh)=0
Method allowing previously written curves to be retrieved during a restart.
virtual void updateMetaData()=0
Method allowing the curve metadata to be updated.
virtual void addValue(const TimeHistoryAddValueArgInternal &thpi, Int64 value)=0
Method allowing a value to be added to a history.
virtual void addCurveWriter(Ref< ITimeHistoryCurveWriter2 > writer)=0
Method allowing a writer to be added for curve output.
virtual bool isDumpActive() const =0
Indicates the output activation status.
virtual void addValue(const TimeHistoryAddValueArgInternal &thpi, Int32 value)=0
Method allowing a value to be added to a history.
virtual void addNowInGlobalTime()=0
Method allowing the current GlobalTime to be added to the GlobalTimes array.
virtual void removeCurveWriter(const String &name)=0
Method allowing a writer to be removed.
virtual void addValue(const TimeHistoryAddValueArgInternal &thpi, Real value)=0
Method allowing a value to be added to a history.
Interface of an object transforming history curves.
Handle on a mesh.
Definition MeshHandle.h:48
Reference to an instance.
Class extending the arguments when adding a value to a value history.
1D data vector with value semantics (STL style).
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.
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