TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Champ_Generique_Reduction_0D.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
17#ifndef Champ_Generique_Reduction_0D_included
18#define Champ_Generique_Reduction_0D_included
19
20#include <Champ_Gen_de_Champs_Gen.h>
21
22/*! @brief class Champ_Generique_Reduction_0D
23 *
24 */
25
26// Champ destine a post-traiter un champ reduit a une dimension 0D
27// On construit un champ prenant en tout point de l espace la valeur reduite
28// La classe porte le type de methode pour realiser la reduction
29//// Syntaxe a respecter pour jdd
30//
31// "nom_champ" Reduction_0D { methode "type_methode"
32// source "type_champ_gen" { ...source ref_Champ { Pb_champ "nom_pb" "nom_champ_discret" } }
33// [ nom_source "nom_source" ]
34// [ source_reference "source_reference" ]
35// [ sources_reference "list_nom_virgule" ]
36// [ sources "listchamp_generique" ]
37// }
38// "nom_champ" fixe par utilisateur sera le nom du champ generique
39// "type_champ_gen" type d'un champ generique
40// "type_methode" indique le type de reduction demandee
41// Les options possibles sont disponibles dans $TRUST_ROOT/src/Kernel/Champs/Champ_Generique_Reduction_0D.cpp
42
44{
45
46 Declare_instanciable(Champ_Generique_Reduction_0D);
47
48public:
49
50 void set_param(Param& param) const override;
51 void completer(const Postraitement_base& post) override;
52 const Noms get_property(const Motcle& query) const override;
53 const Champ_base& get_champ(OWN_PTR(Champ_base)& espace_stockage) const override;
54 const Champ_base& get_champ_without_evaluation(OWN_PTR(Champ_base)& espace_stockage) const override;
55 void nommer_source() override;
56 void extraire(double& val_extraites, const DoubleVect& val_source, const bool basis_function, const int composante_VDF=-1) const;
57 const Motcle get_directive_pour_discr() const override;
58
59protected:
60
61 Motcle methode_; //Type de reduction : min, max, moyenne ou somme
62 int numero_proc_ = -10; // numero du proc contenant la maille la plus a gauche
63 int numero_elem_ = -10; // numero local de la maille la plus a gauche sur numero_proc_
64 mutable DoubleVect volume_controle_; //Tableau de travail
65
66private:
67 mutable OWN_PTR(Champ_Fonc_base) espace_stockage_;
68 mutable OWN_PTR(Champ_base) source_espace_stockage_;
69 mutable DoubleVect un_;
70};
71
72#endif
73
classe Champ_Fonc_base Classe de base des champs qui sont fonction d'une grandeur calculee
Classe de base des champs generiques ayant comme source d'autres champs generiques L'utilisation des ...
class Champ_Generique_Reduction_0D
void extraire(double &val_extraites, const DoubleVect &val_source, const bool basis_function, const int composante_VDF=-1) const
const Noms get_property(const Motcle &query) const override
Renvoie la propriete demandee.
const Champ_base & get_champ(OWN_PTR(Champ_base)&espace_stockage) const override
Reduction_0D du champ source (au sens qu on le rend uniforme) en fonction de la methode (min,...
const Motcle get_directive_pour_discr() const override
Renvoie la directive (champ_elem, champ_sommets, champ_face ou pression) pour lancer la discretisatio...
void completer(const Postraitement_base &post) override
void set_param(Param &param) const override
const Champ_base & get_champ_without_evaluation(OWN_PTR(Champ_base)&espace_stockage) const override
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
Un tableau de chaine de caracteres (VECT(Nom)).
Definition Noms.h:26
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
Classe de base pour l'ensemble des postraitements.