16#include <Champ_Fonc_Tabule.h>
17#include <Champ_Uniforme.h>
35 Cerr <<
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << finl;
36 Cerr <<
"Error: you are using an obsolete syntax for the keyword " << nom_class <<
" :" << finl;
37 Cerr <<
"Your should specify the problem name first instead of " << val1 << finl;
38 Cerr <<
"New syntax is: " << nom_class <<
" problem_name field_name ncomp expression" << finl;
44 Cerr <<
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << finl;
45 Cerr <<
"Error: you are using an obsolete syntax for the keyword " << nom_class <<
" :" << finl;
46 Cerr <<
"Your should specify the field name instead of " << val2 << finl;
47 Cerr <<
"New syntax is: " << nom_class <<
" problem_name field_name ncomp expression" << finl;
54 std::string s((
const char*) val);
56 auto checkNotDig = [](
unsigned char c)
57 {
return !std::isdigit(c);};
58 return (!s.empty() && std::find_if(s.begin(), s.end(), checkNotDig) == s.end());
85 const Motcle accolade_ouverte(
"{"), accolade_fermee(
"}");
87 if (motlu != accolade_ouverte)
89 Cerr <<
"You are using an old syntaxe, you should now use:"<< finl;
90 Cerr <<
"Champ_Fonc_Tabule { problem_name field_name } ncomp { table }" << finl;
110 if (motlu == accolade_ouverte)
114 for (
int n = 0; n < nb_param; n++)
117 DoubleVect param(nb_val);
118 for (
int i = 0; i < nb_val; i++)
126 for (
int n = 0; n < nb_param; n++)
127 size *= params[n].size();
130 DoubleVect tab_valeurs(size);
131 for (
int i = 0; i < size; i++)
132 is >> tab_valeurs[i];
133 la_table.remplir(params, tab_valeurs);
136 if (motlu != accolade_fermee)
138 Cerr <<
"Error reading from an object of type Champ_Fonc_Tabule" << finl;
139 Cerr <<
"We expected keyword } instead of " << motlu << finl;
143 else if (motlu ==
"fonction")
145 Cerr <<
"The syntax has changed..." << finl;
146 Cerr <<
"The syntax is now Champ_Fonc_fonction problem field 1 field_expression" << finl;
151 Cerr <<
"Error reading from an object of type Champ_Fonc_Tabule" << finl;
152 Cerr <<
"We expected keyword { or fonction instead of " << motlu << finl;
160 if (!le_champ_tabule_dis)
161 Cerr <<
le_nom() <<
"type : " <<
que_suis_je() <<
" can not be assigned to " << ch.
le_nom() <<
" because " <<
le_nom() <<
" is incomplete " << finl;
Class Champ_Fonc_Tabule Derived class of Champ_Fonc_base representing.
Champ_base & affecter_(const Champ_base &) override
Assigns a Champ_base to a Champ_Fonc_base.
const DoubleTab & valeurs() const override
static bool Check_if_int(const Nom &val)
Noms noms_champs_parametre_
static void Warn_old_chp_fonc_syntax_V_184(const char *nom_class, const Nom &val1, const Nom &val2)
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
virtual DoubleTab & valeurs()=0
int lire_dimension(Entree &, const Nom &)
Verification of the field dimension Returns the dimension of the field.
Champ_base()
Default constructor of a Champ_base.
Class defining operators and methods for all reading operation in an input flow (file,...
virtual void fixer_nb_comp(int i)
Sets the number of components of the field.
const Nom & le_nom() const override
Returns the name of the field.
class Nom: a character string for naming TRUST objects.
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.
value_type & add()=delete