16#ifndef Probleme_U_included
17#define Probleme_U_included
19#include <ScalarRegister.h>
69 virtual void getOutputField(
const Nom& nameField, ICoCo::TrioField& afield)
const;
75 const std::vector<double>& x,
76 const std::vector<double>& y,
77 const std::vector<double>& z,
78 std::vector<double>& vals,
int compo)
80 Cerr <<
"Probleme_U::" << __func__ <<
" must be overloaded in " <<
que_suis_je() << finl;
96 virtual int limpr()
const;
97 virtual int lsauv()
const;
98 virtual void sauver()
const;
class Champ_Generique_base
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.
Objet_U()
Default constructor: assigns a unique identifier to the object (object_id_) and registers the object ...
virtual void sauver() const
Save the problem state to disk.
virtual int postraiter(int force=1)
Asks the problem to post-process its fields, probes, etc.
virtual OBS_PTR(Champ_Generique_base) findOutputField(const Nom &name) const
virtual void getInputFieldsNames(Noms &noms) const
This method is used to find the names of input fields understood by the Problem.
virtual bool initTimeStep(double dt)
This method allocates and initializes the unknown and given fields for the future time step.
virtual std::string newCompute()
virtual OBS_PTR(Field_base) findInputField(const Nom &name) const
virtual void validateTimeStep()
Validates the calculated unknown by moving the present time at the end of the time step.
virtual int limpr() const
Should we print the execution statistics now?
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
virtual void setInputField(const Nom &name, const ICoCo::TrioField &afield)
virtual bool iterateTimeStep(bool &converged)
In the case solveTimeStep uses an iterative process, this method executes a single iteration.
virtual void setInputDoubleValue(const Nom &name, const double val)
virtual 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)
virtual void setInputStringValue(const std::string &name, const std::string &val)
virtual void terminate()
This method is called once at the end, after any other one.
virtual void abortTimeStep()
Aborts the resolution of the current time step.
virtual double futureTime() const
Returns the future time (end of current computing interval) This value is valid between initTimeStep ...
virtual bool checkOutputIntEntry(const Nom &name) const
virtual bool runUntil(double time)
This method has the same role as the method run, but it stops when reaching the time given in paramet...
virtual int lsauv() const
Should we save the problem state to disk now?
virtual bool run()
This method is a sort of main() for the Problem. It can be used if the problem is not coupled with an...
virtual bool solveTimeStep()
For possible re-implementation and unified call from python.
void nommer(const Nom &name) override
Assigns a name to the Objet_U. Virtual method to override.
virtual std::string getOutputStringValue(const std::string &name)
virtual bool isStationary() const
Tells if the Problem unknowns have changed during the last time step.
virtual double presentTime() const
Returns the present time.
virtual void setStationary(bool)
Tells to the Problem that stationary is reached or not.
virtual void getOutputFieldsNames(Noms &noms) const
std::map< std::string, std::string > str_params_
virtual void setInputIntValue(const Nom &name, const int &val)
virtual int getOutputIntValue(const Nom &name) const
virtual void getOutputField(const Nom &nameField, ICoCo::TrioField &afield) const
virtual void resetTime(double time)
Reset the current time of the Problem to a given value.
virtual void getInputFieldTemplate(const Nom &name, ICoCo::TrioField &afield) const
virtual bool updateGivenFields()
WARNING:
virtual void post_initialize()
virtual void initialize()
This method is called once at the beginning, before any other one of the interface Problem.
virtual double computeTimeStep(bool &stop) const
Compute the value the Problem would like for the next time step.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.