ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/geometrie/src/fem_triangle6.cpp
Revision: 684
Committed: Tue Jun 30 15:21:22 2015 UTC (9 years, 10 months ago) by francois
File size: 16764 byte(s)
Log Message:
mise a jour de la boite englobante quand une coordonnees change  dans un fem_noeud

File Contents

# User Rev Content
1 francois 283 //------------------------------------------------------------
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_triangle6.cpp
16     //
17     //------------------------------------------------------------
18     //------------------------------------------------------------
19     // COPYRIGHT 2000
20     // Version du 02/03/2006 � 11H22
21     //------------------------------------------------------------
22     //------------------------------------------------------------
23    
24    
25     #include "gestionversion.h"
26     #include "fem_triangle6.h"
27     #include "fem_noeud.h"
28     #include "mg_element_maillage.h"
29     #include "fem_maillage.h"
30 francois 612 #include "math.h"
31     #include "ot_quadrature_gauss.h"
32 francois 283
33 francois 309 FEM_TRIANGLE6::FEM_TRIANGLE6(unsigned long num,class MG_ELEMENT_MAILLAGE* mai,class FEM_NOEUD** tabnoeud):FEM_ELEMENT2(num,mai),FEM_TEMPLATE_ELEMENT<6>(tabnoeud)
34 francois 283 {
35     if (liaison_topologique!=NULL) if (liaison_topologique->get_dimension()==2) liaison_topologique->get_lien_fem_maillage()->ajouter(this);
36 francois 309 tab[0]->get_lien_element2()->ajouter(this);
37     tab[1]->get_lien_element2()->ajouter(this);
38     tab[2]->get_lien_element2()->ajouter(this);
39     tab[3]->get_lien_element2()->ajouter(this);
40     tab[4]->get_lien_element2()->ajouter(this);
41     tab[5]->get_lien_element2()->ajouter(this);
42     get_fem_noeudpetitid()->get_lien_petit_element2()->ajouter(this);
43 francois 283 }
44    
45 francois 309 FEM_TRIANGLE6::FEM_TRIANGLE6(class MG_ELEMENT_MAILLAGE* mai,FEM_NOEUD** tabnoeud):FEM_ELEMENT2(mai),FEM_TEMPLATE_ELEMENT<6>(tabnoeud)
46 francois 283 {
47     if (liaison_topologique!=NULL) if (liaison_topologique->get_dimension()==2) liaison_topologique->get_lien_fem_maillage()->ajouter(this);
48 francois 309 tab[0]->get_lien_element2()->ajouter(this);
49     tab[1]->get_lien_element2()->ajouter(this);
50     tab[2]->get_lien_element2()->ajouter(this);
51     tab[3]->get_lien_element2()->ajouter(this);
52     tab[4]->get_lien_element2()->ajouter(this);
53     tab[5]->get_lien_element2()->ajouter(this);
54     get_fem_noeudpetitid()->get_lien_petit_element2()->ajouter(this);
55 francois 283 }
56    
57 francois 378 FEM_TRIANGLE6::FEM_TRIANGLE6(unsigned long num,class MG_ELEMENT_TOPOLOGIQUE* topo,class FEM_NOEUD** tabnoeud):FEM_ELEMENT2(num,topo),FEM_TEMPLATE_ELEMENT<6>(tabnoeud)
58     {
59     if (liaison_topologique!=NULL) if (liaison_topologique->get_dimension()==2) liaison_topologique->get_lien_fem_maillage()->ajouter(this);
60     tab[0]->get_lien_element2()->ajouter(this);
61     tab[1]->get_lien_element2()->ajouter(this);
62     tab[2]->get_lien_element2()->ajouter(this);
63     tab[3]->get_lien_element2()->ajouter(this);
64     tab[4]->get_lien_element2()->ajouter(this);
65     tab[5]->get_lien_element2()->ajouter(this);
66     get_fem_noeudpetitid()->get_lien_petit_element2()->ajouter(this);
67     }
68    
69     FEM_TRIANGLE6::FEM_TRIANGLE6(class MG_ELEMENT_TOPOLOGIQUE* topo,FEM_NOEUD** tabnoeud):FEM_ELEMENT2(topo),FEM_TEMPLATE_ELEMENT<6>(tabnoeud)
70     {
71     if (liaison_topologique!=NULL) if (liaison_topologique->get_dimension()==2) liaison_topologique->get_lien_fem_maillage()->ajouter(this);
72     tab[0]->get_lien_element2()->ajouter(this);
73     tab[1]->get_lien_element2()->ajouter(this);
74     tab[2]->get_lien_element2()->ajouter(this);
75     tab[3]->get_lien_element2()->ajouter(this);
76     tab[4]->get_lien_element2()->ajouter(this);
77     tab[5]->get_lien_element2()->ajouter(this);
78     get_fem_noeudpetitid()->get_lien_petit_element2()->ajouter(this);
79     }
80     FEM_TRIANGLE6::FEM_TRIANGLE6(unsigned long num,class MG_ELEMENT_TOPOLOGIQUE* topo,class MG_ELEMENT_MAILLAGE* mai,class FEM_NOEUD** tabnoeud):FEM_ELEMENT2(num,topo,mai),FEM_TEMPLATE_ELEMENT<6>(tabnoeud)
81     {
82     if (liaison_topologique!=NULL) if (liaison_topologique->get_dimension()==2) liaison_topologique->get_lien_fem_maillage()->ajouter(this);
83     tab[0]->get_lien_element2()->ajouter(this);
84     tab[1]->get_lien_element2()->ajouter(this);
85     tab[2]->get_lien_element2()->ajouter(this);
86     tab[3]->get_lien_element2()->ajouter(this);
87     tab[4]->get_lien_element2()->ajouter(this);
88     tab[5]->get_lien_element2()->ajouter(this);
89     get_fem_noeudpetitid()->get_lien_petit_element2()->ajouter(this);
90     }
91    
92     FEM_TRIANGLE6::FEM_TRIANGLE6(class MG_ELEMENT_TOPOLOGIQUE* topo,class MG_ELEMENT_MAILLAGE* mai,FEM_NOEUD** tabnoeud):FEM_ELEMENT2(topo,mai),FEM_TEMPLATE_ELEMENT<6>(tabnoeud)
93     {
94     if (liaison_topologique!=NULL) if (liaison_topologique->get_dimension()==2) liaison_topologique->get_lien_fem_maillage()->ajouter(this);
95     tab[0]->get_lien_element2()->ajouter(this);
96     tab[1]->get_lien_element2()->ajouter(this);
97     tab[2]->get_lien_element2()->ajouter(this);
98     tab[3]->get_lien_element2()->ajouter(this);
99     tab[4]->get_lien_element2()->ajouter(this);
100     tab[5]->get_lien_element2()->ajouter(this);
101     get_fem_noeudpetitid()->get_lien_petit_element2()->ajouter(this);
102     }
103    
104    
105    
106 francois 684 void FEM_TRIANGLE6::reinit_boite_3D(void)
107     {
108     FEM_TEMPLATE_ELEMENT<6>::reinit_boite_3D();
109     }
110 francois 378
111    
112    
113    
114 francois 309 FEM_TRIANGLE6::FEM_TRIANGLE6(FEM_TRIANGLE6& mdd):FEM_ELEMENT2(mdd),FEM_TEMPLATE_ELEMENT<6>(mdd)
115 francois 283 {
116     if (liaison_topologique!=NULL) if (liaison_topologique->get_dimension()==2) liaison_topologique->get_lien_fem_maillage()->ajouter(this);
117 francois 309 tab[0]->get_lien_element2()->ajouter(this);
118     tab[1]->get_lien_element2()->ajouter(this);
119     tab[2]->get_lien_element2()->ajouter(this);
120     tab[3]->get_lien_element2()->ajouter(this);
121     tab[4]->get_lien_element2()->ajouter(this);
122     tab[5]->get_lien_element2()->ajouter(this);
123     get_fem_noeudpetitid()->get_lien_petit_element2()->ajouter(this);
124 francois 283 }
125     FEM_TRIANGLE6::~FEM_TRIANGLE6()
126     {
127 francois 663 if (liaison_topologique!=NULL)
128     if (liaison_topologique->get_dimension()==0) liaison_topologique->get_lien_fem_maillage()->supprimer(this);
129 francois 309 tab[0]->get_lien_element2()->supprimer(this);
130     tab[1]->get_lien_element2()->supprimer(this);
131     tab[2]->get_lien_element2()->supprimer(this);
132     tab[3]->get_lien_element2()->supprimer(this);
133     tab[4]->get_lien_element2()->supprimer(this);
134     tab[5]->get_lien_element2()->supprimer(this);
135     get_fem_noeudpetitid()->get_lien_petit_element2()->supprimer(this);
136 francois 283 }
137    
138     FEM_ELEMENT_MAILLAGE* FEM_TRIANGLE6::dupliquer(FEM_MAILLAGE *femmai,long decalage)
139     {
140     FEM_NOEUD* tabnoeud[6];
141     tabnoeud[0]=femmai->get_fem_noeudid(tab[0]->get_id()+decalage);
142     tabnoeud[1]=femmai->get_fem_noeudid(tab[1]->get_id()+decalage);
143     tabnoeud[2]=femmai->get_fem_noeudid(tab[2]->get_id()+decalage);
144     tabnoeud[3]=femmai->get_fem_noeudid(tab[3]->get_id()+decalage);
145     tabnoeud[4]=femmai->get_fem_noeudid(tab[4]->get_id()+decalage);
146     tabnoeud[5]=femmai->get_fem_noeudid(tab[5]->get_id()+decalage);
147     FEM_TRIANGLE6* tri=new FEM_TRIANGLE6(get_id()+decalage,maillage,tabnoeud);
148 francois 309 femmai->ajouter_fem_element2(tri);
149 francois 283 return tri;
150     }
151    
152 francois 635 bool FEM_TRIANGLE6::valide_parametre_EF(double* uvw)
153     {
154     if (uvw[0]>=-1e-10)
155     if (uvw[1]>=-1e-10)
156     if (uvw[0]+uvw[1]<=1.+1e-10)
157     return true;
158     return false;
159     }
160 francois 283
161    
162     int FEM_TRIANGLE6::get_type_entite(void)
163     {
164     return IDFEM_TRIANGLE6;
165     }
166    
167     int FEM_TRIANGLE6::get_dimension(void)
168     {
169     return 2;
170     }
171    
172    
173     int FEM_TRIANGLE6::get_nb_fem_noeud(void)
174     {
175     return FEM_TEMPLATE_ELEMENT<6>::get_nb_fem_noeud();
176     }
177    
178     FEM_NOEUD* FEM_TRIANGLE6::get_fem_noeud(int num)
179     {
180     return FEM_TEMPLATE_ELEMENT<6>::get_fem_noeud(num);
181     }
182    
183     void FEM_TRIANGLE6::change_noeud(int num,FEM_NOEUD* noeud)
184     {
185     FEM_TEMPLATE_ELEMENT<6>::change_noeud(num,noeud);
186     }
187    
188     BOITE_3D& FEM_TRIANGLE6::get_boite_3D(void)
189     {
190     return FEM_TEMPLATE_ELEMENT<6>::get_boite_3D();
191     }
192    
193    
194     void FEM_TRIANGLE6::enregistrer(std::ostream& o)
195     {
196 francois 378 if (maillage!=NULL)
197     if (get_lien_topologie()!=NULL) o << "%" << get_id() << "=FEM_TRIANGLE6($"<< 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() << ");" << std::endl;
198     else o << "%" << get_id() << "=FEM_TRIANGLE6(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() << ");" << std::endl;
199     else
200     if (get_lien_topologie()!=NULL) o << "%" << get_id() << "=FEM_TRIANGLE6($"<< get_lien_topologie()->get_id() << ",NULL,$" << tab[0]->get_id() << ",$" << tab[1]->get_id() << ",$" << tab[2]->get_id() << ",$" << tab[3]->get_id() << ",$" << tab[4]->get_id() << ",$" << tab[5]->get_id() << ");" << std::endl;
201     else o << "%" << get_id() << "=FEM_TRIANGLE6(NULL,NULL,$" << tab[0]->get_id() << ",$" << tab[1]->get_id() << ",$" << tab[2]->get_id() << ",$" << tab[3]->get_id() << ",$" << tab[4]->get_id() << ",$" << tab[5]->get_id() << ");" << std::endl;
202    
203 francois 283 }
204 francois 310
205 francois 637 int FEM_TRIANGLE6::get_nb_pt_gauss(int degre)
206     {
207     if (degre<2) return 1;
208     if (degre<3) return 3;
209     if (degre<4) return 4;
210     if (degre<5) return 6;
211     if (degre<6) return 7;
212     return 0;
213     }
214 francois 310
215 francois 637 void FEM_TRIANGLE6::get_pt_gauss(int degre,int num,double &w,double *uv)
216     {
217     if (degre<2)
218     {
219     if (num==0) {w=0.5;uv[0]=0.333333333333333;uv[1]=0.333333333333333;}
220     return;
221     }
222     if (degre<3)
223     {
224     if (num==0) {w=0.166666666666667;uv[0]=0.166666666666667;uv[1]=0.166666666666667;}
225     if (num==1) {w=0.166666666666667;uv[0]=0.666666666666667;uv[1]=0.166666666666667;}
226     if (num==2) {w=0.166666666666667;uv[0]=0.166666666666667;uv[1]=0.666666666666667;}
227     return;
228     }
229     if (degre<4)
230     {
231     if (num==0) {w=-0.28125;uv[0]=0.333333333333333;uv[1]=0.333333333333333;}
232     if (num==1) {w=0.260416666666667;uv[0]=0.2;uv[1]=0.2;}
233     if (num==2) {w=0.260416666666667;uv[0]=0.6;uv[1]=0.2;}
234     if (num==3) {w=0.260416666666667;uv[0]=0.2;uv[1]=0.6;}
235     return;
236     }
237     if (degre<5)
238     {
239     if (num==0) {w=0.111690794839005;uv[0]=0.445948490915965;uv[1]=0.445948490915965;}
240     if (num==1) {w=0.111690794839005;uv[0]=0.108103018168070;uv[1]=0.445948490915965;}
241     if (num==2) {w=0.111690794839005;uv[0]=0.445948490915965;uv[1]=0.108103018168070;}
242     if (num==3) {w=0.054975871827661;uv[0]=0.091576213509771;uv[1]=0.091576213509771;}
243     if (num==4) {w=0.054975871827661;uv[0]=0.816847572980458;uv[1]=0.091576213509771;}
244     if (num==5) {w=0.054975871827661;uv[0]=0.091576213509771;uv[1]=0.816847572980458;}
245     return;
246     }
247     if (degre<6)
248     {
249     if (num==0) {w=0.1125;uv[0]=0.333333333333333;uv[1]=0.333333333333333;}
250     if (num==1) {w=0.066197076394253;uv[0]=0.470142064105115;uv[1]=0.470142064105115;}
251     if (num==2) {w=0.066197076394253;uv[0]=0.059715871789770;uv[1]=0.470142064105115;}
252     if (num==3) {w=0.066197076394253;uv[0]=0.470142064105115;uv[1]=0.059715871789770;}
253     if (num==4) {w=0.062969590272413;uv[0]=0.101286507323456;uv[1]=0.101286507323456;}
254     if (num==5) {w=0.062969590272413;uv[0]=0.797426985353088;uv[1]=0.101286507323456;}
255     if (num==6) {w=0.062969590272413;uv[0]=0.101286507323456;uv[1]=0.797426985353088;}
256     return;
257     }
258     }
259    
260 francois 638 int FEM_TRIANGLE6::get_nb_fonction_interpolation(void)
261 francois 310 {
262     return 6;
263     }
264 francois 638 int FEM_TRIANGLE6::get_degremax_fonction_interpolation(void)
265     {
266     return 2;
267     }
268 francois 310 double FEM_TRIANGLE6::get_fonction_interpolation(int num,double *uv)
269     {
270     double val;
271     switch (num)
272     {
273     case 1:
274     val=(-1+uv[0]+uv[1])*(-1+2*uv[0]+2*uv[1]);
275     break;
276     case 2:
277     val=4.*uv[0]*(1-uv[0]-uv[1]);
278     break;
279     case 3:
280     val=-uv[0]*(1.-2.*uv[0]);
281     break;
282     case 4:
283     val=4.*uv[0]*uv[1];
284     break;
285     case 5:
286     val=-uv[1]*(1-2*uv[1]);
287     break;
288     case 6:
289     val=4.*uv[1]*(1-uv[0]-uv[1]);
290     break;
291    
292     }
293     return val;
294     }
295    
296     double FEM_TRIANGLE6::get_fonction_derive_interpolation(int num,int num_variable,double *uv)
297     {
298     double val;
299    
300     switch (num)
301     {
302     case 1:
303     switch (num_variable)
304     {
305     case 1:
306 francois 612 val=-3.+4*uv[0]+4*uv[1];
307 francois 310 break;
308     case 2:
309     val=-3.+4*uv[0]+4*uv[1];
310     break;
311     } break;
312     case 2:
313     switch (num_variable)
314     {
315     case 1:
316     val=4.-8*uv[0]-4*uv[1];
317     break;
318     case 2:
319     val=-4.*uv[0];
320     break;
321     }break;
322     case 3:
323     switch (num_variable)
324     {
325     case 1:
326 francois 612 val=-1.+4*uv[0];
327 francois 310 break;
328     case 2:
329     val=0.;
330     break;
331     }break;
332     case 4:
333     switch (num_variable)
334     {
335     case 1:
336     val=4*uv[1];
337     break;
338     case 2:
339     val=4*uv[0];
340     break;
341     }break;
342     case 5:
343     switch (num_variable)
344     {
345     case 1:
346     val=0.;
347     break;
348     case 2:
349     val=-1+4.*uv[1];
350     break;
351     }break;
352     case 6:
353     switch (num_variable)
354     {
355     case 1:
356     val=-4*uv[1];
357     break;
358     case 2:
359     val=4-4*uv[0]-8*uv[1];
360     break;
361     }break;
362    
363     }
364     return val;
365     }
366    
367 francois 612
368 francois 310 double FEM_TRIANGLE6::get_jacobien(double* jac,double *uv,int& li,int& col,double unite)
369     {
370 francois 612 FEM_NOEUD* n1=get_fem_noeud(0);
371     FEM_NOEUD* n2=get_fem_noeud(1);
372     FEM_NOEUD* n3=get_fem_noeud(2);
373     FEM_NOEUD* n4=get_fem_noeud(3);
374     FEM_NOEUD* n5=get_fem_noeud(4);
375     FEM_NOEUD* n6=get_fem_noeud(5);
376    
377     double xyzn1[3],xyzn2[3],xyzn3[3],xyzn4[3],xyzn5[3],xyzn6[3];
378    
379     xyzn1[0]=n1->get_x();
380     xyzn1[1]=n1->get_y();
381     xyzn1[2]=n1->get_z();
382    
383     xyzn2[0]=n2->get_x();
384     xyzn2[1]=n2->get_y();
385     xyzn2[2]=n2->get_z();
386    
387     xyzn3[0]=n3->get_x();
388     xyzn3[1]=n3->get_y();
389     xyzn3[2]=n3->get_z();
390    
391     xyzn4[0]=n4->get_x();
392     xyzn4[1]=n4->get_y();
393     xyzn4[2]=n4->get_z();
394    
395     xyzn5[0]=n5->get_x();
396     xyzn5[1]=n5->get_y();
397     xyzn5[2]=n5->get_z();
398    
399     xyzn6[0]=n6->get_x();
400     xyzn6[1]=n6->get_y();
401     xyzn6[2]=n6->get_z();
402    
403     OT_VECTEUR_3D vec1(xyzn1,xyzn3);
404     OT_VECTEUR_3D vec3(xyzn1,xyzn5);
405     OT_VECTEUR_3D n=vec1&vec3;
406     n.norme();
407 francois 310
408 francois 612 jac[0]=get_fonction_derive_interpolation(1,1,uv)*xyzn1[0]+get_fonction_derive_interpolation(2,1,uv)*xyzn2[0]+get_fonction_derive_interpolation(3,1,uv)*xyzn3[0]+get_fonction_derive_interpolation(4,1,uv)*xyzn4[0]+get_fonction_derive_interpolation(6,1,uv)*xyzn6[0];
409     jac[1]=get_fonction_derive_interpolation(1,1,uv)*xyzn1[1]+get_fonction_derive_interpolation(2,1,uv)*xyzn2[1]+get_fonction_derive_interpolation(3,1,uv)*xyzn3[1]+get_fonction_derive_interpolation(4,1,uv)*xyzn4[1]+get_fonction_derive_interpolation(6,1,uv)*xyzn6[1];
410     jac[2]=get_fonction_derive_interpolation(1,1,uv)*xyzn1[2]+get_fonction_derive_interpolation(2,1,uv)*xyzn2[2]+get_fonction_derive_interpolation(3,1,uv)*xyzn3[2]+get_fonction_derive_interpolation(4,1,uv)*xyzn4[2]+get_fonction_derive_interpolation(6,1,uv)*xyzn6[2];
411    
412     jac[3]=get_fonction_derive_interpolation(1,2,uv)*xyzn1[0]+get_fonction_derive_interpolation(2,2,uv)*xyzn2[0]+get_fonction_derive_interpolation(4,2,uv)*xyzn4[0]+get_fonction_derive_interpolation(5,2,uv)*xyzn5[0]+get_fonction_derive_interpolation(6,2,uv)*xyzn6[0];
413     jac[4]=get_fonction_derive_interpolation(1,2,uv)*xyzn1[1]+get_fonction_derive_interpolation(2,2,uv)*xyzn2[1]+get_fonction_derive_interpolation(4,2,uv)*xyzn4[1]+get_fonction_derive_interpolation(5,2,uv)*xyzn5[1]+get_fonction_derive_interpolation(6,2,uv)*xyzn6[1];
414     jac[5]=get_fonction_derive_interpolation(1,2,uv)*xyzn1[2]+get_fonction_derive_interpolation(2,2,uv)*xyzn2[2]+get_fonction_derive_interpolation(4,2,uv)*xyzn4[2]+get_fonction_derive_interpolation(5,2,uv)*xyzn5[2]+get_fonction_derive_interpolation(6,2,uv)*xyzn6[2];
415    
416     jac[6]=n[0];
417     jac[7]=n[1];
418     jac[8]=n[2];
419    
420     double DET= jac[0]*(jac[4]*jac[8]-jac[7]*jac[5])+jac[1]*(jac[5]*jac[6]-jac[8]*jac[3])+jac[2]*(jac[3]*jac[7]-jac[6]*jac[4]);
421    
422     return DET;
423    
424 francois 310 }
425    
426     void FEM_TRIANGLE6::get_inverse_jacob(double* j,double *uv,double unite)
427     {
428 francois 612 double jac[9];
429     int lig,col;
430     double detj=this->get_jacobien(jac,uv,lig,col,unite);
431    
432     j[0] = (jac[4]*jac[8]-jac[5]*jac[7])/(detj);
433     j[1] = -(jac[1]*jac[8]-jac[2]*jac[7])/(detj);
434     j[2] =-(-jac[1]*jac[5]+jac[2]*jac[4])/(detj);
435    
436     j[3] = -(jac[1]*jac[8]-jac[5]*jac[6])/(detj);
437     j[4] = (jac[0]*jac[8]-jac[2]*jac[6])/(detj);
438     j[5] = -(jac[0]*jac[5]-jac[2]*jac[3])/(detj);
439    
440     j[6] =-(-jac[3]*jac[7]+jac[4]*jac[6])/(detj);
441     j[7] = -(jac[0]*jac[7]-jac[1]*jac[6])/(detj);
442     j[8] = (jac[0]*jac[4]-jac[1]*jac[4])/(detj);
443    
444     }
445