ECOGEN 4.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
ElementNS.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 ELEMENTNS_H
32#define ELEMENTNS_H
33
34#include "../../Element.h"
35
36class FaceNS; //Predeclaration de la classe Face pour pouvoir inclure Face.h
37#include "FaceNS.h"
38
39class ElementNS : public Element
40{
41public:
42 ElementNS();
43 ElementNS(const int& typeGmsh, const int& numberNodes, const int& numberFaces, const int& typeVTK);
44 virtual ~ElementNS();
45
46 void construitElement(const int* numNodes, const Coord* nodes, const int numberEntitePhysique, const int numberEntiteGeometrique, int& indexElement); /*Calcul des proprietes de l element*/
47 void construitElementParallele(const Coord* nodes); /*Calcul des proprietes de l element*/
48 virtual void attributFaceLimite(FaceNS** /*faces*/, const int& /*indexMaxFaces*/) { Errors::errorMessage("attributFaceLimite non prevu pour le type d element demande"); };
49 virtual void attributFaceCommunicante(FaceNS** /*faces*/, const int& /*indexMaxFaces*/, const int& /*numberNodesInternal*/) { Errors::errorMessage("attributFaceCommunicante non prevu pour le type d element demande"); };
50 virtual void construitFaces(const Coord* /*nodes*/, FaceNS** /*faces*/, int& /*indexMaxFaces*/, int** /*facesBuff*/, int* /*sumNodesBuff*/) { Errors::errorMessage("construitFaces non prevu pour le type d element demande"); }; //Pour tests
51 virtual void construitFacesSimplifie(int& /*iMax*/, int** /*facesBuff*/, int* /*sumNodesBuff*/) { Errors::errorMessage("construitFacesSimplifie non prevu pour le type d element demande"); };
52 virtual int compteFaceCommunicante(std::vector<int*>& /*faces*/, std::vector<int>& /*sumNodesBuff*/) { Errors::errorMessage("compteFaceCommunicante non prevu pour le type d element demande"); return 0; };
53 virtual int compteFaceCommunicante(int& /*iMax*/, int** /*faces*/, int* /*sumNodesBuff*/) { Errors::errorMessage("compteFaceCommunicante non prevu pour le type d element demande"); return 0; };
54 /* void removeCPUOthers(const int& numCPU);*/
55 void removeCPUOthers(std::vector<int>& numCPU);
56
57 //Accesseurs
58 void setIndex(int& index);
60 void setNumNode(int* numNodes);
61 void setNumNode(int& node, int& numNode);
62 void setIsFantome(bool isFantome);
64 void setAppartenanceCPU(const int* numCPU, const int& numberCPU);
65
66 virtual const int& getIndex() const { return m_index; };
67 const int& getNumberNodes() const { return m_numberNodes; };
68 const int& getNumberFaces() const { return m_numberFaces; };
69 const int& getTypeGmsh() const { return m_typeGmsh; };
70 const int& getTypeVTK() const { return m_typeVTK; };
71 const int& getNumNode(int& node) const { return m_numNodes[node]; };
72 virtual const int& getAppartenancePhysique() const { return m_appartenancePhysique; };
74 const int& getCPU() const { return m_CPU; };
75 const int& getNumberOthersCPU() const { return m_numberOtherCPU; };
76 const int& getAutreCPU(const int& autreCPU) const;
77 void printInfo() const;
78
79 const bool& isFantome() const { return m_isFantome; };
80 const bool& isCommunicant() const { return m_isCommunicant; };
81
82protected:
83 virtual void computeVolume(const Coord* /*nodes*/){};
84 virtual void computeLCFL(const Coord* /*nodes*/){};
85
87
96 int m_CPU; /*Number du CPU sur lequel l'element est present physiquement*/
98 int* m_otherCPU; /*Number des CPU sur lesquels l'element est present en tant que fantome*/
99 int* m_numNodes; /*Correspondance avec le array de nodes du mesh*/
100
101};
102
103#endif // ELEMENTNS_H
Class for a coordinate system object such as coordinates of the vertex or a vector.
Definition Coord.h:43
Definition ElementNS.h:40
void printInfo() const
Definition ElementNS.cpp:204
virtual void construitFacesSimplifie(int &, int **, int *)
Definition ElementNS.h:51
bool m_isFantome
Definition ElementNS.h:94
void removeCPUOthers(std::vector< int > &numCPU)
Definition ElementNS.cpp:156
void setAppartenancePhysique(int &appartenancePhysique)
Definition ElementNS.cpp:108
void setIsFantome(bool isFantome)
Definition ElementNS.cpp:129
const int & getTypeGmsh() const
Definition ElementNS.h:69
int m_numberNodes
Definition ElementNS.h:90
const int & getAutreCPU(const int &autreCPU) const
Definition ElementNS.cpp:193
int m_numberFaces
Definition ElementNS.h:91
int m_numberOtherCPU
Definition ElementNS.h:97
virtual void attributFaceCommunicante(FaceNS **, const int &, const int &)
Definition ElementNS.h:49
ElementNS()
Definition ElementNS.cpp:35
virtual int compteFaceCommunicante(int &, int **, int *)
Definition ElementNS.h:53
bool m_isCommunicant
Definition ElementNS.h:95
virtual void attributFaceLimite(FaceNS **, const int &)
Definition ElementNS.h:48
int m_appartenanceGeometrique
Definition ElementNS.h:93
virtual ~ElementNS()
Definition ElementNS.cpp:53
const int & getNumberOthersCPU() const
Definition ElementNS.h:75
const int & getCPU() const
Definition ElementNS.h:74
virtual const int & getIndex() const
Definition ElementNS.h:66
int m_index
Definition ElementNS.h:86
void construitElementParallele(const Coord *nodes)
Definition ElementNS.cpp:82
const bool & isCommunicant() const
Definition ElementNS.h:80
const int & getAppartenanceGeometrique() const
Definition ElementNS.h:73
int m_CPU
Definition ElementNS.h:96
const int & getNumNode(int &node) const
Definition ElementNS.h:71
virtual void computeLCFL(const Coord *)
Definition ElementNS.h:84
int * m_otherCPU
Definition ElementNS.h:98
const int & getNumberFaces() const
Definition ElementNS.h:68
int m_typeVTK
Definition ElementNS.h:89
virtual void computeVolume(const Coord *)
Definition ElementNS.h:83
void setIndex(int &index)
Definition ElementNS.cpp:101
void setNumNode(int *numNodes)
Definition ElementNS.cpp:115
void setAppartenanceCPU(const int *numCPU, const int &numberCPU)
Definition ElementNS.cpp:143
void setIsCommunicant(bool isCommunicant)
Definition ElementNS.cpp:136
virtual void construitFaces(const Coord *, FaceNS **, int &, int **, int *)
Definition ElementNS.h:50
const int & getNumberNodes() const
Definition ElementNS.h:67
void construitElement(const int *numNodes, const Coord *nodes, const int numberEntitePhysique, const int numberEntiteGeometrique, int &indexElement)
Definition ElementNS.cpp:61
const bool & isFantome() const
Definition ElementNS.h:79
int * m_numNodes
Definition ElementNS.h:99
virtual int compteFaceCommunicante(std::vector< int * > &, std::vector< int > &)
Definition ElementNS.h:52
int m_appartenancePhysique
Definition ElementNS.h:92
int m_typeGmsh
Definition ElementNS.h:88
virtual const int & getAppartenancePhysique() const
Definition ElementNS.h:72
const int & getTypeVTK() const
Definition ElementNS.h:70
Definition Element.h:47
Coord vector(const Element *e)
Definition Element.cpp:59
static void errorMessage(const std::string &message)
Definition Errors.cpp:56
Definition FaceNS.h:40