16#include <Champ_Don_Face_lu.h>
17#include <Probleme_base.h>
18#include <Domaine_VDF.h>
23int meme_point(
const ArrOfInt& x,
const DoubleTab& tab,
int rang_tab)
28 for (k = 0; k < dime; k++)
29 if (std::fabs(x[k] - tab(rang_tab, k)) >= 1.e-12)
38 const DoubleTab& tab =
valeurs();
39 os << tab.
size() <<
" ";
40 for (
int i = 0; i < tab.
size(); i++)
58 Cerr <<
"Champ_Don_Face_lu: reading file " << nom << finl;
60 fic.set_check_types(1);
64 const DoubleTab& xv = zvdf.
xv();
67 ArrOfBit flag(nb_faces);
73 int nb_faces_affectees = 0;
75 for (i = 0; i < nb_val_lues; i++)
80 for (k = 0; k < dim; k++)
84 for (
int j = 0; j < nb_faces; j++)
87 if (num_face >= nb_faces)
90 if (meme_point(point, xv, num_face))
93 mes_val(num_face) = val_lu[0];
95 for (k = 0; k < dim; k++)
96 mes_val(num_face, k) = val_lu[k];
97 if (!flag.testsetbit(num_face))
104 int erreur =
static_cast<int>(
mp_sum(nb_faces - nb_faces_affectees));
107 Cerr <<
"Error in Champ_Don_Face_lu.\n" << erreur <<
" faces were not assigned.\n" <<
"See the list of faces in the .log files" << finl;
108 Journal() <<
"Champ_Don_Face_lu. List of unassigned faces:\n";
109 for (i = 0; i < nb_faces; i++)
111 Journal() << i <<
" " << xv(i, 0) <<
" " << xv(i, 1) <<
" " << ((
dimension == 3) ? xv(i, 3) : 0.) << finl;
class Champ_Don_Face_lu This class represents a data field that is read
void dimensionner(int, int)
Sets the number of components and the number of nodal values.
DoubleTab & valeurs() override
Overrides Champ_base::valeurs() Returns the array of values.
class Champ_Fonc_Face_VDF
void associer_domaine_dis_base(const Domaine_dis_base &) override
const Domaine_dis_base & domaine_dis_base() const override
int nb_faces() const
Returns the total number of faces.
double xv(int num_face, int k) const
Class defining operators and methods for all reading operation in an input flow (file,...
static Objet_U & objet(const Nom &)
See Interprete_bloc::objet_global(). BM: the Interprete class is not the best place for this.
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.
const Domaine_dis_base & domaine_dis() const
Returns the discretized domain associated with the problem (const version).
static Sortie & Journal(int message_level=0)
Returns a static Sortie object used as an event journal.
static double mp_sum(double)
Computes the sum of x over all processors in the current group.
static void barrier()
Synchronizes all processors in the current group (waits until all processors have reached the barrier...
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.
_SIZE_ size_array() const
_SIZE_ dimension(int d) const