16#include <MD_Vector_tools.h>
34template <
typename _SIZE_>
38 return is >> les_faces;
51template <
typename _SIZE_>
55 return os << les_faces;
62template <
typename _SIZE_>
66 les_faces.associer_domaine(un_domaine);
73template <
typename _SIZE_>
85template <
typename _SIZE_>
88 les_faces.ajouter(sommets);
95template <
typename _SIZE_>
105template <
typename _SIZE_>
108 les_faces.typer(typ);
115template <
typename _SIZE_>
118 return les_faces.les_sommets();
124template <
typename _SIZE_>
127 return les_faces.les_sommets();
136template <
typename _SIZE_>
142 for(
int_t i=0; i<nb_som; i++)
143 for(
int j=0; j<nb_som_dim; j++)
144 les_sommets(i,j)=Les_Nums[les_sommets(i,j)];
151template <
typename _SIZE_>
154 return le_dom.valeur();
161template <
typename _SIZE_>
164 return le_dom.valeur();
172template <
typename _SIZE_>
176 int_t nbf1=les_faces.nb_faces();
179 int nbs=std::max(les_faces.nb_som_faces(), a_ajouter.
nb_som_faces());
181 les_faces.les_sommets().resize(nbf1+nbf2, nbs);
182 for(face=0; face<nbf2; face++)
183 for(
int som=0; som<nbs; som++)
184 les_faces.sommet(nbf1+face, som)=a_ajouter.
sommet(face, som);
190 les_faces.voisins().resize(nbf1+nbf2, nb_voisins);
191 for(face=0; face<nbf2; face++)
192 for(
int voisin=0; voisin<nb_voisins; voisin++)
193 les_faces.voisin(nbf1+face, voisin)=a_ajouter.
voisin(face, voisin);
200template <
typename _SIZE_>
203 const MD_Vector& md = les_faces.les_sommets().get_md_vector();
218 x.
resize(size, nb_compo_);
221 Cerr <<
"Call to Frontiere_32_64<int>::trace_elem with a DoubleTab x not located on boundary faces or don't have the same number of components" << finl;
224 for (
int i = 0; i < size; i++)
226 int elem =
faces().voisin(i, 0);
228 elem =
faces().voisin(i, 1);
230 for(
int j = 0; j < nb_compo_; j++)
231 x(i, j) = y(elem, j);
248 x.
resize(size, nb_compo_);
251 Cerr <<
"Call to Frontiere_32_64<int>::trace_elem with a DoubleTab x not located on boundary faces or don't have the same number of components" << finl;
255 for (
int i = 0; i < size; i++)
256 for(
int j=0; j<nb_compo_; j++)
259 for (
int isom = 0; isom < nsomfa; isom++)
260 s += y(som_face(i, isom), j);
273 Cerr <<
"Frontiere_32_64<int>::trace_face(const DoubleVect_t& y, DoubleVect_t& x) const" << finl;
274 Cerr <<
"not coded yet." << finl;
286 for (
int i = 0; i < size; i++)
289 for (
int n = 0; n < N; n++)
290 x.
addr()[N * i + n] = y.
addr()[M * face + n];
297 Cerr<<
que_suis_je()<<
"::trace_som_distant not implemented "<<finl;
304 Cerr<<
que_suis_je()<<
"::trace_elem_distant not implemented "<<finl;
311 Cerr<<
que_suis_je()<<
"::trace_face_distant not implemented "<<finl;
318 Cerr<<
que_suis_je()<<
"::trace_face_distant not implemented "<<finl;
326template <
typename _SIZE_>
333template <
typename _SIZE_>
340template <
typename _SIZE_>
347template <
typename _SIZE_>
354template <
typename _SIZE_>
361template <
typename _SIZE_>
368template <
typename _SIZE_>
375template <
typename _SIZE_>
Empty class used as a base for all the arrays.
Class defining operators and methods for all reading operation in an input flow (file,...
IntTab_t & voisins()
Returns the array of neighbors (of the faces).
int_t voisin(int_t, int) const
Returns the number of the i-th neighbor of face.
int_t sommet(int_t, int) const
Returns the number of the j-th vertex of the i-th face.
int nb_som_faces() const
Returns the number of vertices per face.
virtual void trace_elem_distant(const DoubleTab &, DoubleTab &) const
virtual void trace_face_distant(const DoubleTab &, DoubleTab &) const
IntVect_T< _SIZE_ > IntVect_t
void ajouter_faces(const IntTab_t &)
Adds one or more faces to the boundary; the face(s) are specified by an array.
void nommer(const Nom &) override
Gives a name to the boundary.
virtual void trace_face_local(const DoubleTab &, DoubleTab &) const
Domaine_32_64< _SIZE_ > Domaine_t
const Domaine_t & domaine() const
Returns the domain associated with the boundary (const version).
int_t num_premiere_face() const
virtual void trace_elem_local(const DoubleTab &, DoubleTab &) const
void typer_faces(const Motcle &)
Sets the type of the boundary faces.
void associer_domaine(const Domaine_t &)
Associates the boundary to the domain it belongs to.
IntTab_t & les_sommets_des_faces()
Returns the vertices of the boundary faces.
void renum(const IntVect_t &)
Renumbers the nodes (vertices) of the faces.
IntTab_T< _SIZE_ > IntTab_t
virtual void creer_tableau_faces(Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) const
Creates an array with one "row" per face of this boundary.
Faces_32_64< _SIZE_ > Faces_t
virtual void trace_som_distant(const DoubleTab &, DoubleTab &) const
const Faces_t & faces() const
virtual void trace_som_local(const DoubleTab &y, DoubleTab &x) const
void add(const Frontiere_32_64 &)
Adds the vertices (and faces) of the given boundary to this object (Frontiere_32_64).
: This class is an OWN_PTR but the pointed object is shared among multiple
A character string (Nom) in uppercase.
class Nom: a character string for naming TRUST objects.
Base class for TRUST objects (Objet_U).
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.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.
_SIZE_ size_array() const
int dimension_int(int d) const
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
_SIZE_ dimension(int d) const