16#include <Discretisation_base.h>
17#include <Schema_Temps_base.h>
18#include <Operateur_base.h>
19#include <Probleme_base.h>
22#include <Perf_counters.h>
26 os <<
" { " <<
typ <<
" } " << finl;
64 else if (motlu==
"nb_sous_pas_de_temps")
72 int nb_ss_pas_de_temps;
73 is >> nb_ss_pas_de_temps;
77 else if (motlu==
"implicite")
92 if(motlu !=
"solveur")
94 Cerr <<
"We expected the keyword \"solveur\" instead of : "
102 if(
typ!=
"non defini")
104 Cerr <<
"We must choose the type of operator in beginning "
105 <<
"of reading block (before implicit in particular) "
126 return le_champ_inco.valeur();
135 return mon_equation->discretisation();
147 le_champ_inco=mon_equation->inconnue();
175 if (
equation().equation_non_resolue())
177 statistics().begin_count(STD_COUNTERS::compute_dt,statistics().get_last_opened_counter_level()+1);
179 statistics().end_count(STD_COUNTERS::compute_dt);
197 return mon_equation->limpr();
239 DoubleTrav derivee(resu);
243 double dt_inv=1./(double(nstep));
244 for (i=0; i<nstep; i++)
248 resu.
ajoute(dt_inv, derivee) ;
285 return ajouter(le_champ_inco->valeurs(), resu);
298 return ajouter(le_champ_inco->valeurs(), resu);
DoubleTab & valeurs() override
Returns the array of field values at the current time.
class Discretisation_base This class represents a spatial discretization scheme, which
Class defining operators and methods for all reading operation in an input flow (file,...
Solveur_Masse_base & solv_masse()
Returns the mass solver associated with the equation.
Schema_Temps_base & schema_temps()
Returns the time scheme associated with the equation.
const Equation_base & equation() const
Returns the reference to the equation pointed to by MorEqn::mon_equation.
A character string (Nom) in uppercase.
class Nom: a character string for naming TRUST objects.
void set_fichier(const Nom &)
virtual void calculer_dt_local(DoubleTab &) const
virtual void associer_champ(const Champ_Inc_base &, const std::string &nom_ch)
virtual void mettre_a_jour(double temps)
DOES NOTHING - to override in derived classes.
virtual double calculer_dt_stab() const
Computes dt_stab.
int set_nb_ss_pas_de_temps(int)
virtual void completer()
Associates the operator with the domaine_dis, the domaine_Cl_dis, and the unknown of its equation.
int get_nb_ss_pas_de_temps() const
virtual int impr(Sortie &os) const
DOES NOTHING - to override in derived classes.
Entree & lire_solveur(Entree &)
virtual void ajouter_contribution_explicite_au_second_membre(const Champ_Inc_base &inconnue, DoubleTab &derivee) const
void set_description(const Nom &nom)
void associer_eqn(const Equation_base &)
Associates an equation with the operator.
const Champ_Inc_base & mon_inconnue() const
Returns the field representing the unknown of the equation to which the operator belongs.
virtual Operateur_base & l_op_base()=0
Entree & lire(Entree &)
Reads an operator from an input stream.
double calculer_pas_de_temps() const
Computes the next time step.
int limpr() const
Asks the equation whether printing is needed. Returns 1 for YES, 0 otherwise.
int impr(Sortie &os) const
Prints the operator to an output stream unconditionally.
virtual DoubleTab & calculer(const DoubleTab &, DoubleTab &) const =0
Sortie & ecrire(Sortie &) const
void imprimer(Sortie &os) const
Prints the operator to an output stream, if necessary.
virtual void mettre_a_jour(double temps)
Performs a time update of the operator.
const Nom & type() const
Returns the (name of the) type of operator to create.
const Discretisation_base & discretisation() const
Returns the discretization of the equation to which the operator belongs.
void ajouter_contribution_explicite_au_second_membre(const Champ_Inc_base &inconnue, DoubleTab &derivee) const
virtual DoubleTab & ajouter(const DoubleTab &, DoubleTab &) const =0
void set_description(const Nom &nom)
virtual void completer()
Updates the references of the objects associated with the operator.
void set_fichier(const Nom &nom)
void associer_champ(const Champ_Inc_base &, const std::string &nom_ch)
void calculer_pas_de_temps_locaux(DoubleTab &) const
Calculate the next local time steps.
static double mp_min(double)
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
double pas_de_temps() const
Returns the current time step (delta_t).
Solveur_Masse_base Represents the mass matrix of an equation.
virtual DoubleTab & appliquer(DoubleTab &) const
Returns appliquer_impl(x/temporal_coefficient) if a temporal coefficient is set, otherwise returns ap...
Base class for output streams.
void ajoute(_SCALAR_TYPE_ alpha, const TRUSTVect &y, Mp_vect_options opt=VECT_ALL_ITEMS)
void ajoute_sans_ech_esp_virt(_SCALAR_TYPE_ alpha, const TRUSTVect &y, Mp_vect_options opt=VECT_REAL_ITEMS)
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")