Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
TimeHistoryMngInternal.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/* TimeHistoryMngInternal.h (C) 2000-2025 */
9/* */
10/* Internal class managing a history of values. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_IMPL_INTERNAL_TIMEHISTORYMNGINTERNAL_H
13#define ARCANE_IMPL_INTERNAL_TIMEHISTORYMNGINTERNAL_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/Iostream.h"
18#include "arcane/utils/Iterator.h"
19#include "arcane/utils/ScopedPtr.h"
20#include "arcane/utils/ITraceMng.h"
21#include "arcane/utils/PlatformUtils.h"
22#include "arcane/utils/OStringStream.h"
23
24#include "arcane/core/IIOMng.h"
25#include "arcane/core/CommonVariables.h"
26#include "arcane/core/Directory.h"
27#include "arcane/core/ObserverPool.h"
28#include "arcane/core/IVariableMng.h"
29#include "arcane/core/IParallelMng.h"
30#include "arcane/core/ITimeHistoryCurveWriter2.h"
31#include "arcane/core/ITimeHistoryTransformer.h"
32#include "arcane/core/XmlNode.h"
33#include "arcane/core/XmlNodeList.h"
34#include "arcane/core/IXmlDocumentHolder.h"
35#include "arcane/core/ServiceBuilder.h"
36#include "arcane/core/Properties.h"
37#include "arcane/core/IParallelReplication.h"
38
39#include "arcane/datatype/DataTypeTraits.h"
40
41#include "arcane/core/internal/ITimeHistoryMngInternal.h"
42
43#include <map>
44#include <set>
45
46/*---------------------------------------------------------------------------*/
47/*---------------------------------------------------------------------------*/
48
49namespace Arcane
50{
51
58class TimeHistoryValue
59{
60 public:
61
62 TimeHistoryValue(const TimeHistoryAddValueArgInternal& thpi, eDataType dt, Integer index, Integer sub_size)
63 : m_data_type(dt)
64 , m_index(index)
65 , m_sub_size(sub_size)
66 , m_thpi(thpi)
67 {}
68
69 virtual ~TimeHistoryValue() = default;
70
71 public:
72
80 virtual void fromOldToNewVariables(IVariableMng* vm, IMesh* default_mesh) = 0;
81
83 virtual void dumpValues(ITraceMng* msg,
85 const TimeHistoryCurveWriterInfo& infos) const = 0;
86
94 virtual void arrayToWrite(UniqueArray<Int32>& iterations,
95 UniqueArray<Real>& values,
96 const TimeHistoryCurveWriterInfo& infos) const = 0;
97
107
113 virtual Integer size() const = 0;
114
120 virtual void removeAfterIteration(Integer last_iteration) = 0;
121
123 const String& name() const { return m_thpi.timeHistoryAddValueArg().name(); }
124
126 eDataType dataType() const { return m_data_type; }
127
129 Integer index() const { return m_index; }
130
131 Integer subSize() const { return m_sub_size; }
132
140 const MeshHandle& meshHandle() const { return m_thpi.meshHandle(); }
141
148 bool isLocal() const { return m_thpi.timeHistoryAddValueArg().isLocal(); }
149
155 Integer localSubDomainId() const { return m_thpi.timeHistoryAddValueArg().localSubDomainId(); }
156
157 private:
158
161 Integer m_sub_size;
163};
164
165/*---------------------------------------------------------------------------*/
166/*---------------------------------------------------------------------------*/
167
179template <typename DataType>
181: public TimeHistoryValue
182{
183 /*
184 * WARNING: WHAT IS DESCRIBED IN THIS COMMENT IS NOT YET OPERATIONAL
185 * When there are many curves and the number of iterations
186 * becomes significant, storage consumes memory. To avoid
187 * this, it is possible to compress the array of iterations.
188 * If this is the case and the iterations are consecutive, only the first
189 * and the last are kept. In this case,
190 * m_iterations has 3 values: [0] = COMPRESSED_TAG, [1] = first
191 * and [2] = last.
192 */
193 public:
194
195 typedef VariableRefArrayT<DataType> ValueList;
196 typedef VariableRefArrayT<Int32> IterationList;
197 static const Integer COMPRESSED_TAG = -15;
198
199 public:
200
202
203 public:
204
215 : TimeHistoryValue(thpi, DataTypeTraitsT<DataType>::type(), index, nb_element)
216 , m_values(VariableBuildInfo(vm, String("TimeHistoryMngValues") + index, VAR_BUILD_FLAGS))
217 , m_iterations(VariableBuildInfo(vm, String("TimeHistoryMngIterations") + index, VAR_BUILD_FLAGS))
218 , m_use_compression(false)
219 , m_shrink_history(shrink)
220 {
221 }
222
232 : TimeHistoryValue(thpi, DataTypeTraitsT<DataType>::type(), index, nb_element)
233 , m_values(VariableBuildInfo(thpi.meshHandle(), String("TimeHistoryMngValues") + index, VAR_BUILD_FLAGS))
234 , m_iterations(VariableBuildInfo(thpi.meshHandle(), String("TimeHistoryMngIterations") + index, VAR_BUILD_FLAGS))
235 , m_use_compression(false)
236 , m_shrink_history(shrink)
237 {
238 }
239
240 public:
241
242 void fromOldToNewVariables(IVariableMng* vm, IMesh* default_mesh) override
243 {
244 IVariable* ptr_old_values = vm->findMeshVariable(default_mesh, String("TimeHistory_Values_") + index());
245 IVariable* ptr_old_iterations = vm->findMeshVariable(default_mesh, String("TimeHistory_Iterations_") + index());
246 if (ptr_old_values == nullptr || ptr_old_iterations == nullptr)
247 ARCANE_FATAL("Unknown old variable");
248
249 ValueList old_values(ptr_old_values);
250 IterationList old_iterations(ptr_old_iterations);
251
252 m_values.resize(old_values.size());
253 m_values.copy(old_values);
254
255 m_iterations.resize(old_iterations.size());
256 m_iterations.copy(old_iterations);
257
258 old_values.resize(0);
259 old_iterations.resize(0);
260 }
261
262 Integer size() const override
263 {
264 return m_iterations.size();
265 }
266
274 {
275 Integer nb_iteration = m_iterations.size();
276 Integer nb_value = m_values.size();
277 Integer sub_size = values.size();
278 if (nb_iteration != 0)
279 if (m_iterations[nb_iteration - 1] == iteration) {
280 // Replace the value
281 for (Integer i = 0; i < sub_size; ++i)
282 m_values[nb_value - sub_size + i] = values[i];
283 return;
284 }
285 Integer add_nb_iter = math::max(128, nb_iteration / 20);
286 Integer add_nb_value = math::max(1024, nb_value / 20);
287 m_iterations.resizeWithReserve(nb_iteration + 1, add_nb_iter);
288 m_values.resizeWithReserve(nb_value + sub_size, add_nb_value);
289 m_iterations[nb_iteration] = iteration;
290 for (Integer i = 0; i < sub_size; ++i)
291 m_values[nb_value + i] = values[i];
292 }
293
294 void removeAfterIteration(Integer last_iteration) override
295 {
296 Integer size = m_iterations.size();
297 Integer last_elem = size;
298 for (Integer i = 0; i < size; ++i)
299 if (m_iterations[i] >= last_iteration) {
300 last_elem = i;
301 break;
302 }
303 if (last_elem != size) {
304 m_iterations.resize(last_elem);
305 m_values.resize(last_elem * subSize());
306 }
307 }
308
309 // Writing a curve for writers version 2.
312 const TimeHistoryCurveWriterInfo& infos) const override
313 {
314 ARCANE_UNUSED(msg);
315
316 // For now, we do nothing
317 if (m_shrink_history)
318 return;
319
320 UniqueArray<Real> values_to_write;
321 UniqueArray<Int32> iterations_to_write;
322
323 arrayToWrite(iterations_to_write, values_to_write, infos);
324
326 if (!meshHandle().isNull()) {
327 TimeHistoryCurveInfo curve_info(name(), meshHandle().meshName(), iterations_to_write, values_to_write, subSize(), sd);
328 writer->writeCurve(curve_info);
329 }
330 else {
331 TimeHistoryCurveInfo curve_info(name(), iterations_to_write, values_to_write, subSize(), sd);
332 writer->writeCurve(curve_info);
333 }
334 }
335
337 {
339 ci.name = name();
340 SharedArray<Int32> iterations(m_iterations.asArray());
341 ci.iterations = iterations;
342 Integer sub_size = subSize();
343 ci.sub_size = subSize();
344
345 SharedArray<DataType> values(m_values.asArray());
346
347 v->transform(ci, values);
348
349 Integer nb_iteration = iterations.size();
350 Integer nb_value = values.size();
351 if (nb_iteration * sub_size != nb_value) {
352 msg->warning() << "Bad size after history transformation";
353 return;
354 }
355
356 m_iterations.resize(nb_iteration);
357 for (Integer i = 0; i < nb_iteration; ++i)
358 m_iterations[i] = iterations[i];
359
360 m_values.resize(nb_value);
361 for (Integer i = 0; i < nb_value; ++i)
362 m_values[i] = values[i];
363 }
364
365 void arrayToWrite(UniqueArray<Int32>& iterations, UniqueArray<Real>& values, const TimeHistoryCurveWriterInfo& infos) const override
366 {
367 // To check that we do not save more iterations than there are
368 // currently (which can happen in case of rollback).
369 Integer max_iter = infos.times().size();
370 Integer nb_iteration = m_iterations.size();
371 Integer sub_size = subSize();
372 iterations.clear();
373 iterations.reserve(nb_iteration);
374 values.clear();
375 values.reserve(nb_iteration * sub_size);
376 for (Integer i = 0, is = nb_iteration; i < is; ++i) {
377 Integer iter = m_iterations[i];
378 if (iter < max_iter) {
379 for (Integer z = 0; z < sub_size; ++z) {
380 values.add(Convert::toReal(m_values[(i * sub_size) + z]));
381 }
382 iterations.add(iter);
383 }
384 }
385 }
386
387 const ValueList& values() const { return m_values; }
388 const IterationList& iterations() const { return m_iterations; }
389
390 private:
391
392 ValueList m_values;
393 IterationList m_iterations;
394 bool m_use_compression;
395 bool m_shrink_history;
396};
397
398/*---------------------------------------------------------------------------*/
399/*---------------------------------------------------------------------------*/
400
401class TimeHistoryMngInternal
403{
404 public:
405
406 explicit TimeHistoryMngInternal(IVariableMng* vm, const Ref<Properties>& properties)
407 : m_variable_mng(vm)
408 , m_trace_mng(m_variable_mng->traceMng())
409 , m_parallel_mng(m_variable_mng->parallelMng())
410 , m_common_variables(m_variable_mng)
411 , m_is_active(true)
412 , m_is_shrink_active(false)
413 , m_is_dump_active(true)
415 , m_need_comm(false)
416 , m_th_meta_data(VariableBuildInfo(m_variable_mng, "TimeHistoryMngMetaData"))
417 , m_th_global_time(VariableBuildInfo(m_variable_mng, "TimeHistoryMngGlobalTime"))
418 , m_properties(properties)
419 , m_version(2)
420 {
421 // TODO AH: With the new API, this variable should always be true
422 // (thanks to m_need_comm). Keep for IFPEN.
423 m_enable_non_io_master_curves = !platform::getEnvironmentVariable("ARCANE_ENABLE_NON_IO_MASTER_CURVES").null();
424
425 bool enable_all_replicats_write = !platform::getEnvironmentVariable("ARCANE_ENABLE_ALL_REPLICATS_WRITE_CURVES").null();
426
427 // Only the IO master subdomain activates time history.
428 IParallelReplication* pr = m_parallel_mng->replication();
429 if (pr->hasReplication()) {
430 m_is_master_io = (pr->isMasterRank() && m_parallel_mng->isMasterIO());
431 m_is_master_io_of_sd = (enable_all_replicats_write || pr->isMasterRank());
432 }
433 else {
434 m_is_master_io = m_parallel_mng->isMasterIO();
436 }
437 }
438
439 ~TimeHistoryMngInternal() override
440 {
442
443 m_curve_writers2.clear();
444 m_history_list.clear();
445 }
446
447 typedef std::map<String, TimeHistoryValue*> HistoryList;
448 typedef std::set<Ref<ITimeHistoryCurveWriter2>> CurveWriter2List;
449 typedef HistoryList::value_type HistoryValueType;
450
451 public:
452
453 void addValue(const TimeHistoryAddValueArgInternal& thpi, Real value) override
454 {
455 RealConstArrayView values(1, &value);
456 _addHistoryValue(thpi, values);
457 }
458 void addValue(const TimeHistoryAddValueArgInternal& thpi, Int64 value) override
459 {
460 Int64ConstArrayView values(1, &value);
461 _addHistoryValue(thpi, values);
462 }
463 void addValue(const TimeHistoryAddValueArgInternal& thpi, Int32 value) override
464 {
465 Int32ConstArrayView values(1, &value);
466 _addHistoryValue(thpi, values);
467 }
469 {
470 _addHistoryValue(thpi, values);
471 }
473 {
474 _addHistoryValue(thpi, values);
475 }
477 {
478 _addHistoryValue(thpi, values);
479 }
480
481 public:
482
483 void addNowInGlobalTime() override;
484 void updateGlobalTimeCurve() override;
485 void resizeArrayAfterRestore() override;
486 void dumpCurves(ITimeHistoryCurveWriter2* writer) override;
487 void dumpHistory() override;
488 void updateMetaData() override;
489 void readVariables(IMeshMng* mesh_mng, IMesh* default_mesh) override;
490
491 void addCurveWriter(Ref<ITimeHistoryCurveWriter2> writer) override;
492 void removeCurveWriter(const String& name) override;
494
495 void addObservers(IPropertyMng* prop_mng) override;
496 void editOutputPath(const Directory& directory) override;
497 void iterationsAndValues(const TimeHistoryAddValueArgInternal& thpi, UniqueArray<Int32>& iterations, UniqueArray<Real>& values) override;
498
499 public:
500
501 bool isShrinkActive() const override { return m_is_shrink_active; }
502 void setShrinkActive(bool is_active) override { m_is_shrink_active = is_active; }
503 bool active() const override { return m_is_active; }
504 void setActive(bool is_active) override { m_is_active = is_active; }
505 bool isDumpActive() const override { return m_is_dump_active; }
506 void setDumpActive(bool is_active) override { m_is_dump_active = is_active; }
507 bool isMasterIO() override { return m_is_master_io; }
508 bool isMasterIOOfSubDomain() override { return m_is_master_io_of_sd; }
510 bool isIOMasterWriteOnly() override { return m_io_master_write_only; }
511 void setIOMasterWriteOnly(bool is_active) override { m_io_master_write_only = is_active; }
512
513 private:
514
522 template <class DataType>
524
528 void _destroyAll();
529
534
540
547
553 void _fromLegacyFormat(IMesh* default_mesh);
554
558 void _saveProperties();
559
565
566 private:
567
568 IVariableMng* m_variable_mng;
569 ITraceMng* m_trace_mng;
570 IParallelMng* m_parallel_mng;
571 CommonVariables m_common_variables;
572 Directory m_directory;
573
582
583 String m_output_path;
584 ObserverPool m_observer_pool;
585 HistoryList m_history_list;
589 CurveWriter2List m_curve_writers2;
590 Ref<Properties> m_properties;
591 Integer m_version;
592};
593
594/*---------------------------------------------------------------------------*/
595/*---------------------------------------------------------------------------*/
596
597} // End namespace Arcane
598
599/*---------------------------------------------------------------------------*/
600/*---------------------------------------------------------------------------*/
601
602#endif
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
constexpr Integer size() const noexcept
Returns the size of the array.
Common variables of a case.
Constant view of an array of type T.
constexpr Integer size() const noexcept
Number of elements in the array.
Class managing a directory.
Definition Directory.h:36
Mesh manager interface.
Definition IMeshMng.h:41
Interface of the parallelism manager for a subdomain.
Brief information on parallel subdomain replication.
virtual bool hasReplication() const =0
Indicates if replication is active.
virtual bool isMasterRank() const =0
Indicates if this replication rank is the master.
Interface of the property manager.
virtual void writeCurve(const TimeHistoryCurveInfo &infos)=0
Write a curve.
Interface for the internal part of a value history manager.
Integer sub_size
Number of values per curve.
Int32SharedArray iterations
List of iterations.
Interface of an object transforming history curves.
virtual void transform(CommonInfo &infos, RealSharedArray values)=0
Applies the transformation for a curve with Real values.
virtual TraceMessage warning()=0
Stream for a warning message.
Variable manager interface.
virtual IVariable * findMeshVariable(IMesh *mesh, const String &name)=0
Returns the mesh variable named name or 0 if no such name exists.
Interface of a variable.
Definition IVariable.h:40
@ PNoReplicaSync
Indicates that the variable does not necessarily have the same value across replicas.
Definition IVariable.h:147
@ PExecutionDepend
Indicates that the variable value is dependent on the execution.
Definition IVariable.h:96
@ PNoRestore
Indicates that the variable should not be restored.
Definition IVariable.h:120
Handle on a mesh.
Definition MeshHandle.h:48
List of observers.
Reference to an instance.
1D vector of data with reference semantics.
bool null() const
Returns true if the string is null.
Definition String.cc:306
Class extending the arguments when adding a value to a value history.
Information for writing a curve.
Information about writing curves.
RealConstArrayView times() const
List of times.
void setIOMasterWriteOnly(bool is_active) override
Method allowing to define if only the master process calls the writers.
bool isShrinkActive() const override
Returns a boolean indicating if the history is compressed.
void updateMetaData() override
Method allowing the curve metadata to be updated.
bool m_is_master_io
True if I am the IO manager.
bool m_is_shrink_active
Indicates if history compression is active.
void addNowInGlobalTime() override
Method allowing the current GlobalTime to be added to the GlobalTimes array.
bool isMasterIO() override
Method allowing to know if our process is the writer.
void addValue(const TimeHistoryAddValueArgInternal &thpi, Real value) override
Method allowing a value to be added to a history.
void _dumpSummaryOfCurves()
Method allowing a JSON file to be dumped with the name of each curve output in GNUPLOT format as well...
void addValue(const TimeHistoryAddValueArgInternal &thpi, Int32 value) override
Method allowing a value to be added to a history.
bool m_is_master_io_of_sd
True if I am the IO manager for my subdomain.
void _removeCurveWriter(const Ref< ITimeHistoryCurveWriter2 > &writer)
Method allowing removal of a writer.
void updateGlobalTimeCurve() override
Method allowing the GlobalTime array to be copied into the global GlobalTime variable.
void resizeArrayAfterRestore() override
Method allowing the value arrays to be resized after a restart.
void addObservers(IPropertyMng *prop_mng) override
Method allowing observers saving the history before a checkpoint to be added.
bool isMasterIOOfSubDomain() override
Method allowing to know if our process is the writer for our subdomain. In the case where replication...
bool isDumpActive() const override
Indicates the output activation status.
bool m_is_dump_active
Indicates if dumps are active.
void removeCurveWriter(const String &name) override
Method allowing a writer to be removed.
void readVariables(IMeshMng *mesh_mng, IMesh *default_mesh) override
Method allowing previously written curves to be retrieved during a restart.
void setDumpActive(bool is_active) override
Sets the output activation status.
void addValue(const TimeHistoryAddValueArgInternal &thpi, Int32ConstArrayView values) override
Method allowing values to be added to a history.
void dumpHistory() override
Method allowing all curves to be written using all registered writers.
void _dumpSummaryOfCurvesLegacy()
Method allowing an XML file to be dumped with the name of each curve output in GNUPLOT format.
void addValue(const TimeHistoryAddValueArgInternal &thpi, Int64ConstArrayView values) override
Method allowing values to be added to a history.
HistoryList m_history_list
List of histories.
void _addHistoryValue(const TimeHistoryAddValueArgInternal &thpi, ConstArrayView< DataType > values)
Method allowing values to be added to a value history.
VariableArrayReal m_th_global_time
Array of time instants.
bool isNonIOMasterCurvesEnabled() override
Method allowing to know if all processes can have a value history.
bool m_enable_non_io_master_curves
Indicates if curve writing by non-io_master procs is possible.
void _dumpCurvesAllWriters()
Method allowing all curves to be dumped with all writers.
void setActive(bool is_active) override
Sets the activation status.
void applyTransformation(ITimeHistoryTransformer *v) override
Applies the transformation v to all curves.
void iterationsAndValues(const TimeHistoryAddValueArgInternal &thpi, UniqueArray< Int32 > &iterations, UniqueArray< Real > &values) override
Method allowing the iterations and values of a history to be outputted.
void dumpCurves(ITimeHistoryCurveWriter2 *writer) override
Method allowing curves to be written using the provided writer.
bool m_io_master_write_only
Indicates if writers must be called by all processes.
bool isIOMasterWriteOnly() override
Method allowing to know if only the master process calls the writers.
bool active() const override
Indicates the activation status.
void addValue(const TimeHistoryAddValueArgInternal &thpi, RealConstArrayView values) override
Method allowing values to be added to a history.
void _saveProperties()
Method allowing saving the properties of the metadata.
void addValue(const TimeHistoryAddValueArgInternal &thpi, Int64 value) override
Method allowing a value to be added to a history.
void setShrinkActive(bool is_active) override
Sets the boolean indicating if the history is compressed.
VariableScalarString m_th_meta_data
History info.
void _fromLegacyFormat(IMesh *default_mesh)
Method allowing conversion from the old format to the new.
void editOutputPath(const Directory &directory) override
Method allowing the curve output directory to be changed.
RealUniqueArray m_global_times
List of global times.
bool m_need_comm
Indicates if at least one curve is non-local (thus requiring communications).
bool m_is_active
Indicates if the service is active.
void addCurveWriter(Ref< ITimeHistoryCurveWriter2 > writer) override
Method allowing a writer to be added for curve output.
TimeHistoryValueT(const TimeHistoryAddValueArgInternal &thpi, Integer index, Integer nb_element, bool shrink)
Constructor for building a value history linked to a mesh.
void applyTransformation(ITraceMng *msg, ITimeHistoryTransformer *v) override
Method allowing the application of a transformation on the values of the value history.
Integer size() const override
Method allowing the retrieval of the number of recorded values.
void dumpValues(ITraceMng *msg, ITimeHistoryCurveWriter2 *writer, const TimeHistoryCurveWriterInfo &infos) const override
Prints the history values using the writer writer.
void addValue(ConstArrayView< DataType > values, Integer iteration)
Method allowing the addition of values to an iteration.
void removeAfterIteration(Integer last_iteration) override
Method allowing the removal of all values after a certain iteration.
void arrayToWrite(UniqueArray< Int32 > &iterations, UniqueArray< Real > &values, const TimeHistoryCurveWriterInfo &infos) const override
Method allowing the retrieval of iterations and values from a value history.
TimeHistoryValueT(IVariableMng *vm, const TimeHistoryAddValueArgInternal &thpi, Integer index, Integer nb_element, bool shrink)
Constructor for building a value history not linked to a mesh.
void fromOldToNewVariables(IVariableMng *vm, IMesh *default_mesh) override
Method allowing the conversion of variables from old saves to the new format.
Integer index() const
History index in the list.
virtual Integer size() const =0
Method allowing the retrieval of the number of recorded values.
const MeshHandle & meshHandle() const
Method allowing the retrieval of the registered MeshHandle.
virtual void removeAfterIteration(Integer last_iteration)=0
Method allowing the removal of all values after a certain iteration.
const String & name() const
History name.
eDataType dataType() const
History data type.
virtual void applyTransformation(ITraceMng *msg, ITimeHistoryTransformer *v)=0
Method allowing the application of a transformation on the values of the value history.
Integer m_index
History index in the list.
virtual void fromOldToNewVariables(IVariableMng *vm, IMesh *default_mesh)=0
Method allowing the conversion of variables from old saves to the new format.
virtual ~TimeHistoryValue()=default
Frees resources.
Integer localSubDomainId() const
Method allowing the retrieval of the subdomain ID to which this history belongs.
virtual void arrayToWrite(UniqueArray< Int32 > &iterations, UniqueArray< Real > &values, const TimeHistoryCurveWriterInfo &infos) const =0
Method allowing the retrieval of iterations and values from a value history.
bool isLocal() const
Method allowing determination if it is a global history or local to a subdomain.
virtual void dumpValues(ITraceMng *msg, ITimeHistoryCurveWriter2 *writer, const TimeHistoryCurveWriterInfo &infos) const =0
Prints the history values using the writer writer.
1D data vector with value semantics (STL style).
Parameters necessary for building a variable.
virtual void resize(Integer new_size)
Resizes the array to contain new_size elements.
T max(const T &a, const T &b, const T &c)
Returns the maximum of three elements.
Definition MathUtils.h:407
VariableRefArrayT< Real > VariableArrayReal
Array variable of real type.
VariableRefScalarT< String > VariableScalarString
Scalar variable of character string type.
Real toReal(Real r)
Converts r to a Real.
String getEnvironmentVariable(const String &name)
Environment variable named name.
-- 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
Integer arcaneCallFunctionAndCatchException(std::function< void()> function)
Calls the function function while catching potential exceptions.
UniqueArray< Real > RealUniqueArray
Dynamic 1D array of reals.
Definition UtilsTypes.h:349
double Real
Type representing a real number.
eDataType
Data type.
Definition DataTypes.h:41
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