15#include <Domaine_bord.h>
23template <
typename _SIZE_>
33template <
typename _SIZE_>
43template <
typename _SIZE_>
46 domaine_source_ = source;
54template <
typename _SIZE_>
57 return domaine_source_;
63template <
typename _SIZE_>
72template <
typename _SIZE_>
81template <
typename _SIZE_>
86 case Type_Face::vide_0D:
87 type_elem_face =
"??";
89 case Type_Face::point_1D:
90 type_elem_face =
"??";
92 case Type_Face::segment_2D:
93 type_elem_face =
"segment";
95 case Type_Face::segment_2D_axi:
96 type_elem_face =
"segment";
98 case Type_Face::triangle_3D:
99 type_elem_face =
"triangle";
101 case Type_Face::quadrilatere_2D_axi:
102 type_elem_face =
"quadrangle_VEF";
104 case Type_Face::quadrangle_3D:
105 type_elem_face = (sub_type(Hexaedre,type_elem)?
"rectangle":
"quadrangle_VEF");
107 case Type_Face::quadrangle_3D_axi:
108 type_elem_face =
"quadrangle_VEF";
111 type_elem_face =
"??";
122template <
typename _SIZE_>
130 Cerr <<
"extraire_domaine_bord in parallel: the domain created will not have a distributed structure\n"
131 <<
" (this will be done one day... ask to B.Mathieu)" << finl;
141 type_face_to_type_elem(src.type_elem().valeur(), src.type_elem()->type_face(), type_elem);
142 const std::string suff = !std::is_same<_SIZE_, int>::value ?
"_64" :
"";
143 Nom type_elem_64 = type_elem + suff;
144 dest.type_elem().
typer(type_elem_64);
145 dest.type_elem()->associer_domaine(dest);
152 elem_dest.
resize(nb_faces, nb_som_face);
158 int_t nb_som_dest = 0;
159 for (
int_t i = 0; i < nb_faces; i++)
161 for (
int j = 0; j < nb_som_face; j++)
163 const int_t som = faces_src(i, j);
165 if (renum_inverse[som] < 0)
168 renum_inverse[som] = nb_som_dest++;
170 elem_dest(i, j) = renum_inverse[som];
176 const int dim =
static_cast<int>(som_src.
dimension(1));
177 som_dest.
resize(nb_som_dest, dim);
178 for (
int_t i = 0; i < nb_som_dest; i++)
180 const int_t som = renum_som[i];
181 for (
int j = 0; j < dim; j++)
182 som_dest(i, j) = som_src(som, j);
class Domaine_32_64 A Domain is a mesh composed of a set of geometric elements of the same type.
DoubleTab_t & les_sommets()
const Frontiere_t & frontiere(int i) const
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.
void nommer(const Nom &nom) override
Assigns a name to the Objet_U. Virtual method to override.
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
This class is a domain whose vertices and elements are extracted from a boundary of a source domain.
virtual void construire_domaine_bord(const Domaine_t &source, const Nom &nom_bord)
builds the domain by calling extraire_domaine_bord()
virtual const Domaine_t & get_domaine_source() const
returns a reference to the source domain
Frontiere_32_64< _SIZE_ > Frontiere_t
virtual const Nom & get_nom_bord_source() const
returns the name of the source boundary
static void extraire_domaine_bord(const Domaine_t &src, const Nom &nom_bord, Domaine_t &dest, ArrOfInt_t &renum_som)
fills the domain "dest" with the vertices and faces of the boundary "nom_bord" of the domain "src".
virtual const ArrOfInt_t & get_renum_som() const
returns renum_som (for each vertex of domaine_bord, index of the same vertex in the domain)
DoubleTab_T< _SIZE_ > DoubleTab_t
Domaine_32_64< _SIZE_ > Domaine_t
IntTab_T< _SIZE_ > IntTab_t
ArrOfInt_T< _SIZE_ > ArrOfInt_t
Class Elem_geom_base This class is the base class for the definition of elements.
Class defining operators and methods for all reading operation in an input flow (file,...
const IntTab_t & les_sommets() const
Returns the array of vertices of all faces.
int nb_som_faces() const
Returns the number of vertices per face.
const Faces_t & faces() const
A character string (Nom) in uppercase.
class Nom: a character string for naming TRUST objects.
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 bool is_parallel()
Base class for output streams.
void append_array(_TYPE_ valeur)
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
_SIZE_ dimension(int d) const