16#include <Raffiner_isotrope_parallele.h>
17#include <Reordonner_faces_periodiques.h>
18#include <LecFicDistribue.h>
19#include <EcrFicCollecte.h>
20#include <FichierHDFPar.h>
21#include <LecFicDiffuse.h>
22#include <TRUSTArrays.h>
23#include <Schema_Comm.h>
49 bool format_hdf =
false;
68 if (form && format_hdf)
70 Cerr <<
"Raffiner_isotrope_parallele::interpreter(): options 'ascii' and 'single_hdf' are mutually exclusive!" << finl;
83 bool has_perio =
false;
93 fichier >> liste_bords_periodiques;
99 fic_hdf.
open(org,
true);
106 data >> liste_bords_periodiques;
111 Domaine dom_new(dom_org);
117 for (
auto nom_bord : liste_bords_periodiques)
119 Cerr <<
"Reordering faces of the periodic boundary " << nom_bord << finl;
120 ArrOfDouble direction_perio;
122 Bord& bord = dom_new.
bord(nom_bord);
130 int nb_sommet_avant_completion=dom_new.
nb_som();
135 statistics().begin_count(STD_COUNTERS::parallel_meshing,statistics().get_last_opened_counter_level()+1);
142 double maxtime =
mp_max(statistics().get_time_since_last_open(STD_COUNTERS::parallel_meshing));
143 statistics().end_count(STD_COUNTERS::parallel_meshing);
144 Cerr <<
"Scatter::construire_correspondance_sommets_par_coordonnees fin, time:"
148 statistics().begin_count(STD_COUNTERS::parallel_meshing,statistics().get_last_opened_counter_level()+1);
150 maxtime =
mp_max(statistics().get_time_since_last_open(STD_COUNTERS::parallel_meshing));
151 statistics().end_count(STD_COUNTERS::parallel_meshing);
152 Cerr <<
"Scatter::construire_structures_paralleles, time:" << maxtime << finl;
157 int nb_elem_reel=dom_new.
nb_elem();
172 os.
setf(ios::scientific);
DoubleTab_t & les_sommets()
Entree & readOn_has_perio(Entree &s, bool &has_perio)
Reads the objects constituting a Domain from an input stream.
void typer(const Nom &)
Sets the element type of the domain using the name passed as parameter.
int_t nb_som() const
Returns the number of vertices of the domain.
const Noms & bords_perio() const
void set_fichier_lu(Nom &nom)
Writing to a file. This class implements the operators and virtual methods of the SFichier class as f...
int ouvrir(const char *name, IOS_OPEN_MODE mode=ios::out) override
Opens the file with the given mode and prot parameters. These parameters are the parameters of the st...
An Entree whose main source of data is an arbitrary binary buffer set using the set_data() method.
Class defining operators and methods for all reading operation in an input flow (file,...
void set_bin(bool bin) override
Changes the file write mode.
const IntTab_t & les_sommets() const
Returns the array of vertices of all faces.
Parallel collective version of FichierHDF, to be used for all concurrent reading/writing on HDF files...
static bool is_hdf5(const char *file_name)
virtual void create_and_fill_dataset_MW(Nom dataset_basename, Sortie_Brute &sortie)
virtual void read_dataset(Nom dataset_basename, int proc_rank, Entree_Brute &entree)
virtual void open(Nom filename, bool readOnly)
virtual void create(Nom filename)
const Faces_t & faces() const
This class implements the operators and virtual methods of the EFichier class as follows: The file to...
int ouvrir(const char *name, IOS_OPEN_MODE mode=ios::in) override
Opens the file.
This class implements the operators and virtual methods of the EFichier class as follows: there are a...
int ouvrir(const char *name, IOS_OPEN_MODE mode=ios::in) override
Opens the file with the given mode and prot parameters. These parameters are the parameters of the st...
class Nom: a character string for naming TRUST objects.
Nom nom_me(int, const char *prefix=0, int without_padding=0) const
Inserts _prefix000n (n=me() or nproc()) into a file name (e.g. toto.titi) to produce toto_prefix000n....
An array of character strings (VECT(Nom)).
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.
static double precision_geom
static int format_precision_geom
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Helper class to factorize the readOn method of Objet_U classes.
void ajouter_flag(const char *keyword, const bool *value)
Register a boolean flag whose mere presence switches it to true.
void ajouter(const char *keyword, const int *value, Param::Nature nat=Param::OPTIONAL)
Register an integer parameter.
int lire_avec_accolades(Entree &is)
Alias of lire_avec_accolades_depuis.
static double mp_max(double)
static int nproc()
Returns the number of processors in the current group. See Comm_Group::nproc() and PE_Groups::current...
static bool force_single_file(const int ranks, const Nom &filename)
static int me()
Returns the rank of the local processor in the current communication group. See Comm_Group::rank() an...
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
void refine_domain(const Domaine_t &src, Domaine_t &dest)
Refine the mesh once it has been partitionned, in a parallel fashion.
Entree & interpreter(Entree &is) override
static void chercher_direction_perio(ArrOfDouble &direction_perio, const Domaine_32_64< int > &dom, const Nom &bord)
static int reordonner_faces_periodiques(const Domaine_32_64< int > &domaine, IntTab_T< int > &faces, const ArrOfDouble &direction_perio, const double epsilon)
static void init_sequential_domain(Domaine_32_64< _SIZE_ > &dom)
Create parallel descriptors for the vertex and element arrays of the domain (necessary because Scatte...
static void construire_structures_paralleles(Domaine &dom)
Builds the parallel structures of the domain (determination of distant elements as a function of join...
static void construire_correspondance_sommets_par_coordonnees(Domaine &dom, bool allow_resize=false)
Builds the joint_item(JOINT_ITEM::SOMMET).items_communs arrays for all joints of the domain dom.
static void trier_les_joints(Joints &joints)
Sort joints by increasing neighbor proc number.
static void uninit_sequential_domain(Domaine_32_64< _SIZE_ > &dom)
Method used by interpreters that modify the domain (sequential), destroys the descriptors of vertices...
This derived class of Sortie stacks whatever it receives in an internal binary buffer.
void precision(int pre) override
void setf(IOS_FORMAT code) override
Base class for output streams.
void set_bin(bool bin) override
Changes the write mode of the file.
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
_SIZE_ dimension(int d) const