Changeset 2981
- Timestamp:
- 02/08/10 12:17:27 (15 years ago)
- Location:
- issm/trunk/src/c/Bamgx
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Bamgx/Bamgx.cpp
r2942 r2981 83 83 if (verbosity>1) printf(" Generating Metric...\n"); 84 84 for(i=0;i<Gh.nbv;i++){ 85 Metric AnIsoM=Gh[i];85 Metric M=Gh[i]; 86 86 MatVVP2x2 Vp(M/coef); 87 87 Vp.Maxh(hmax); -
issm/trunk/src/c/Bamgx/Mesh2.h
r2970 r2981 23 23 namespace bamg { 24 24 25 const double Pi = 3.14159265358979323846264338328; 26 const float fPi = 3.14159265358979323846264338328; 27 28 extern int hinterpole; 25 //Some parameters 26 const double Pi =3.141592653589793238462643383279502884197169399375105820974944592308; 27 const float fPi=3.141592653589793238462643383279502884197169399375105820974944592308; 29 28 30 29 inline int BinaryRand(){ … … 37 36 } 38 37 38 //typedef 39 39 typedef P2<Icoor1,Icoor2> I2; 40 typedef P2xP2<Int2,Int4> I2xI2;41 typedef P2<Real8,Real8> R2;42 typedef P2<Real4,Real8> R2xR2;40 typedef P2xP2<Int2,Int4> I2xI2; 41 typedef P2<Real8,Real8> R2; 42 typedef P2<Real4,Real8> R2xR2; 43 43 } 44 44 -
issm/trunk/src/c/Bamgx/Metric.h
r2933 r2981 1 1 #ifndef TYPEMETRIX 2 #define TYPEMETRIX Metric AnIso2 #define TYPEMETRIX Metric 3 3 #endif 4 4 … … 9 9 typedef P2xP2<double,double> D2xD2; 10 10 11 class MetricAnIso;11 class Metric; 12 12 class MatVVP2x2; 13 class MetricIso;14 15 typedef TYPEMETRIX Metric;16 13 17 14 18 class MetricIso{ 19 friend class MatVVP2x2; 20 Real4 h; 21 public: 22 MetricIso(Real4 a): h(a){} 23 MetricIso(const MetricAnIso M);// {MatVVP2x2 vp(M);h=1/sqrt(Max(vp.lambda1,vp.lambda2));} 24 MetricIso(Real8 a11,Real8 a21,Real8 a22);// {*this=MetricAnIso(a11,a21,a22));} 25 MetricIso(): h(1) {}; // 26 MetricIso(const Real8 a[3],const MetricIso m0, 27 const MetricIso m1,const MetricIso m2 ) 28 : h(hinterpole 29 ? (a[0]*m0.h+a[1]*m1.h+a[2]*m2.h) 30 : 1/sqrt(a[0]/(m0.h*m0.h)+a[1]/(m1.h*m1.h)+a[2]/(m2.h*m2.h))) {} 31 MetricIso(const Real8 a,const MetricIso ma, 32 const Real8 b,const MetricIso mb) 33 : h(hinterpole 34 ? a*ma.h+b*mb.h 35 :1/sqrt(a/(ma.h*ma.h)+b/(mb.h*mb.h))) {} 36 R2 Orthogonal(const R2 A)const {return R2(-h*A.y,h*A.x);} 37 R2 Orthogonal(const I2 A)const {return R2(-h*A.y,h*A.x);} 38 // D2 Orthogonal(const D2 A)const {return D2(-h*A.y,h*A.x);} 39 Real8 operator()(R2 x) const { return sqrt((x,x))/h;}; 40 Real8 operator()(R2 x,R2 y) const { return ((x,y))/(h*h);}; 41 int IntersectWith(MetricIso M) {int change=0;if (M.h<h) change=1,h=M.h;return change;} 42 MetricIso operator*(Real8 c) const {return MetricIso(h/c);} 43 MetricIso operator/(Real8 c) const {return MetricIso(h*c);} 44 Real8 det() const {return 1./(h*h*h*h);} 45 operator D2xD2(){ return D2xD2(1/(h*h),0.,0.,1/(h*h));} 46 void Box(Real4 & hx,Real4 & hy) { hx=h,hy=h;} 47 }; 48 49 50 class MetricAnIso{ public: 15 class Metric{ public: 51 16 friend class MatVVP2x2; 52 17 Real8 a11,a21,a22; 53 Metric AnIso(Real8 a): a11(1/(a*a)),a21(0),a22(1/(a*a)){}54 Metric AnIso(Real8 a,Real8 b,Real8 c) :a11(a),a21(b),a22(c){}55 Metric AnIso() {}; //56 Metric AnIso(const Real8 a[3],const MetricAnIsom0,57 const Metric AnIso m1,const MetricAnIsom2 );18 Metric(Real8 a): a11(1/(a*a)),a21(0),a22(1/(a*a)){} 19 Metric(Real8 a,Real8 b,Real8 c) :a11(a),a21(b),a22(c){} 20 Metric() {}; // 21 Metric(const Real8 a[3],const Metric m0, 22 const Metric m1,const Metric m2 ); 58 23 R2 mul(const R2 x)const {return R2(a11*x.x+a21*x.y,a21*x.x+a22*x.y);} 59 24 Real8 det() const {return a11*a22-a21*a21;} … … 61 26 R2 Orthogonal(const I2 x){return R2(-(a21*x.x+a22*x.y),a11*x.x+a21*x.y);} 62 27 // D2 Orthogonal(const D2 x){return D2(-(a21*x.x+a22*x.y),a11*x.x+a21*x.y);} 63 Metric AnIso( Real8 a,const MetricAnIsoma,64 Real8 b,const Metric AnIsomb);65 int IntersectWith(const Metric AnIsoM2);66 Metric AnIso operator*(Real8 c) const {Real8 c2=c*c;return MetricAnIso(a11*c2,a21*c2,a22*c2);}67 Metric AnIso operator/(Real8 c) const {Real8 c2=1/(c*c);return MetricAnIso(a11*c2,a21*c2,a22*c2);}28 Metric( Real8 a,const Metric ma, 29 Real8 b,const Metric mb); 30 int IntersectWith(const Metric M2); 31 Metric operator*(Real8 c) const {Real8 c2=c*c;return Metric(a11*c2,a21*c2,a22*c2);} 32 Metric operator/(Real8 c) const {Real8 c2=1/(c*c);return Metric(a11*c2,a21*c2,a22*c2);} 68 33 operator D2xD2(){ return D2xD2(a11,a21,a21,a22);} 69 34 … … 72 37 Real8 operator()(R2 x,R2 y) const { return x.x*y.x*a11+(x.x*x.y+x.y*y.x)*a21+x.y*y.y*a22;}; 73 38 inline void Box(Real4 &hx,Real4 &hy) const ; 74 Metric AnIso(const MatVVP2x2);39 Metric(const MatVVP2x2); 75 40 void Echo(); 76 41 }; 77 42 78 43 class MatVVP2x2{ 79 friend class MetricAnIso; 80 friend class MetricIso; 44 friend class Metric; 81 45 public: 82 46 double lambda1,lambda2; … … 94 58 void Maxh(double h) {Max(1.0/(h*h));} 95 59 void Isotrope() {lambda1=lambda2=bamg::Max(lambda1,lambda2);} 96 MatVVP2x2(const MetricAnIso ); 97 MatVVP2x2(const MetricIso M) : lambda1(1/(M.h*M.h)),lambda2(1/(M.h*M.h)),v(1,0) {} 60 MatVVP2x2(const Metric ); 98 61 Real8 hmin() const {return sqrt(1/bamg::Max3(lambda1,lambda2,1e-30));} 99 62 Real8 hmax() const {return sqrt(1/bamg::Max(bamg::Min(lambda1,lambda2),1e-30));} … … 122 85 } 123 86 124 void SimultaneousMatrixReduction( Metric AnIso M1, MetricAnIsoM2,D2xD2 &V);87 void SimultaneousMatrixReduction( Metric M1, Metric M2,D2xD2 &V); 125 88 126 inline Metric AnIso::MetricAnIso(const MatVVP2x2 M) {89 inline Metric::Metric(const MatVVP2x2 M) { 127 90 // recompose M in: M = V^t lambda V 128 91 // V = ( v,v^\perp) … … 136 99 } 137 100 138 inline void Metric AnIso::Box(Real4 &hx,Real4 &hy) const {101 inline void Metric::Box(Real4 &hx,Real4 &hy) const { 139 102 Real8 d= a11*a22-a21*a21; 140 103 hx = sqrt(a22/d); … … 142 105 } 143 106 144 inline MetricIso::MetricIso(const MetricAnIso M)145 {MatVVP2x2 vp(M);h=1/sqrt(Max(vp.lambda1,vp.lambda2));}146 147 inline MetricIso::MetricIso(Real8 a11,Real8 a21,Real8 a22)148 {MatVVP2x2 vp(MetricAnIso(a11,a21,a22));h=1/sqrt(Max(vp.lambda1,vp.lambda2));}149 150 151 152 107 class SaveMetricInterpole { 153 friend Real8 LengthInterpole(const Metric AnIso ,const MetricAnIso, R2 );154 friend Real8 abscisseInterpole(const Metric AnIso ,const MetricAnIso, R2 ,Real8 ,int );108 friend Real8 LengthInterpole(const Metric ,const Metric , R2 ); 109 friend Real8 abscisseInterpole(const Metric ,const Metric , R2 ,Real8 ,int ); 155 110 int opt; 156 111 Real8 lab; … … 160 115 extern SaveMetricInterpole LastMetricInterpole; // for optimization 161 116 162 Real8 LengthInterpole(const Metric AnIso Ma,const MetricAnIsoMb, R2 AB);163 Real8 abscisseInterpole(const Metric AnIso Ma,const MetricAnIsoMb, R2 AB,Real8 s,int optim=0);117 Real8 LengthInterpole(const Metric Ma,const Metric Mb, R2 AB); 118 Real8 abscisseInterpole(const Metric Ma,const Metric Mb, R2 AB,Real8 s,int optim=0); 164 119 165 120 inline Real8 LengthInterpole(Real8 la,Real8 lb) -
issm/trunk/src/c/Bamgx/QuadTree.h
r2980 r2981 6 6 7 7 const int MaxDeep = 30; 8 typedef longIntQuad;8 typedef long IntQuad; 9 9 //long int 1, bitwise operation: 8L = 00001000 << 2L -> 00100000 shifted left by 2 10 10 const IntQuad MaxISize = ( 1L << MaxDeep); … … 16 16 public: 17 17 long n; 18 //contains only one object form the list (either Vertex or QuadTreeBox) 19 // if n < 4 => Vertex else => QuadTreeBox; 18 20 union{ 19 //contains only one object form the list (either Vertex or QuadTreeBox)20 // if n < 4 => Vertex else => QuadTreeBox;21 21 QuadTreeBox* b[4]; 22 22 Vertex* v[4]; 23 23 }; 24 }; // end class24 }; 25 25 class StorageQuadTreeBox { 26 26 public: … … 34 34 } 35 35 long SizeOf() const {return len*sizeof(QuadTreeBox)+sizeof(StorageQuadTreeBox)+ (n?n->SizeOf():0);} 36 }; // end class36 }; 37 37 StorageQuadTreeBox* sb; 38 long lenStorageQuadTreeBox;38 long lenStorageQuadTreeBox; 39 39 40 40 public: 41 42 //fields 41 43 QuadTreeBox* root; 42 Triangles* th; 43 long NbQuadTreeBox,NbVertices; 44 long NbQuadTreeBoxSearch,NbVerticesSearch; 44 Triangles* th; 45 46 //functions 47 ~QuadTree(); 48 QuadTree(Triangles * t,long nbv=-1); 49 QuadTree(); 50 long NbQuadTreeBox,NbVertices; 51 long NbQuadTreeBoxSearch,NbVerticesSearch; 45 52 Vertex* NearestVertex(Icoor1 i,Icoor1 j); 46 Vertex* 53 Vertex* NearestVertexWithNormal(Icoor1 i,Icoor1 j); 47 54 Vertex* ToClose(Vertex & ,Real8 ,Icoor1,Icoor1); 48 long SizeOf() const {return sizeof(QuadTree)+sb->SizeOf();}49 void Add( Vertex & w);55 long SizeOf() const {return sizeof(QuadTree)+sb->SizeOf();} 56 void Add( Vertex & w); 50 57 QuadTreeBox* NewQuadTreeBox(){ 51 58 if(! (sb->bc<sb->be)) sb=new StorageQuadTreeBox(lenStorageQuadTreeBox,sb); … … 54 61 return sb->bc++; 55 62 } 56 ~QuadTree();57 QuadTree(Triangles * t,long nbv=-1);58 QuadTree();59 63 }; 60 64 } -
issm/trunk/src/c/Bamgx/R2.h
r2932 r2981 1 1 namespace bamg { 2 2 3 template <class R,class RR> class P2xP2; 3 4 4 template <class R,class RR> 5 5 class P2 { … … 15 15 P2 (R a,R b) :x(a),y(b) {} 16 16 P2 (P2 A,P2 B) : x(B.x-A.x),y(B.y-A.y) {} 17 P2<R,RR> operator+(const P2<R,RR> & cc) const {return P2<R,RR>(x+cc.x,y+cc.y);}18 P2<R,RR> operator-(const P2<R,RR> & cc) const {return P2<R,RR>(x-cc.x,y-cc.y);}19 P2<R,RR> operator-() const{return P2<R,RR>(-x,-y);}20 RR operator,(const P2<R,RR> & cc) const {return (RR) x* (RR) cc.x+(RR) y* (RR) cc.y;} // produit scalaire21 P2<R,RR> 22 P2<R,RR> 23 P2<R,RR> 24 P2<R,RR> 25 P2<R,RR> 26 P2<R,RR> 17 RR operator,(const P2<R,RR> & cc) const {return (RR) x* (RR) cc.x+(RR) y* (RR) cc.y;} //scalar product 18 P2<R,RR> operator+(const P2<R,RR> & cc) const {return P2<R,RR>(x+cc.x,y+cc.y);} 19 P2<R,RR> operator-(const P2<R,RR> & cc) const {return P2<R,RR>(x-cc.x,y-cc.y);} 20 P2<R,RR> operator-() const{return P2<R,RR>(-x,-y);} 21 P2<R,RR> operator*(R cc) const {return P2<R,RR>(x*cc,y*cc);} 22 P2<R,RR> operator/(R cc) const {return P2<R,RR>(x/cc,y/cc);} 23 P2<R,RR> operator+=(const P2<R,RR> & cc) {x += cc.x;y += cc.y;return *this;} 24 P2<R,RR> operator/=(const R r) {x /= r;y /= r;return *this;} 25 P2<R,RR> operator*=(const R r) {x *= r;y *= r;return *this;} 26 P2<R,RR> operator-=(const P2<R,RR> & cc) {x -= cc.x;y -= cc.y;return *this;} 27 27 }; 28 28 29 29 template <class R,class RR> 30 class P2xP2 { // x ligne 1 y ligne2 31 32 friend P2<R,RR> operator*(P2<R,RR> c,P2xP2<R,RR> cc) 33 {return P2<R,RR>(c.x*cc.x.x + c.y*cc.y.x, c.x*cc.x.y + c.y*cc.y.y);} 34 35 30 class P2xP2 { 31 friend P2<R,RR> operator*(P2<R,RR> c,P2xP2<R,RR> cc){ 32 return P2<R,RR>(c.x*cc.x.x + c.y*cc.y.x, c.x*cc.x.y + c.y*cc.y.y); 33 } 36 34 public: 37 35 P2<R,RR> x,y; 36 37 //functions 38 38 void Echo(){ 39 39 printf("Member of P2xP2:\n"); … … 45 45 P2xP2 (P2<R,RR> a,P2<R,RR> b,P2<R,RR> c ): x(b-a),y(c-a) {} 46 46 P2xP2 (R xx,R xy,R yx,R yy) :x(xx,xy),y(yx,yy) {} 47 P2<R,RR> operator*(const P2<R,RR> c) const {return P2<R,RR>(x.x*c.x + x.y*c.y, y.x*c.x + y.y*c.y);} 48 P2xP2<R,RR> operator*(P2xP2<R,RR> c) const 49 { return P2xP2<R,RR>(x.x*c.x.x + x.y*c.y.x, 47 RR det() const {return (RR) x.x* (RR) y.y - (RR) x.y * (RR) y.x;} 48 P2xP2<R,RR> inv() const{ 49 RR d = (*this).det(); 50 return P2xP2<R,RR>((R)( y.y /d) ,(R)(-x.y/d),(R)( -y.x/d) ,(R)( x.x/d) ); 51 }; 52 P2xP2<R,RR> t() {return P2xP2<R,RR>(x.x,y.x,x.y,y.y);} //transposer 53 P2<R,RR> tx() {return P2<R,RR>(x.x,y.x);} 54 P2<R,RR> ty() {return P2<R,RR>(x.y,y.y);} 55 56 //Operators 57 P2<R,RR> operator*(const P2<R,RR> c) const {return P2<R,RR>(x.x*c.x + x.y*c.y, y.x*c.x + y.y*c.y);} 58 P2xP2<R,RR> operator*(P2xP2<R,RR> c) const{ 59 return P2xP2<R,RR>(x.x*c.x.x + x.y*c.y.x, 50 60 x.x*c.x.y + x.y*c.y.y, 51 61 y.x*c.x.x + y.y*c.y.x, 52 y.x*c.x.y + y.y*c.y.y);} 53 RR det() const {return (RR) x.x* (RR) y.y - (RR) x.y * (RR) y.x;} 54 P2xP2<R,RR> inv() const 55 { RR d = (*this).det(); 56 return P2xP2<R,RR>((R)( y.y /d) ,(R)(-x.y/d),(R)( -y.x/d) ,(R)( x.x/d) ); 57 }; 58 P2xP2<R,RR> t() {return P2xP2<R,RR>(x.x,y.x,x.y,y.y);} //transposer 59 P2<R,RR>tx() {return P2<R,RR>(x.x,y.x);} 60 P2<R,RR>ty() {return P2<R,RR>(x.y,y.y);} 61 62 y.x*c.x.y + y.y*c.y.y); 63 } 62 64 }; 63 65 66 //inline functions 64 67 template <class R,class RR> 65 68 inline RR Det(const P2<R,RR> x,const P2<R,RR> y) { 66 return (RR) x.x * (RR) y.y - (RR) x.y * (RR) y.x ;} 69 return (RR) x.x * (RR) y.y - (RR) x.y * (RR) y.x ; 70 } 67 71 68 72 template <class R,class RR> 69 73 inline RR Area2 (const P2<R,RR> a,const P2<R,RR> b,const P2<R,RR> c) { 70 return Det(b-a,c-a) ;} 74 return Det(b-a,c-a) ; 75 } 71 76 72 77 template <class R,class RR> 73 78 inline R Norme1 (const P2<R,RR> x) { 74 return (Abs(x.x)+Abs(x.y)) ;} 79 return (Abs(x.x)+Abs(x.y)) ; 80 } 75 81 76 82 template <class R,class RR> 77 83 inline R NormeInfini (const P2<R,RR> x) { 78 return Max(Abs(x.x),Abs(x.y)) ;} 84 return Max(Abs(x.x),Abs(x.y)) ; 85 } 79 86 80 87 template <class R,class RR> 81 88 inline RR Norme2_2 (const P2<R,RR> x) { 82 return (RR)x.x*(RR)x.x + (RR)x.y*(RR)x.y ;} 89 return (RR)x.x*(RR)x.x + (RR)x.y*(RR)x.y ; 90 } 83 91 84 92 template <class R,class RR> 85 93 inline RR Norme2 (const P2<R,RR> x) { 86 return sqrt((RR)x.x*(RR)x.x + (RR)x.y*(RR)x.y) ;} 94 return sqrt((RR)x.x*(RR)x.x + (RR)x.y*(RR)x.y) ; 95 } 87 96 88 97 template <class R,class RR> 89 98 inline P2<R,RR> Orthogonal (const P2<R,RR> x) { 90 return P2<R,RR>(-x.y,x.x);} 99 return P2<R,RR>(-x.y,x.x); 100 } 91 101 } -
issm/trunk/src/c/Bamgx/SetOfE4.h
r2958 r2981 4 4 namespace bamg { 5 5 6 class SetOfEdges4 ; 6 class SetOfEdges4; 7 7 8 class Int4Edge{ 8 9 friend class SetOfEdges4; … … 28 29 Int4 j(Int4 k){return Edges[k].j;} 29 30 Int4 newarete(Int4 k){return NbOfEdges == k+1;} 31 32 //operators 30 33 Int4Edge & operator[](Int4 k){return Edges[k];} 31 34 }; -
issm/trunk/src/c/Bamgx/objects/MatVVP2x2.cpp
r2928 r2981 18 18 19 19 /*Constructor*/ 20 /*FUNCTION MatVVP2x2::MatVVP2x2(const Metric AnIsoM){{{1*/21 MatVVP2x2::MatVVP2x2(const Metric AnIsoM){20 /*FUNCTION MatVVP2x2::MatVVP2x2(const Metric M){{{1*/ 21 MatVVP2x2::MatVVP2x2(const Metric M){ 22 22 double a11=M.a11,a21=M.a21,a22=M.a22; 23 23 const double eps = 1.e-5; -
issm/trunk/src/c/Bamgx/objects/MetricAnIso.cpp
r2933 r2981 13 13 14 14 #undef __FUNCT__ 15 #define __FUNCT__ "Metric AnIso"15 #define __FUNCT__ "Metric" 16 16 17 17 using namespace std; … … 22 22 23 23 /*Constructor/Destructor*/ 24 /*FUNCTION Metric AnIso::MetricAnIso(const Real8 a[3],const MetricAnIso m0, const MetricAnIso m1,const MetricAnIsom2 ){{{1*/25 Metric AnIso::MetricAnIso(const Real8 a[3],const MetricAnIso m0, const MetricAnIso m1,const MetricAnIsom2 ){26 Metric AnIsomab(a[0]*m0.a11 + a[1]*m1.a11 + a[2]*m2.a11,24 /*FUNCTION Metric::Metric(const Real8 a[3],const Metric m0, const Metric m1,const Metric m2 ){{{1*/ 25 Metric::Metric(const Real8 a[3],const Metric m0, const Metric m1,const Metric m2 ){ 26 Metric mab(a[0]*m0.a11 + a[1]*m1.a11 + a[2]*m2.a11, 27 27 a[0]*m0.a21 + a[1]*m1.a21 + a[2]*m2.a21, 28 28 a[0]*m0.a22 + a[1]*m1.a22 + a[2]*m2.a22); … … 41 41 } 42 42 /*}}}1*/ 43 /*FUNCTION Metric AnIso::MetricAnIso( Real8 a,const MetricAnIso ma, Real8 b,const MetricAnIsomb){{{1*/44 Metric AnIso::MetricAnIso( Real8 a,const MetricAnIso ma, Real8 b,const MetricAnIsomb) {45 Metric AnIsomab(a*ma.a11+b*mb.a11,a*ma.a21+b*mb.a21,a*ma.a22+b*mb.a22);43 /*FUNCTION Metric::Metric( Real8 a,const Metric ma, Real8 b,const Metric mb){{{1*/ 44 Metric::Metric( Real8 a,const Metric ma, Real8 b,const Metric mb) { 45 Metric mab(a*ma.a11+b*mb.a11,a*ma.a21+b*mb.a21,a*ma.a22+b*mb.a22); 46 46 MatVVP2x2 vab(mab); 47 47 … … 59 59 60 60 /*Methods*/ 61 /*FUNCTION Metric AnIso::Echo {{{1*/62 63 void Metric AnIso::Echo(void){64 65 printf("Metric AnIso:\n");61 /*FUNCTION Metric::Echo {{{1*/ 62 63 void Metric::Echo(void){ 64 65 printf("Metric:\n"); 66 66 printf(" [a11 a21 a22]: [%g %g %g]\n",a11,a21,a22); 67 67 … … 69 69 } 70 70 /*}}}*/ 71 /*FUNCTION Metric AnIso::IntersectWith{{{1*/72 int Metric AnIso::IntersectWith(const MetricAnIsoM2) {71 /*FUNCTION Metric::IntersectWith{{{1*/ 72 int Metric::IntersectWith(const Metric M2) { 73 73 /*Get a new metric from an existing metric (M1=this) 74 74 * and a new metric given in input M2 using a … … 88 88 89 89 int change=0; 90 Metric AnIso&M1=*this;90 Metric &M1=*this; 91 91 D2xD2 P; 92 92 … … 123 123 /*Intermediary*/ 124 124 /*FUNCTION LengthInterpole{{{1*/ 125 Real8 LengthInterpole(const Metric AnIso Ma,const MetricAnIsoMb, R2 AB) {125 Real8 LengthInterpole(const Metric Ma,const Metric Mb, R2 AB) { 126 126 Real8 k=1./2.; 127 127 int level=0; … … 189 189 /*}}}1*/ 190 190 /*FUNCTION SimultaneousMatrixReduction{{{1*/ 191 void SimultaneousMatrixReduction( Metric AnIso M1, MetricAnIsoM2, D2xD2 &V) {191 void SimultaneousMatrixReduction( Metric M1, Metric M2, D2xD2 &V) { 192 192 /*In this routine we must return a matrix V that is composed of the 193 193 * eigen vectors of N=inv(M1) M2. … … 292 292 /*}}}1*/ 293 293 /*FUNCTION abscisseInterpole{{{1*/ 294 Real8 abscisseInterpole(const Metric AnIso Ma,const MetricAnIsoMb, R2 AB,Real8 s,int optim) {294 Real8 abscisseInterpole(const Metric Ma,const Metric Mb, R2 AB,Real8 s,int optim) { 295 295 if(!optim) LengthInterpole(Ma,Mb,AB); 296 296 Real8 l = s* LastMetricInterpole.lab,r; -
issm/trunk/src/c/Bamgx/objects/Triangles.cpp
r2977 r2981 773 773 b=bamgopts->metric[i*3+1]; 774 774 c=bamgopts->metric[i*3+2]; 775 Metric AnIsoM(a,b,c);775 Metric M(a,b,c); 776 776 MatVVP2x2 Vp(M/coef); 777 777 … … 3834 3834 D2xD2 D(maxsubdiv2,0,0,lc); 3835 3835 D2xD2 MM = Rt1*D*Rt1.t(); 3836 v0.m = M = Metric AnIso(MM.x.x,MM.y.x,MM.y.y);3836 v0.m = M = Metric(MM.x.x,MM.y.x,MM.y.y); 3837 3837 nbchange++; 3838 3838 } … … 3847 3847 D2xD2 D(maxsubdiv2,0,0,lc); 3848 3848 D2xD2 MM = Rt1*D*Rt1.t(); 3849 v1.m = M = Metric AnIso(MM.x.x,MM.y.x,MM.y.y);3849 v1.m = M = Metric(MM.x.x,MM.y.x,MM.y.y); 3850 3850 nbchange++; 3851 3851 } … … 4431 4431 D2xD2 BK = B_K*B1r; 4432 4432 D2xD2 B1B1 = B1K.t()*B1K; 4433 Metric AnIsoMK(B1B1.x.x,B1B1.x.y,B1B1.y.y);4433 Metric MK(B1B1.x.x,B1B1.x.y,B1B1.y.y); 4434 4434 MatVVP2x2 VMK(MK); 4435 4435 alpha2 = Max(alpha2,Max(VMK.lambda1/VMK.lambda2,VMK.lambda2/VMK.lambda1)); … … 4442 4442 hmax=Max(hmax,he); 4443 4443 Vertex & v=K[j]; 4444 D2xD2 M((Metric AnIso)v);4444 D2xD2 M((Metric)v); 4445 4445 betaK += sqrt(M.det()); 4446 4446 4447 4447 D2xD2 BMB = BK.t()*M*BK; 4448 Metric AnIsoM1(BMB.x.x,BMB.x.y,BMB.y.y);4448 Metric M1(BMB.x.x,BMB.x.y,BMB.y.y); 4449 4449 MatVVP2x2 VM1(M1); 4450 4450 gammamn=Min3(gammamn,VM1.lambda1,VM1.lambda2);
Note:
See TracChangeset
for help on using the changeset viewer.