ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/geometrie/src/xfem_triangle3.cpp
Revision: 1075
Committed: Tue Aug 10 17:02:54 2021 UTC (4 years ago) by francois
File size: 4132 byte(s)
Log Message:
suppression de warning avec le dernier compilateur

File Contents

# Content
1 //------------------------------------------------------------
2 //------------------------------------------------------------
3 // MAGiC
4 // Jean Christophe Cuilli�re et Vincent FRANCOIS
5 // D�partement de G�nie M�canique - UQTR
6 //------------------------------------------------------------
7 // 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 // des auteurs (contact : francois@uqtr.ca)
12 //------------------------------------------------------------
13 //------------------------------------------------------------
14 //
15 // fem_element34.cpp
16 //
17 //------------------------------------------------------------
18 //------------------------------------------------------------
19 // COPYRIGHT 2000
20 // Version du 02/03/2006 � 11H22
21 //------------------------------------------------------------
22 //------------------------------------------------------------
23
24
25 #include "gestionversion.h"
26 #include "xfem_triangle3.h"
27 #include "fem_tetra4.h"
28 #include "fem_noeud.h"
29 #include "mg_element_maillage.h"
30 #include "fem_maillage.h"
31
32
33 XFEM_TRIANGLE3::XFEM_TRIANGLE3(unsigned long num,class FEM_ELEMENT_MAILLAGE *mai,class MG_ELEMENT_TOPOLOGIQUE *mgtopo,class FEM_NOEUD** tabnoeud):XFEM_ELEMENT2(num,mai,mgtopo),FEM_TEMPLATE_ELEMENT<3>(tabnoeud)
34 {
35 femmai->ajouter_xfem(this);
36 }
37
38 XFEM_TRIANGLE3::XFEM_TRIANGLE3(class FEM_ELEMENT_MAILLAGE *mai,class MG_ELEMENT_TOPOLOGIQUE *mgtopo,FEM_NOEUD** tabnoeud):XFEM_ELEMENT2(mai,mgtopo),FEM_TEMPLATE_ELEMENT<3>(tabnoeud)
39 {
40 femmai->ajouter_xfem(this);
41 }
42
43 XFEM_TRIANGLE3::XFEM_TRIANGLE3(XFEM_TRIANGLE3& mdd):XFEM_ELEMENT2(mdd),FEM_TEMPLATE_ELEMENT<3>(mdd)
44 {
45 }
46
47 XFEM_TRIANGLE3::~XFEM_TRIANGLE3()
48 {
49 femmai->supprimer_xfem(this);
50 }
51
52
53
54 int XFEM_TRIANGLE3::get_type_entite(void)
55 {
56 return IDXFEM_TRIANGLE3;
57 }
58
59 int XFEM_TRIANGLE3::get_dimension(void)
60 {
61 return 2;
62 }
63
64
65 int XFEM_TRIANGLE3::get_nb_fem_noeud(void)
66 {
67 return FEM_TEMPLATE_ELEMENT<3>::get_nb_fem_noeud();
68 }
69
70 FEM_NOEUD* XFEM_TRIANGLE3::get_fem_noeud(int num)
71 {
72 return FEM_TEMPLATE_ELEMENT<3>::get_fem_noeud(num);
73 }
74
75 void XFEM_TRIANGLE3::change_noeud(int num,FEM_NOEUD* noeud)
76 {
77 FEM_TEMPLATE_ELEMENT<3>::change_noeud(num,noeud);
78 }
79
80
81 BOITE_3D& XFEM_TRIANGLE3::get_boite_3D(void)
82 {
83 return FEM_TEMPLATE_ELEMENT<3>::get_boite_3D();
84 }
85
86 void XFEM_TRIANGLE3::enregistrer(std::ostream& o,double version)
87 {
88 if (get_lien_topologie()!=NULL) o << "%" << get_id() << "=XFEM_TRIANGLE3($"<< femmai->get_id() << ",$" << topo->get_id() << ",$" << tab[0]->get_id() << ",$" << tab[1]->get_id() << ",$" << tab[2]->get_id() << "," << etat << ");" << std::endl;
89 else o << "%" << get_id() << "=XFEM_TRIANGLE3($"<< femmai->get_id() << ",NULL,$" << tab[0]->get_id() << ",$" << tab[1]->get_id() << ",$" << tab[2]->get_id() << "," << etat << ");" << std::endl;
90
91 }
92
93
94
95
96 int XFEM_TRIANGLE3::nb_fonction_interpolation(void)
97 {
98 return 3;
99 }
100 double XFEM_TRIANGLE3::get_fonction_interpolation(int num,double *uv)
101 {
102 double val;
103 switch (num)
104 {
105 case 1:
106 val=1-uv[0]-uv[1];
107 break;
108 case 2:
109 val=uv[0];
110 break;
111 case 3:
112 val=uv[1];
113 break;
114 }
115 return val;
116 }
117 double XFEM_TRIANGLE3::get_fonction_derive_interpolation(int num,int num_variable,double *uv)
118 {
119 double val;
120
121 switch (num)
122 {
123 case 1:
124 switch (num_variable)
125 {
126 case 1:
127 val=-1;
128 break;
129 case 2:
130 val=-1;
131 break;
132 } break;
133 case 2:
134 switch (num_variable)
135 {
136 case 1:
137 val=1;
138 break;
139 case 2:
140 val=0;
141 break;
142 }break;
143 case 3:
144 switch (num_variable)
145 {
146 case 1:
147 val=0;
148 break;
149 case 2:
150 val=1;
151 break;
152 }break;
153
154 }
155 return val;
156 }
157 double XFEM_TRIANGLE3::get_jacobien(double* jac,double *uv,int& li,int& col,double unite)
158 {
159 return 0.;
160 }
161
162 void XFEM_TRIANGLE3::get_inverse_jacob(double* j,double *uv,double unite)
163 {
164 }