16#ifndef Triangle_included
17#define Triangle_included
19#include <Elem_geom_base.h>
29template <
typename _SIZE_>
49 inline int nb_som()
const override {
return 3; }
72inline double aire_triangle(
const DoubleTab& pos)
80 double dz = (x1-x0)*(y2-y0) - (x2-x0)*(y1-y0);
82 return 0.5 * std::fabs(dz);
88 double dx = (y1-y0)*(z2-z0) - (y2-y0)*(z1-z0);
89 double dy = (z1-z0)*(x2-x0) - (x1-x0)*(z2-z0);
90 return 0.5 * sqrt(dx*dx+dy*dy+dz*dz);
100template <
typename _SIZE_>
122template <
typename _SIZE_>
135template <
typename _SIZE_>
148template <
typename _SIZE_>
162template <
typename _SIZE_>
176template <
typename _SIZE_>
192template <
typename _SIZE_>
196 return Type_Face::segment_2D;
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.
Class Triangle: represents the geometric element Triangle.
int nb_faces(int=0) const override
Returns the number of faces of the specified type that the geometric element has.
Domaine_32_64< _SIZE_ > Domaine_t
int nb_som() const override
Nb of vertices for the element.
int nb_som_face(int=0) const override
Returns the number of vertices of faces of the specified type.
SmallArrOfTID_T< _SIZE_ > SmallArrOfTID_t
Type_Face type_face(int=0) const override
Returns the i-th face type.
IntTab_T< _SIZE_ > IntTab_t
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 get_tab_faces_sommets_locaux(IntTab &faces_som_local) const override
See ElemGeomBase::get_tab_faces_sommets_locaux.
int face_sommet2(int i) const
Returns the index of the i-th vertex of face 2.
int face_sommet1(int i) const
Returns the index of the i-th vertex of face 1.
DoubleVect_T< _SIZE_ > DoubleVect_t
int face_sommet0(int i) const
Returns the index of the i-th vertex of face 0.
DoubleTab_T< _SIZE_ > DoubleTab_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.
void calculer_volumes(DoubleVect_t &vols) const override
Computes the volumes (areas) of the elements of the associated domain.
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.
const Nom & nom_lml() const override
Returns the LML name of a triangle = "PRISM6".
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.