16#ifndef Probleme_base_included
17#define Probleme_base_included
19#include <Probleme_base_interface_proto.h>
20#include <Champs_compris_interface.h>
21#include <Champ_front_Parametrique.h>
22#include <Champ_Parametrique.h>
23#include <Correlation_base.h>
24#include <Probleme_Couple.h>
25#include <Postraitements.h>
26#include <Equation_base.h>
27#include <Save_Restart.h>
28#include <Milieu_base.h>
29#include <TRUST_List.h>
30#include <Probleme_U.h>
104 const Domaine&
domaine()
const;
146 int limpr()
const override;
147 int lsauv()
const override;
148 void sauver()
const override;
176 const std::vector<double>& x,
177 const std::vector<double>& y,
178 const std::vector<double>& z,
179 std::vector<double>& vals,
int compo)
override;
192 OBS_PTR(
Field_base) findInputField(
const Nom& name)
const override {
return findInputField_impl(*
this, name); }
202 Motcle mot(nom_correlation);
208 Motcle mot(nom_correlation);
243 if(!la_discretisation_)
245 Cerr <<
que_suis_je() <<
" has not been discretized!" << finl;
248 return la_discretisation_.valeur();
class Champ_Generique_base
: class Champ_Parametrique
class Champ_base This class is the base of the fields hierarchy.
class Champs_compris_interface This class contains an interface of methods intended to manage
class Discretisation_base This class represents a spatial discretization scheme, which
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Writing to a shared file. This class derives from Ecr_Fic_Par, using binary output.
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....
: Base class of closure laws.
Milieu_base This class is the base of the (physical) medium hierarchy.
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.
class Postraitement. The class holds -a list of generic fields champs_post_complet_ containing
Probleme_Couple This is the historical coupling class of TRUST.
virtual bool solveTimeStep()
For possible re-implementation and unified call from python.
void getInputFieldsNames_impl(const Probleme_base &pb, Noms &noms) const
bool updateGivenFields_impl(Probleme_base &pb)
void getOutputFieldsNames_impl(const Probleme_base &pb, Noms &noms) const
const bool & is_probleme_initialized_impl() const
void initialize_impl(Probleme_base &pb)
void validateTimeStep_impl(Probleme_base &pb)
void abortTimeStep_impl(Probleme_base &pb)
void terminate_impl(Probleme_base &pb)
bool solveTimeStep_impl(Probleme_base &pb)
bool initTimeStep_impl(Probleme_base &pb, double dt)
bool iterateTimeStep_impl(Probleme_base &pb, bool &converged)
double futureTime_impl(const Probleme_base &pb) const
double presentTime_impl(const Probleme_base &pb) const
bool isStationary_impl(const Probleme_base &pb) const
double computeTimeStep_impl(const Probleme_base &pb, bool &stop) const
void addInputField_impl(Probleme_base &pb, Field_base &f)
class Probleme_base It is a Probleme_U that is not a coupling.
int sauvegarder(Sortie &) const override
Writing of the problem to file for restart.
int limpr() const override
Asks the time scheme if a print is needed.
const bool & is_probleme_base_initialized() const
virtual void associer_milieu_base(const Milieu_base &)
Associates a physical medium with the problem equations.
bool has_domaine_dis() const
virtual Entree & lire_equations(Entree &is, Motcle &dernier_mot)
Reading of the equations of the problem.
void setStationary(bool flag) override
Tells to the Problem that stationary is reached or not.
virtual void typer_lire_milieu(Entree &is)
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
Probleme_Couple & get_pb_couple()
void getOutputPointValues(const Nom &name, const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z, std::vector< double > &vals, int compo) override
virtual void discretiser(Discretisation_base &)
Assigns a discretization to the problem Discretizes the Domain associated with the problem with the d...
double presentTime() const override
Returns the present time.
LIST(OBS_PTR(SFichier)) &get_set_out_files() const
OBS_PTR(Champ_Generique_base) findOutputField(const Nom &name) const override
std::string newCompute() override
Searches for parametric fields and for each, moves to the next parameter.
virtual void lire_postraitement_interfaces(Entree &is)
bool iterateTimeStep(bool &converged) override
In the case solveTimeStep uses an iterative process, this method executes a single iteration.
const Nom & checkpoint_filename() const
virtual void associer_domaine(const Domaine &)
Associates a domain with the problem.
virtual void discretiser_equations()
void initialize() override
This method is called once at the beginning, before any other one of the interface Problem.
double futureTime() const override
Returns the future time (end of current computing interval) This value is valid between initTimeStep ...
bool has_champ(const Motcle &nom, OBS_PTR(Champ_base) &ref_champ) const override
int postraiter(int force=1) override
If force=1, performs post-processing regardless of the post-processing frequencies.
void associer_pb_couple(const Probleme_Couple &pbc)
virtual void addInputField(Field_base &f)
virtual void postraiter_interfaces(const Nom &nom_fich, Sortie &s, const Nom &format, double temps)
LIST(OBS_PTR(Champ_Parametrique)) Champs_Parametriques_
bool is_dilatable() const
bool reprise_effectuee() const
void creer_champ(const Motcle &motlu) override
LIST(OBS_PTR(SFichier)) out_files_
void getOutputFieldsNames(Noms &noms) const override
int associer_(Objet_U &) override
override Objet_U::associer_(Objet_U& ob) Associates different objects with the problem by checking
const Nom & checkpoint_format() const
virtual Entree & lire_correlations(Entree &is)
void sauver() const override
Writes to file for restart (backup).
const Domaine & domaine() const
Returns the domain associated with the problem.
const Champ_base & get_champ(const Motcle &nom) const override
Entree & read_optional_equations(Entree &is, Motcle &mot)
bool solveTimeStep() override
For possible re-implementation and unified call from python.
bool updateGivenFields() override
WARNING:
const Nom & yaml_filename() const
virtual bool has_champ_post(const Motcle &nom) const
virtual void preparer_calcul()
Prepares the computation: initializes the medium parameters and prepares the computation of each equa...
const Discretisation_base & discretisation() const
Returns the discretization associated with the problem.
void init_postraitements()
Flags the first and last post-processing for each file And initializes the post-processing.
const Probleme_Couple & get_pb_couple() const
void abortTimeStep() override
Aborts the resolution of the current time step.
Postraitements & postraitements()
virtual double calculer_pas_de_temps() const
Computes the value of the next time step for the problem.
Postraitements les_postraitements_
virtual int a_pour_IntVect(const Motcle &, OBS_PTR(IntVect)&) const
const std::vector< OWN_PTR(Milieu_base)> & milieu_vect() const
virtual int comprend_champ_post(const Motcle &nom) const
virtual void mettre_a_jour(double temps)
Performs a time update of the problem.
Save_Restart save_restart_
void resetTime(double time) override
Reset the current time of the Problem to a given value.
int lsauv() const override
Asks the time scheme if a backup is needed.
OBS_PTR(Schema_Temps_base) le_schema_en_temps_
int has_correlation(std::string nom_correlation) const
virtual void allocation() const final
Verifies that the necessary disk space exists.
OBS_PTR(Domaine) le_domaine_
virtual void associer_sch_tps_base(const Schema_Temps_base &)
Associates a time scheme with the problem.
virtual void finir()
Finalizes post-processing and saves the problem to a file.
LIST(OBS_PTR(Loi_Fermeture_base)) liste_loi_fermeture_
OBS_PTR(Probleme_Couple) pbc_
virtual bool has_mod_rayo_transp() const
int is_sauvegarde_simple() const
const Correlation_base & get_correlation(std::string nom_correlation) const
virtual const Champ_Generique_base & get_champ_post(const Motcle &nom) const
bool & reprise_effectuee()
std::vector< OWN_PTR(Milieu_base)> le_milieu_
virtual const Milieu_base & milieu() const
Returns the physical medium associated with the problem (const version).
virtual Equation_base & equation(int)=0
std::map< std::string, OWN_PTR(Correlation_base)> correlations_
const Schema_Temps_base & schema_temps() const
Returns the time scheme associated with the problem.
const Postraitements & postraitements() const
LIST(OWN_PTR(Equation_base)) eq_opt_
void terminate() override
This method is called once at the end, after any other one.
virtual int nombre_d_equations() const =0
OBS_PTR(Domaine_dis_base) le_domaine_dis_
OBS_PTR(Field_base) findInputField(const Nom &name) const override
virtual Entree & lire_radiation_models(Entree &is, Motcle &mot)
virtual const Equation_base & equation(int) const =0
virtual void imprimer(Sortie &os) const
Prints the equations associated with the problem if the associated time scheme indicates that it is n...
virtual int verifier()
Verifies that the object is complete, coherent, .
virtual void completer()
Completes the equations associated with the problem.
bool initTimeStep(double dt) override
This method allocates and initializes the unknown and given fields for the future time step.
OBS_PTR(Discretisation_base) la_discretisation_
void getInputFieldsNames(Noms &noms) const override
This method is used to find the names of input fields understood by the Problem.
virtual int expression_predefini(const Motcle &motlu, Nom &expression)
bool isStationary() const override
Tells if the Problem unknowns have changed during the last time step.
virtual void lire_solved_equations(Entree &is)
const Domaine_dis_base & domaine_dis() const
Returns the discretized domain associated with the problem (const version).
const char * reprise_format_temps() const
virtual const Equation_base & get_equation_by_name(const Nom &) const
(B. Math): Virtual method added for problems having several equations of the same type (Probleme_FT_D...
int reprendre(Entree &) override
Reading of an input stream (file) for restart after a backup with Probleme_base::sauvegarder(Sortie& ...
double computeTimeStep(bool &stop) const override
Compute the value the Problem would like for the next time step.
virtual void associer()
Associates the problem with all its equations.
virtual Equation_base & getset_equation_by_name(const Nom &)
(B. Math): Virtual method added for problems having several equations of the same type (Probleme_FT_D...
void validateTimeStep() override
Validates the calculated unknown by moving the present time at the end of the time step.
const Nom & restart_filename() const
std::vector< OWN_PTR(Milieu_base)> & milieu_vect()
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
SFichier is to the C++ ofstream class what Sortie is to the C++ ostream class.
void set_stationnaires_atteints(bool flag)
Base class for output streams.