TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Equation_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 Equation_base_included
17#define Equation_base_included
18
19#include <Ecrire_fichier_xyz_valeur.h>
20#include <Parametre_equation_base.h>
21#include <Domaine_Cl_dis_base.h>
22#include <Discretisation_base.h>
23#include <Solveur_Masse_base.h>
24#include <Matrice_Morse_Diag.h>
25#include <MD_Vector_tools.h>
26#include <Interface_blocs.h>
27#include <Value_Input_Int.h>
28#include <TRUSTTab_parts.h>
29#include <Champ_Inc_base.h>
30#include <Matrice_Morse.h>
31#include <Ecrire_YAML.h>
32#include <Champs_Fonc.h>
33#include <TRUST_Ref.h>
34#include <TRUSTList.h>
35#include <TRUSTTrav.h>
36#include <Parser_U.h>
37#include <Sources.h>
38#include <vector>
39
41class Cond_lim_base;
42class Milieu_base;
43class Operateur;
44class Motcle;
45class Param;
46
47enum Type_modele { TURBULENCE };
48
49/*! @brief class Equation_base The role of an equation is the calculation of one or more fields. This class is the base of the equations hierarchy.
50 *
51 * Its members are the attributes and methods common to all classes that represent equations.
52 * An equation is modeled in the following way:
53 *
54 * M * dU_h/dt + Sum_i(Op_i(U_h)) = Sum(Sources);
55 *
56 * M is the mass matrix represented by a "Solveur_Masse" object
57 * U_h is the unknown represented by a "Champ_Inc" object
58 * Op_i is the i-th operator of the equation represented by an "Operateur" object
59 * Sources are the source terms (possibly non-existent) of the equation represented by "Source" objects.
60 * An equation is linked to a problem by a reference contained in the member OBS_PTR(Probleme_base) mon_probleme.
61 *
62 * Abstract class from which all equations must derive.
63 * Abstract methods:
64 * int nombre_d_operateurs() const
65 * const Operateur& operateur(int) const
66 * Operateur& operateur(int)
67 * const Champ_Inc_base& inconnue() const
68 * Champ_Inc_base& inconnue()
69 * void associer_milieu_base(const Milieu_base&)
70 * const Milieu_base& milieu() const
71 * Milieu_base& milieu()
72 * Entree& lire(const Motcle&, Entree&) [protected]
73 *
74 */
76{
77 Declare_base(Equation_base);
78
79public :
80 // Overridden method from Objet_U:
81 void nommer(const Nom& nom) override;
82 // MODIF ELI LAUCOIN (22/11/2007) : adding a forward and a backward method
83 virtual void avancer(int i=1);
84 virtual void reculer(int i=1);
85 // FIN MODIF ELI LAUCOIN (22/11/2007)
86
87 virtual int nombre_d_operateurs() const =0;
88 virtual int nombre_d_operateurs_tot() const;
89 virtual const Operateur& operateur(int) const =0;
90 virtual Operateur& operateur(int) =0;
91 virtual const Operateur& operateur_fonctionnel(int) const;
92 virtual Operateur& operateur_fonctionnel(int);
93 virtual const Champ_Inc_base& inconnue() const =0;
94 virtual Champ_Inc_base& inconnue() =0;
95 virtual void associer_milieu_base(const Milieu_base&)=0;
96 virtual const Milieu_base& milieu() const =0;
97 virtual Milieu_base& milieu() =0;
98
99 virtual std::vector<YAML_data> data_a_sauvegarder() const;
100 int sauvegarder(Sortie&) const override;
101 int reprendre(Entree&) override;
102 Nom create_polymacfamily_syno(const Nom& field_tag) const;
103 // if some equations need to save some parts of their data in a different backup file, we need to override these 2 methods below
104 // (useful if some backup formats are not available for every equations)
105 virtual void init_save_file() { }
106 virtual void close_save_file() { }
107
108 int limpr() const;
109 virtual void imprimer(Sortie& os) const;
110 virtual int impr(Sortie& os) const;
111 virtual void associer_milieu_equation();
112
113 virtual DoubleTab& derivee_en_temps_inco(DoubleTab& );
114 virtual DoubleTab& derivee_en_temps_inco_transport(DoubleTab& derivee) { return derivee_en_temps_inco(derivee); }
115 virtual DoubleTab& corriger_derivee_expl(DoubleTab& );
116 virtual DoubleTab& corriger_derivee_impl(DoubleTab& );
117 virtual void mettre_a_jour(double temps);
118 virtual void abortTimeStep();
119 virtual void resetTime(double time);
120 virtual void valider_iteration();
121 virtual int preparer_calcul();
122 virtual bool initTimeStep(double dt);
123 virtual bool updateGivenFields();
124 virtual void discretiser();
125 virtual void associer_pb_base(const Probleme_base&);
126 virtual void completer();
127 virtual double calculer_pas_de_temps() const;
128 void calculer_pas_de_temps_locaux(DoubleTab&) const; //Computation of local time: Vect of size number of faces of the domain
129 Sources& sources();
130 const Sources& sources() const;
132 inline const Solveur_Masse_base& solv_masse() const;
134 const Probleme_base& probleme() const;
136 const Schema_Temps_base& schema_temps() const;
137 virtual void associer_sch_tps_base(const Schema_Temps_base&);
138 virtual void associer_domaine_dis(const Domaine_dis_base&);
139
140 const Discretisation_base& discretisation() const;
141
142 virtual inline Domaine_Cl_dis_base& domaine_Cl_dis();
143 virtual inline const Domaine_Cl_dis_base& domaine_Cl_dis() const;
145 const Domaine_dis_base& domaine_dis() const;
146 //
147 inline const Nom& le_nom() const override;
148 inline DoubleVect& get_residu() { return residu_; }
149 inline DoubleVect& residu_initial() { return residu_initial_; }
150 void initialise_residu(int=0);
151 virtual void imprime_residu(SFichier&);
152 virtual Nom expression_residu();
153
154 // methods for implicit scheme
155 virtual void dimensionner_matrice(Matrice_Morse& mat_morse); //memorizes the matrix stencil after the 1st call
156 virtual void dimensionner_matrice_sans_mem(Matrice_Morse& mat_morse); //internal method called by the above
157
158 // adds contributions from operators and sources
159 virtual void assembler( Matrice_Morse& mat_morse, const DoubleTab& present, DoubleTab& secmem) ;
160 // modifies the matrix and the right-hand side according to boundary conditions
161 virtual void modifier_pour_Cl( Matrice_Morse& mat_morse,DoubleTab& secmem) const;
162 // assembles, adds inertia, and modifies for boundary conditions.
163 virtual void assembler_avec_inertie( Matrice_Morse& mat_morse, const DoubleTab& present, DoubleTab& secmem) ;
164 virtual void dimensionner_termes_croises(Matrice_Morse& matrice, const Probleme_base& autre_pb, int nl, int nc);
165 virtual void ajouter_termes_croises(const DoubleTab& inco, const Probleme_base& autre_pb, const DoubleTab& autre_inco, DoubleTab& resu) const;
166 virtual void contribuer_termes_croises(const DoubleTab& inco, const Probleme_base& autre_pb, const DoubleTab& autre_inco, Matrice_Morse& matrice) const;
167
168 /*
169 interface {dimensionner/ajouter/assembler}_blocs
170 specificities: - has_interface_blocs() returns 1 if all terms of the equation support this interface
171 - dimensionner_blocs() not memoized (to be managed by the caller) / callable on non-empty matrices
172 - assembler_blocs() uses the values of unknowns/fields at the current time (like inconnue().valeurs())
173 - assembler_blocs_*() reasons in increments: M.dInco = S -> beware of solver thresholds
174 - certain variables (semi_impl set) can be treated as "semi-implicit"
175 (predicted values are used, no derivatives provided)
176 */
177 virtual int has_interface_blocs() const;
178 virtual double get_time_factor() const { return 1.; }
179 virtual void dimensionner_blocs(matrices_t matrices, const tabs_t& semi_impl = {}) const;
180 virtual void assembler_blocs(matrices_t matrices, DoubleTab& secmem, const tabs_t& semi_impl = {}) const;
181 virtual void assembler_blocs_avec_inertie(matrices_t matrices, DoubleTab& secmem, const tabs_t& semi_impl = {});
182
183 /* auxiliary methods of the _blocs interface: field conserved by the equation and its values on Dirichlet or Neumann_val_ext boundary conditions
184 by default, champ_conserve = temporal_coefficient * unknown
185 this field is mutable so that the time scheme can update it
186 */
187 //the field: as many spatial/temporal values as the unknown
188 Champ_Inc_base& champ_conserve() const { return champ_conserve_.valeur(); }
189 int has_champ_conserve() const { return bool(champ_conserve_); }
190
191 void init_champ_conserve() const; //to be called in completer() of operators/sources that will need champ_conserve_
192 /* default computation function for champ_conserve */
193 static void calculer_champ_conserve(const Objet_U& obj, DoubleTab& val, DoubleTab& bval, tabs_t& deriv);
194 /* returns the name of the conserved field and the function to compute it -> to be overridden */
195 virtual std::pair<std::string, fonc_calc_t> get_fonc_champ_conserve() const
196 {
198 }
199
200 //by default the conserved field
201 virtual Champ_Inc_base& champ_convecte() const { return champ_conserve_.valeur(); }
202 virtual int has_champ_convecte() const { return bool(champ_conserve_); }
203 virtual void init_champ_convecte() const { init_champ_conserve(); }
204 //update of champ_conserve / champ_convecte: called by Probleme_base::mettre_a_jour() after updating the medium
205 //if reset = 1, forces computation of all temporal values (not just the current value)
206 virtual void mettre_a_jour_champs_conserves(double temps, int reset = 0);
207
208 //Methods of the post-processable fields interface
209 /////////////////////////////////////////////////////
210 void creer_champ(const Motcle& motlu) override;
211 const Champ_base& get_champ(const Motcle& nom) const override;
212 void get_noms_champs_postraitables(Noms& nom,Option opt=NONE) const override;
213 bool has_champ(const Motcle& nom, OBS_PTR(Champ_base) &ref_champ) const override;
214 bool has_champ(const Motcle& nom) const override;
215 /////////////////////////////////////////////////////
216
217 virtual const Motcle& domaine_application() const;
218 virtual void verifie_ch_init_nb_comp(const Champ_Inc_base& ch_ref, const int nb_comp) const;
219 virtual void verifie_ch_init_nb_comp_cl(const Champ_Inc_base& ch_ref, const int nb_comp, const Cond_lim_base& cl) const
220 {
221 verifie_ch_init_nb_comp(ch_ref, nb_comp);
222 }
223
224 DoubleTab& derivee_en_temps_conv(DoubleTab& , const DoubleTab& );
225 // Diffusion implicit scheme
227 void Gradient_conjugue_diff_impl(DoubleTrav& secmem, DoubleTab& solution)
228 {
229 return Gradient_conjugue_diff_impl(secmem,solution,0,NULL_);
230 }
231 void Gradient_conjugue_diff_impl(DoubleTrav& secmem, DoubleTab& solution, const DoubleTab& terme_mul)
232 {
233 return Gradient_conjugue_diff_impl(secmem,solution,terme_mul.dimension_tot(0),terme_mul);
234 }
235 inline OWN_PTR(Parametre_equation_base)& parametre_equation() { return parametre_equation_ ; }
236 inline const OWN_PTR(Parametre_equation_base)& parametre_equation() const { return parametre_equation_ ; }
237 virtual const RefObjU& get_modele(Type_modele type) const;
238 virtual int equation_non_resolue() const;
239 int disable_equation_residual() const { return disable_equation_residual_; };
240
241 //for multi-step time schemes
242 inline virtual const Champ_Inc_base& derivee_en_temps() const { return derivee_en_temps_; }
243 inline virtual Champ_Inc_base& derivee_en_temps() { return derivee_en_temps_; }
246
247 void set_residuals(const DoubleTab& residual);
248 virtual bool positive_unkown() { return false; }
249
250 inline void add_champs_compris(const Champ_base& ch) { champs_compris_.ajoute_champ(ch); };
251
252 // set to true if operator is multiscalar (mixes components together). Only coded for VDF-Elem at present !
253 inline void set_diffusion_multi_scalaire(bool flg = true)
254 {
255 if (flg) assert (discretisation().is_vdf());
257 }
258 inline const bool& diffusion_multi_scalaire() const { return diffusion_multi_scalaire_; }
259
260 public_for_cuda
261 void Gradient_conjugue_diff_impl(DoubleTrav& secmem, DoubleTab& solution, int size_terme_mul, const DoubleTab& term_mul);
262
263protected :
264
268 OBS_PTR(Schema_Temps_base) le_schema_en_temps;
271 OBS_PTR(Probleme_base) mon_probleme;
272 virtual void set_param(Param& titi) const override;
273 int lire_motcle_non_standard(const Motcle&, Entree&) override;
274 virtual Entree& lire_sources(Entree&);
275 virtual Entree& lire_cond_init(Entree&);
276 virtual Entree& lire_cl(Entree&);
277 virtual int verif_Cl() const;
278 mutable DoubleList dt_op_bak;
279 //Method lire with a specific signature to cause a compilation failure
280 //if the old lire method is present
281 //virtual Entree& lire(const Motcle&, Entree&)
282 virtual void lire() { exit(); }
283
286 bool has_time_factor_; // Parameter set to 1 if convection has a prefactor (eg rhoCp in energy)
287 OWN_PTR(Parametre_equation_base) parametre_equation_;
288
289 LIST(RefObjU) liste_modeles_; //The first element of the list is the null model
290 Champs_compris champs_compris_;
292
293 //memoization of the matrix for PolyMAC_HFV
295 mutable int matrice_init;
296
297 //for the assembler_blocs interface
298 mutable OWN_PTR(Champ_Inc_base) champ_conserve_;
299 mutable OWN_PTR(Champ_Inc_base) champ_convecte_;
300
301 // For multistep methods, store previous dI/dt(n), dI/dt(n-1),...
302 OWN_PTR(Champ_Inc_base) derivee_en_temps_;
304
305 // for positivization of the term at the end of an iteration if necessary
306 // returns 1 for a positive field, 0 for a negative field
307
309
310private :
311 virtual void derivee_en_temps_inco_sources(DoubleTrav& ) { /* Don nothing */ }
312 virtual void verify_scheme() { /* Don nothing */ }
313
314 Ecrire_fichier_xyz_valeur xyz_field_values_file_;
315
316 //!SC: moved to protected (override of get_champ in Equation_Diphasique_base)
317// Champs_Fonc list_champ_combi;
318 DoubleVect residu_;
319 DoubleVect residu_initial_;
320 // returns the FIELD (not the norm) of the residuals for each unknown of the problem
321 OWN_PTR(Champ_Fonc_base) field_residu_;
322
323 mutable DoubleTab NULL_;
324 int disable_equation_residual_ = 0;
325 mutable Parser_U equation_non_resolue_;
326 Value_Input_Int eq_non_resolue_input_;
327};
328
329
330/*! @brief Returns the name of the equation.
331 *
332 * @return (Nom&) the name of the equation
333 */
334inline const Nom& Equation_base::le_nom() const
335{
336 return nom_;
337}
338
339/*! @brief Returns the discretized boundary condition domain associated with the equation.
340 *
341 * @return (Domaine_Cl_dis_base&) discretized boundary condition domain
342 */
344{
345 assert(le_dom_Cl_dis);
346 return le_dom_Cl_dis.valeur();
347}
348
349/*! @brief Returns the discretized boundary condition domain associated with the equation (const version).
350 *
351 * @return (Domaine_Cl_dis_base&) discretized boundary condition domain
352 */
354{
355 assert(le_dom_Cl_dis);
356 return le_dom_Cl_dis.valeur();
357}
358
359/*! @brief Returns the mass solver associated with the equation.
360 *
361 * @return (Solveur_Masse_base&) the mass solver associated with the equation
362 */
364{
365 return solveur_masse;
366}
367
368/*! @brief Returns the mass solver associated with the equation (const version).
369 *
370 * @return (Solveur_Masse_base&) the mass solver associated with the equation
371 */
373{
374 return solveur_masse;
375}
376
377#endif /* Equation_base_included */
Class Champ_Inc_base.
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
class Champs_Fonc List of OWN_PTR(Champ_Fonc_base) declared through the LIST(X) macro
Definition Champs_Fonc.h:28
class Champs_compris_interface This class contains an interface of methods intended to manage
class Cond_lim_base Base class for the hierarchy of classes that represent the different boundary con...
class Discretisation_base This class represents a spatial discretization scheme, which
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 Equation_base The role of an equation is the calculation of one or more fields....
virtual int equation_non_resolue() const
Matrice_Morse matrice_stockee
virtual void dimensionner_termes_croises(Matrice_Morse &matrice, const Probleme_base &autre_pb, int nl, int nc)
virtual void ajouter_termes_croises(const DoubleTab &inco, const Probleme_base &autre_pb, const DoubleTab &autre_inco, DoubleTab &resu) const
virtual void set_param(Param &titi) const override
void Gradient_conjugue_diff_impl(DoubleTrav &secmem, DoubleTab &solution, const DoubleTab &terme_mul)
const Nom & le_nom() const override
Returns the name of the equation.
const bool & diffusion_multi_scalaire() const
OWN_PTR(Champ_Inc_base) champ_conserve_
virtual void associer_milieu_equation()
virtual void associer_milieu_base(const Milieu_base &)=0
virtual Entree & lire_cond_init(Entree &)
Reading of initial conditions in an input stream.
int reprendre(Entree &) override
We resume the unknown from an input stream.
virtual const Milieu_base & milieu() const =0
virtual void init_save_file()
int has_champ_conserve() const
DoubleTab & derivee_en_temps_conv(DoubleTab &, const DoubleTab &)
Add convection term In: solution is the unknown I.
OBS_PTR(Domaine_dis_base) le_dom_dis
virtual const RefObjU & get_modele(Type_modele type) const
virtual void avancer(int i=1)
virtual void associer_domaine_dis(const Domaine_dis_base &)
Associates the discretized domain with the equation.
void set_residuals(const DoubleTab &residual)
void nommer(const Nom &nom) override
Method called when the object instance is created in the data file (Interprete::ajouter).
virtual void dimensionner_matrice_sans_mem(Matrice_Morse &mat_morse)
virtual int verif_Cl() const
Verifies the compatibility of boundary conditions with the equation.
virtual int has_champ_convecte() const
virtual std::vector< YAML_data > data_a_sauvegarder() const
for PDI IO: retrieve name, type and dimensions of the data to save/restore. This has to be overrode f...
virtual void imprimer(Sortie &os) const
Prints the equation operators if the time scheme indicates it is necessary.
virtual void associer_pb_base(const Probleme_base &)
Associates with the Problem passed as parameter.
virtual DoubleTab & derivee_en_temps_inco_transport(DoubleTab &derivee)
Sources & sources()
Returns the source terms associated with the equation.
OBS_PTR(Probleme_base) mon_probleme
OWN_PTR(Champ_Inc_base) champ_convecte_
void set_calculate_time_derivative(int i)
OWN_PTR(Parametre_equation_base) &parametre_equation()
virtual void assembler_blocs_avec_inertie(matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl={})
const Discretisation_base & discretisation() const
Returns the discretization associated with the equation.
void init_champ_conserve() const
Champ_Inc_base & champ_conserve() const
Solveur_Masse_base & solv_masse()
Returns the mass solver associated with the equation.
virtual void valider_iteration()
virtual method to correct the unknown during implicit iterations for example K-eps must remain positi...
virtual void mettre_a_jour_champs_conserves(double temps, int reset=0)
virtual const Champ_Inc_base & inconnue() const =0
void set_diffusion_multi_scalaire(bool flg=true)
Nom create_polymacfamily_syno(const Nom &field_tag) const
Create a synonym of a field name in order to ensure backward compatibility with old names of the Poly...
virtual void verifie_ch_init_nb_comp_cl(const Champ_Inc_base &ch_ref, const int nb_comp, const Cond_lim_base &cl) const
OBS_PTR(Schema_Temps_base) le_schema_en_temps
const Champ_base & get_champ(const Motcle &nom) const override
virtual Entree & lire_cl(Entree &)
Reading of boundary conditions in an input stream.
int calculate_time_derivative_
void add_champs_compris(const Champ_base &ch)
LIST(RefObjU) liste_modeles_
virtual DoubleTab & corriger_derivee_expl(DoubleTab &)
DoubleVect & get_residu()
Matrice_Morse_Diag diag_
virtual void dimensionner_blocs(matrices_t matrices, const tabs_t &semi_impl={}) const
virtual void contribuer_termes_croises(const DoubleTab &inco, const Probleme_base &autre_pb, const DoubleTab &autre_inco, Matrice_Morse &matrice) const
const OWN_PTR(Parametre_equation_base) &parametre_equation() const
virtual void mettre_a_jour(double temps)
The value of the unknown at the time step has been calculated.
virtual int impr(Sortie &os) const
Prints the equation operators to an output stream, unconditionally.
virtual void abortTimeStep()
Reinitialize what must be.
virtual void assembler_avec_inertie(Matrice_Morse &mat_morse, const DoubleTab &present, DoubleTab &secmem)
int calculate_time_derivative() const
virtual bool positive_unkown()
virtual void completer()
Completes the construction (initialization) of objects associated with the equation.
virtual int nombre_d_operateurs() const =0
Champs_Fonc list_champ_combi
virtual double get_time_factor() const
Sources les_sources
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
virtual int preparer_calcul()
Everything that does not depend on other possible problems.
virtual void imprime_residu(SFichier &)
virtual int nombre_d_operateurs_tot() const
OWN_PTR(Solveur_Masse_base) solveur_masse
virtual bool updateGivenFields()
bool has_champ(const Motcle &nom, OBS_PTR(Champ_base) &ref_champ) const override
DoubleList dt_op_bak
virtual std::pair< std::string, fonc_calc_t > get_fonc_champ_conserve() const
void initialise_residu(int=0)
virtual void assembler(Matrice_Morse &mat_morse, const DoubleTab &present, DoubleTab &secmem)
virtual Milieu_base & milieu()=0
virtual void modifier_pour_Cl(Matrice_Morse &mat_morse, DoubleTab &secmem) const
virtual DoubleTab & derivee_en_temps_inco(DoubleTab &)
Returns the time derivative of the unknown I of the equation: dI/dt = M-1*(sum(operators(I) + sources...
int sauvegarder(Sortie &) const override
We save the unknown, then the source terms to an output stream.
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the discretized boundary condition domain associated with the equation.
virtual const Champ_Inc_base & derivee_en_temps() const
virtual Champ_Inc_base & inconnue()=0
Probleme_base & probleme()
Returns the problem associated with the equation.
virtual void verifie_ch_init_nb_comp(const Champ_Inc_base &ch_ref, const int nb_comp) const
Verification of the number of components read for the specification of a field.
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
virtual void associer_sch_tps_base(const Schema_Temps_base &)
Associates the time scheme with the equation.
virtual void close_save_file()
virtual void lire()
virtual void reculer(int i=1)
virtual void init_champ_convecte() const
virtual DoubleTab & corriger_derivee_impl(DoubleTab &)
DoubleVect & residu_initial()
int limpr() const
Ask the time scheme if an output is needed.
void creer_champ(const Motcle &motlu) override
Schema_Temps_base & schema_temps()
Returns the time scheme associated with the equation.
void Gradient_conjugue_diff_impl(DoubleTrav &secmem, DoubleTab &solution)
virtual bool initTimeStep(double dt)
Allocation and initialization of the unknown and boundary conditions until present+dt.
virtual void dimensionner_matrice(Matrice_Morse &mat_morse)
virtual const Operateur & operateur_fonctionnel(int) const
virtual void discretiser()
Discretizes the equation.
void calculer_pas_de_temps_locaux(DoubleTab &) const
virtual Champ_Inc_base & derivee_en_temps()
virtual Operateur & operateur(int)=0
virtual Entree & lire_sources(Entree &)
Reading of source terms in an input stream.
virtual int has_interface_blocs() const
virtual void resetTime(double time)
Reset current time of the equation. Used from ICoCo. See documentation of Problem_base::resetTime().
Champs_compris champs_compris_
virtual void assembler_blocs(matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl={}) const
int disable_equation_residual() const
virtual const Operateur & operateur(int) const =0
static void calculer_champ_conserve(const Objet_U &obj, DoubleTab &val, DoubleTab &bval, tabs_t &deriv)
OWN_PTR(Parametre_equation_base) parametre_equation_
virtual Champ_Inc_base & champ_convecte() const
OWN_PTR(Domaine_Cl_dis_base) le_dom_Cl_dis
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
virtual const Motcle & domaine_application() const
Returns "indeterminate" Navier_Stokes_standard for example overrides this method.
virtual double calculer_pas_de_temps() const
Calculation of the next time step.
virtual Nom expression_residu()
bool diffusion_multi_scalaire_
OWN_PTR(Champ_Inc_base) derivee_en_temps_
const Nom & le_nom() const override
Returns the name of the field.
Matrice_Morse_Diag class - Represents a sparse symmetric matrix M stored in Morse format.
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
Milieu_base This class is the base of the (physical) medium hierarchy.
Definition Milieu_base.h:50
A character string (Nom) in uppercase.
Definition Motcle.h:26
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
const std::string & getString() const
Definition Nom.h:92
An array of character strings (VECT(Nom)).
Definition Noms.h:26
Base class for TRUST objects (Objet_U).
Definition Objet_U.h:68
friend class Entree
Definition Objet_U.h:71
friend class Sortie
Definition Objet_U.h:70
Objet_U()
Default constructor: assigns a unique identifier to the object (object_id_) and registers the object ...
Definition Objet_U.cpp:54
class Operateur Generic class of the operator hierarchy.
Definition Operateur.h:39
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
Parametre_equation_base A Parametre_equation_base object groups the various.
class Probleme_base It is a Probleme_U that is not a coupling.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
SFichier is to the C++ ofstream class what Sortie is to the C++ ostream class.
Definition SFichier.h:29
class Schema_Temps_base
Solveur_Masse_base Represents the mass matrix of an equation.
Base class for output streams.
Definition Sortie.h:52
class Sources Sources represents a list of Source objects.
Definition Sources.h:31
_SIZE_ dimension_tot(int) const override
Definition TRUSTTab.tpp:160