Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
ITimeLoop.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/* ITimeLoop.h (C) 2000-2025 */
9/* */
10/* Interface of a time loop. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_ITIMELOOP_H
13#define ARCANE_CORE_ITIMELOOP_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \ingroup Module
30 * \brief Interface of a time loop.
31 */
32class ARCANE_CORE_EXPORT ITimeLoop
33{
34 public:
35
36 /*! @name Call point
37 Where the entry point is used.
38 */
39 //@{
40 //! called during the calculation loop
41 static const char* WComputeLoop;
42 //! called when reading the dataset
43 static const char* WBuild;
44 //! called during initialization, initialization of a restart, or a new case
45 static const char* WInit;
46 //! called to restore variables during a rollback
47 static const char* WRestore;
48 //! called after a mesh change
49 static const char* WOnMeshChanged;
50 //! called after mesh refinement
51 static const char* WOnMeshRefinement;
52 //! called upon termination of the code.
53 static const char* WExit;
54 //@}
55
56 public:
57
58 virtual ~ITimeLoop() = default; //!< Frees resources.
59
60 public:
61
62 //! Constructs the time loop
63 virtual void build() = 0;
64
65 public:
66
67 //! Application
68 virtual IApplication* application() const = 0;
69
70 public:
71
72 //! Name of the time loop
73 virtual String name() const = 0;
74
75 //! Title of the time loop
76 virtual String title() const = 0;
77
78 //! Sets the title of the time loop
79 virtual void setTitle(const String&) = 0;
80
81 //! Description of the time loop
82 virtual String description() const = 0;
83
84 //! Sets the description of the time loop
85 virtual void setDescription(const String&) = 0;
86
87 //! List of names of required modules.
89
90 //! Sets the list of required modules.
91 virtual void setRequiredModulesName(const StringCollection&) = 0;
92
93 //! List of names of optional modules.
95
96 //! Sets the list of optional modules.
97 virtual void setOptionalModulesName(const StringCollection&) = 0;
98
99 //! List of names of entry points for the call point \a where.
100 virtual TimeLoopEntryPointInfoCollection entryPoints(const String& where) const = 0;
101
102 //! Sets the list of names of entry points for the call point \a where
103 virtual void setEntryPoints(const String& where, const TimeLoopEntryPointInfoCollection&) = 0;
104
105 //! List of user classes associated with the time loop.
106 virtual StringCollection userClasses() const = 0;
107
108 //! Returns the list of classes associated with the time loop.
109 virtual void setUserClasses(const StringCollection&) = 0;
110
111 //! List of singleton services
112 virtual TimeLoopSingletonServiceInfoCollection singletonServices() const = 0;
113
114 //! Sets the list of singleton services.
115 virtual void setSingletonServices(const TimeLoopSingletonServiceInfoCollection& c) = 0;
116
117 //! Configuration options
119};
120
121/*---------------------------------------------------------------------------*/
122/*---------------------------------------------------------------------------*/
123
124} // namespace Arcane
125
126/*---------------------------------------------------------------------------*/
127/*---------------------------------------------------------------------------*/
128
129#endif
Declarations of Arcane's general types.
Application interface.
Interface for a configuration.
Interface of a time loop.
Definition ITimeLoop.h:33
virtual void setUserClasses(const StringCollection &)=0
Returns the list of classes associated with the time loop.
static const char * WRestore
called to restore variables during a rollback
Definition ITimeLoop.h:47
virtual StringCollection optionalModulesName() const =0
List of names of optional modules.
virtual void setRequiredModulesName(const StringCollection &)=0
Sets the list of required modules.
virtual String title() const =0
Title of the time loop.
virtual IApplication * application() const =0
Application.
virtual TimeLoopEntryPointInfoCollection entryPoints(const String &where) const =0
List of names of entry points for the call point where.
static const char * WOnMeshChanged
called after a mesh change
Definition ITimeLoop.h:49
virtual void setTitle(const String &)=0
Sets the title of the time loop.
virtual void setSingletonServices(const TimeLoopSingletonServiceInfoCollection &c)=0
Sets the list of singleton services.
static const char * WExit
called upon termination of the code.
Definition ITimeLoop.h:53
virtual void build()=0
Constructs the time loop.
virtual IConfiguration * configuration()=0
Configuration options.
virtual StringCollection requiredModulesName() const =0
List of names of required modules.
virtual TimeLoopSingletonServiceInfoCollection singletonServices() const =0
List of singleton services.
virtual ~ITimeLoop()=default
Frees resources.
virtual String description() const =0
Description of the time loop.
static const char * WOnMeshRefinement
called after mesh refinement
Definition ITimeLoop.h:51
virtual void setDescription(const String &)=0
Sets the description of the time loop.
virtual void setOptionalModulesName(const StringCollection &)=0
Sets the list of optional modules.
static const char * WBuild
called when reading the dataset
Definition ITimeLoop.h:43
static const char * WComputeLoop
called during the calculation loop
Definition ITimeLoop.h:41
virtual void setEntryPoints(const String &where, const TimeLoopEntryPointInfoCollection &)=0
Sets the list of names of entry points for the call point where.
virtual StringCollection userClasses() const =0
List of user classes associated with the time loop.
static const char * WInit
called during initialization, initialization of a restart, or a new case
Definition ITimeLoop.h:45
virtual String name() const =0
Name of the time loop.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Collection< String > StringCollection
Collection of strings.
Definition UtilsTypes.h:506