16#include <Champ_Generique_Gradient.h>
17#include <Domaine_VF.h>
18#include <Champ_Generique_refChamp.h>
19#include <Discretisation_base.h>
20#include <Synonyme_info.h>
51 if ( (mon_champ_inc.
le_nom()==
"pression") || ((mon_champ_inc.
le_nom()!=
"vitesse") && (mon_champ_inc.
que_suis_je()==
"Champ_P1NC"))
52 || ((mon_champ_inc.
le_nom()!=
"vitesse") && (mon_champ_inc.
que_suis_je()==
"Champ_P0_VDF")) )
65 (eq_test.
le_nom()!=
"Conduction")))
73 Op_Grad_.l_op_base().associer_eqn(eqn);
82 Cerr<<
"We can apply a Champ_Generique_Gradient only to the pressure field"<<finl;
83 Cerr<<
"or to a field of type Champ_P1NC or Champ_P0_VDF at one component"<<finl;
89 Cerr<<
"We can apply a Champ_Generique_Gradient only to an unknown field of the problem"<<finl;
101 espace_stockage = creer_espace_stockage(vectoriel,
dimension,es_tmp);
107 Cerr<<
"We can apply a Champ_Generique_Gradient only to the pressure field"<<finl;
108 Cerr<<
"or to a field of type Champ_P1NC or Champ_P0_VDF at one component"<<finl;
111 return espace_stockage;
121 espace_stockage = creer_espace_stockage(vectoriel,
dimension,es_tmp);
126 if ((type_op!=
"Op_Grad_P1NC_to_P0") && (type_op!=
"Op_Grad_P0_to_Face"))
127 Op_Grad_.equation().solv_masse().appliquer(espace_stockage->
valeurs());
132 Cerr<<
"We can apply a Champ_Generique_Gradient only to the pressure field"<<finl;
133 Cerr<<
"or to a field of type Champ_P1NC or Champ_P0_VDF at one component"<<finl;
134 Cerr<<
"The space of storage of field treated here "<<nom[0]<<
" is of type"<<source.
que_suis_je()<<finl;
138 DoubleTab& espace_valeurs = espace_stockage->
valeurs();
140 return espace_stockage;
149 motcles[0] =
"composantes";
150 motcles[1] =
"unites";
152 int rang = motcles.
search(query);
163 Nom nom_champ = "pression";
165 //Valid if Champ_Fonc_P1NC
166 Noms mots(dimension);
167 Nom compo_temp="gradient_";
169 for (int i=0; i<dimension; i++) {
171 mots[i] = compo_temp+nom_champ +"X";
174 mots[i] = compo_temp+nom_champ +"Y";;
177 mots[i] = compo_temp+nom_champ +"Z";
203 unites[i] = source_unites[0]+
"/m";
217 if ((type_op==
"Op_Grad_P1NC_to_P0") && (index <= 0))
218 loc = Entity::ELEMENT;
219 else if ((type_op==
"Op_Grad_P0_to_Face") && (index <= 0))
223 Cerr <<
"Error of type : Gradient operator " << type_op <<
" is not possible for the defined field " <<
nom_post_ << finl;
234 Nom nom_post_source, nom_champ_source;
236 nom_champ_source = nom[0];
237 nom_post_source =
"Gradient_";
238 nom_post_source += nom_champ_source;
248 if (type_op==
"Op_Grad_P1NC_to_P0")
249 directive =
"champ_elem";
251 directive =
"gradient_pression";
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
const Noms get_property(const Motcle &query) const override
Returns the requested property.
virtual OWN_PTR(Champ_Fonc_base) &creer_espace_stockage(const Nature_du_champ &nature
void completer(const Postraitement_base &post) override
const Probleme_base & get_ref_pb_base() const override
Returns the problem that carries the target field.
virtual const Champ_Generique_base & get_source(int i) const
virtual const int nb_comp
class Champ_Generique_Gradient OWN_PTR(Champ_base) intended to post-process the gradient of a generic...
void completer(const Postraitement_base &post) override
const Motcle get_directive_pour_discr() const override
Returns the directive (champ_elem, champ_sommets, champ_face or pression) to launch the discretizatio...
const Noms get_property(const Motcle &query) const override
Returns the requested property.
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...
const Champ_base & get_champ_without_evaluation(OWN_PTR(Champ_base)&espace_stockage) const override
const Champ_base & get_champ(OWN_PTR(Champ_base)&espace_stockage) const override
void nommer_source() override
Classe Champ_Generique_Operateur_base Base class for generic field classes dedicated to applying an o...
virtual const Noms get_property(const Motcle &query) const
Returns the requested property.
virtual const Champ_base & get_champ(OWN_PTR(Champ_base) &espace_stockage) const =0
void nommer(const Nom &nom) override
Assigns a name to the Objet_U. Virtual method to override.
Special field class that encapsulates a reference to a volume field of TRUST of type Champ_base.
virtual DoubleTab & valeurs()=0
class Champ_base This class is the base of the fields hierarchy.
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Class defining operators and methods for all reading operation in an input flow (file,...
class Equation_base The role of an equation is the calculation of one or more fields....
const Nom & le_nom() const override
Returns the name of the equation.
virtual const Champ_Inc_base & inconnue() const =0
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the discretized boundary condition domain associated with the equation.
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
const Nom & le_nom() const override
Returns the name of the field.
A character string (Nom) in uppercase.
An array of Motcle objects.
int search(const Motcle &t) const
class Nom: a character string for naming TRUST objects.
An array of character strings (VECT(Nom)).
const Nom & que_suis_je() const
Returns the string identifying the class.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
virtual const Nom & le_nom() const
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Base class for all post-processing objects.
class Probleme_base It is a Probleme_U that is not a coupling.
virtual int nombre_d_equations() const =0
virtual const Equation_base & equation(int) const =0
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")