TrioCFD 1.9.9_beta
TrioCFD documentation
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) intended to post-process a quantity related to an equation piece
26 *
27 * See the MorEqn hierarchy to know the available equation pieces
28 * Syntax to follow in the data file
29 *
30 * "field_name" Morceau_Equation { type "type_moreqn" numero "numero_moreqn" option "type_option" [ compo "num_compo" ]
31 * source Champ_Post_ref_Champ { Pb_champ "pb_name" "discrete_field_name" }
32 * }
33 * "field_name" set by the user will be the name of the generic field
34 * "unite" set by the user for readability in post-processing
35 * "type_moreqn" designates the type of equation piece (currently available: "operateur")
36 * "numero_moreqn" designates the piece number
37 * ex: operator case: 0 (diffusion) 1 (convection) 2 (gradient) 3 (divergence)
38 * "type_option" chosen option ("stabilite" or "flux_bords")
39 * "num_compo" component number to post-process (to consider only for "flux_bords" if multiple components)
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
79#endif
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
Base class of generic fields having other generic fields as source. The use of the class methods reli...
class Champ_Generique_Morceau_Equation OWN_PTR(Champ_base) intended to post-process a quantity relate...
const Noms get_property(const Motcle &query) const override
Returns the requested property.
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
Returns the directive (champ_elem, champ_sommets, champ_face or pression) to launch the discretizatio...
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
Returns the type of geometric entities on which the discrete values are attached (NODE for a P1 field...
OBS_PTR(Equation_base) ref_eq_
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
class Equation_base The role of an equation is the calculation of one or more fields....
class MorEqn Class that groups the functionalities of linking with an
Definition MorEqn.h:35
A character string (Nom) in uppercase.
Definition Motcle.h:26
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
An array of character strings (VECT(Nom)).
Definition Noms.h:26
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
Base class for all post-processing objects.