MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
ot_tenseur.cpp
Aller à la documentation de ce fichier.
1 //####//------------------------------------------------------------
2 //####//------------------------------------------------------------
3 //####// MAGiC
4 //####// Jean Christophe Cuilliere et Vincent FRANCOIS
5 //####// Departement de Genie Mecanique - UQTR
6 //####//------------------------------------------------------------
7 //####// MAGIC est un projet de recherche de l equipe ERICCA
8 //####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres
9 //####// http://www.uqtr.ca/ericca
10 //####// http://www.uqtr.ca/
11 //####//------------------------------------------------------------
12 //####//------------------------------------------------------------
13 //####//
14 //####// ot_tenseur.cpp
15 //####//
16 //####//------------------------------------------------------------
17 //####//------------------------------------------------------------
18 //####// COPYRIGHT 2000-2025
19 //####// Derniere modification par francois
20 //####// mer 14 mai 2025 17:54:47 EDT
21 //####//------------------------------------------------------------
22 //####//------------------------------------------------------------
23 
24 #pragma hdrstop
25 
26 #include "ot_tenseur.h"
27 
28 #include <iomanip>
29 #include <stdio.h>
30 #include <assert.h>
31 #include <math.h>
32 #include <vector>
33 
34 #pragma package(smart_init)
35 
36 
37 
38 
40 {
41  Dim1=0;
42  Dim2=0;
43  data=NULL;
44 }
45 
47 {
48  Dim1=n;
49  Dim2=n;
50  double2 zero(0.);
51  data =new double2[n*n];
52  for (int i=0;i<Dim1*Dim2;i++) data[i]=zero;
53 }
54 
56 {
57  Dim1=n;
58  Dim2=m;
59  double2 zero(0.);
60  data =new double2[n*m];
61  for (int i=0;i<Dim1*Dim2;i++) data[i]=zero;
62 }
63 
64 
65 
66 OT_TENSEUR:: OT_TENSEUR(std::vector<OT_VECTEUR_4DD>& v)
67 {
68 
69  Dim1=v.size();
70  Dim2=Dim1;
71  double2 zero=0.;
72  double2 prec=1e-6;
73  prec.set_dx(1e-8);
74  double2 c=0.5;
75  OT_VECTEUR_4DD VCT_NUL(1e-7,1e-7,1e-7,1e-7), w;
76  int Dim= Dim1*Dim2 ;
77  data=new double2[Dim];
78  for (int i=0;i<Dim1;i++)
79  {
80  OT_VECTEUR_4DD z1=v[i];
81  for (int j=0;j<Dim2;j++)
82  {
83  OT_VECTEUR_4DD z2=v[j];
84  double2 prscal=z1*z2;
85  w=z1^z2;
86  double2 wnorm=w.norme();
87  if (wnorm<prec)
88  {
89  if (prscal<zero && prscal.get_fabs()>c) prscal= -1.;
90  if (prscal>zero && prscal.get_fabs()>c) prscal= 1.;
91  if (prscal<zero && prscal.get_fabs()<c) prscal= 0.;
92  if (prscal>zero && prscal.get_fabs()<c) prscal= 0.;
93  }
94  double2 val= prscal.get_fabs();
95  if (val.get_x()<=val.get_dx()) {
96  prscal=0.;
97  prscal.set_dx(val.get_dx());
98  }
99  data[i*Dim2+j]=prscal;
100  }
101  }
102 
103 
104 }
105 
106 OT_TENSEUR::OT_TENSEUR(std::vector<OT_VECTEUR_4DD>&v1,std::vector<OT_VECTEUR_4DD>&v2)
107 {
108 
109  Dim1=v1.size();
110  Dim2=v2.size();
111  int Dim= Dim1*Dim2 ;
112  data=new double2[Dim];
113  for (int i=0;i<Dim1;i++)
114  {
115  OT_VECTEUR_4DD z1=v1[i];
116  for (int j=0;j<Dim2;j++)
117  {
118  OT_VECTEUR_4DD z2=v2[j];
119  double2 prscal=z1*z2;
120  double2 val= prscal.get_fabs();
121  if (val.get_x()<=val.get_dx()) {
122  prscal=0.;
123  prscal.set_dx(val.get_dx());
124  }
125  data[i*Dim2+j]=prscal;
126  }
127  }
128 
129 
130 }
131 
132 
134 {
135  Dim1=0;
136  Dim2=0;
137 
138  if (data!=NULL) delete [] data;
139 }
140 
141  void OT_TENSEUR::reinit(int n,int m)
142  {
143  if (data!=NULL) delete [] data;
144  Dim1=n;
145  Dim2=m;
146  double2 zero(0.);
147  data=new double2[Dim1*Dim2];
148  for (int i=0;i<Dim1*Dim2;i++) data[i]=zero;
149  }
150 
152 {
153  Dim1=ot.Dim1;
154  Dim2=ot.Dim2;
155  data=new double2[Dim1*Dim2];
156 
157  for (int i=0;i<Dim1;i++)
158  {
159  for (int j=0;j<Dim2;j++)
160  {
161  data[i*Dim2+j]=ot(i,j);
162  }
163  }
164 }
165 
166 
168 {
169 
170  if (this==&ot) return *this ;
171 
172  if (data) delete [] data;
173 
174  Dim1=ot.Dim1;
175  Dim2=ot.Dim2;
176  data=new double2[Dim1*Dim2];
177 
178  for (int i=0;i<Dim1;i++) {
179  for (int j=0;j<Dim2;j++) {
180  data[i*Dim2+j]=ot.data[i*Dim2+j];
181  }
182  }
183 
184 
185  return *this;
186 }
187 
189 {
190  if (t1.Get_NbRows()!=t2.Get_NbRows()||t1.Get_NbCols()!=t2.Get_NbCols()) return 0;
191  else {
192  for (int i=0;i<t1.Get_NbRows();i++)
193  {
194  for (int j=0;j<t1.Get_NbCols();j++)
195  {
196  double2 val1=t1(i,j);
197  double2 val2=t2(i,j);
198  if (val1==val2) continue;
199  else return 0;
200  }
201 
202  }
203  }
204  return 1;
205 }
206 
208 {
209  double2 un(1.0);
210  for (int i=0;i<Dim1;i++)
211  data[i*Dim2+i]=un;
212 }
213 
214 
215 
217 {
218  assert(i<Dim1&&j<Dim2);
219  double2 prciseion=0.0;
220  if (data[i*Dim2+j].get_fabs()<=prciseion)
221  {
222  data[i*Dim2+j]=0.;
223 
224  }
225  return data[i*Dim2+j];
226 }
227 
228 
229 
231 {
232  assert(i<Dim1&&j<Dim2);
233  double2 prciseion=0.0;
234  if (data[i*Dim2+j].get_fabs()<=prciseion)
235  {
236  data[i*Dim2+j]=0.;
237 
238  }
239  return data[i*Dim2+j];
240 }
241 
242 
243 
245 {
246  return Dim1;
247 }
248 
249 
250 
252 {
253  return Dim2;
254 }
255 
256 
257 
259 {
260 
261  if (Dim1!=tns.Get_NbRows()||Dim2!=tns.Get_NbCols()) return 0;
262  std::vector<int> check;
263 
264  for (int i=0;i<tns.Get_NbRows();i++)
265  {
266 
267  std::vector<double2> lig1;
268  for (int ix1=0;ix1<Dim2;ix1++) lig1.insert(lig1.end(),data[i*Dim2+ix1]);
269 
270  for (int j=0;j<Dim2;j++)
271  {
272  int p=-1;
273  if (!existe(check,j,p))
274  {
275  std::vector<int>trouve;
276  std::vector<double2>valeur;
277  std::vector<double2> lig2;
278  for (int ix2=0;ix2<Dim2;ix2++) lig2.insert(lig2.end(),tns(j,ix2));
279  for (int r=0;r<Dim2;r++)
280  {
281  double2 val=lig1[r];
282  val=val.get_fabs();
283 
284  int indx1=-1;
285 
286  for (int s=0;s<Dim2;s++)
287  {
288  int pos1;
289  double2 vall=lig2[s];
290  vall=vall.get_fabs();
291 
292  if (val==vall&&!existe(trouve,s,indx1))
293  {
294  trouve.insert(trouve.end(),s);
295  valeur.insert(valeur.end(),val);
296  break;
297  }
298 
299  }
300 
301  }
302  int t_trouve=trouve.size();
303  if (t_trouve==Dim2)
304  {
305  check.insert(check.end(),j);
306  break;
307 
308  }
309 
310  }
311  }
312  continue;
313  }
314  int t_chek=check.size();
315  if (t_chek==Dim1)return 1;
316  else return 0;
317 
318 }
319 
320 
321 
322 template <class T> int OT_TENSEUR:: existe(const std::vector<T>& vct,T val,int& idx)
323 {
324 
325  if (val<0) val=-val;
326  for (unsigned int i=0;i<vct.size();i++)
327  {
328  double x=vct[i];
329  if (x<0) val=-val;
330  if (x==val) {
331  idx=i;
332  return 1;
333  }
334  }
335  idx=-1;
336  return 0;
337 }
338 
339 
341 {
342  assert (ot1.Get_NbRows()==ot2.Get_NbRows()&&ot1.Get_NbCols()==ot2.Get_NbCols());
343  OT_TENSEUR res(ot1.Get_NbRows(),ot1.Get_NbCols());
344  for (int i=0;i<ot1.Get_NbRows();i++)
345  {
346  for (int j=0;j<ot2.Get_NbCols();j++)
347  {
348  res(i,j)=ot1(i,j)+ot2(i,j);
349  }
350  }
351 
352  return res;
353 }
354 
355 
356 std::vector<double2> operator*( OT_TENSEUR& ot1, std::vector<double2>& v)
357 {
358  assert (ot1.Get_NbCols()==v.size());
359  std::vector<double2> res(ot1.Get_NbCols());
360  for (int i=0;i<ot1.Get_NbRows();i++)
361  {
362  res[i]=double2(0.0);
363  for (int j=0;j<ot1.Get_NbCols();j++)
364  {
365  res[i]=res[i]+ot1(i,j)+v[j];
366  }
367  }
368 
369  return res;
370 
371 
372 }
373 
375 {
376  OT_TENSEUR T=ot;
377  for (int i=0;i<ot.Get_NbRows();i++)
378  for (int j=0;j<ot.Get_NbCols();j++)
379 
380  T(i,j)=coef*T(i,j);
381 
382  return T;
383 
384 }
385 
387 {
388  return coef*ot;
389 }
390 
391 OT_TENSEUR operator*( double& coef, OT_TENSEUR& ot)
392 {
393  double2 coef2(coef);
394  return coef2*ot;
395 
396 }
397 
398 OT_TENSEUR operator*(OT_TENSEUR& ot , double& coef)
399 {
400  double2 coef2(coef);
401  return coef2*ot;
402 }
404 {
405  OT_TENSEUR TMP(4,4);
406  if (Dim1!=4) return TMP;
407  if (Dim2!=4) return TMP;
408  double2 zero(0.);
409  double2 un(1.);
410  OT_VECTEUR_4DD x1((*this)(0,0),(*this)(1,0),(*this)(2,0),zero);
411  OT_VECTEUR_4DD x2((*this)(0,1),(*this)(1,1),(*this)(2,1),zero);
412  OT_VECTEUR_4DD x3((*this)(0,2),(*this)(1,2),(*this)(2,2),zero);
413  OT_VECTEUR_4DD x4((*this)(0,3)/(*this)(3,3),(*this)(1,3)/(*this)(3,3),(*this)(2,3)/(*this)(3,3),un);
414  TMP(0,0)=(*this)(0,0);
415  TMP(1,0)=(*this)(0,1);
416  TMP(2,0)=(*this)(0,2);
417  TMP(3,0)=zero;
418  TMP(0,1)=(*this)(1,0);
419  TMP(1,1)=(*this)(1,1);
420  TMP(2,1)=(*this)(1,2);
421  TMP(3,1)=zero;
422  TMP(0,2)=(*this)(2,0);
423  TMP(1,2)=(*this)(2,1);
424  TMP(2,2)=(*this)(2,2);
425  TMP(3,2)=zero;
426  TMP(0,3)=zero-x4*x1;
427  TMP(1,3)=zero-x4*x2;
428  TMP(2,3)=zero-x4*x3;
429  TMP(3,3)=un;
430  return TMP;
431 }
432 
434 {
435 double2 zero(0.),eps(1e-14),un(1.);
436 OT_TENSEUR tnul;
437 if (Dim1!=Dim2) return tnul;
438 int n=Dim1;
439 OT_TENSEUR tinv(n,n);
440 for (int i=0;i<n;i++)
441  for (int j=0;j<n;j++)
442  tinv(i,j)=(*this)(i,j);
443 double2 pd=un;
444 for (int l=0;l<n;l++)
445  {
446  double2 dd=zero;
447  for (int k=0;k<n;k++)
448  dd=dd+tinv(l,k)*tinv(l,k);
449  dd=sqrt(dd);
450  pd=pd*dd;
451  }
452 
453 std::vector<int> j(10000);
454 double2 detm=1.0;
455 for (int l=0;l<n;l++)
456  j[l+20+n]=l;
457 for (int l=0;l<n;l++)
458  {
459  double2 cc=0.;
460  int m=l;
461  for (int k=l;k<n;k++)
462  if (f2abs(cc)-f2abs(tinv(l,k))<zero)
463  {
464  m=k;
465  cc=tinv(l,k);
466 
467  }
468  if (l!=m)
469  {
470  int k=j[m+20+n];
471  j[m+20+n]=j[l+20+n];
472  j[l+20+n]=k;
473  for (int k=0;k<n;k++)
474  {
475  double2 s=tinv(k,l);
476  tinv(k,l)=tinv(k,m);
477  tinv(k,m)=s;
478  }
479  }
480  tinv(l,l)=1.;
481  detm=detm*cc;
482  for (int m=0;m<n;m++)
483  tinv(l,m)=tinv(l,m)/cc;
484  for (int m=0;m<n;m++)
485  if (l!=m)
486  {
487  cc=tinv(m,l);
488  if (f2abs(cc)>eps)
489  {
490  tinv(m,l)=zero;
491  for (int k=0;k<n;k++)
492  tinv(m,k)=tinv(m,k)-cc*tinv(l,k);
493  }
494  }
495 
496  }
497 for (int l=0;l<n;l++)
498  if (j[l+20+n]!=l)
499  {
500  int m=l;
501  int ok;
502  do
503  {
504  ok=1;
505  m++;
506  if (j[m+20+n]!=l)
507  if (n>m) ok=0;
508 
509  }
510  while (ok==0);
511  j[m+20+n]=j[l+20+n];
512  for (int k=0;k<n;k++)
513  {
514  double2 cc=tinv(l,k);
515  tinv(l,k)=tinv(m,k);
516  tinv(m,k)=cc;
517  }
518  j[l+20+n]=l;
519 
520 
521  }
522 return tinv;
523 }
524 
526 {
527  OT_TENSEUR TMP(Dim2,Dim1);
528  for (int i=0;i<Dim1;i++) {
529  for (int j=0;j<Dim2;j++)
530  {
531  TMP(j,i)=(*this)(i,j); // ot(i,j);
532  }
533  }
534  return TMP;
535 }
536 
537 
539 {
540  int dim1=ot1.Get_NbRows();
541  int dim3= ot1.Get_NbCols();
542  int dim2=ot2.Get_NbCols();
543  OT_TENSEUR TMP (dim1,dim2);
544 
545  for (int i=0;i<dim1;i++)
546  {
547  for (int j=0;j<dim2;j++)
548  {
549  for (int k=0;k<dim3;k++)
550  TMP(i,j)=TMP(i,j)+ot1(i,k)*ot2(k,j);
551  }
552  }
553  return TMP;
554 }
555 
557 {
558  int dim11=ot1.Get_NbRows();
559  int dim12= ot1.Get_NbCols();
560  int dim21=ot2.Get_NbRows();
561  int dim22=ot2.Get_NbCols();
562  if (dim11!=dim21) return 0.;
563  if (dim12!=dim22) return 0.;
564  double2 res=0.;
565 
566  for (int i=0;i<dim11;i++)
567  for (int j=0;j<dim12;j++)
568  res=res+ot1(i,j)*ot2(i,j);
569 return res;
570 }
571 
573 {
574  OT_VECTEUR_4DD TMP(0.,0.,0.,0.);
575  if (ot1.Get_NbRows()!=4) return TMP;
576  if (ot1.Get_NbCols()!=4) return TMP;
577  for (int i=0;i<4;i++)
578  {
579  TMP[i]=TMP[i]+ot1(i,0)*ot2[0]+ot1(i,1)*ot2[1]+ot1(i,2)*ot2[2]+ot1(i,3)*ot2[3];
580  }
581  return TMP;
582 }
583 
585 {
586  OT_VECTEUR_3DD TMP(0.,0.,0.);
587  if (ot1.Get_NbRows()!=3) return TMP;
588  if (ot1.Get_NbCols()!=3) return TMP;
589  for (int i=0;i<3;i++)
590  {
591  TMP[i]=TMP[i]+ot1(i,0)*ot2[0]+ot1(i,1)*ot2[1]+ot1(i,2)*ot2[2];
592  }
593  return TMP;
594 }
595 
596 std::ostream& operator<<(std::ostream& os, OT_TENSEUR& tns) {
597  os<<"------------------------------------------------------------------------------------"<<std::endl;
598  os<<"# TENSEUR: DIM1= "<< tns.Get_NbRows()<<" , DIM2: "<<tns.Get_NbCols()<<" #"<<std::endl;
599  os<<"------------------------------------------------------------------------------------"<<std::endl;
600  for (int i=0;i<tns.Get_NbRows();i++) {
601  for (int j=0;j<tns.Get_NbCols();j++) {
602  os<<std::setw(18)<<tns(i,j);
603  }
604  os<<std::endl;
605  }
606  os<<"------------------------------------------------------------------------------------"<<std::endl;
607  return os;
608 }
609 
610 
611 
613 {
614 
615  static const int ITMAX=50;
616  double2 zro=0.0;
617  int n1=n-1,n2=1/(n*n),ip1,iq1;// ,ip,j,i,iq// n=3,
618  double2 tresh,theta,tau,t,sm,s,h,g,c;
619  double2 *b=new double2[n]; // OT_VECTEUR_3D b,z;
620  double2 *z=new double2[n];
621 
622  for (int ip=0;ip<n;ip++)
623  {
624  for (int iq=0;iq<n;iq++)
625  //v[ip*n+iq]=0.0;
626  v(ip,iq)=0.0;
627  v(ip,ip)=1.0;
628  b[(unsigned int)ip]=d[(unsigned int)ip]=a(ip,ip);
629  z[(unsigned int)ip]=0.0;
630  }
631  nrot=0;
632  for (int i=1;i<=ITMAX;i++)
633  {
634  sm=0.0;
635  for (int ip=0;ip<n1;ip++)
636  for (int iq=ip+1;iq<n;iq++)
637  sm =sm+(a(ip,iq)).get_fabs();
638  if (sm==zro)
639  return;
640  if (i<4)
641  tresh=0.2*sm*n2;
642  else
643  tresh=0.0;
644  for (int ip=0;ip<n1;ip++)
645  for (int iq=ip+1;iq<n;iq++)
646  {
647  g=100*(a(ip,iq)).get_fabs();
648  if (i>4&&((d[(unsigned int)ip]+g).get_fabs()==d[(unsigned int)ip].get_fabs())&&((d[(unsigned int)iq])+g).get_fabs()==d[(unsigned int)iq].get_fabs())
649  a(ip,iq)=0.0;
650  else if ((a(ip,iq)).get_fabs()>tresh)
651  {
652  h=d[(unsigned int)iq]-d[(unsigned int)ip];
653  if (((h).get_fabs()+g)==(h).get_fabs())
654  t=a(ip,iq)/h;
655  else
656  {
657  theta=0.5*h/a(ip,iq);
658  t=1.0/((theta).get_fabs()+sqrt(1.0+theta*theta));
659  if (theta<zro)t=zro-t;
660  }
661  c=1.0/sqrt(1+t*t);
662  s=t*c;
663  tau=s/(1.0+c);
664  h=t*a(ip,iq);
665  z[(unsigned int)ip]=z[(unsigned int)ip]-h;
666  z[(unsigned int)iq]=z[(unsigned int)iq]+h;
667  d[(unsigned int)ip]=d[(unsigned int)ip]-h;
668  d[(unsigned int)iq]=d[(unsigned int)iq]+h;
669  a(ip,iq)=0.0;
670  ip1=ip-1;
671  iq1=iq-1;
672  for (int j=0;j<=ip1;j++)
673  {
674  g=a(j,ip);
675  h=a(j,iq);
676  a(j,ip)=g-s*(h+g*tau);
677  a(j,iq)=h+s*(g-h*tau);
678  }
679  for (int j=ip+1;j<=iq1;j++)
680  {
681  g=a(ip,j);
682  h=a(j,iq);
683  a(ip,j)=g-s*(h+g*tau);
684  a(j,iq)=h+s*(g-h*tau);
685  }
686  for (int j=iq+1;j<n;j++)
687  {
688  g=a(ip,j);
689  h=a(iq,j);
690  a(ip,j)=g-s*(h+g*tau);
691  a(iq,j)=h+s*(g-h*tau);
692  }
693  for (int j=0;j<n;j++)
694  {
695  g=v(j,ip);
696  h=v(j,iq);
697  v(j,ip)=g-s*(h+g*tau);
698  v(j,iq)=h+s*(g-h*tau);
699  }
700  ++nrot;
701  }
702  }
703  for (int ip=0;ip<n;ip++)
704  {
705  b[(unsigned int)ip]=b[(unsigned int)ip]+z[(unsigned int)ip];
706  d[(unsigned int)ip]=b[(unsigned int)ip];
707  z[(unsigned int)ip]=0.0;
708  }
709  }
710 
711 
712  delete [] b;
713  delete [] z;
714 
715 }
716 
717 
718 
719 
720 int OT_TENSEUR::listes_equivalentes(std::vector<double2>& list1,std::vector<double2>& list2,std::vector<unsigned int>& indx)
721 
722 {
723  int compt=0;
724  int pos=-1;
725  int exist=0;
726  for (int i=0;i<list1.size();i++)
727  {
728  double2 val1=list1[i];
729  double prc=1e-3;
730  double prcc;
731  if (pos==-1)
732  {
733  for (int k=0;k< list2.size();k++)
734  {
735  double2 val2=list2[k];
736  prcc =val2.get_x()-val1.get_x();
737  if (fabs(val2.get_x())>val2.get_dx())
738  prcc =prcc/val2.get_x();
739  if ( fabs(prcc)<prc) {
740  indx.insert(indx.end(),k);
741  pos=k;
742  compt++;
743  break;
744  }
745  }
746  }
747 
748 
749  else {
750  for ( int r=0;r<list2.size();r++)
751  {
752  double2 vval2=list2[r];
753  for (int j=0;j<indx.size();j++)
754  {
755  exist=0;
756  if (r==indx[j])
757  {
758  exist=1;
759  break;
760  }
761  }
762 
763  prcc =vval2.get_x()-val1.get_x();
764  if (fabs(vval2.get_x())>vval2.get_dx())
765  prcc =prcc/vval2.get_x();
766 
767  if (fabs(prcc)<prc&&!exist) // vval2==val1
768  {
769  indx.insert(indx.end(),r);
770  pos=r;
771  compt++;
772  break;
773  }
774 
775  }
776  }
777  }
778 
779  if (compt==list1.size())return 1;
780  else return 0;
781 
782 
783 }
784 
785 
786 
787 
788 
789 
operator<<
std::ostream & operator<<(std::ostream &os, OT_TENSEUR &tns)
Definition: ot_tenseur.cpp:596
OT_TENSEUR::Dim2
int Dim2
Definition: ot_tenseur.h:85
OT_TENSEUR::Dim1
int Dim1
Definition: ot_tenseur.h:84
OT_TENSEUR::get_orthogonalisation
virtual void get_orthogonalisation(OT_TENSEUR &a, OT_VECTEUR_4DD &d, OT_TENSEUR &v, int n, int &nrot)
Definition: ot_tenseur.cpp:612
OT_TENSEUR::inverse
virtual OT_TENSEUR inverse(void)
Definition: ot_tenseur.cpp:433
OT_TENSEUR::transpose
virtual OT_TENSEUR transpose()
Definition: ot_tenseur.cpp:525
f2abs
double2 f2abs(double2 &val)
Definition: ot_doubleprecision.cpp:267
a
#define a(i, j)
double2::get_dx
double get_dx()
Definition: ot_doubleprecision.cpp:373
double2::get_x
double get_x()
Definition: ot_doubleprecision.cpp:367
OT_TENSEUR::identite
void identite(void)
Definition: ot_tenseur.cpp:207
double2
Definition: ot_doubleprecision.h:29
OT_TENSEUR::data
double2 * data
Definition: ot_tenseur.h:83
OT_TENSEUR
Definition: ot_tenseur.h:41
OT_VECTEUR_3DD
Definition: ot_mathematique.h:350
OT_TENSEUR::existe
int existe(const std::vector< T > &vct, T val, int &idx)
Definition: ot_tenseur.cpp:322
OT_TENSEUR::Get_NbCols
int Get_NbCols() const
Definition: ot_tenseur.cpp:251
double2::get_fabs
double2 get_fabs()
Definition: ot_doubleprecision.cpp:259
OT_TENSEUR::reinit
void reinit(int n, int m)
Definition: ot_tenseur.cpp:141
OT_TENSEUR::est_til_equivalent
virtual int est_til_equivalent(OT_TENSEUR &tns)
Definition: ot_tenseur.cpp:258
OT_TENSEUR::operator()
double2 & operator()(int i, int j)
Definition: ot_tenseur.cpp:216
OT_TENSEUR::listes_equivalentes
int listes_equivalentes(std::vector< double2 > &list1, std::vector< double2 > &list2, std::vector< unsigned int > &indx)
Definition: ot_tenseur.cpp:720
ot_tenseur.h
sqrt
double2 sqrt(double2 &val)
Definition: ot_doubleprecision.cpp:345
OT_TENSEUR::inverse_homogene
virtual OT_TENSEUR inverse_homogene(void)
Definition: ot_tenseur.cpp:403
operator%
double2 operator%(OT_TENSEUR &ot1, OT_TENSEUR &ot2)
Definition: ot_tenseur.cpp:556
double2::set_dx
void set_dx(double ddx)
Definition: ot_doubleprecision.cpp:380
operator==
int operator==(OT_TENSEUR &t1, OT_TENSEUR &t2)
Definition: ot_tenseur.cpp:188
OT_TENSEUR::~OT_TENSEUR
virtual ~OT_TENSEUR()
Definition: ot_tenseur.cpp:133
operator*
std::vector< double2 > operator*(OT_TENSEUR &ot1, std::vector< double2 > &v)
Definition: ot_tenseur.cpp:356
OT_TENSEUR::Get_NbRows
int Get_NbRows() const
Definition: ot_tenseur.cpp:244
res
#define res(i, j)
idx
#define idx(i, j)
OT_TENSEUR::OT_TENSEUR
OT_TENSEUR()
Definition: ot_tenseur.cpp:39
operator+
OT_TENSEUR operator+(OT_TENSEUR &ot1, OT_TENSEUR &ot2)
Definition: ot_tenseur.cpp:340
OT_VECTEUR_4DD::norme
double2 norme()
Definition: ot_mathematique.cpp:1395
OT_VECTEUR_4DD
Definition: ot_mathematique.h:284
OT_TENSEUR::operator=
OT_TENSEUR & operator=(const OT_TENSEUR &ot)
Definition: ot_tenseur.cpp:167
m
#define m(i, j)