16#include <EcritureLectureSpecial.h>
17#include <Champ_Fonc_base.h>
18#include <MD_Vector_tools.h>
19#include <Domaine_VF.h>
22#include <TRUST_2_PDI.h>
43 return le_dom_VF.valeur();
58 Cerr <<
"Error in Champ_Fonc_base::fixer_nb_valeurs_nodales: method not reimplemented for the class " <<
que_suis_je() << finl;
74 if (!(
valeurs_.get_md_vector() == md))
78 Cerr <<
"Internal error in Champ_Fonc_base::creer_tableau_distribue:\n" <<
" array has already a (wrong) parallel descriptor" << finl;
99 std::vector<YAML_data> data;
112 int a_faire, special;
121 fich << mon_ident << finl;
136 if(
valeurs().dimension_tot(0) )
141 ArrOfDouble garbage(
valeurs().nb_dim() );
155 Cerr <<
"Backup of the field " <<
nom_ <<
" performed on time : " <<
Nom(
temps_,
"%e") << finl;
173 Cerr <<
"Resume of the field " <<
nom_;
189 Cerr <<
" performed." << finl;
195 Cerr << finl <<
"Problem in the resumption " << finl;
196 Cerr <<
"PDI format does not require to navigate through file..." << finl;
293 domaine.chercher_elements(positions, les_polys);
class Champ_Don_base base class of Given Fields (not calculated)
DoubleTab & valeurs() override
Overrides Champ_base::valeurs() Returns the array of values.
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
Champ_base & affecter_compo(const Champ_base &, int compo) override
Assigns a component of a Champ_base to the same component of a Champ_Fonc_base.
void associer_domaine_dis_base(const Domaine_dis_base &) override
virtual DoubleTab & remplir_coord_noeuds_compo(DoubleTab &, int) const
DOES NOTHING TO override in derived classes.
virtual int remplir_coord_noeuds_et_polys(DoubleTab &, IntVect &) const
DOES NOTHING TO override in derived classes.
virtual int remplir_coord_noeuds_et_polys_compo(DoubleTab &, IntVect &, int) const
DOES NOTHING TO override in derived classes.
virtual const Domaine & domaine() const
DoubleTab & valeur_aux(const DoubleTab &, DoubleTab &) const override
Causes an error! Must be overridden by derived classes.
virtual const Domaine_VF & domaine_vf() const
Champ_base & affecter_(const Champ_base &) override
Assigns a Champ_base to a Champ_Fonc_base.
void mettre_a_jour(double temps) override
Time update of the field.
virtual std::vector< YAML_data > data_a_sauvegarder() const
for PDI IO: retrieve name, type and dimensions of the field to save/restore.
virtual DoubleTab & remplir_coord_noeuds(DoubleTab &) const
DOES NOTHING TO override in derived classes.
int reprendre(Entree &) override
Restart from an input stream. Reads the time and values of the field.
virtual void creer_tableau_distribue(const MD_Vector &, RESIZE_OPTIONS=RESIZE_OPTIONS::COPY_INIT)
const Domaine_dis_base & domaine_dis_base() const override
int sauvegarder(Sortie &) const override
Saves the field to an output stream. Writes the name, time and values.
int fixer_nb_valeurs_nodales(int nb_noeuds) override
Sets the number of degrees of freedom per component.
Champ_base()
Default constructor of a Champ_base.
virtual const Domaine_dis_base & domaine_dis_base() const
virtual DoubleVect & valeur_aux_elems_compo(const DoubleTab &positions, const IntVect &les_polys, DoubleVect &valeurs, int ncomp) const
Causes an error! Must be overridden by derived classes.
virtual double changer_temps(const double t)
Sets the time at which the field is defined.
virtual DoubleTab & valeur_aux(const DoubleTab &positions, DoubleTab &valeurs) const
Causes an error! Must be overridden by derived classes.
virtual DoubleTab & valeur_aux_elems(const DoubleTab &positions, const IntVect &les_polys, DoubleTab &valeurs) const
Causes an error! Must be overridden by derived classes.
virtual DoubleVect & valeur_aux_compo(const DoubleTab &positions, DoubleVect &valeurs, int ncomp) const
Same as valeur_aux(const DoubleTab &, DoubleTab &), but computes only the component compo of the fiel...
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
const Domaine & domaine() const
static int is_ecriture_special(int &special, int &a_faire)
Indicates whether the special format was requested in active writing by xyz save.
static int is_lecture_special()
Indicates whether the special format was requested in active reading by xyz restart.
static int ecriture_special(const Champ_base &ch, Sortie &fich)
Simple call to EcritureLectureSpecial::ecriture_special (const Domaine_VF& zvf,Sortie& fich,...
static void lecture_special(Champ_base &ch, Entree &fich)
Simple call to EcritureLectureSpecial::lecture_special (const Domaine_VF& zvf,Entree& fich,...
Class defining operators and methods for all reading operation in an input flow (file,...
: This class is an OWN_PTR but the pointed object is shared among multiple
A character string (Nom) in uppercase.
class Nom: a character string for naming TRUST objects.
const char * getChar() const
const std::string & getString() const
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.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.
_SIZE_ size_array() const
void jump(Entree &) override
void lit(Entree &, bool resize_and_read=true) override
void ecrit(Sortie &) const override
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")
TRUST_2_PDI Encapsulation of PDI methods (library used for IO operations). See the website pdi....
void read(const std::string &name, void *data)
static int is_PDI_checkpoint()
static int is_PDI_restart()
void share_TRUSTTab_dimensions(const DoubleTab &tab, const Nom &name, int write)
Generic method to share the dimensions of a TRUST DoubleTab with PDI.
void TRUST_start_sharing(const std::string &name, const void *data)
YAML_data class: collection of all needed information for data to save/restore in order to write the ...