TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Champ_Generique_Statistiques_base.h
1/****************************************************************************
2* Copyright (c) 2026, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#ifndef Champ_Generique_Statistiques_base_included
17#define Champ_Generique_Statistiques_base_included
18
19#include <Champ_Gen_de_Champs_Gen.h>
20#include <Integrale_tps_Champ.h>
21
22class Probleme_base;
24#include <Domaine_forward.h>
25class Nom;
27
28/*! @brief Classe Champ_Generique_Statistiques_base Base class for generic field classes dedicated to statistics
29 *
30 * A class inheriting from Champ_Generique_Statistiques_base carries a statistical operator
31 * The operators considered are moyenne, ecart_Type and correlation
32 *
33 *
34 */
36{
37
38 Declare_base_sans_constructeur(Champ_Generique_Statistiques_base);
39
40public:
41
42 void set_param(Param& param) const override;
44
46
47 virtual double temps() const =0;
48 virtual const Integrale_tps_Champ& integrale() const =0;
49
50 virtual int completer_post_statistiques(const Domaine& dom,const int is_axi,Format_Post_base& format);
53
54 std::vector<YAML_data> data_a_sauvegarder() const override;
55 int sauvegarder(Sortie& os) const override;
56 int reprendre(Entree& is) override;
57 void mettre_a_jour(double temps) override;
58
59 void fixer_tdeb_tfin(const double t_deb,const double t_fin);
60 void fixer_serie(const double t1,const double t2) override;
61 void fixer_tstat_deb(const double t1,const double t2) override;
62 void lire_bidon(Entree& is) const override;
63
64 inline double tstat_deb() const
65 {
66 return tstat_deb_;
67 }
68 inline double tstat_fin() const
69 {
70 return tstat_fin_;
71 }
72
74
75protected:
76
77 bool use_source_name_only_ = false; // for PDI: does the name has to be prefixed with the name of my parent field, or am I just using my name?
78 double tstat_deb_, tstat_fin_; //start and end times of the statistics for this field
79};
80
81#endif
Base class of generic fields having other generic fields as source. The use of the class methods reli...
virtual int completer_post_statistiques(const Domaine &dom, const int is_axi, Format_Post_base &format)
std::vector< YAML_data > data_a_sauvegarder() const override
for PDI IO: retrieve name, type and dimensions of the field to save/restore
virtual const Integrale_tps_Champ & integrale() const =0
virtual void associer_op_stat(const Champ_Generique_Statistiques_base &)
virtual Operateur_Statistique_tps_base & Operateur_Statistique()=0
virtual double temps() const =0
int reprendre(Entree &is) override
resume the different sources
void fixer_tstat_deb(const double t1, const double t2) override
void fixer_serie(const double t1, const double t2) override
virtual const Operateur_Statistique_tps_base & Operateur_Statistique() const =0
int sauvegarder(Sortie &os) const override
save the different sources
void fixer_tdeb_tfin(const double t_deb, const double t_fin)
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Base class for post-processing output formats for fields (lata, med, cgns, lml, single_lata).
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
friend class Entree
Definition Objet_U.h:71
friend class Sortie
Definition Objet_U.h:70
class Operateur_Statistique_tps_base
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
class Probleme_base It is a Probleme_U that is not a coupling.