16#include <Elem_geom_base.h>
50template <
typename _SIZE_>
63template <
typename _SIZE_>
72 const IntTab_t& les_Polys = mon_dom->les_elems();
78 for(face=0; face<
nb_faces(type_id); face++)
92template <
typename _SIZE_>
98 nb_elem = mon_dom->nb_elem_tot();
104 int nb_som_elem =
nb_som();
107 ConstView<_SIZE_,2> les_Polys = mon_dom->les_elems().view_ro();
109 CDoubleTabView coord = mon_dom->coord_sommets().view_ro();
110 DoubleTabView xp = tab_xp.
view_wo();
111 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), nb_elem, KOKKOS_LAMBDA(
const int_t num_elem)
113 for (
int i = 0; i < dim; i++)
115 int nb_som_reel = nb_som_elem;
116 while (les_Polys(num_elem, nb_som_reel - 1) == -1) nb_som_reel--;
117 for (
int s = 0; s < nb_som_reel; s++)
119 int_t num_som = les_Polys(num_elem, s);
120 for (
int i = 0; i < dim; i++)
121 xp(num_elem, i) += coord(num_som, i) / nb_som_reel;
124 end_gpu_timer(__KERNEL_NAME__);
132template <
typename _SIZE_>
135 Cerr <<
"calculer_normales method is not coded for an element " << finl;
136 Cerr <<
"of type que_suis_je() " << finl;
146template <
typename _SIZE_>
162template <
typename _SIZE_>
165 Cerr <<
"Elem_geom_base::faces_sommets_locaux : error.\n"
166 <<
" Method not implemented for the object "
180template <
typename _SIZE_>
183 Cerr <<
"Elem_geom_base::aretes_sommets_locaux : error.\n"
184 <<
" Method not implemented for the object "
Class Elem_geom_base This class is the base class for the definition of elements.
virtual int face_sommet(int i, int j) const =0
Returns the number of the j-th vertex of the i-th face of the element.
virtual void calculer_normales(const IntTab_t &faces_sommets, DoubleTab_t &face_normales) const
Exits with an error. This method is not pure virtual for convenience.
Faces_32_64< _SIZE_ > Faces_t
virtual int num_face(int face, Type_Face &type) const
Returns the face parameter if the specified face type matches that of the geometric element.
virtual void calculer_centres_gravite(DoubleTab_t &) const
Compute all centers of mass of all elements in the domain.
DoubleTab_T< _SIZE_ > DoubleTab_t
virtual Type_Face type_face(int face_typ=0) const =0
Type of the face of the element - face_typ < nb_type_face().
virtual void creer_faces_elem(Faces_t &, int_t, Type_Face) const
Creates the faces of the specified geometric element of the domain using the given face type.
virtual int nb_type_face() const
Nb of face types of the elemnt (for example 2 for a prism).
virtual int nb_som_face(int=0) const =0
Nb of vertices for one face of the element.
virtual int nb_faces(int=0) const =0
Nb of faces for the element.
virtual int nb_som() const =0
Nb of vertices for the element.
IntTab_T< _SIZE_ > IntTab_t
virtual void get_tab_aretes_sommets_locaux(IntTab &aretes_som_local) const
Same as Elem_geom_base::get_tab_faces_sommets_locaux but for edges: aretes_som_local.
virtual int get_tab_faces_sommets_locaux(IntTab &faces_som_local) const
Fills faces_som_local(i,j) giving for 0 <= i < nb_faces() and 0 <= j < nb_som_face(i) the local verte...
Class defining operators and methods for all reading operation in an input flow (file,...
void associer_domaine(const Domaine_t &z)
void completer(int_t face, int_t num_elem)
Completes the specified face: updates its neighbors.
int_t dimensionner(int_t)
(Re-)sizes the faces. The neighbors are resized accordingly.
int_t sommet(int_t, int) const
Returns the number of the j-th vertex of the i-th face.
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.
std::enable_if_t< is_default_exec_space< EXEC_SPACE >, View< _TYPE_, _SHAPE_ > > view_wo()
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
_SIZE_ dimension_tot(int) const override
_SIZE_ dimension(int d) const