Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IEntryPoint.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/* IEntryPoint.h (C) 2000-2025 */
9/* */
10/* Interface of a module entry point. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IENTRYPOINT_H
13#define ARCANE_CORE_IENTRYPOINT_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18#include "arcane/core/Timer.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arcane
24{
25class IModule;
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
34class ARCANE_CORE_EXPORT IEntryPoint
35{
36 public:
37
42
43 static const char* const WComputeLoop;
45 static const char* const WBuild;
47 static const char* const WInit;
49 static const char* const WContinueInit;
51 static const char* const WStartInit;
53 static const char* const WRestore;
55 static const char* const WOnMeshChanged;
57 static const char* const WOnMeshRefinement;
59 static const char* const WExit;
61
65 enum
66 {
67 PNone = 0,
82 };
83
84 public:
85
86 virtual ~IEntryPoint() = default;
87
88 public:
89
91 virtual String name() const = 0;
92
94 virtual String fullName() const = 0;
95
96 public:
97
99 ARCANE_DEPRECATED_REASON("Y2022: Do not use this method. Try to get 'ISubDomain' from another way")
100 virtual ISubDomain* subDomain() const = 0;
101
103 virtual IModule* module() const = 0;
104
106 virtual void executeEntryPoint() = 0;
107
114 virtual Real totalCPUTime() const = 0;
115
122 virtual Real lastCPUTime() const = 0;
123
125 virtual Real totalElapsedTime() const = 0;
126
128 virtual Real lastElapsedTime() const = 0;
129
134 ARCANE_DEPRECATED_REASON("Y2022: Use totalElapsedTime() instead")
135 virtual Real totalTime(Timer::eTimerType) const = 0;
136
141 ARCANE_DEPRECATED_REASON("Y2022: Use lastElapsedTime() instead")
142 virtual Real lastTime(Timer::eTimerType) const = 0;
143
145 virtual Integer nbCall() const = 0;
146
148 virtual String where() const = 0;
149
151 virtual int property() const = 0;
152};
153
154/*---------------------------------------------------------------------------*/
155/*---------------------------------------------------------------------------*/
156
157} // End namespace Arcane
158
159/*---------------------------------------------------------------------------*/
160/*---------------------------------------------------------------------------*/
161
162#endif
Declarations of Arcane's general types.
Interface of a module entry point.
Definition IEntryPoint.h:35
virtual Real lastTime(Timer::eTimerType) const =0
Returns lastElapsedTime().
virtual Real totalTime(Timer::eTimerType) const =0
Returns totalElapsedTime().
virtual void executeEntryPoint()=0
Calls the entry point.
virtual Real totalElapsedTime() const =0
Elapsed execution time (clock time) in this entry point (in milliseconds).
static const char *const WComputeLoop
called during the calculation loop
Definition IEntryPoint.h:43
static const char *const WBuild
called for module construction
Definition IEntryPoint.h:45
virtual Real lastElapsedTime() const =0
Elapsed execution time (clock time) of the last iteration (in milliseconds).
virtual Real lastCPUTime() const =0
CPU consumption of the last iteration (in milliseconds).
virtual ISubDomain * subDomain() const =0
Returns the main manager.
static const char *const WStartInit
called during new case initialization
Definition IEntryPoint.h:51
static const char *const WRestore
called to restore variables during a rollback
Definition IEntryPoint.h:53
virtual Integer nbCall() const =0
Returns the number of times the entry point has been executed.
static const char *const WOnMeshRefinement
called after mesh refinement
Definition IEntryPoint.h:57
virtual String fullName() const =0
Full name (with the module) of the entry point. This name is unique.
@ PNone
No properties.
Definition IEntryPoint.h:67
@ PAutoLoadEnd
Automatically loaded at the end. This means that a module possessing an entry point with this propert...
Definition IEntryPoint.h:81
@ PAutoLoadBegin
Automatically loaded at the beginning. This means that a module possessing an entry point with this p...
Definition IEntryPoint.h:74
virtual int property() const =0
Returns the properties of the entry point.
virtual Real totalCPUTime() const =0
Total CPU consumption spent in this entry point (in milliseconds).
static const char *const WOnMeshChanged
called after a mesh change
Definition IEntryPoint.h:55
static const char *const WContinueInit
called during continuation initialization
Definition IEntryPoint.h:49
virtual String where() const =0
Returns where the entry point is called.
static const char *const WInit
called during initialization
Definition IEntryPoint.h:47
virtual IModule * module() const =0
Returns the module associated with the entry point.
virtual String name() const =0
Returns the name of the entry point.
virtual ~IEntryPoint()=default
Releases resources.
Interface of a module.
Definition IModule.h:40
Interface of the subdomain manager.
Definition ISubDomain.h:75
Management of a timer.
Definition Timer.h:63
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
double Real
Type representing a real number.