16#ifndef Tetraedre_included
17#define Tetraedre_included
19#include <Elem_geom_base.h>
20#include <Linear_algebra_tools.h>
29template <
typename _SIZE_>
49 inline int nb_som()
const override {
return 4; }
64 const DoubleTab& coords,
69 const DoubleTab& coords,
93template <
typename _SIZE_>
118template <
typename _SIZE_>
131template <
typename _SIZE_>
144template <
typename _SIZE_>
161template <
typename _SIZE_>
178template <
typename _SIZE_>
195template <
typename _SIZE_>
214template <
typename _SIZE_>
218 return Type_Face::triangle_3D;
228template <
typename _SIZE_>
230 const DoubleTab& coords,
234 const int som0 = polys(num_elem, 0);
235 const int som1 = polys(num_elem, 1);
236 const int som2 = polys(num_elem, 2);
237 const int som3 = polys(num_elem, 3);
238 const double x0 = coords(som0, 0);
239 const double y0 = coords(som0, 1);
240 const double z0 = coords(som0, 2);
242 m(0,0) = coords(som1,0) - x0;
243 m(1,0) = coords(som1,1) - y0;
244 m(2,0) = coords(som1,2) - z0;
245 m(0,1) = coords(som2,0) - x0;
246 m(1,1) = coords(som2,1) - y0;
247 m(2,1) = coords(som2,2) - z0;
248 m(0,2) = coords(som3,0) - x0;
249 m(1,2) = coords(som3,1) - y0;
250 m(2,2) = coords(som3,2) - z0;
256template <
typename _SIZE_>
258 const DoubleTab& coords,
263 const int som0 = polys(num_elem, 0);
264 const int som1 = polys(num_elem, 1);
265 const int som2 = polys(num_elem, 2);
266 const int som3 = polys(num_elem, 3);
267 const double x0 = coords(som0, 0);
268 const double y0 = coords(som0, 1);
269 const double z0 = coords(som0, 2);
271 m(0,0) = coords(som1,0) - x0;
272 m(1,0) = coords(som1,1) - y0;
273 m(2,0) = coords(som1,2) - z0;
274 m(0,1) = coords(som2,0) - x0;
275 m(1,1) = coords(som2,1) - y0;
276 m(2,1) = coords(som2,2) - z0;
277 m(0,2) = coords(som3,0) - x0;
278 m(1,2) = coords(som3,1) - y0;
279 m(2,2) = coords(som3,2) - z0;
class Domaine_32_64 A Domain is a mesh composed of a set of geometric elements of the same type.
Class Elem_geom_base This class is the base class for the definition of elements.
class Nom: a character string for naming TRUST objects.
Tetraedre class — represents the tetrahedral geometric element.
static void matrice_base_tetraedre(const IntTab &polys, const DoubleTab &coords, int num_elem, Matrice33 &m, Vecteur3 &origine)
Same as the previous overload, but also fills "origine" with the coordinates of the first vertex.
Type_Face type_face(int=0) const override
Returns the i-th face type.
void calculer_volumes(DoubleVect_t &vols) const override
Computes the volumes of the elements of the associated domain.
int contient(const SmallArrOfTID_t &soms, int_t elem) const override
Returns 1 if the vertices specified by "som" are the vertices of element "element".
int contient(const ArrOfDouble &pos, int_t elem) const override
Returns 1 if element "ielem" of the domain associated with this geometric element contains the point ...
int face_sommet3(int i) const
Returns the index of the i-th vertex of face 3.
int nb_som_face(int=0) const override
Returns the number of vertices of faces of the specified type.
static void matrice_base_tetraedre(const IntTab &polys, const DoubleTab &coords, int num_elem, Matrice33 &m)
Fills matrix m with the three basis vectors of the requested tetrahedron (the first vertex of the tet...
Domaine_32_64< _SIZE_ > Domaine_t
int face_sommet2(int i) const
Returns the index of the i-th vertex of face 2.
int get_tab_faces_sommets_locaux(IntTab &faces_som_local) const override
See ElemGeomBase::get_tab_faces_sommets_locaux.
int nb_som() const override
Nb of vertices for the element.
bool est_structure() const override
int face_sommet(int i, int j) const override
Returns the index of the j-th vertex of the i-th face of the element.
IntTab_T< _SIZE_ > IntTab_t
int face_sommet1(int i) const
Returns the index of the i-th vertex of face 1.
void get_tab_aretes_sommets_locaux(IntTab &aretes_som_local) const override
Same as Elem_geom_base::get_tab_faces_sommets_locaux but for edges: aretes_som_local.
const Nom & nom_lml() const override
Returns the LML name of a tetrahedron = "TETRA4".
DoubleTab_T< _SIZE_ > DoubleTab_t
SmallArrOfTID_T< _SIZE_ > SmallArrOfTID_t
int face_sommet0(int i) const
Returns the index of the i-th vertex of face 0.
DoubleVect_T< _SIZE_ > DoubleVect_t
void calculer_normales(const IntTab_t &faces_sommets, DoubleTab_t &face_normales) const override
Computes the face normals of the elements of the associated domain.
int nb_faces(int=0) const override
Returns the number of faces of the specified type that the geometric element has.