TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Aretes.h
1/****************************************************************************
2* Copyright (c) 2022, 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 Aretes_included
17#define Aretes_included
18
19#include <TRUSTTab.h>
20
21class Domaine_VDF;
22
23//////////////////////////////////////////////////////////////////////////////
24//
25// Class Aretes: represents a set of edges
26//
27//////////////////////////////////////////////////////////////////////////////
28
29class Aretes: public Objet_U
30{
31 Declare_instanciable(Aretes);
32public:
33
34 inline Aretes(int n);
35 void affecter(int&, int, int, int, int, int, int, int, const ArrOfInt&);
36 inline IntTab& faces();
37 void dimensionner(int);
38 void trier(int&, int&, int&, int&);
39 void trier_pour_debog(int&, int&, int&, int&, const DoubleTab&);
41
42private:
43 IntTab faces_;
44 IntVect type1_, type2_;
45 void swap(int, int);
46
47};
48
49/*! @brief Constructeur : dimensionne les tableaux
50 *
51 */
52inline Aretes::Aretes(int n) : faces_(n,4),type1_(n),type2_(n)
53{
54}
55
56/*! @brief Returns the face array (IntTab) of dimension nb_aretes,4.
57 *
58 * faces(num_arete,i) 0 <= i <= 3:
59 * indices of the 4 faces sharing edge num_arete
60 * For an internal edge all 4 faces exist.
61 * For a boundary edge one or two of the indices equal -1.
62 *
63 */
64inline IntTab& Aretes::faces()
65{
66 return faces_;
67}
68
69#endif // Aretes_H
void trier_pour_debog(int &, int &, int &, int &, const DoubleTab &)
Definition Aretes.cpp:404
IntTab & faces()
Returns the face array (IntTab) of dimension nb_aretes,4.
Definition Aretes.h:64
void affecter(int &, int, int, int, int, int, int, int, const ArrOfInt &)
Assigns faces f1, f2, f3, f4 to edge numero.
Definition Aretes.cpp:61
void calculer_centre_de_gravite(Domaine_VDF &domaine)
Definition Aretes.cpp:110
void dimensionner(int)
Resizes the arrays.
Definition Aretes.cpp:270
Aretes(int n)
Constructeur : dimensionne les tableaux.
Definition Aretes.h:52
void trier(int &, int &, int &, int &)
Reorders the edge array: first corner edges (they have only two faces),.
Definition Aretes.cpp:309
class Domaine_VDF
Definition Domaine_VDF.h:61
Objet_U()
Default constructor: assigns a unique identifier to the object (object_id_) and registers the object ...
Definition Objet_U.cpp:54