ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/geometrie/src/xfem_segment2.cpp
Revision: 1075
Committed: Tue Aug 10 17:02:54 2021 UTC (4 years ago) by francois
File size: 3738 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_segment2.h"
27 #include "fem_segment2.h"
28 #include "fem_noeud.h"
29 #include "mg_element_maillage.h"
30 #include "fem_maillage.h"
31
32
33 XFEM_SEGMENT2::XFEM_SEGMENT2(unsigned long num,class FEM_ELEMENT_MAILLAGE* mai,class MG_ELEMENT_TOPOLOGIQUE *mgtopo,class FEM_NOEUD** tabnoeud):XFEM_ELEMENT1(num,mai,mgtopo),FEM_TEMPLATE_ELEMENT<2>(tabnoeud)
34 {
35 femmai->ajouter_xfem(this);
36 }
37
38 XFEM_SEGMENT2::XFEM_SEGMENT2(class FEM_ELEMENT_MAILLAGE* mai,class MG_ELEMENT_TOPOLOGIQUE *mgtopo,FEM_NOEUD** tabnoeud):XFEM_ELEMENT1(mai,mgtopo),FEM_TEMPLATE_ELEMENT<2>(tabnoeud)
39 {
40 femmai->ajouter_xfem(this);
41 }
42
43 XFEM_SEGMENT2::XFEM_SEGMENT2(XFEM_SEGMENT2& mdd):XFEM_ELEMENT1(mdd),FEM_TEMPLATE_ELEMENT<2>(mdd)
44 {
45 }
46
47 XFEM_SEGMENT2::~XFEM_SEGMENT2()
48 {
49 femmai->supprimer_xfem(this);
50 }
51
52
53
54 int XFEM_SEGMENT2::get_type_entite(void)
55 {
56 return IDXFEM_SEGMENT2;
57 }
58
59 int XFEM_SEGMENT2::get_dimension(void)
60 {
61 return 1;
62 }
63
64
65 int XFEM_SEGMENT2::get_nb_fem_noeud(void)
66 {
67 return FEM_TEMPLATE_ELEMENT<2>::get_nb_fem_noeud();
68 }
69
70 FEM_NOEUD* XFEM_SEGMENT2::get_fem_noeud(int num)
71 {
72 return FEM_TEMPLATE_ELEMENT<2>::get_fem_noeud(num);
73 }
74
75 void XFEM_SEGMENT2::change_noeud(int num,FEM_NOEUD* noeud)
76 {
77 FEM_TEMPLATE_ELEMENT<2>::change_noeud(num,noeud);
78 }
79
80
81 BOITE_3D& XFEM_SEGMENT2::get_boite_3D(void)
82 {
83 return FEM_TEMPLATE_ELEMENT<2>::get_boite_3D();
84 }
85
86 void XFEM_SEGMENT2::enregistrer(std::ostream& o,double version)
87 {
88 if (get_lien_topologie()!=NULL) o << "%" << get_id() << "=XFEM_SEGMENT2($"<< femmai->get_id() << ",$" << topo->get_id() << ",$" << tab[0]->get_id() << ",$" << tab[1]->get_id() << "," << etat << ");" << std::endl;
89 else o << "%" << get_id() << "=XFEM_SEGMENT2($"<< femmai->get_id() << ",NULL,$" << tab[0]->get_id() << ",$" << tab[1]->get_id() << "," << etat << ");" << std::endl;
90
91 }
92
93
94
95
96 int XFEM_SEGMENT2::nb_fonction_interpolation(void)
97 {
98 return 2;
99 }
100 double XFEM_SEGMENT2::get_fonction_interpolation(int num,double *uv)
101 {
102 double val;
103 switch (num)
104 {
105 case 1:
106 val=0.5*(1-uv[0]);
107 break;
108 case 2:
109 val=0.5*(1+uv[0]);
110 break;
111 }
112 return val;
113 }
114 double XFEM_SEGMENT2::get_fonction_derive_interpolation(int num,int num_variable,double *uv)
115 {
116 double val;
117
118 switch (num)
119 {
120 case 1:
121 switch (num_variable)
122 {
123 case 1:
124 val=-0.5;
125 break;
126 } break;
127 case 2:
128 switch (num_variable)
129 {
130 case 1:
131 val=0.5;
132 break;
133 }break;
134
135 }
136 return val;
137 }
138 double XFEM_SEGMENT2::get_jacobien(double* jac,double *uv,int& li,int& col,double unite)
139 {
140 return 0.;
141
142 }
143 void XFEM_SEGMENT2::get_inverse_jacob(double* j,double *uv,double unite)
144 {
145 }