Manages outputs based on physical time, CPU time, or a number of iterations. More...
#include <arcane/core/OutputChecker.h>
Public Types | |
| enum | eOutType { OutTypeNone , OutTypeGlobalTime , OutTypeCPUTime , OutTypeIteration } |
| Output type. More... | |
Public Member Functions | |
| OutputChecker (ISubDomain *sd, const String &name) | |
| void | initialize () |
| void | initialize (bool recompute_next_value) |
| bool | hasOutput () const |
| bool | check (Real old_time, Real current_time, Integer current_iteration, Integer current_cpu_time, const String &from_function=String()) |
| Checks whether an output should be performed. | |
| void | assignGlobalTime (VariableScalarReal *variable, const CaseOptionReal *option) |
| void | assignCPUTime (VariableScalarInteger *variable, const CaseOptionInteger *option) |
| void | assignIteration (VariableScalarInteger *variable, const CaseOptionInteger *option) |
| Real | nextGlobalTime () const |
| Integer | nextIteration () const |
| Integer | nextCPUTime () const |
Manages outputs based on physical time, CPU time, or a number of iterations.
CPU time is expressed in minutes.
Definition at line 37 of file OutputChecker.h.
Output type.
| Enumerator | |
|---|---|
| OutTypeNone | No outputs. |
| OutTypeGlobalTime | Output based on physical time. |
| OutTypeCPUTime | Output based on consumed CPU time. |
| OutTypeIteration | Output based on number of iterations. |
Definition at line 42 of file OutputChecker.h.
| Arcane::OutputChecker::OutputChecker | ( | ISubDomain * | sd, |
| const String & | name ) |
Definition at line 34 of file OutputChecker.cc.
| void Arcane::OutputChecker::assignCPUTime | ( | VariableScalarInteger * | variable, |
| const CaseOptionInteger * | option ) |
Definition at line 54 of file OutputChecker.cc.
| void Arcane::OutputChecker::assignGlobalTime | ( | VariableScalarReal * | variable, |
| const CaseOptionReal * | option ) |
Definition at line 47 of file OutputChecker.cc.
| void Arcane::OutputChecker::assignIteration | ( | VariableScalarInteger * | variable, |
| const CaseOptionInteger * | option ) |
Definition at line 61 of file OutputChecker.cc.
| bool Arcane::OutputChecker::check | ( | Real | old_time, |
| Real | current_time, | ||
| Integer | current_iteration, | ||
| Integer | cpu_time_used, | ||
| const String & | from_function = String() ) |
Checks whether an output should be performed.
When an output type is not available, the associated value(s) are not used and may be arbitrary.
| old_time | physical time of the previous iteration. |
| current_time | current physical time. |
| current_iteration | current iteration. |
| cpu_time_used | CPU time used |
Definition at line 86 of file OutputChecker.cc.
References Arcane::ITraceMng::debug(), Arcane::math::floor(), Arcane::math::isEqual(), Arcane::math::isZero(), OutTypeCPUTime, OutTypeGlobalTime, OutTypeIteration, and OutTypeNone.
|
inline |
Definition at line 58 of file OutputChecker.h.
| void Arcane::OutputChecker::initialize | ( | ) |
Definition at line 286 of file OutputChecker.cc.
| void Arcane::OutputChecker::initialize | ( | bool | recompute_next_value | ) |
Definition at line 295 of file OutputChecker.cc.
| Integer Arcane::OutputChecker::nextCPUTime | ( | ) | const |
Definition at line 365 of file OutputChecker.cc.
| Real Arcane::OutputChecker::nextGlobalTime | ( | ) | const |
Definition at line 341 of file OutputChecker.cc.
| Integer Arcane::OutputChecker::nextIteration | ( | ) | const |
Definition at line 353 of file OutputChecker.cc.