27static int faces_sommets_triangle[3][2] =
34template <
typename _SIZE_>
40template <
typename _SIZE_>
51template <
typename _SIZE_>
54 static Nom nom=
"PRISM6";
68template <
typename _SIZE_>
72 const Domaine_t& dom=this->mon_dom.valeur();
104 p0 = (pos[0]-dom.
coord(som0,0))*(pos[1]-dom.
coord(som1,1))
105 - (pos[1]-dom.
coord(som0,1))*(pos[0]-dom.
coord(som1,0));
108 p1 = (pos[0]-dom.
coord(som1,0))*(pos[1]-dom.
coord(som2,1))
109 - (pos[1]-dom.
coord(som1,1))*(pos[0]-dom.
coord(som2,0));
112 p2 = (pos[0]-dom.
coord(som2,0))*(pos[1]-dom.
coord(som0,1))
113 - (pos[1]-dom.
coord(som2,1))*(pos[0]-dom.
coord(som0,0));
116 if ((p0>-epsilon) && (p1>-epsilon) && (p2>-epsilon))
131template <
typename _SIZE_>
134 const Domaine_t& domaine=this->mon_dom.valeur();
135 if((domaine.sommet_elem(element,0)==som[0])&&
136 (domaine.sommet_elem(element,1)==som[1])&&
137 (domaine.sommet_elem(element,2)==som[2]))
147template <
typename _SIZE_>
150 const Domaine_t& domaine=this->mon_dom.valeur();
151 const DoubleTab_t& coord = domaine.coord_sommets();
153 int_t size_tot = domaine.nb_elem_tot();
155 for (
int_t num_poly=0; num_poly<size_tot; num_poly++)
157 for (
int i=0; i<3; i++)
159 int_t Si = domaine.sommet_elem(num_poly,i);
161 pos(i,j) = coord(Si,j);
163 volumes[num_poly] = aire_triangle(pos);
172template <
typename _SIZE_>
175 const Domaine_t& domaine_geom = this->mon_dom.valeur();
180 for (
int_t numface=0; numface<nbfaces; numface++)
182 n0 = Face_sommets(numface,0);
183 n1 = Face_sommets(numface,1);
184 x1 = les_coords(n0,0)-les_coords(n1,0);
185 y1 = les_coords(n0,1)-les_coords(n1,1);
186 face_normales(numface,0) = -y1;
187 face_normales(numface,1) = x1;
194template <
typename _SIZE_>
197 faces_som_local.
resize(3,2);
198 for (
int i=0; i<3; i++)
199 for (
int j=0; j<2; j++)
200 faces_som_local(i,j) = faces_sommets_triangle[i][j];
int_t nb_elem_tot() const
const DoubleTab_t & coord_sommets() const
int_t nb_som_tot() const
Returns the total number of vertices of the domain i.e. the number of real and virtual vertices on th...
double coord(int_t i, int j) const
int_t sommet_elem(int_t i, int j) const
Returns the (global) number of the j-th vertex of the i-th element.
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,...
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.
static double precision_geom
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Base class for output streams.
_SIZE_ size_array() const
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
_SIZE_ dimension(int d) const
_SIZE_ size_totale() const
Class Triangle: represents the geometric element Triangle.
Domaine_32_64< _SIZE_ > Domaine_t
SmallArrOfTID_T< _SIZE_ > SmallArrOfTID_t
IntTab_T< _SIZE_ > IntTab_t
int get_tab_faces_sommets_locaux(IntTab &faces_som_local) const override
See ElemGeomBase::get_tab_faces_sommets_locaux.
DoubleVect_T< _SIZE_ > DoubleVect_t
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".