1 |
|
5 |
//------------------------------------------------------------
|
2 |
|
|
//------------------------------------------------------------
|
3 |
|
|
// MAGiC
|
4 |
francois |
195 |
// Jean Christophe Cuilli�re et Vincent FRANCOIS
|
5 |
|
|
// D�partement de G�nie M�canique - UQTR
|
6 |
|
5 |
//------------------------------------------------------------
|
7 |
francois |
195 |
// Le projet MAGIC est un projet de recherche du d�partement
|
8 |
|
|
// de g�nie m�canique de l'Universit� du Qu�bec �
|
9 |
|
|
// Trois Rivi�res
|
10 |
|
|
// Les librairies ne peuvent �tre utilis�es sans l'accord
|
11 |
|
5 |
// des auteurs (contact : francois@uqtr.ca)
|
12 |
|
|
//------------------------------------------------------------
|
13 |
|
|
//------------------------------------------------------------
|
14 |
|
|
//
|
15 |
|
|
// fem_tetra10.cpp
|
16 |
|
|
//
|
17 |
|
|
//------------------------------------------------------------
|
18 |
|
|
//------------------------------------------------------------
|
19 |
|
|
// COPYRIGHT 2000
|
20 |
francois |
195 |
// Version du 02/03/2006 � 11H22
|
21 |
|
5 |
//------------------------------------------------------------
|
22 |
|
|
//------------------------------------------------------------
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
#include "gestionversion.h"
|
26 |
|
|
#include "fem_tetra10.h"
|
27 |
|
|
#include "fem_noeud.h"
|
28 |
|
|
#include "mg_element_maillage.h"
|
29 |
|
|
#include "fem_maillage.h"
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
FEM_TETRA10::FEM_TETRA10(unsigned long num,class MG_ELEMENT_MAILLAGE* mai,class FEM_NOEUD** tabnoeud):FEM_TETRA(num,mai),FEM_TEMPLATE_ELEMENT<10>(tabnoeud)
|
33 |
|
|
{
|
34 |
francois |
195 |
if (liaison_topologique!=NULL) if (liaison_topologique->get_dimension()==3) liaison_topologique->get_lien_fem_maillage()->ajouter(this);
|
35 |
|
5 |
tab[0]->get_lien_tetra()->ajouter(this);
|
36 |
|
|
tab[1]->get_lien_tetra()->ajouter(this);
|
37 |
|
|
tab[2]->get_lien_tetra()->ajouter(this);
|
38 |
|
|
tab[3]->get_lien_tetra()->ajouter(this);
|
39 |
|
|
tab[4]->get_lien_tetra()->ajouter(this);
|
40 |
|
|
tab[5]->get_lien_tetra()->ajouter(this);
|
41 |
|
|
tab[6]->get_lien_tetra()->ajouter(this);
|
42 |
|
|
tab[7]->get_lien_tetra()->ajouter(this);
|
43 |
|
|
tab[8]->get_lien_tetra()->ajouter(this);
|
44 |
|
|
tab[9]->get_lien_tetra()->ajouter(this);
|
45 |
|
|
get_fem_noeudpetitid()->get_lien_petit_tetra()->ajouter(this);
|
46 |
|
|
}
|
47 |
|
|
|
48 |
|
|
FEM_TETRA10::FEM_TETRA10(class MG_ELEMENT_MAILLAGE* mai,FEM_NOEUD** tabnoeud):FEM_TETRA(mai),FEM_TEMPLATE_ELEMENT<10>(tabnoeud)
|
49 |
|
|
{
|
50 |
francois |
195 |
if (liaison_topologique!=NULL) if (liaison_topologique->get_dimension()==3) liaison_topologique->get_lien_fem_maillage()->ajouter(this);
|
51 |
|
5 |
tab[0]->get_lien_tetra()->ajouter(this);
|
52 |
|
|
tab[1]->get_lien_tetra()->ajouter(this);
|
53 |
|
|
tab[2]->get_lien_tetra()->ajouter(this);
|
54 |
|
|
tab[3]->get_lien_tetra()->ajouter(this);
|
55 |
|
|
tab[4]->get_lien_tetra()->ajouter(this);
|
56 |
|
|
tab[5]->get_lien_tetra()->ajouter(this);
|
57 |
|
|
tab[6]->get_lien_tetra()->ajouter(this);
|
58 |
|
|
tab[7]->get_lien_tetra()->ajouter(this);
|
59 |
|
|
tab[8]->get_lien_tetra()->ajouter(this);
|
60 |
|
|
tab[9]->get_lien_tetra()->ajouter(this);
|
61 |
|
|
get_fem_noeudpetitid()->get_lien_petit_tetra()->ajouter(this);
|
62 |
|
|
}
|
63 |
|
|
|
64 |
|
|
FEM_TETRA10::FEM_TETRA10(FEM_TETRA10& mdd):FEM_TETRA(mdd),FEM_TEMPLATE_ELEMENT<10>(mdd)
|
65 |
|
|
{
|
66 |
francois |
195 |
if (liaison_topologique!=NULL) if (liaison_topologique->get_dimension()==3) liaison_topologique->get_lien_fem_maillage()->ajouter(this);
|
67 |
|
5 |
tab[0]->get_lien_tetra()->ajouter(this);
|
68 |
|
|
tab[1]->get_lien_tetra()->ajouter(this);
|
69 |
|
|
tab[2]->get_lien_tetra()->ajouter(this);
|
70 |
|
|
tab[3]->get_lien_tetra()->ajouter(this);
|
71 |
|
|
tab[4]->get_lien_tetra()->ajouter(this);
|
72 |
|
|
tab[5]->get_lien_tetra()->ajouter(this);
|
73 |
|
|
tab[6]->get_lien_tetra()->ajouter(this);
|
74 |
|
|
tab[7]->get_lien_tetra()->ajouter(this);
|
75 |
|
|
tab[8]->get_lien_tetra()->ajouter(this);
|
76 |
|
|
tab[9]->get_lien_tetra()->ajouter(this);
|
77 |
|
|
get_fem_noeudpetitid()->get_lien_petit_tetra()->ajouter(this);
|
78 |
|
|
}
|
79 |
|
|
FEM_TETRA10::~FEM_TETRA10()
|
80 |
|
|
{
|
81 |
|
|
if (liaison_topologique==NULL) return;
|
82 |
|
|
if (liaison_topologique->get_dimension()==0) liaison_topologique->get_lien_fem_maillage()->supprimer(this);
|
83 |
|
|
tab[0]->get_lien_tetra()->supprimer(this);
|
84 |
|
|
tab[1]->get_lien_tetra()->supprimer(this);
|
85 |
|
|
tab[2]->get_lien_tetra()->supprimer(this);
|
86 |
|
|
tab[3]->get_lien_tetra()->supprimer(this);
|
87 |
|
|
tab[4]->get_lien_tetra()->supprimer(this);
|
88 |
|
|
tab[5]->get_lien_tetra()->supprimer(this);
|
89 |
|
|
tab[6]->get_lien_tetra()->supprimer(this);
|
90 |
|
|
tab[7]->get_lien_tetra()->supprimer(this);
|
91 |
|
|
tab[8]->get_lien_tetra()->supprimer(this);
|
92 |
|
|
tab[9]->get_lien_tetra()->supprimer(this);
|
93 |
|
|
get_fem_noeudpetitid()->get_lien_petit_tetra()->supprimer(this);
|
94 |
|
|
}
|
95 |
|
|
|
96 |
|
|
FEM_ELEMENT_MAILLAGE* FEM_TETRA10::dupliquer(FEM_MAILLAGE *femmai,long decalage)
|
97 |
|
|
{
|
98 |
|
|
FEM_NOEUD* tabnoeud[10];
|
99 |
|
|
tabnoeud[0]=femmai->get_fem_noeudid(tab[0]->get_id()+decalage);
|
100 |
|
|
tabnoeud[1]=femmai->get_fem_noeudid(tab[1]->get_id()+decalage);
|
101 |
|
|
tabnoeud[2]=femmai->get_fem_noeudid(tab[2]->get_id()+decalage);
|
102 |
|
|
tabnoeud[3]=femmai->get_fem_noeudid(tab[3]->get_id()+decalage);
|
103 |
|
|
tabnoeud[4]=femmai->get_fem_noeudid(tab[4]->get_id()+decalage);
|
104 |
|
|
tabnoeud[5]=femmai->get_fem_noeudid(tab[5]->get_id()+decalage);
|
105 |
|
|
tabnoeud[6]=femmai->get_fem_noeudid(tab[6]->get_id()+decalage);
|
106 |
|
|
tabnoeud[7]=femmai->get_fem_noeudid(tab[7]->get_id()+decalage);
|
107 |
|
|
tabnoeud[8]=femmai->get_fem_noeudid(tab[8]->get_id()+decalage);
|
108 |
|
|
tabnoeud[9]=femmai->get_fem_noeudid(tab[9]->get_id()+decalage);
|
109 |
|
|
FEM_TETRA10* tet=new FEM_TETRA10(get_id()+decalage,maillage,tabnoeud);
|
110 |
|
|
femmai->ajouter_fem_tetra(tet);
|
111 |
|
|
return tet;
|
112 |
|
|
}
|
113 |
|
|
|
114 |
|
|
|
115 |
|
|
|
116 |
|
|
|
117 |
|
|
|
118 |
|
|
int FEM_TETRA10::get_type_entite(void)
|
119 |
|
|
{
|
120 |
|
|
return IDFEM_TETRA10;
|
121 |
|
|
}
|
122 |
|
|
|
123 |
|
|
int FEM_TETRA10::get_dimension(void)
|
124 |
|
|
{
|
125 |
|
|
return 3;
|
126 |
|
|
}
|
127 |
|
|
|
128 |
|
|
|
129 |
|
|
int FEM_TETRA10::get_nb_fem_noeud(void)
|
130 |
|
|
{
|
131 |
|
|
return FEM_TEMPLATE_ELEMENT<10>::get_nb_fem_noeud();
|
132 |
|
|
}
|
133 |
|
|
|
134 |
|
|
FEM_NOEUD* FEM_TETRA10::get_fem_noeud(int num)
|
135 |
|
|
{
|
136 |
|
|
return FEM_TEMPLATE_ELEMENT<10>::get_fem_noeud(num);
|
137 |
|
|
}
|
138 |
|
|
|
139 |
|
|
void FEM_TETRA10::change_noeud(int num,FEM_NOEUD* noeud)
|
140 |
|
|
{
|
141 |
|
|
FEM_TEMPLATE_ELEMENT<10>::change_noeud(num,noeud);
|
142 |
|
|
}
|
143 |
|
|
|
144 |
|
|
BOITE_3D& FEM_TETRA10::get_boite_3D(void)
|
145 |
|
|
{
|
146 |
|
|
return FEM_TEMPLATE_ELEMENT<10>::get_boite_3D();
|
147 |
|
|
}
|
148 |
|
|
|
149 |
|
|
|
150 |
|
|
void FEM_TETRA10::enregistrer(std::ostream& o)
|
151 |
|
|
{
|
152 |
|
|
if (get_lien_topologie()!=NULL) o << "%" << get_id() << "=FEM_TETRA10($"<< get_lien_topologie()->get_id() << ",$" << maillage->get_id() << ",$" << tab[0]->get_id() << ",$" << tab[1]->get_id() << ",$" << tab[2]->get_id() << ",$" << tab[3]->get_id() << ",$" << tab[4]->get_id() << ",$" << tab[5]->get_id() << ",$" << tab[6]->get_id() << ",$" << tab[7]->get_id() << ",$" << tab[8]->get_id() << ",$" << tab[9]->get_id()<< ");" << std::endl;
|
153 |
|
|
else o << "%" << get_id() << "=FEM_TETRA10(NULL,$" << maillage->get_id() << ",$" << tab[0]->get_id() << ",$" << tab[1]->get_id() << ",$" << tab[2]->get_id() << ",$" << tab[3]->get_id() << ",$" << tab[4]->get_id() << ",$" << tab[5]->get_id() << ",$" << tab[6]->get_id() << ",$" << tab[7]->get_id() << ",$" << tab[8]->get_id() << ",$" << tab[9]->get_id() << ");" << std::endl;
|
154 |
|
|
}
|