16#include <Schema_Temps_base.h>
17#include <Equation_base.h>
18#include <Probleme_base.h>
20#include <Source_base.h>
61 Cerr <<
"You must to overload the method Source_base::mettre_a_jour() because there's a big" << finl;
62 Cerr <<
"chance that the source term " <<
que_suis_je() <<
" must be updated," << finl;
63 Cerr <<
"especially if your source has a field, you must update it..." << finl << finl;
75 Cerr <<
"You must to overload the method Source_base::resetTime() because there's big" << finl;
76 Cerr <<
"chance that the source term " <<
que_suis_je() <<
" must be reset," << finl;
77 Cerr <<
"especially if your source has a field, you must reset its current time..." << finl << finl;
118 Cerr <<
"In Source_base::associer_champ_rho" << finl;
119 Cerr <<
" field : " << champ_rho.
le_nom() << finl;
120 Cerr <<
" Source of type : " <<
que_suis_je() << finl;
121 Cerr <<
" This source does not support the association of a field rho." << finl;
122 Cerr <<
" (method associer_champ_rho must be coded for this source term)." << finl;
155 if (opt == DESCRIPTION)
167static std::map<std::string, int> counters;
176 int nb_compo=
bilan_.size();
179 Cerr <<
"No balance printed for " <<
que_suis_je() << finl;
180 Cerr <<
"cause bilan_ array is not filled." << finl;
192 DoubleVect bilan_p(
bilan_);
202 for(
int k=0; k<nb_compo; k++)
203 Flux.add_col(bilan_p(k));
244 DoubleTrav secmem(
equation().inconnue().valeurs());
255 Cerr<<
"Source_base::contribuer_au_second_membre(DoubleTab& ) const uncoded"<<finl;
293 if (counters[type.
getString()]>1 && type!=
"")
295 Cerr <<
"Code should be rewritten to have only one call to Source_base::ouvrir_fichier for " << type <<
" source and not " << counters[type.
getString()] <<
" times." << finl;
304 if (type!=
"") nomfichier+=(
Nom)
"_"+type;
315 if (!gnuplot_header) fic <<
"#";
326 os.
ouvrir(nomfichier,ios::app);
329 os.
setf(ios::scientific);
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....
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.
Probleme_base & probleme()
Returns the problem 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.
virtual int nb_comp() const
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
const Equation_base & equation() const
Returns the reference to the equation pointed to by MorEqn::mon_equation.
OBS_PTR(Equation_base) mon_equation
A character string (Nom) in uppercase.
class Nom: a character string for naming TRUST objects.
const std::string & getString() const
An array of character strings (VECT(Nom)).
Base class for TRUST objects (Objet_U).
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.
static const Nom & nom_du_cas()
Returns a constant reference to the case name. This method is static.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
class Probleme_base It is a Probleme_U that is not a coupling.
bool & reprise_effectuee()
const Schema_Temps_base & schema_temps() const
Returns the time scheme associated with the problem.
static void mp_sum_for_each_item(TRUSTArray< _TYPE_ > &x, int n=-1)
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
static int je_suis_maitre()
Returns 1 if on the master processor of the current group (i.e. me() == 0), 0 otherwise.
SFichier is to the C++ ofstream class what Sortie is to the C++ ostream class.
int nb_impr() const
Returns the number of outputs performed.
double temps_courant() const
Returns the current time.
int gnuplot_header() const
int precision_impr() const
virtual int ouvrir(const char *name, IOS_OPEN_MODE mode=ios::out)
void precision(int pre) override
void setf(IOS_FORMAT code) override
Base class for output streams.
void set_col_width(int w)
virtual int add_col(const double ob)
Source_base A Source_base object is a term appearing on the right-hand side of an.
void set_fichier(const Nom &)
virtual void mettre_a_jour(double temps)
DOES NOTHING - to override in derived classes.
virtual void associer_pb(const Probleme_base &)=0
Champs_compris champs_compris_
const Champ_base & get_champ(const Motcle &nom) const override
virtual void associer_domaines(const Domaine_dis_base &, const Domaine_Cl_dis_base &)=0
bool has_champ(const Motcle &nom, OBS_PTR(Champ_base) &ref_champ) const override
const Nom description() const
virtual int impr(Sortie &os) const
virtual void resetTime(double t)
DOES NOTHING - to override in derived classes.
virtual void associer_champ_rho(const Champ_base &champ_rho)
This method (or the method of the derived class) is called by Sources::associer_champ_rho for each so...
virtual DoubleTab & calculer(DoubleTab &) const
virtual void ouvrir_fichier(SFichier &os, const Nom &, const int flag=1) const
Opening/creation of a file for printing a source term. To override in derived classes.
virtual void contribuer_au_second_membre(DoubleTab &) const
contribution to the right-hand side of source terms implicitly, by default error
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
virtual int initialiser(double temps)
Unlike the mettre_a_jour methods, the initializer methods of sources cannot depend on the outside.
virtual void contribuer_a_avec(const DoubleTab &, Matrice_Morse &) const
contribution to the implicit matrix of source terms, by default no contribution
virtual void dimensionner_blocs(matrices_t matrices, const tabs_t &semi_impl={ }) const
virtual void dimensionner_bloc_vitesse(Matrice_Morse &) const
virtual void completer()
Updates internal references of the Source_base object.
virtual int has_interface_blocs() const
virtual DoubleTab & ajouter(DoubleTab &) const
virtual int a_pour_Champ_Fonc(const Motcle &mot, OBS_PTR(Champ_base) &ch_ref) const
If the source understands the keyword "mot", it fills the reference to ch_ref and returns 1,...
virtual void dimensionner(Matrice_Morse &) const
Sizing of the implicit matrix of source terms.
virtual void ajouter_blocs(matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl={ }) const