TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Hexaedre_axi.h
1/****************************************************************************
2* Copyright (c) 2024, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#ifndef Hexaedre_axi_included
17#define Hexaedre_axi_included
18
19#include <Hexaedre.h>
20
21/*! @brief Class Hexaedre_axi: represents the deformed hexahedron in
22 *
23 * the case of a mesh in cylindrical coordinates.
24 * The methods of the Hexaedre class from which Hexaedre_axi derives are
25 * overridden to perform calculations in cylindrical coordinates.
26 *
27 * @sa Hexaedre Elem_geom_base Elem_geom
28 */
29template <typename _SIZE_>
30class Hexaedre_axi_32_64 : public Hexaedre_32_64<_SIZE_>
31{
32
33 Declare_instanciable_32_64(Hexaedre_axi_32_64);
34
35public :
36 using int_t = _SIZE_;
37 using IntTab_t = IntTab_T<_SIZE_>;
38 using SmallArrOfTID_t = SmallArrOfTID_T<_SIZE_>;
39 using DoubleVect_t = DoubleVect_T<_SIZE_>;
40 using DoubleTab_t = DoubleTab_T<_SIZE_>;
42
43 const Nom& nom_lml() const override;
44 int contient(const ArrOfDouble& pos, int_t elem) const override;
45 int contient(const SmallArrOfTID_t& soms, int_t elem ) const override;
46 inline Type_Face type_face(int=0) const override;
47 void calculer_centres_gravite(DoubleTab_t& c) const override ;
48 void calculer_volumes(DoubleVect_t& vols) const override;
49};
50
51
52/*! @brief Returns the i-th face type.
53 *
54 * A hexahedron (Axi) has only one face type.
55 *
56 * @param i the rank of the face type to return
57 * @return a face type
58 */
59template <typename _SIZE_>
60inline Type_Face Hexaedre_axi_32_64<_SIZE_>::type_face(int i) const
61{
62 assert(i==0);
63 return Type_Face::quadrangle_3D_axi;
64}
65
66using Hexaedre_axi = Hexaedre_axi_32_64<int>;
67using Hexaedre_axi_64 = Hexaedre_axi_32_64<trustIdType>;
68
69#endif
class Domaine_32_64 A Domain is a mesh composed of a set of geometric elements of the same type.
Definition Domaine.h:62
Class Hexaedre: represents a geometric element with 6 faces, 8 vertices, and.
Definition Hexaedre.h:29
Class Hexaedre_axi: represents the deformed hexahedron in.
void calculer_centres_gravite(DoubleTab_t &c) const override
Computes the center of gravity of all elements of the domain associated with the geometric element.
Domaine_32_64< _SIZE_ > Domaine_t
Type_Face type_face(int=0) const override
Returns the i-th face type.
DoubleTab_T< _SIZE_ > DoubleTab_t
int contient(const ArrOfDouble &pos, int_t elem) const override
DOES NOTHING: TO BE CODED, always returns 0.
DoubleVect_T< _SIZE_ > DoubleVect_t
int contient(const SmallArrOfTID_t &soms, int_t elem) const override
Returns 1 if the vertices specified by parameter "pos" are the vertices of element "element" of the d...
void calculer_volumes(DoubleVect_t &vols) const override
Computes the volumes of the elements of the associated domain.
const Nom & nom_lml() const override
Returns the LML name of a Hexaedre_axi element = "VOXEL8".
IntTab_T< _SIZE_ > IntTab_t
SmallArrOfTID_T< _SIZE_ > SmallArrOfTID_t
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31