16#include <Postraitements.h>
17#include <Postraitement.h>
18#include <unordered_set>
47 for (
const auto& itr : *
this)
49 const Postraitement_base& post = itr.valeur();
110 motcles[0] =
"Postraitement|Post_processing";
111 motcles[1] =
"Postraitements|Post_processings";
112 motcles[2] =
"liste_postraitements";
113 motcles[3] =
"liste_de_postraitements";
114 motcles[4] =
"Postraitement_FT_Lata";
116 const int lerang = motcles.
search(motlu);
120 LIST(
Nom) list_nom_post;
128 post.typer(
"Postraitement_STT");
130 post.typer(
"Postprocessing_IJK");
132 post.typer(
"Postraitement");
133 post->associer_nom_et_pb_base(
"neant", mon_pb);
139 if (z_post && z_post->
format() ==
"cgns")
142 else if (lerang == 1 || lerang == 2 || lerang == 3 )
151 Cerr <<
"Error while reading the list of Postraitements," << finl;
152 Cerr <<
" we expected a {" << finl;
156 while (motlu2 !=
"}")
163 type =
"Postraitement";
164 nom_du_post = motlu2;
169 Cerr<<
" Warning liste_postraitements obsolete option" <<finl;
177 nom_du_post = motlu2;
183 Cerr<<
"Error in Postraitements"<<finl;
187 list_nom_post.add_if_not(nom_du_post);
191 post->associer_nom_et_pb_base(nom_du_post, mon_pb);
197 if (z_post && z_post->
format() ==
"cgns")
224 if (list_nom_post.size()!=compteur)
226 Cerr <<
"You can use the same name for the storing data file in two different blocks of post-processing" << finl;
227 Cerr <<
"Check your datafile." << finl;
231 else if (lerang == 4)
234 post.typer(
"Postraitement_FT_Lata");
235 post->associer_nom_et_pb_base(
"neant", mon_pb);
247 for (
auto& itr : *
this)
253 for (
auto& itr : *
this)
259 for (
auto& itr : *
this)
260 itr->mettre_a_jour(temps);
265 for (
auto& itr : *
this)
266 itr->resetTime(t, dirname);
271 for (
auto& itr : *
this)
277 for (
auto& itr : *
this)
284 for (
const auto& itr : *
this)
285 bytes += itr->sauvegarder(os);
291 for (
auto& itr : *
this)
302 std::unordered_map<std::string, int> file_name_counts;
304 file_name_counts[name]++;
307 bool has_duplicates =
false;
308 for (
const auto& name_to_count: file_name_counts)
311 const auto& count = name_to_count.second;
314 has_duplicates =
true;
321 std::unordered_map<std::string, int> current_occurrence;
323 for (
auto &itr : *
this)
326 if (!z_post || z_post->
format() !=
"cgns")
332 if (file_name_counts[file_name] > 1)
334 current_occurrence[file_name]++;
337 if (current_occurrence[file_name] > 1)
345 for (
auto& itr : *
this)
351 for (
auto& itr : *
this)
352 itr->completer_sondes();
Class defining operators and methods for all reading operation in an input flow (file,...
Une chaine de caractere (Nom) en majuscules.
Un tableau d'objets de la classe Motcle.
int search(const Motcle &t) const
class Nom Une chaine de caractere pour nommer les objets de TRUST
bool contient(const Nom &nom) const
const std::string & getString() const
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Classe de base pour l'ensemble des postraitements.
classe Postraitement La classe est dotee -d une liste de champs generiques champs_post_complet_ qui c...
void modify_cgns_basenames_and_reinit(const int, const int)
const Nom & format() const
int reprendre(Entree &is) override
int sauvegarder(Sortie &os) const override
std::vector< std::string > cgns_post_file_names_
void resetTime(double t, const std::string dirname)
void traiter_postraitement()
int lire_postraitements(Entree &is, const Motcle &motlu, const Probleme_base &mon_pb)
void mettre_a_jour(double temps)
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Classe de base des flux de sortie.