TRUST 1.9.8
HPC thermohydraulic platform
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// Classe Aretes : represente un ensemble d' aretes
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 retourne le tableau (IntTab) des faces de dimension nb_aretes,4
57 *
58 * faces(num_arete,i) 0 <= i <= 3:
59 * numeros des 4 faces qui se partagent l'arete num_arete
60 * Pour une arete interne les 4 faces existent
61 * Pour une arete bord un ou deux des numeros valent -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:395
IntTab & faces()
retourne le tableau (IntTab) des faces de dimension nb_aretes,4
Definition Aretes.h:64
void affecter(int &, int, int, int, int, int, int, int, const ArrOfInt &)
affecte a l'arete numero les faces f1, f2, f3, f4
Definition Aretes.cpp:52
void calculer_centre_de_gravite(Domaine_VDF &domaine)
Definition Aretes.cpp:101
void dimensionner(int)
Dimensionne les tableaux.
Definition Aretes.cpp:261
Aretes(int n)
Constructeur : dimensionne les tableaux.
Definition Aretes.h:52
void trier(int &, int &, int &, int &)
reoordonne le tableaux des aretes avec d'abord les aretes coins (elles n'ont que deux faces)
Definition Aretes.cpp:300
class Domaine_VDF
Definition Domaine_VDF.h:64
Objet_U()
Constructeur par defaut : attribue un numero d'identifiant unique a l'objet (object_id_),...
Definition Objet_U.cpp:55