16#include <LecFicDiffuse_JDD.h>
17#include <communications.h>
20#include <Type_Verifie.h>
47 int ok =
ouvrir(name, mode);
50 Cerr <<
"File " << name <<
" does not exist (LecFicDiffuse_JDD)" << finl;
68 Cout <<
"Reading data file "<<finl;
72 ok = file_.
ouvrir(name, mode);
75 Cerr <<
"File " << name <<
" does not exist (LecFicDiffuse_JDD)" << finl;
84 int nb_accolade_sa=-1;
86 bool petsc_format =
false;
100 nb_accolade_sa=nb_accolade;
107 comments += std::string(
"[") + std::string(name) +
"] : Comments bloc starts at line " + std::to_string(line)+
" ";
109 for(
int jump=0; jump<jol; jump++)
118 Nom msg =
"\nProblem while reading some # \n # not closed.\n";
119 msg+=
"============================================\nExiting TRUST.";
123 for(
int jump=0; jump<jol; jump++)
128 comments +=
"and ends at line " + std::to_string(line)+
"\n";
130 for(
int jump=0; jump<jol; jump++)
135 else if (motlu==
"/*")
139 comments += std::string(
"[") + std::string(name) +
"] : Comments bloc starts at line " + std::to_string(line) +
" ";
143 for(
int jump=0; jump<jol; jump++)
150 Nom msg =
"\nProblem while reading some /* \n not closed.\n";
151 msg+=
"============================================\nExiting TRUST.";
154 if (motlu==
"/*") ouvrante++;
155 if (motlu==
"*/") ouvrante--;
157 comments +=
"and ends at line " + std::to_string(line)+
"\n";
159 for(
int jump=0; jump<jol; jump++)
163 else if ((motlu.find(
"}")!=-1 && motlu !=
"}") || (motlu.find(
"{")!=-1 && motlu !=
"{") || (motlu.find(
"#")!=-1) || (motlu.find(
",")!=-1 && motlu !=
"," && !petsc_format))
165 Nom msg =
"Error while reading '" + motlu.
getString() +
"' from datafile " + name +
" at line " + std::to_string(line) +
".\nCheck for missing space character.\n";
166 msg+=
"============================================\nExiting TRUST.";
188 for(
int jump=0; jump<jol; jump++)
193 petsc_format =
false;
194 if ((motlu.debute_par(
"-pc_fieldsplit_") && motlu.finit_par(
"_fields")))
202 nb_accolade=nb_accolade_sa;
206 Cerr<<
"Error perhaps extra \"}\" or missing \"#\" in data file"<<finl;
208 Cerr<<
"Error check for missing \"}\" in data file"<<finl;
217 envoyer_broadcast(ok, 0);
EFichier(const char *name, IOS_OPEN_MODE mode=ios::in)
virtual int ouvrir(const char *name, IOS_OPEN_MODE mode=ios::in)
Class defining operators and methods for all reading operation in an input flow (file,...
virtual int jumpOfLines()
This class implements the operators and virtual methods of the EFichier class as follows: The file to...
static bool apply_verif
! whether obsolete keywords should be checked or not. True by default.
Entree & get_entree_master() override
int ouvrir(const char *name, IOS_OPEN_MODE mode=ios::in) override
Opens the file.
Base class for diffused inputs: the master processor reads data from get_entree_master() and broadcas...
A character string (Nom) in uppercase.
class Nom: a character string for naming TRUST objects.
const std::string & getString() const
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 Sortie & Journal(int message_level=0)
Returns a static Sortie object used as an event journal.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
static int je_suis_maitre()
Returns 1 if on the master processor of the current group (i.e. me() == 0), 0 otherwise.
This class, derived from Sortie, accumulates what is sent to it into a character string.
const char * get_str() const
returns a copy of the string stored by the SChaine
Base class for output streams.