ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
FaceNS.h
Go to the documentation of this file.
1//
2// ,---. ,--, .---. ,--, ,---. .-. .-.
3// | .-' .' .') / .-. ) .' .' | .-' | \| |
4// | `-. | |(_) | | |(_) | | __ | `-. | | |
5// | .-' \ \ | | | | \ \ ( _) | .-' | |\ |
6// | `--. \ `-. \ `-' / \ `-) ) | `--. | | |)|
7// /( __.' \____\ )---' )\____/ /( __.' /( (_)
8// (__) (_) (__) (__) (__)
9// Official webSite: https://code-mphi.github.io/ECOGEN/
10//
11// This file is part of ECOGEN.
12//
13// ECOGEN is the legal property of its developers, whose names
14// are listed in the copyright file included with this source
15// distribution.
16//
17// ECOGEN is free software: you can redistribute it and/or modify
18// it under the terms of the GNU General Public License as published
19// by the Free Software Foundation, either version 3 of the License,
20// or (at your option) any later version.
21//
22// ECOGEN is distributed in the hope that it will be useful,
23// but WITHOUT ANY WARRANTY; without even the implied warranty of
24// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25// GNU General Public License for more details.
26//
27// You should have received a copy of the GNU General Public License
28// along with ECOGEN (file LICENSE).
29// If not, see <http://www.gnu.org/licenses/>.
30
31#ifndef FACENS_H
32 #define FACENS_H
33
34 #include "../../Face.h"
35
36class ElementNS; //Predeclaration de la classe Element pour pouvoir inclure Element.h
37 #include "ElementNS.h"
38
39class FaceNS : public Face
40{
41 public:
42 FaceNS();
43 FaceNS(const int& numberNodes);
44 ~FaceNS() override;
45
46 void construitFace(const Coord* nodes, const int& numNodeOther, ElementNS* elementNeighbor);
47 bool faceExists(FaceNS** faces, const int& indexMaxFaces, int& indexFaceExiste);
48 void addElementNeighbor(ElementNS* elementNeighbor);
49 void addElementNeighborLimite(ElementNS* elementNeighbor);
50
51 //Accesseurs
54 void setEstLimite(const bool& estLimite);
55 void setEstComm(const bool& estComm);
56 const bool& getEstComm() const { return m_comm; };
57 const int& getSumNumNodes() const { return m_sumNumNodes; };
58
59 const int& getNumberNodes() const { return m_numberNodes; };
60 const int& getNumNode(const int& numNode) const { return m_numNodes[numNode]; };
61 void getInfoNodes(int* numNodes, int& sumNumNodes) const;
62 const bool& getEstLimite() const { return m_limite; };
63 void printNodes() const;
64 void printInfo() const override;
65 static int searchFace(int* face,
66 int& sumNodes,
67 int** arrayFaces,
68 int* arraySumNodes,
69 int numberNodes,
70 int& indexMaxFaces); // Recherche si face appartient au array arrayFaces : renvoi le number ou -1 si absence
71 static int searchFace(
72 int* face,
73 int& sumNodes,
74 std::vector<int*> arrayFaces,
75 std::vector<int> arraySumNodes,
76 int numberNodes,
77 int& indexMaxFaces); // Recherche si face appartient au array arrayFaces : renvoi le number ou -1 si absence. Utilise seulement sur ancienne version
78
79 protected:
80 virtual void computeSurface(const Coord* /*nodes*/) {};
81 virtual void computeRepere(const Coord* /*nodes*/, const int& /*numNodeOther*/, ElementNS* /*elementNeighbor*/) {};
82
87 bool m_comm;
90};
91
92#endif // FACENS_H
93
94//Surcharge operateur externe a la classe car prends deux arguments
95bool operator==(const FaceNS& a, const FaceNS& b);
96bool operator!=(const FaceNS& a, const FaceNS& b);
bool operator!=(const FaceNS &a, const FaceNS &b)
Definition FaceNS.cpp:257
bool operator==(const FaceNS &a, const FaceNS &b)
Definition FaceNS.cpp:235
Class for a coordinate system object such as coordinates of the vertex or a vector.
Definition Coord.h:43
Definition ElementNS.h:40
Definition FaceNS.h:40
ElementNS * m_elementDroite
Definition FaceNS.h:89
void printInfo() const override
Definition FaceNS.cpp:150
~FaceNS() override
Definition FaceNS.cpp:46
void addElementNeighborLimite(ElementNS *elementNeighbor)
Definition FaceNS.cpp:118
const int & getSumNumNodes() const
Definition FaceNS.h:57
int m_sumNumNodes
Definition FaceNS.h:85
void setEstComm(const bool &estComm)
Definition FaceNS.cpp:136
ElementNS * getElementDroite() const
Definition FaceNS.cpp:54
static int searchFace(int *face, int &sumNodes, int **arrayFaces, int *arraySumNodes, int numberNodes, int &indexMaxFaces)
Definition FaceNS.cpp:189
bool m_limite
Definition FaceNS.h:86
const int & getNumNode(const int &numNode) const
Definition FaceNS.h:60
int * m_numNodes
Definition FaceNS.h:84
virtual void computeRepere(const Coord *, const int &, ElementNS *)
Definition FaceNS.h:81
void getInfoNodes(int *numNodes, int &sumNumNodes) const
Definition FaceNS.cpp:140
bool m_comm
Definition FaceNS.h:87
const int & getNumberNodes() const
Definition FaceNS.h:59
bool faceExists(FaceNS **faces, const int &indexMaxFaces, int &indexFaceExiste)
Definition FaceNS.cpp:74
virtual void computeSurface(const Coord *)
Definition FaceNS.h:80
const bool & getEstLimite() const
Definition FaceNS.h:62
void addElementNeighbor(ElementNS *elementNeighbor)
Definition FaceNS.cpp:106
ElementNS * m_elementGauche
Definition FaceNS.h:88
void construitFace(const Coord *nodes, const int &numNodeOther, ElementNS *elementNeighbor)
Definition FaceNS.cpp:58
int m_numberNodes
Definition FaceNS.h:83
const bool & getEstComm() const
Definition FaceNS.h:56
void setEstLimite(const bool &estLimite)
Definition FaceNS.cpp:132
FaceNS()
Definition FaceNS.cpp:35
void printNodes() const
Definition FaceNS.cpp:178
ElementNS * getElementGauche() const
Definition FaceNS.cpp:50
Face()
Definition Face.cpp:35