Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
CommonVariables.cc
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/* CommonVariables.cc (C) 2000-2022 */
9/* */
10/* Common variables describing a case. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/core/CommonVariables.h"
15#include "arcane/core/IModule.h"
16#include "arcane/core/ISubDomain.h"
17
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
20
21namespace Arcane
22{
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
29: CommonVariables(c->subDomain()->variableMng())
30{
31}
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
38: CommonVariables(sd->variableMng())
39{
40}
41
42/*---------------------------------------------------------------------------*/
43/*---------------------------------------------------------------------------*/
44
46CommonVariables(IVariableMng* variable_mng)
47: m_global_iteration(VariableBuildInfo(variable_mng, "GlobalIteration"))
48, m_global_time(VariableBuildInfo(variable_mng, "GlobalTime"))
49, m_global_deltat(VariableBuildInfo(variable_mng, "GlobalDeltaT"))
50, m_global_old_time(VariableBuildInfo(variable_mng, "GlobalOldTime"))
51, m_global_old_deltat(VariableBuildInfo(variable_mng, "GlobalOldDeltaT"))
52, m_global_final_time(VariableBuildInfo(variable_mng, "GlobalFinalTime"))
53, m_global_old_cpu_time(VariableBuildInfo(variable_mng, "GlobalOldCPUTime"))
54, m_global_cpu_time(VariableBuildInfo(variable_mng, "GlobalCPUTime", IVariable::PNoRestore | IVariable::PExecutionDepend))
55, m_global_old_elapsed_time(VariableBuildInfo(variable_mng, "GlobalOldElapsedTime"))
56, m_global_elapsed_time(VariableBuildInfo(variable_mng, "GlobalElapsedTime", IVariable::PNoRestore | IVariable::PExecutionDepend))
57{
58}
59
60/*---------------------------------------------------------------------------*/
61/*---------------------------------------------------------------------------*/
62
68
70globalTime() const
71{
72 return m_global_time();
73}
74
80
86
88globalDeltaT() const
89{
90 return m_global_deltat();
91}
92
98
100globalCPUTime() const
101{
102 return m_global_cpu_time();
103}
104
110
116
117/*---------------------------------------------------------------------------*/
118/*---------------------------------------------------------------------------*/
119
120} // End namespace Arcane
121
122/*---------------------------------------------------------------------------*/
123/*---------------------------------------------------------------------------*/
VariableScalarInt32 m_global_iteration
Current iteration.
Real globalOldElapsedTime() const
Previous clock time (elapsed) used (in seconds).
VariableScalarReal m_global_final_time
Final time of the case.
VariableScalarReal m_global_elapsed_time
Clock time used (in seconds).
Real globalCPUTime() const
CPU time used (in seconds).
VariableScalarReal m_global_cpu_time
CPU time used (in seconds).
Real globalDeltaT() const
Current Delta T.
Real globalTime() const
Current time.
VariableScalarReal m_global_old_deltat
Delta T at the time previous to the global time.
Real globalElapsedTime() const
Clock time (elapsed) used (in seconds).
Int32 globalIteration() const
Current iteration number.
VariableScalarReal m_global_old_elapsed_time
Previous clock time used (in seconds).
VariableScalarReal m_global_time
Current time.
CommonVariables(IModule *c)
Constructs the references of the common variables for the module c.
VariableScalarReal m_global_old_cpu_time
Previous CPU time used (in seconds).
VariableScalarReal m_global_old_time
Time previous to the current time.
VariableScalarReal m_global_deltat
Global Delta T.
Real globalFinalTime() const
Final time of the simulation.
Real globalOldCPUTime() const
Previous CPU time used (in seconds).
Real globalOldTime() const
Previous current time.
Interface of a module.
Definition IModule.h:40
Interface of the subdomain manager.
Definition ISubDomain.h:75
Variable manager interface.
Interface of a variable.
Definition IVariable.h:40
Parameters necessary for building a variable.
-- 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.