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 |
Private Member Functions | |
| void | _recomputeTypeGlobalTime () |
| void | _recomputeTypeCPUTime () |
| void | _recomputeTypeIteration () |
Private Attributes | |
| ISubDomain * | m_sub_domain = nullptr |
| String | m_name |
| eOutType | m_out_type = OutTypeNone |
| VariableScalarInteger * | m_next_iteration = nullptr |
| Next save iteration. | |
| VariableScalarReal * | m_next_global_time = nullptr |
| Physical time of the next save. | |
| VariableScalarInteger * | m_next_cpu_time = nullptr |
| CPU time of the next save. | |
| const CaseOptionInteger * | m_step_iteration = nullptr |
| const CaseOptionReal * | m_step_global_time = nullptr |
| const CaseOptionInteger * | m_step_cpu_time = nullptr |
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.
|
private |
Definition at line 233 of file OutputChecker.cc.
|
private |
Definition at line 210 of file OutputChecker.cc.
|
private |
Definition at line 259 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(), m_next_global_time, 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.
|
private |
Definition at line 71 of file OutputChecker.h.
|
private |
CPU time of the next save.
Definition at line 75 of file OutputChecker.h.
|
private |
Physical time of the next save.
Definition at line 74 of file OutputChecker.h.
Referenced by check().
|
private |
Next save iteration.
Definition at line 73 of file OutputChecker.h.
|
private |
Definition at line 72 of file OutputChecker.h.
|
private |
Definition at line 78 of file OutputChecker.h.
|
private |
Definition at line 77 of file OutputChecker.h.
|
private |
Definition at line 76 of file OutputChecker.h.
|
private |
Definition at line 70 of file OutputChecker.h.