Ignore:
Timestamp:
06/07/17 10:50:54 (8 years ago)
Author:
Eric.Larour
Message:

CHG: merged branch back to trunk-jpl 21754.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/branches/trunk-larour-NatGeoScience2016/src/c/bamg/Metric.h

    r16237 r21759  
    3030                        Metric(double a);
    3131                        Metric(double a,double b,double c);
    32                         Metric( double  a,const  Metric& ma, double  b,const  Metric& mb);
    33                         Metric(const double  a[3],const  Metric& m0,const  Metric& m1,const  Metric& m2 );
     32                        Metric(double  a,const Metric ma,double  b,const Metric mb);
     33                        Metric(const double  a[3],const Metric m0,const Metric m1,const Metric m2 );
    3434                        void        Echo();
    35                         R2          mul(const R2 x)const;
    3635                        double      det() const;
    3736                        int         IntersectWith(const  Metric& M2);
     
    4241                        R2 Orthogonal(const R2 x){ return R2(-(a21*x.x+a22*x.y),a11*x.x+a21*x.y); }
    4342                        R2 Orthogonal(const I2 x){ return R2(-(a21*x.x+a22*x.y),a11*x.x+a21*x.y); }
     43                        double Length(double Ax,double Ay) const;
    4444
    4545                        //operators
     
    4747                        Metric operator/(double c) const {double c2=1/(c*c);return  Metric(a11*c2,a21*c2,a22*c2);}
    4848                        operator D2xD2(){ return D2xD2(a11,a21,a21,a22);}
    49                         double  operator()(R2 x) const { return sqrt(x.x*x.x*a11+2*x.x*x.y*a21+x.y*x.y*a22);};        // length of x in metric sqrt(<Mx,x>)
     49                        //double  operator()(R2 x) const { return sqrt(x.x*x.x*a11+2*x.x*x.y*a21+x.y*x.y*a22);};        // length of x in metric sqrt(<Mx,x>) FIXME: replace by Length!
    5050                        double  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;};
    5151
     
    5757                        //fields
    5858                        double lambda1,lambda2;
    59                         D2     v;
     59                        double vx,vy;
    6060
    6161                        //friends
     
    114114        }
    115115        inline Metric::Metric(const EigenMetric& M) {
    116                 double v00=M.v.x*M.v.x;
    117                 double v11=M.v.y*M.v.y;
    118                 double v01=M.v.x*M.v.y;
     116                double v00=M.vx*M.vx;
     117                double v11=M.vy*M.vy;
     118                double v01=M.vx*M.vy;
    119119                a11=v00*M.lambda1+v11*M.lambda2;
    120120                a21=v01*(M.lambda1-M.lambda2);
Note: See TracChangeset for help on using the changeset viewer.