15#include <Partitionneur_Union.h>
20#include <Sous_Domaine.h>
21#include <Interprete.h>
36 Cerr <<
"Partitionneur_Union::printOn invalid\n" << finl;
58 Cerr <<
que_suis_je() <<
"::validate_params" << finl;
79 ref_domaine_ = domaine;
87 elem_part.
resize(ref_domaine_->nb_elem());
92 Nom subdomain =
Nom(p.first);
93 const std::string& filename = p.second;
96 const Sous_Domaine& ssz = ref_cast(Sous_Domaine, ref);
98 file.
ouvrir(filename.c_str());
105 Cerr <<
"Partitionneur_Union : incoherent element number for sub-domaine " <<subdomain << finl;
109 elem_part[ssz(i)] = dec_ssz(i);
File for reading. This class is to the C++ ifstream class what the Entree class is to the.
virtual int ouvrir(const char *name, IOS_OPEN_MODE mode=ios::in)
static Objet_U & objet(const Nom &)
See Interprete_bloc::objet_global(). BM: the Interprete class is not the best place for this.
static int objet_existant(const Nom &)
Returns 1 if the object exists, 0 otherwise. See Interprete_bloc::objet_global_existant().
class Nom: a character string for naming TRUST objects.
virtual void set_param(Param &) const
const Nom & que_suis_je() const
Returns the string identifying the class.
Objet_U()
Default constructor: assigns a unique identifier to the object (object_id_) and registers the object ...
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(const char *keyword, const int *value, Param::Nature nat=Param::OPTIONAL)
Register an integer parameter.
Partitioner allowing a global domain to be split conformally with a set of already-partitioned sub-do...
std::map< std::string, std::string > fic_ssz
void construire_partition(IntVect &elem_part, int &nb_parts_tot) const override
Reads the content of the file "filename_" and stores the result in elem_part.
void associer_domaine(const Domaine &dom) override
void validate_params() const override
Called in the readOn of Objet_U_With_Params, after reading the params.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.
int_t nb_elem_tot() const
_SIZE_ size_array() const
void resize(_SIZE_, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)