Changeset 2937


Ignore:
Timestamp:
01/29/10 15:59:55 (15 years ago)
Author:
Mathieu Morlighem
Message:

Added Metric type

Location:
issm/trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/Bamgx/Bamgx.cpp

    r2934 r2937  
    7171                throw ErrorException(__FUNCT__,exprintf("maxsubdiv %g is should be in ]1,%g]",maxsubdiv,boundmaxsubdiv));
    7272        }
     73        // if iso, then anisomax = 1;
    7374        if (iso) anisomax=1;
    7475        // no metric -> no smoothing
     
    7677                NbSmooth=0;
    7778        }
     79
     80        /*If no mesh in input, generate one*/
    7881
    7982        if(bamgmesh->NumTriangles==0){
  • issm/trunk/src/c/Bamgx/Mesh2.h

    r2924 r2937  
    137137                //  ~Vertex(){}
    138138                Real8  Smoothing(Triangles & ,const Triangles & ,Triangle  * & ,Real8 =1);
     139                void MetricFromHessian(const double Hxx,const double Hyx, const double Hyy, const double smin,const double smax,const double s,BamgOpts* bamgopts);
    139140                int ref() const { return ReferenceNumber;}
    140141
  • issm/trunk/src/c/Bamgx/objects/Triangles.cpp

    r2934 r2937  
    900900                /*Options*/
    901901                const int dim = 2;
    902                 int AbsError;
    903902                double* s=NULL;
    904903                Int4 nbsol;
    905904                int* typsols=NULL;
    906                 Real8 hmin1;
    907                 Real8 hmax1;
    908                 Real8 coef;
    909                 Real8 anisomax;
    910                 Real8 CutOff;
    911905                int NbJacobi;
    912                 int Rescaling;
    913                 double power;
    914906                int verbosity;
    915907
    916908                /*Recover options*/
    917909                verbosity=bamgopts->verbose;
    918                 AbsError=bamgopts->AbsError;   
    919                 CutOff=bamgopts->cutoff;
    920                 hmin1=bamgopts->hmin;
    921                 hmax1=bamgopts->hmax;
    922                 coef=bamgopts->coef;
    923910                NbJacobi=bamgopts->nbjacobi;
    924                 Rescaling=bamgopts->Rescaling; //do normalization
    925                 power=bamgopts->power;
    926                 anisomax=bamgopts->anisomax;
    927 
    928                 /*process options*/
    929                 if (AbsError) CutOff=0.0;
    930                 coef=sqrt(bamgopts->err)*coef;
    931911
    932912                /*Get and process fields*/
     
    955935                Int4    i,k,iA,iB,iC,iv;
    956936                R2      O(0,0);
    957                 int     RelativeMetric = CutOff>1e-30;
    958                 Real8   hmin = Max(hmin1,MinimalHmin());
    959                 Real8   hmax = Min(hmax1,MaximalHmax());
    960                 Real8   coef2 = 1/(coef*coef);
    961937                double* ss=(double*)s;
    962938                double  sA,sB,sC;
     
    974950                if(verbosity>1) {
    975951                        printf("   Construction of Metric: number of field: %i (nbt=%i, nbv=%i)\n",n,nbt,nbv);
    976                         printf("      coef = %g\n",coef);
    977                         printf("      hmin = %g hmax = %g\n",hmin,hmax);
    978                         printf("      anisomax = %g nb Jacobi = %i, power = %g\n",anisomax,NbJacobi,power);
    979                         if (RelativeMetric) printf("      RelativeErr with CutOff= %g\n",CutOff);
    980                         else printf("      Absolute error\n");
    981952                }
    982953
     
    10491020                        Real8 smin=ss[0],smax=ss[0];
    10501021                        Real8 h1=1.e30,h2=1e-30,rx=0;
    1051                         Real8 coef = 1./(anisomax*anisomax);
    10521022                        Real8 hn1=1.e30,hn2=1e-30,rnx =1.e-30; 
    10531023                        int   nbfield=typsols?sizeoftype[typsols[nusol]]:1;
     
    10781048                        Real8 sdelta=smax-smin;
    10791049                        Real8 absmax=Max(Abs(smin),Abs(smax));
    1080                         Real8 cnorm =Rescaling ? coef2/sdelta : coef2;
    10811050
    10821051                        //display info
    1083                         if(verbosity>2) printf("      Solution %i, Min = %g, Max = %g, Delta = %g, cnorm = %g, number of fields = %i\n",nusol,smin,smax,sdelta,cnorm,nbfield);
     1052                        if(verbosity>2) printf("      Solution %i, Min = %g, Max = %g, Delta = %g, number of fields = %i\n",nusol,smin,smax,sdelta,nbfield);
    10841053
    10851054                        //skip constant field
     
    12361205                                }
    12371206
    1238                                 //constuction of the metric from the Hessian dxdx. dxdy,dydy
    1239                                 Real8 rCutOff=CutOff*absmax;// relative cut off
    1240 
    1241                                 //loop over the nodes
    1242                                 for ( iv=0,k=0 ; iv<nbv; iv++,k+=n ){
    1243 
    1244                                         MetricIso Miso;
    1245                                         Real8 ci ;
    1246 
    1247                                         //   compute norm of the solution
    1248                                         if (RelativeMetric){
    1249                                                 double xx =0,*sfk=sf+k;
    1250                                                 for (int ifield=0;ifield<nbfield;ifield++,sfk++){
    1251                                                         xx += *sfk* *sfk;             
    1252                                                 }
    1253                                                 xx=sqrt(xx);
    1254                                                 ci=coef2/Max(xx,rCutOff);
    1255                                         }
    1256                                         else ci=cnorm;
    1257 
    1258                                         //initialize metric Miv with ci*H
    1259                                         Metric    Miv(dxdx[iv]*ci, dxdy[iv]*ci,  dydy[iv]*ci);
    1260 
    1261                                         //Get eigen values and vectors of Miv
    1262                                         MatVVP2x2 Vp(Miv);
    1263 
    1264                                         //move eigen valuse to their absolute values
    1265                                         Vp.Abs();
    1266 
    1267                                         //Allpy a power if requested by user
    1268                                         if(power!=1.0) Vp.pow(power);
    1269 
    1270                                         //get minimum and maximum eigen values 
    1271                                         h1=Min(h1,Vp.lmin());
    1272                                         h2=Max(h2,Vp.lmax());
    1273 
    1274                                         //modify eigen values according to hmin and hmax
    1275                                         Vp.Maxh(hmax);
    1276                                         Vp.Minh(hmin);
    1277 
    1278                                         //multiply eigen values by coef
    1279                                         Vp.BoundAniso2(coef);
    1280 
    1281                                         //rebuild Metric from Vp
    1282                                         Metric MVp(Vp);
    1283 
    1284                                         //Apply Metric to vertex
    1285                                         vertices[iv].m.IntersectWith(MVp);
    1286 
    1287                                         //info to be displayed
    1288                                         //rx = max(lmax/lmin) (anisotropy ratio)
    1289                                         rx = Max(rx,Vp.Aniso2());
    1290                                         hn1=Min(hn1,Vp.lmin());
    1291                                         hn2=Max(hn2,Vp.lmax());
    1292                                         rnx = Max(rnx,Vp.Aniso2());
    1293                                 }
    1294 
    1295                                 //display info
    1296                                 if (verbosity>2) {
    1297 
    1298 
    1299                                         printf("      Field %i of solution %i\n",nufield,nusol);
    1300                                         printf("         before bounding : Hmin = %g, Hmax = %g, factor of anisotropy max = %g\n",pow(h2,-0.5), pow(h1,-0.5), pow(rx,0.5));
    1301                                         printf("         after  bounding : Hmin = %g, Hmax = %g, factor of anisotropy max = %g\n",pow(hn2,-0.5),pow(hn1,-0.5),pow(rnx,0.5));
    1302                                 }
     1207                                /*Compute Metric from Hessian*/
     1208                                for ( iv=0;iv<nbv;iv++){
     1209                                        vertices[iv].MetricFromHessian(dxdx[iv],dxdy[iv],dydy[iv],smin,smax,ss[n*iv],bamgopts);
     1210                                }
     1211
    13031212                        } //  end of for all field
    13041213                }// end for all solution
     
    13251234                /*Options*/
    13261235                const int dim = 2;
    1327                 int AbsError;
    13281236                double* s=NULL;
    13291237                Int4 nbsol;
    13301238                int* typsols=NULL;
    1331                 Real8 hmin1;
    1332                 Real8 hmax1;
    1333                 Real8 coef;
    1334                 Real8 anisomax;
    1335                 Real8 CutOff;
    13361239                int NbJacobi;
    1337                 int Rescaling;
    1338                 double power;
    13391240                int verbosity;
    13401241
    13411242                /*Recover options*/
    13421243                verbosity=bamgopts->verbose;
    1343                 AbsError=bamgopts->AbsError;   
    1344                 CutOff=bamgopts->cutoff;
    1345                 hmin1=bamgopts->hmin;
    1346                 hmax1=bamgopts->hmax;
    1347                 coef=bamgopts->coef;
    13481244                NbJacobi=bamgopts->nbjacobi;
    1349                 Rescaling=bamgopts->Rescaling; //do normalization
    1350                 power=bamgopts->power;
    1351                 anisomax=bamgopts->anisomax;
    1352 
    1353                 /*process options*/
    1354                 if (AbsError) CutOff=0.0;
    1355                 coef=sqrt(bamgopts->err)*coef;
    13561245
    13571246                /*Get and process fields*/
     
    13801269                Int4    i,k,iA,iB,iC,iv;
    13811270                R2      O(0,0);
    1382                 int     RelativeMetric = CutOff>1e-30;
    1383                 Real8   hmin = Max(hmin1,MinimalHmin());
    1384                 Real8   hmax = Min(hmax1,MaximalHmax());
    1385                 Real8   coef2 = 1/(coef*coef);
    13861271                double* ss=(double*)s;
    13871272                double  sA,sB,sC;
     
    13991284                if(verbosity>1) {
    14001285                        printf("   Construction of Metric: number of field: %i (nbt=%i, nbv=%i)\n",n,nbt,nbv);
    1401                         printf("      coef = %g\n",coef);
    1402                         printf("      hmin = %g hmax = %g\n",hmin,hmax);
    1403                         printf("      anisomax = %g nb Jacobi = %i, power = %g\n",anisomax,NbJacobi,power);
    1404                         if (RelativeMetric) printf("      RelativeErr with CutOff= %g\n",CutOff);
    1405                         else printf("      Absolute error\n");
    14061286                }
    14071287
     
    14761356                        Real8 smin=ss[0],smax=ss[0];
    14771357                        Real8 h1=1.e30,h2=1e-30,rx=0;
    1478                         Real8 coef = 1./(anisomax*anisomax);
    14791358                        Real8 hn1=1.e30,hn2=1e-30,rnx =1.e-30; 
    14801359                        int   nbfield=typsols?sizeoftype[typsols[nusol]]:1;
     
    15051384                        Real8 sdelta=smax-smin;
    15061385                        Real8 absmax=Max(Abs(smin),Abs(smax));
    1507                         Real8 cnorm =Rescaling ? coef2/sdelta : coef2;
    15081386
    15091387                        //display info
    1510                         if(verbosity>2) printf("      Solution %i, Min = %g, Max = %g, Delta = %g, cnorm = %g, number of fields = %i\n",nusol,smin,smax,sdelta,cnorm,nbfield);
     1388                        if(verbosity>2) printf("      Solution %i, Min = %g, Max = %g, Delta = %g, number of fields = %i\n",nusol,smin,smax,sdelta,nbfield);
    15111389
    15121390                        //skip constant field
     
    16571535                                                Real8 Hxy = cAB * ( nBC.y*nCA.x) +  cBC * ( nCA.y*nAB.x) + cCA * (nAB.y*nBC.x)
    16581536                                                  + cAB * ( nBC.x*nCA.y) +  cBC * ( nCA.x*nAB.y) + cCA * (nAB.x*nBC.y);
    1659                                                 Real8 coef = 1.0/(3*dd*det33);
    1660                                                 Real8 coef2 = 2*coef;
    1661                                                 Hxx *= coef2;
    1662                                                 Hyy *= coef2;
    1663                                                 Hxy *= coef2;
    16641537                                                if(nbb==0){
    16651538                                                        dxdx[iA] += Hxx;
     
    17391612                                }
    17401613
    1741                                 //constuction of the metric from the Hessian dxdx. dxdy,dydy
    1742                                 Real8 rCutOff=CutOff*absmax;// relative cut off
    1743 
    1744                                 //loop over the nodes
    1745                                 for ( iv=0,k=0 ; iv<nbv; iv++,k+=n ){
    1746 
    1747                                         MetricIso Miso;
    1748                                         Real8 ci ;
    1749 
    1750                                         //   compute norm of the solution
    1751                                         if (RelativeMetric){
    1752                                                 double xx =0,*sfk=sf+k;
    1753                                                 for (int ifield=0;ifield<nbfield;ifield++,sfk++){
    1754                                                         xx += *sfk* *sfk;             
    1755                                                 }
    1756                                                 xx=sqrt(xx);
    1757                                                 ci=coef2/Max(xx,rCutOff);
    1758                                         }
    1759                                         else ci=cnorm;
    1760 
    1761                                         //initialize metric Miv with ci*H
    1762                                         Metric    Miv(dxdx[iv]*ci, dxdy[iv]*ci,  dydy[iv]*ci);
    1763 
    1764                                         //Get eigen values and vectors of Miv
    1765                                         MatVVP2x2 Vp(Miv);
    1766 
    1767                                         //move eigen valuse to their absolute values
    1768                                         Vp.Abs();
    1769 
    1770                                         //Allpy a power if requested by user
    1771                                         if(power!=1.0) Vp.pow(power);
    1772 
    1773                                         //get minimum and maximum eigen values 
    1774                                         h1=Min(h1,Vp.lmin());
    1775                                         h2=Max(h2,Vp.lmax());
    1776 
    1777                                         //modify eigen values according to hmin and hmax
    1778                                         Vp.Maxh(hmax);
    1779                                         Vp.Minh(hmin);
    1780 
    1781                                         //multiply eigen values by coef
    1782                                         Vp.BoundAniso2(coef);
    1783 
    1784                                         //rebuild Metric from Vp
    1785                                         Metric MVp(Vp);
    1786 
    1787                                         //Apply Metric to vertex
    1788                                         vertices[iv].m.IntersectWith(MVp);
    1789 
    1790                                         //info to be displayed
    1791                                         //rx = max(lmax/lmin) (anisotropy ratio)
    1792                                         rx = Max(rx,Vp.Aniso2());
    1793                                         hn1=Min(hn1,Vp.lmin());
    1794                                         hn2=Max(hn2,Vp.lmax());
    1795                                         rnx = Max(rnx,Vp.Aniso2());
    1796                                 }
    1797 
    1798                                 //display info
    1799                                 if (verbosity>2) {
    1800 
    1801 
    1802                                         printf("      Field %i of solution %i\n",nufield,nusol);
    1803                                         printf("         before bounding : Hmin = %g, Hmax = %g, factor of anisotropy max = %g\n",pow(h2,-0.5), pow(h1,-0.5), pow(rx,0.5));
    1804                                         printf("         after  bounding : Hmin = %g, Hmax = %g, factor of anisotropy max = %g\n",pow(hn2,-0.5),pow(hn1,-0.5),pow(rnx,0.5));
    1805                                 }
     1614                                /*Compute Metric from Hessian*/
     1615                                for ( iv=0;iv<nbv;iv++){
     1616                                        vertices[iv].MetricFromHessian(dxdx[iv],dxdy[iv],dydy[iv],smin,smax,ss[n*iv],bamgopts);
     1617                                }
     1618
    18061619                        } //  end of for all field
    18071620                }// end for all solution
     
    18281641                int*   typsols=NULL;
    18291642                int    verbosity;
    1830                 Real8  hmin1;
    1831                 Real8  hmax1;
    1832                 double power;
    1833                 double anisomax;
    18341643
    18351644                int   i,j,k,iA,iB,iC;
    18361645                int   iv,nbfield;
    1837                 double coef;
    18381646
    18391647                /*Recover options*/
    18401648                verbosity=bamgopts->verbose;
    1841                 power=bamgopts->power;
    1842                 hmin1=bamgopts->hmin;
    1843                 hmax1=bamgopts->hmax;
    1844 
    1845                 /*Recover options*/
    1846                 verbosity=bamgopts->verbose;
    1847                 hmin1=bamgopts->hmin;
    1848                 hmax1=bamgopts->hmax;
    1849                 anisomax=bamgopts->anisomax;
    18501649
    18511650                /*Get and process fields*/
     
    18721671
    18731672                //initialization of some variables
    1874                 Real8   hmin = Max(hmin1,MinimalHmin());
    1875                 Real8   hmax = Min(hmax1,MaximalHmax());
    18761673                double* ss=(double*)s;
    18771674                double  sA,sB,sC;
     
    19531750                for (Int4 nusol=0;nusol<nbsol;nusol++) {
    19541751                        int   nbfield=typsols?sizeoftype[typsols[nusol]]:1;
     1752                        Real8 smin=ss[0],smax=ss[0];
     1753
     1754                        //only one field
     1755                        if (nbfield == 1) {
     1756                                //get min(s), max(s) and initialize Hessian (dxdx,dxdy,dydy)
     1757                                for ( iv=0,k=0; iv<nbv; iv++,k+=n ){
     1758                                        smin=Min(smin,ss[k]);
     1759                                        smax=Max(smax,ss[k]);
     1760                                }
     1761                        }
     1762
     1763                        //vectorial case
     1764                        else{
     1765                                for (iv=0,k=0;iv<nbv;iv++,k+=n ){
     1766                                        //compute v = √sum(s[i]^2)
     1767                                        double v=0;                 
     1768                                        for (int i=0;i<nbfield;i++){
     1769                                                v += ss[k+i]*ss[k+i];
     1770                                        }
     1771                                        v = sqrt(v);
     1772                                        smin=Min(smin,v);
     1773                                        smax=Max(smax,v);
     1774                                }
     1775                        }
     1776                        Real8 sdelta=smax-smin;
     1777                        Real8 absmax=Max(Abs(smin),Abs(smax));
     1778
     1779                        //display info
     1780                        if(verbosity>2) printf("      Solution %i, Min = %g, Max = %g, Delta = %g, number of fields = %i\n",nusol,smin,smax,sdelta,nbfield);
     1781
     1782                        //skip constant field
     1783                        if (sdelta < 1.0e-10*Max(absmax,1e-20) && (nbfield ==1)){
     1784                                if (verbosity>2) printf("      Solution %i is constant, skipping...\n");
     1785                                continue;
     1786                        }
     1787
    19551788
    19561789                        //loop over all the fields of the solution
     
    20171850
    20181851                                /*Compute Metric from Hessian*/
    2019 
    2020                                 //compute multiplicative coefficient (2/9 because it is 2d)
    2021                                 Real8 ci=(2.0/9.0)*(1.0/(bamgopts->err));
    2022 
    20231852                                for ( iv=0;iv<nbv;iv++){
    2024 
    2025                                         //initialize metric Miv with ci*H
    2026                                         Metric Miv(dxdx_vertex[iv]*ci,dxdy_vertex[iv]*ci,dydy_vertex[iv]*ci);
    2027 
    2028                                         //Get eigen values and vectors of Miv
    2029                                         MatVVP2x2 Vp(Miv);
    2030 
    2031                                         //move eigen valuse to their absolute values
    2032                                         Vp.Abs();
    2033 
    2034                                         //Apply a power if requested by user
    2035                                         if(power!=1.0) Vp.pow(power);
    2036 
    2037                                         //modify eigen values according to hmin and hmax
    2038                                         Vp.Maxh(hmax);
    2039                                         Vp.Minh(hmin);
    2040 
    2041                                         //Bound anisotropy by 1/(anisomax)^2
    2042                                         Vp.BoundAniso2(1/(anisomax*anisomax));
    2043 
    2044                                         //rebuild Metric from Vp
    2045                                         Metric MVp(Vp);
    2046 
    2047                                         //Apply Metric to vertex
    2048                                         vertices[iv].m.IntersectWith(MVp);
    2049                                 }
     1853                                        vertices[iv].MetricFromHessian(dxdx_vertex[iv],dxdy_vertex[iv],dydy_vertex[iv],smin,smax,ss[n*iv],bamgopts);
     1854                                }
     1855
    20501856                        }//for all fields
    20511857                }//for all solutions
  • issm/trunk/src/c/Bamgx/objects/Vertex.cpp

    r2865 r2937  
    127127        }
    128128        /*}}}1*/
     129        /*FUNCTION Vertex::MetricFromHessian{{{1*/
     130        void Vertex::MetricFromHessian(const double Hxx,const double Hyx, const double Hyy,const double smin,const double smax,const double s,BamgOpts* bamgopts){
     131                /*Compute Metric from Hessian*/
     132
     133                /*get options*/
     134                double power=(bamgopts->power);
     135                double anisomax=(bamgopts->anisomax);
     136                double CutOff=bamgopts->cutoff;
     137                double hmin=(bamgopts->hmin);
     138                double hmax=(bamgopts->hmax);
     139                double coef=bamgopts->coef;
     140                int    Metrictype=(bamgopts->Metrictype);
     141                int    Rescaling=(bamgopts->Rescaling);
     142
     143                /*Intermediary*/
     144                double ci;
     145
     146                /*compute multiplicative coefficient depending on Metric Type (2/9 because it is 2d)*/
     147
     148                //Absolute Error
     149                /*
     150                 *            2         1       
     151                 *Metric M = ---  ------------   Abs(Hessian)
     152                 *            9   err * coeff^2 
     153                 */
     154                if (Metrictype==0){
     155                        if (Rescaling){
     156                                ci= 1/(bamgopts->err*coef*coef) * 1/(smax-smin);
     157                        }
     158                        else{
     159                                ci=1/(bamgopts->err*coef*coef);
     160                        }
     161                }
     162
     163                //Relative Error
     164                /*
     165                 *            2         1            Abs(Hessian)
     166                 *Metric M = ---  ------------  ----------------------
     167                 *            9   err * coeff^2  max( |s| , cutoff*max(|s|) )
     168                 *
     169                 */
     170                else if (Metrictype==1){
     171                        ci=1/(bamgopts->err*coef*coef) * 1/Max( Abs(s), CutOff*(Max(Abs(smin),Abs(smax))));
     172                }
     173
     174                //Interpolation Error
     175                /*
     176                 *            2         1       
     177                 *Metric M = ---  ------------   Abs(Hessian)
     178                 *            9   err * coeff^2 
     179                 */
     180                else if (Metrictype==2){
     181                        ci=(2.0/9.0)*(1.0/(bamgopts->err));
     182                }
     183                else{
     184                        throw ErrorException(__FUNCT__,exprintf("Metrictype %i not supported yet (use 0,1 or 2(default))",Metrictype));
     185                }
     186
     187                //initialize metric Miv with ci*H
     188                Metric Miv(Hxx*ci,Hyx*ci,Hyy*ci);
     189
     190                //Get eigen values and vectors of Miv
     191                MatVVP2x2 Vp(Miv);
     192
     193                //move eigen valuse to their absolute values
     194                Vp.Abs();
     195
     196                //Apply a power if requested by user
     197                if(power!=1.0) Vp.pow(power);
     198
     199                //modify eigen values according to hmin and hmax
     200                Vp.Maxh(hmax);
     201                Vp.Minh(hmin);
     202
     203                //Bound anisotropy by 1/(anisomax)^2
     204                Vp.BoundAniso2(1/(anisomax*anisomax));
     205
     206                //rebuild Metric from Vp
     207                Metric MVp(Vp);
     208
     209                //Apply Metric to vertex
     210                m.IntersectWith(MVp);
     211
     212        }
     213        /*}}}1*/
    129214
    130215        /*Intermediary*/
  • issm/trunk/src/c/objects/BamgOpts.h

    r2934 r2937  
    1616        int     NbSmooth;
    1717        int     Rescaling;
     18        int     Metrictype;
    1819        int     nbjacobi;
    1920        int     AbsError;
  • issm/trunk/src/m/classes/public/bamg.m

    r2934 r2937  
    8484bamg_options.nbjacobi=getfieldvalue(options,'nbjacobi',1);
    8585bamg_options.AbsError=getfieldvalue(options,'AbsError',0);
    86 bamg_options.Hessiantype=getfieldvalue(options,'Hessiantype',0);
     86bamg_options.Hessiantype=getfieldvalue(options,'Hessiantype',2);
     87bamg_options.Metrictype=getfieldvalue(options,'Metrictype',2);
    8788bamg_options.NbSmooth=getfieldvalue(options,'NbSmooth',3);
    8889bamg_options.omega=getfieldvalue(options,'omega',1.8);
  • issm/trunk/src/mex/Bamg/Bamg.cpp

    r2934 r2937  
    3636        double err,errg,coef;
    3737        double power;
    38         int    Hessiantype,NbSmooth;
     38        int    Hessiantype,Metrictype,NbSmooth;
    3939        int    Rescaling,nbjacobi,AbsError;
    4040        double omega;
     
    117117        FetchData(&Hessiantype,mxGetField(BAMGOPTIONS,0,"Hessiantype"));
    118118        bamgopts.Hessiantype=Hessiantype;
     119        FetchData(&Metrictype,mxGetField(BAMGOPTIONS,0,"Metrictype"));
     120        bamgopts.Metrictype=Metrictype;
    119121        FetchData(&power,mxGetField(BAMGOPTIONS,0,"power"));
    120122        bamgopts.power=power;
Note: See TracChangeset for help on using the changeset viewer.