TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Champ_Generique_Morceau_Equation.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_Morceau_Equation_included
17#define Champ_Generique_Morceau_Equation_included
18
19#include <Champ_Gen_de_Champs_Gen.h>
20#include <TRUST_Ref.h>
21
22class Equation_base;
23class MorEqn;
24
25/*! @brief class Champ_Generique_Morceau_Equation OWN_PTR(Champ_base) destine a post-traiter une quantite liee a un morceau d equation
26 *
27 * Consulter la hierarchie de MorEqn pour connaitre les morceaux d equation
28 * Syntaxe a respecter pour jdd
29 *
30 * "nom_champ" Morceau_Equation { type "type_moreqn" numero "numero_moreqn" option "type_option" [ compo "num_compo" ]
31 * source Champ_Post_ref_Champ { Pb_champ "nom_pb" "nom_champ_discret" }
32 * }
33 * "nom_champ" fixe par utilisateur sera le nom du champ generique
34 * "unite" fixe par utilisateur pour la lisibilite dans les postraitements
35 * "type_moreqn" designe le type de morceau d equation (actuellement disponible "operateur")
36 * "numero_moreqn" designe le numero du morceau
37 * ex : cas operateur : 0 (diffusion) 1 (convection) 2 (gradient) 3 (divergence)
38 * "type_option" option choisie ("stabilite" ou "flux_bords")
39 * "num_compo" numero de la composante a postraiter (a considerer uniquement pour "flux_bords" si plusieurs composantes)
40 *
41 */
42
44{
45
46 Declare_instanciable(Champ_Generique_Morceau_Equation);
47
48public:
49
50
51 void set_param(Param& param) const override;
52 const Noms get_property(const Motcle& query) const override;
53 Entity get_localisation(const int index = -1) const override;
54 const Motcle get_directive_pour_discr() const override;
55 const Champ_base& get_champ(OWN_PTR(Champ_base)& espace_stockage) const override;
56 const Champ_base& get_champ_without_evaluation(OWN_PTR(Champ_base)& espace_stockage) const override;
57
58 OWN_PTR(Champ_Fonc_base)& creer_espace_stockage(const Nature_du_champ& nature,
59 const int nb_comp,
60 OWN_PTR(Champ_Fonc_base)& es_tmp) const override;
61 const MorEqn& morceau() const;
62 MorEqn& morceau();
63 void completer(const Postraitement_base& post) override;
64 void nommer_source() override;
65
66protected:
67
68 int numero_morceau_=-1; //numero du morceau d equation
69 Nom type_morceau_; //type du morceau d equation (ex : Operateur)
70 Nom option_; //Pour selectionner la quantite a postraiter
71 int compo_=0; //Pour identifier la composante a recuperer pour l option flux_bords
72 OBS_PTR(Equation_base) ref_eq_; //REF vers l equation qui porte le morceau
73 Motcle localisation_; //localisation correspondant au support du champ postraite
74 Nom unite_; //unite du champ obtenu (a specifier par l'utilisateur)
75
76};
77
78#endif
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_Morceau_Equation OWN_PTR(Champ_base) destine a post-traiter une quantite liee a...
const Noms get_property(const Motcle &query) const override
Renvoie la propriete demandee.
const int OWN_PTR(Champ_Fonc_base) &es_tmp) const override
void completer(const Postraitement_base &post) override
OWN_PTR(Champ_Fonc_base) &creer_espace_stockage(const Nature_du_champ &nature
const Motcle get_directive_pour_discr() const override
Renvoie la directive (champ_elem, champ_sommets, champ_face ou pression) pour lancer la discretisatio...
const Champ_base & get_champ(OWN_PTR(Champ_base)&espace_stockage) const override
const Champ_base & get_champ_without_evaluation(OWN_PTR(Champ_base)&espace_stockage) const override
Entity get_localisation(const int index=-1) const override
Renvoie le type des entites geometriques sur auxquelles les valeurs discretes sont attachees (NODE po...
OBS_PTR(Equation_base) ref_eq_
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
classe MorEqn Classe qui regroupe les fonctionnalites de liaison avec une
Definition MorEqn.h:35
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
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.