Arcane
v3.15.3.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
PreciseOutputChecker.h
1
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2
//-----------------------------------------------------------------------------
3
// Copyright 2000-2022 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
/* PreciseOutputChecker.h (C) 2000-2020 */
9
/* */
10
/* Sorties basées sur un temps (physique ou CPU) ou un nombre d'itération. */
11
/*---------------------------------------------------------------------------*/
12
#ifndef ARCANE_PRECISEOUTPUTCHECKER_H
13
#define ARCANE_PRECISEOUTPUTCHECKER_H
14
/*---------------------------------------------------------------------------*/
15
/*---------------------------------------------------------------------------*/
16
17
#include "arcane/VariableTypes.h"
18
#include "arcane/ICaseFunction.h"
19
20
/*---------------------------------------------------------------------------*/
21
/*---------------------------------------------------------------------------*/
22
23
namespace
Arcane
24
{
25
26
/*---------------------------------------------------------------------------*/
27
/*---------------------------------------------------------------------------*/
28
29
/*!
30
* Service de contrôle sur la réalisation des sorties fichier.
31
* Ce dervice est un singleton devant être initialisé au lancement de l'applicaiton.
32
*/
33
class
PreciseOutputChecker
34
{
35
public
:
36
/*!
37
* Initialisation en fonction du jeu de données utilisateur.
38
**/
39
void
initializeOutputPhysicalTime
(
double
output_period
);
40
void
initializeOutputPhysicalTime
(
ICaseFunction
*
output_period
);
41
42
void
initializeOutputIteration(Integer
output_period
);
43
void
initializeOutputIteration(
ICaseFunction
*
output_period
);
44
45
//! Indique s'il faut ou non faire une sortie
46
bool
checkIfOutput
(
double
old_time
,
double
current_time
,Integer
current_iteration
);
47
48
private
:
49
50
//! Méthode interne de comparaison des temps
51
bool
_compareTime(Real
current_time
, Real
compar_time
);
52
53
//! Méthode pour contrôler un output fixé
54
bool
_checkTime(Real
old_time
, Real
current_time
, Real
output_period
);
55
56
//! Méthode pour vérifier si un temps précédent ne provoque pas d'output
57
bool
_checkOldTime(Real
old_time
, Real
output_period
, Integer
curr_number_of_outputs
);
58
59
//! Méthode pour contrôler un output par encadrement
60
bool
_checkTimeInterval(Real
output_period
, Real
current_time
, Real
period
);
61
62
double
m_output_period_physical_time = 0.0;
63
ICaseFunction
* m_table_values_physical_time =
nullptr
;
64
Integer m_output_period_iteration = -1;
65
ICaseFunction
* m_table_values_iteration =
nullptr
;
66
};
67
68
/*---------------------------------------------------------------------------*/
69
/*---------------------------------------------------------------------------*/
70
71
}
// namespace Arcane
72
73
/*---------------------------------------------------------------------------*/
74
/*---------------------------------------------------------------------------*/
75
76
#endif
Arcane::ICaseFunction
Definition
ICaseFunction.h:46
Arcane::PreciseOutputChecker
Definition
PreciseOutputChecker.h:34
Arcane::PreciseOutputChecker::checkIfOutput
bool checkIfOutput(double old_time, double current_time, Integer current_iteration)
Indique s'il faut ou non faire une sortie.
Definition
PreciseOutputChecker.cc:61
Arcane::PreciseOutputChecker::initializeOutputPhysicalTime
void initializeOutputPhysicalTime(double output_period)
Arccore::Ref
Référence à une instance.
Definition
arccore/src/base/arccore/base/Ref.h:143
Arcane
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Definition
AbstractCaseDocumentVisitor.cc:20
arcane
core
PreciseOutputChecker.h
Généré le Lundi 10 Février 2025 02:47:10 pour Arcane par
1.9.8