Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IVariableReader.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/* IVariableReader.h (C) 2000-2025 */
9/* */
10/* Reading of variables for initialization and during calculation. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13#ifndef ARCANE_CORE_IVARIABLEREADER_H
14#define ARCANE_CORE_IVARIABLEREADER_H
15/*---------------------------------------------------------------------------*/
16/*---------------------------------------------------------------------------*/
17
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29/*!
30 * \internal
31 * \brief Brief reading of variables during calculation.
32 */
34{
35 public:
36
37 virtual ~IVariableReader() = default;
38
39 public:
40
41 //! Sets the path of the directory containing the data
42 virtual void setBaseDirectoryName(const String& path) = 0;
43 //! Sets the name of the file containing the data.
44 virtual void setBaseFileName(const String& filename) = 0;
45 /*!
46 * \brief Initializes the reader.
47 *
48 * \a is_start is true if we are at the start of the calculation.
49 */
50 virtual void initialize(bool is_start) = 0;
51 /*!
52 * \brief Sets the list of variables that we wish to reread.
53 * This call must happen before initialize().
54 */
55 virtual void setVariables(VariableCollection vars) = 0;
56 //! Updates the variables for the time \a wanted_time
57 virtual void updateVariables(Real wanted_time) = 0;
58 /*!
59 * \brief Time interval of values for the variable \a var.
60 * The data for the variable \a var exists for the times
61 * included between \a a.x and \a a.y with \a a having the value
62 * returned.
63 *
64 * This call is valid only after calling initialize().
65 */
66 virtual Real2 timeInterval(IVariable* var) = 0;
67};
68
69/*---------------------------------------------------------------------------*/
70/*---------------------------------------------------------------------------*/
71
72} // namespace Arcane
73
74/*---------------------------------------------------------------------------*/
75/*---------------------------------------------------------------------------*/
76
77#endif
Declarations of Arcane's general types.
virtual Real2 timeInterval(IVariable *var)=0
Time interval of values for the variable var. The data for the variable var exists for the times incl...
virtual void setBaseDirectoryName(const String &path)=0
Sets the path of the directory containing the data.
virtual void initialize(bool is_start)=0
Initializes the reader.
virtual void updateVariables(Real wanted_time)=0
Updates the variables for the time wanted_time.
virtual void setVariables(VariableCollection vars)=0
Sets the list of variables that we wish to reread. This call must happen before initialize().
virtual void setBaseFileName(const String &filename)=0
Sets the name of the file containing the data.
Interface of a variable.
Definition IVariable.h:40
Class managing a 2-dimensional real vector.
Definition Real2.h:122
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
double Real
Type representing a real number.