Changeset 3301


Ignore:
Timestamp:
03/18/10 14:19:34 (15 years ago)
Author:
Mathieu Morlighem
Message:

Added 2 VERY usefull options in bamg hminVertices and hmaxVertices

Location:
issm/trunk/src
Files:
10 edited

Legend:

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

    r3283 r3301  
    1616
    1717        /*Bamg options*/
    18         double anisomax;
    1918        int    maxnbv;
    20         double hmin,hmax;
    21         double coef,maxsubdiv;
     19        double coef;
    2220        int    verbosity;
    2321        int    NbSmooth;
    24         double omega;
    2522
    2623        /*intermediary*/
    2724        int noerr=1;
    2825        int i,j,num;
    29         int allquad=0;
    3026        double costheta=2;
    3127        double hminaniso=1e-100;
     
    3531
    3632        /*Bamg options*/
    37         anisomax=bamgopts->anisomax;
    3833        NbSmooth=bamgopts->NbSmooth;
    39         omega=bamgopts->omega;
    4034        coef=bamgopts->coef;
    4135        maxnbv=bamgopts->maxnbv;
    42         maxsubdiv=bamgopts->maxsubdiv;
    43         hmin=bamgopts->hmin;
    44         hmax=bamgopts->hmax;
    4536        verbosity=bamgopts->verbose;
    4637
     
    5546                /*Mesh generation {{{1*/
    5647
     48                //Step1: generate geometry Gh
    5749                if (verbosity>0) printf("Construction of a mesh from a given geometry\n");
    5850                if (verbosity>1) printf("   Processing geometry...\n");
    5951                Geometry Gh(bamggeom_in,bamgopts);
    60                 if (verbosity>10){
    61                         Gh.Echo();
    62                 }
    6352
    6453                //get hmin and hmax from geometry to generate the metric
    65                 hmin = Max(hmin,Gh.MinimalHmin());
    66                 hmax = Min(hmax,Gh.MaximalHmax());
    67 
    68                 //build metric if not given in input
     54                bamgopts->hmin = Max(bamgopts->hmin,Gh.MinimalHmin());
     55                bamgopts->hmax = Min(bamgopts->hmax,Gh.MaximalHmax());
     56
     57                //build metric using geometry
    6958                if (verbosity>1) printf("   Generating Metric...\n");
    7059                for(i=0;i<Gh.nbv;i++){
    7160                        Metric M=Gh[i];
    7261                        MatVVP2x2 Vp(M/coef);
    73                         Vp.Maxh(hmax);
    74                         Vp.Minh(hmin);
     62                        Vp.Maxh(bamgopts->hmax);
     63                        Vp.Minh(bamgopts->hmin);
    7564                        Gh.vertices[i].m = Vp;
    7665                }
     
    7968                if (verbosity>1) printf("   Generating Mesh...\n");
    8069                Triangles Th(maxnbv,Gh,bamgopts);
     70
     71                //Split corners if requested
    8172                if(bamgopts->splitcorners) Th.SplitInternalEdgeWithBorderVertices();
     73
     74                //Renumbering
    8275                Th.ReNumberingTheTriangleBySubDomain();
    8376
     
    10194                if (verbosity>1) printf("   Processing initial mesh and geometry...\n");
    10295                Triangles BTh(bamggeom_in,bamgmesh_in,bamgopts);
    103                 hmin=Max(hmin,BTh.MinimalHmin());
    104                 hmax=Min(hmax,BTh.MaximalHmax());
    10596
    10697                //Make Quadtree from background mesh
    10798                BTh.MakeQuadTree();
    10899
    109                 //build metric if not given in input
     100                //Bound hmin and hmax
     101                bamgopts->hmin=Max(bamgopts->hmin,BTh.MinimalHmin());
     102                bamgopts->hmax=Min(bamgopts->hmax,BTh.MaximalHmax());
     103
     104                //Generate initial metric
    110105                if (bamgopts->metric){
    111106                        if (verbosity>1) printf("   Processing Metric...\n");
    112                         BTh.ReadMetric(bamgopts,hmin,hmax,coef);
     107                        BTh.ReadMetric(bamgopts);
    113108                }
    114109                else {
    115 
    116                         // init with hmax
    117                         Metric Mhmax(hmax);
     110                        if (verbosity>1) printf("   Generating initial Metric...\n");
     111                        Metric Mhmax(bamgopts->hmax);
    118112                        for (int iv=0;iv<BTh.nbv;iv++) BTh[iv].m = Mhmax;
    119                         // change using hVertices if required
    120                         if (bamgmesh_in->hVertices){
    121                                 for (i=0;i<BTh.nbv;i++){
    122                                         if (!isnan(bamgmesh_in->hVertices[i])){
    123                                                 BTh[i].m=Metric((float)bamgmesh_in->hVertices[i]);
    124                                         }
     113                }
     114
     115                //use present fields to generate metric if present
     116                if (bamgopts->field){
     117                        if (verbosity>1) printf("   Merge metric with field provided...\n");
     118                        BTh.AddMetric(bamgopts);
     119                }
     120
     121                // change using hVertices if provided
     122                if (bamgmesh_in->hVertices){
     123                        if (verbosity>1) printf("   Merging Metric with hVertices...\n");
     124                        for (i=0;i<BTh.nbv;i++){
     125                                if (!isnan(bamgmesh_in->hVertices[i])){
     126                                        BTh[i].m=Metric((float)bamgmesh_in->hVertices[i]);
    125127                                }
    126 
    127                         }
    128 
    129                         //use present fields to generate metric if present
    130                         if (bamgopts->field){
    131                                 if (verbosity>1) printf("   Generating Metric from solution field...\n");
    132                                 BTh.AddMetric(bamgopts);
    133                         }
    134                 }
    135 
    136                 BTh.AddGeometryMetric(bamgopts);
    137                 if (verbosity>1) printf("   Smoothing Metric...");
    138                 if(bamgopts->gradation) BTh.SmoothMetric(bamgopts->gradation);
    139                 if (verbosity>1) printf(" done\n");
    140                 BTh.MaxSubDivision(maxsubdiv);
    141                 BTh.BoundAnisotropy(anisomax,hminaniso);
    142 
    143                 //Build new mesh Thr
     128                        }
     129                }
     130
     131                // change using hminVertices if provided
     132                if (bamgopts->hminVertices){
     133                        if (verbosity>1) printf("   Merging Metric with hminVertices...\n");
     134                        for (i=0;i<BTh.nbv;i++){
     135                                if (!isnan(bamgopts->hminVertices[i])){
     136                                        Metric M=BTh.vertices[i].m;
     137                                        MatVVP2x2 Vp(M/coef);
     138                                        Vp.Minh(bamgopts->hminVertices[i]);
     139                                        BTh.vertices[i].m=Vp;
     140                                }
     141                        }
     142                }
     143
     144                // change using hmaxVertices if provided
     145                if (bamgopts->hmaxVertices){
     146                        if (verbosity>1) printf("   Merging Metric with hmaxVertices...\n");
     147                        for (i=0;i<BTh.nbv;i++){
     148                                if (!isnan(bamgopts->hmaxVertices[i])){
     149                                        Metric M=BTh.vertices[i].m;
     150                                        MatVVP2x2 Vp(M/coef);
     151                                        Vp.Minh(bamgopts->hmaxVertices[i]);
     152                                        BTh.vertices[i].m=Vp;
     153                                }
     154                        }
     155                }
     156
     157                //Add geometry metric if provided
     158                if(bamgopts->geometricalmetric) BTh.AddGeometryMetric(bamgopts);
     159
     160                //Smoothe metric
     161                BTh.SmoothMetric(bamgopts->gradation);
     162
     163                //Control element subdivision
     164                BTh.MaxSubDivision(bamgopts->maxsubdiv);
     165
     166                //Bound anisotropy
     167                BTh.BoundAnisotropy(bamgopts->anisomax,hminaniso);
     168
     169                //Build new mesh
    144170                if (verbosity>1) printf("   Generating Mesh...\n");
    145171                Thr=&BTh,Thb=0;
    146172                Triangles & Th( *(0 ?  new Triangles(*Thr,&Thr->Gh,Thb,maxnbv) :  new Triangles(maxnbv,BTh,bamgopts,bamgopts->KeepVertices)));
    147173                if (Thr != &BTh) delete Thr;
     174
     175                //Make quadrangle if requested
    148176                if(costheta<=1.0) Th.MakeQuadrangles(costheta);
    149                 if (allquad) Th.SplitElement(allquad==2);
     177                //if () Th.SplitElement(2);
     178
     179                //Split corners if requested
    150180                if(bamgopts->splitcorners) Th.SplitInternalEdgeWithBorderVertices();
     181
     182                //Renumber by subdomain
    151183                Th.ReNumberingTheTriangleBySubDomain();
    152                 if(NbSmooth>0) Th.SmoothingVertex(NbSmooth,omega);
     184
     185                //Smooth vertices
     186                if(NbSmooth>0) Th.SmoothingVertex(NbSmooth,bamgopts->omega);
    153187
    154188                //display info
  • issm/trunk/src/c/Bamgx/objects/GeometricalEdge.cpp

    r3263 r3301  
    2525                double dca,dcb,dcta,dctb;
    2626                double ddca,ddcb,ddcta,ddctb;
    27                 // double t1 = 1 -theta;
    28                 // double t1t1 = t1*t1;
    2927                double tt = theta*theta;
    30                 if ( theta<0){
    31                         throw ErrorException(__FUNCT__,exprintf("theta<0"));
     28
     29                //check theta
     30                assert(theta>=0 && theta<=1);
     31
     32                if (TgA()){
     33                        if (TgB()){
     34                                // Tangent A and B provided:
     35                                // interpolation d'hermite
     36                                dcb = 6*theta*(1-theta);
     37                                ddcb = 6*(1-2*theta);
     38                                dca = -dcb;
     39                                ddca = -ddcb;
     40                                dcta =  (3*theta - 4)*theta + 1;
     41                                ddcta=6*theta-4;
     42                                dctb = 3*tt - 2*theta;
     43                                ddctb = 6*theta-2;
     44                        }
     45                        else {
     46                                //Tangent A provided but tangent B not provided
     47                                // 1-t*t, t-t*t, t*t
     48                                double t = theta;
     49                                dcb = 2*t;
     50                                ddcb = 2;
     51                                dca = -dcb;
     52                                ddca = -2;
     53                                dcta = 1-dcb;
     54                                ddcta = -ddcb;
     55                                dctb=0;   
     56                                ddctb=0;   
     57                        }
    3258                }
    33                 if ( theta>1){
    34                         throw ErrorException(__FUNCT__,exprintf("theta>1"));
     59                else{
     60                        if (TgB()){
     61                                //Tangent B provided but tangent A not provided
     62                                double t = 1-theta;
     63                                dca = -2*t;
     64                                ddca = 2;
     65                                dcb = -dca;
     66                                ddcb = -2;
     67                                dctb = 1+dca;
     68                                ddctb= ddca;
     69                                dcta =0;
     70                                ddcta =0;
     71                        }
     72                        else {
     73                                //Neither thangent A nor tangent B provided
     74                                // lagrange P1
     75                                t=B-A;
     76                                return 0;
     77                        }
    3578                }
    36                 if (TgA())
    37                  if (TgB()) // interpolation d'hermite
    38                         { //cb =  theta*theta*(3-2*theta);
    39                          dcb = 6*theta*(1-theta);
    40                          ddcb = 6*(1-2*theta);
    41                          //ca =  1-cb;     
    42                          dca = -dcb;
    43                          ddca = -ddcb;
    44 
    45                          // cta = (1-theta)*(1-theta)*theta;
    46                          dcta =  (3*theta - 4)*theta + 1;
    47                          ddcta=6*theta-4;
    48 
    49                          //ctb = (theta-1)*theta*theta ;
    50                          dctb = 3*tt - 2*theta;
    51                          ddctb = 6*theta-2;
    52                         }
    53                  else { // 1-t*t, t-t*t, t*t
    54                          double t = theta;
    55                          // cb = t*t;
    56                          dcb = 2*t;
    57                          ddcb = 2;
    58                          //ca = 1-cb;
    59                          dca = -dcb;
    60                          ddca = -2;
    61                          // cta= t-cb;
    62                          dcta = 1-dcb;
    63                          ddcta = -ddcb;
    64                          // ctb =0;
    65                          dctb=0;   
    66                          ddctb=0;   
    67                  }   
    68                 else
    69                  if (TgB()){
    70                          double t = 1-theta;
    71                          //ca = t*t;
    72                          dca = -2*t;
    73                          ddca = 2;
    74                          //cb = 1-ca;
    75                          dcb = -dca;
    76                          ddcb = -2;
    77                          //ctb= -t+ca;
    78                          dctb = 1+dca;
    79                          ddctb= ddca;
    80                          //cta=0;   
    81                          dcta =0;
    82                          ddcta =0;
    83                  }
    84                  else {t=B-A;return 0;} // lagrange P1
    85                 R2 d =  A*dca + B*dcb + tg[0]* dcta + tg[1] * dctb;
    86 
     79                R2 d  =  A*dca  + B*dcb  + tg[0]* dcta  + tg[1] * dctb;
    8780                R2 dd =  A*ddca + B*ddcb + tg[0]* ddcta + tg[1] * ddctb;
    8881                double d2=(d,d);
    8982                double sd2 = sqrt(d2);
    9083                t=d;
    91                 if(d2>1.0e-20) {t/=sd2;return Abs(Det(d,dd))/(d2*sd2);}
     84                if(d2>1.0e-20){
     85                        t/=sd2;
     86                        return Abs(Det(d,dd))/(d2*sd2);
     87                }
    9288                else return 0;
    93           }
     89        }
    9490        /*}}}1*/
    9591        /*FUNCTION GeometricalEdge::F{{{1*/
  • issm/trunk/src/c/Bamgx/objects/Geometry.cpp

    r3299 r3301  
    742742                // generation of  all the tangents
    743743                for (i=0;i<nbe;i++) {
    744 
    745744                        //Get AB = vertex1->vertex2
    746745                        R2    AB =edges[i].v[1]->r -edges[i].v[0]->r;       
     
    748747                        double lAB=Norme2(AB);
    749748                        //initialize tangent
    750                         double ltg2[2];
    751                         ltg2[0]=0;ltg2[1]=0;
     749                        double ltg2[2]={0.0};
    752750
    753751                        //loop over the 2 vertices of the edge
    754752                        for (jj=0;jj<2;jj++) {
    755                                 R2    tg =edges[i].tg[jj];
     753                                R2     tg =edges[i].tg[jj];
    756754                                double ltg=Norme2(tg);
    757755
     
    760758                                        //if the current vertex of the edge is not a corner
    761759                                        if(!edges[i].v[jj]->Corner()){
    762                                                 tg =  edges[i].v[1-jj]->r - edges[i].Adj[jj]->v[1-edges[i].DirAdj[jj]]->r;
    763                                                 ltg=  Norme2(tg);
    764                                                 tg =  tg *(lAB/ltg),ltg=lAB;
     760                                                tg = edges[i].v[1-jj]->r - edges[i].Adj[jj]->v[1-edges[i].DirAdj[jj]]->r; //previous point and next point on curve
     761                                                ltg= Norme2(tg);
     762                                                tg = tg *(lAB/ltg);
     763                                                ltg= lAB;
    765764                                        }
    766765                                        //else:  a Corner with no tangent => nothing to do   
    767766                                }
    768767                                else{
    769                                         tg = tg *(lAB/ltg),ltg=lAB;
    770                                 }
     768                                        //tangent has already been computed
     769                                        tg = tg*(lAB/ltg),ltg=lAB;
     770                                }
     771
    771772                                ltg2[jj] = ltg;
    772                                 if ((tg,AB)<0) tg = -tg;
     773
     774                                if ((tg,AB)<0){
     775                                        tg = -tg;
     776                                }
     777
    773778                                edges[i].tg[jj] = tg;
    774779                        }
  • issm/trunk/src/c/Bamgx/objects/Triangles.cpp

    r3300 r3301  
    822822        /*}}}1*/
    823823        /*FUNCTION Triangles::ReadMetric{{{1*/
    824         void Triangles::ReadMetric(BamgOpts* bamgopts,const double hmin1=1.0e-30,const double hmax1=1.0e30,const double coef=1) {
     824        void Triangles::ReadMetric(const BamgOpts* bamgopts) {
     825
     826                /*Intermediary*/
    825827                int  i,j;
    826828
    827829                if(bamgopts->verbose>3) printf("      processing metric\n");
    828 
    829                 double hmin = Max(hmin1,MinimalHmin());
    830                 double hmax = Min(hmax1,MaximalHmax());
     830                double hmin = Max(bamgopts->hmin,MinimalHmin());
     831                double hmax = Min(bamgopts->hmax,MaximalHmax());
     832                double coef = bamgopts->coef;
    831833
    832834                //for now we only use j==3
     
    904906                                Gh.ProjectOnCurve(edges[i],ss[j],V,GV);
    905907
    906                                 GeometricalEdge * eg = GV;
     908                                GeometricalEdge* eg = GV;
    907909                                double s = GV;
    908910                                R2 tg;
     
    914916                                }
    915917                                double hn=Min(hmax,ht*anisomax);
     918
    916919                                if (ht<=0 || hn<=0){
    917920                                        throw ErrorException(__FUNCT__,exprintf("ht<=0 || hn<=0"));
     
    44184421                                } 
    44194422                        }
    4420                 if (quadtree) {delete quadtree;
     4423                if (quadtree){
     4424                        delete quadtree;
    44214425                        quadtree = new QuadTree(this);
    44224426                }
    44234427
    44244428                for ( it=0;it<nbv;it++) renu[i]= -renu[i]-1;
    4425                 printf("end renumbervertex\n");
    44264429        }
    44274430        /*}}}1*/
  • issm/trunk/src/c/Bamgx/objects/Triangles.h

    r3280 r3301  
    136136                        void ReadMesh(BamgMesh* bamgmesh, BamgOpts* bamgopts);
    137137                        void WriteMesh(BamgMesh* bamgmesh,BamgOpts* bamgopts);
    138                         void ReadMetric(BamgOpts* bamgopts,const double hmin,const double hmax,const double coef);
     138                        void ReadMetric(const BamgOpts* bamgopts);
    139139                        void WriteMetric(BamgOpts* bamgopts);
    140140                        void AddMetric(BamgOpts* bamgopts);
  • issm/trunk/src/c/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp

    r3263 r3301  
    1111#include "../toolkits/toolkits.h"
    1212
    13 /*Bamg: */
    14 #include <unistd.h>
    15 #include <stdlib.h>
    16 #include <stdio.h>
    17 #include <string.h>
    1813#include "../Bamgx/objects/BamgObjects.h"
    1914
  • issm/trunk/src/c/objects/BamgOpts.cpp

    r3279 r3301  
    1919        bamgopts->hmin=0;
    2020        bamgopts->hmax=0;
     21        bamgopts->hminVertices=NULL;
     22        bamgopts->hmaxVertices=NULL;
    2123        bamgopts->gradation=0;
    2224        bamgopts->cutoff=0;
    2325        bamgopts->splitcorners=0;
     26        bamgopts->geometricalmetric=0;
    2427        bamgopts->verbose=0;
    2528        bamgopts->err=NULL;
     
    4346        if (bamgopts->errg<0) throw ErrorException(__FUNCT__,exprintf("'errg' option should be >0"));
    4447        if (bamgopts->nbjacobi<=0) throw ErrorException(__FUNCT__,exprintf("'nbjacobi' option should be >0"));
     48        if (bamgopts->geometricalmetric!=0  && bamgopts->geometricalmetric!=1) throw ErrorException(__FUNCT__,exprintf("'geometricalmetric' supported options are 0 and 1"));
    4549        if (bamgopts->NbSmooth<=0) throw ErrorException(__FUNCT__,exprintf("'NbSmooth' option should be >0"));
    4650        if (bamgopts->maxnbv<3) throw ErrorException(__FUNCT__,exprintf("'maxnbv' option should be >3"));
  • issm/trunk/src/c/objects/BamgOpts.h

    r3277 r3301  
    2222        double  hmin;
    2323        double  hmax;
     24        double* hminVertices;
     25        double* hmaxVertices;
    2426        double  gradation;
    2527        double  cutoff;
    2628        int     splitcorners;
     29        int     geometricalmetric;
    2730        int     verbose;
    28         double*  err;
    29         double   errg;
     31        double* err;
     32        double  errg;
    3033        double  coef;
    3134        double* metric;
  • issm/trunk/src/m/classes/public/bamg.m

    r3293 r3301  
    44%   Available options (for more details see ISSM website http://issm.jpl.nasa.gov/):
    55%
    6 %   - domain : followed by an ARGUS file that prescribes the domain outline (rifts and holes)
    7 %   - hmin   : minimum edge length (default is 10^-100)
    8 %   - hmax   : maximum esge length (default is 10^100)
    9 %   - hVertices : imposed edge length for each vertex (geometry or mesh)
     6%   - domain: followed by an ARGUS file that prescribes the domain outline (rifts and holes)
     7%   - hmin  : minimum edge length (default is 10^-100)
     8%   - hmax  : maximum esge length (default is 10^100)
     9%   - hVertices   : imposed edge length for each vertex (geometry or mesh)
     10%   - hminVertices: minimum edge length for each vertex (mesh)
     11%   - hmaxVertices: maximum edge length for each vertex (mesh)
    1012%
    1113%   - anisomax    : maximum ration between the smallest and largest edges (default is 10^30)
     
    3133%   - omega       : relaxation parameter of the smoothing procedure (default is 1.8)
    3234%   - power       : power applied to the metric (default is 1)
    33 %   - splitcorner : split triangles whuch have 3 vertices on the outline (default is 1)
     35%   - splitcorners : split triangles whuch have 3 vertices on the outline (default is 1)
     36%   - geometricalmetric : Take the geometry into account to generate the metric (default is 0)
    3437%   - verbose     : level of verbosity (default is 1)
    3538%
     
    227230bamg_options.hmin=getfieldvalue(options,'hmin',10^-100);
    228231bamg_options.hmax=getfieldvalue(options,'hmax',10^100);
     232bamg_options.hminVertices=getfieldvalue(options,'hminVertices',[]);
     233bamg_options.hmaxVertices=getfieldvalue(options,'hmaxVertices',[]);
    229234bamg_options.KeepVertices=getfieldvalue(options,'KeepVertices',1);
    230235bamg_options.MaximalAngleOfCorner=getfieldvalue(options,'MaximalAngleOfCorner',10);
     
    238243bamg_options.power=getfieldvalue(options,'power',1);
    239244bamg_options.splitcorners=getfieldvalue(options,'splitcorners',1);
     245bamg_options.geometricalmetric=getfieldvalue(options,'geometricalmetric',0);
    240246bamg_options.verbose=getfieldvalue(options,'verbose',1);
    241247%}}}
    242 
    243 %check bamg options
    244 fieldsize=size(bamg_options.field);
    245 if fieldsize(1),
    246         if fieldsize(1)~=md.numberofgrids,
    247                 error(['bamg error message, ''field'' should have ' num2str(md.numberofgrids) ' lines (numberofgrids)']);
    248         end
    249         if (fieldsize(2)~=0 & length(bamg_options.err)~=fieldsize(2)),
    250                 error(['bamg error message, ''err'' should be of length ' num2str(fieldsize(2)) ' (As many as fields)']);
    251         end
    252 end
    253248
    254249%call Bamg
  • issm/trunk/src/mex/Bamg/Bamg.cpp

    r3279 r3301  
    8282        FetchData(&bamgopts.verbose,mxGetField(BAMGOPTIONS,0,"verbose"));
    8383        FetchData(&bamgopts.splitcorners,mxGetField(BAMGOPTIONS,0,"splitcorners"));
     84        FetchData(&bamgopts.geometricalmetric,mxGetField(BAMGOPTIONS,0,"geometricalmetric"));
    8485        FetchData(&bamgopts.MaximalAngleOfCorner,mxGetField(BAMGOPTIONS,0,"MaximalAngleOfCorner"));
     86        FetchData(&bamgopts.hminVertices,&lines,&cols,mxGetField(BAMGOPTIONS,0,"hminVertices"));
     87        if (bamgopts.hminVertices && (cols!=1 || lines!=bamgmesh_in.NumVertices)){throw ErrorException(__FUNCT__,exprintf("the size of 'hminVertices' should be [%i %i]",bamgmesh_in.NumVertices,1));}
     88        FetchData(&bamgopts.hmaxVertices,&lines,&cols,mxGetField(BAMGOPTIONS,0,"hmaxVertices"));
     89        if (bamgopts.hmaxVertices && (cols!=1 || lines!=bamgmesh_in.NumVertices)){throw ErrorException(__FUNCT__,exprintf("the size of 'hmaxVertices' should be [%i %i]",bamgmesh_in.NumVertices,1));}
    8590        FetchData(&bamgopts.metric,&lines,&cols,mxGetField(BAMGOPTIONS,0,"metric"));
    8691        if (bamgopts.metric && (cols!=3 || lines!=bamgmesh_in.NumVertices)){throw ErrorException(__FUNCT__,exprintf("the size of 'metric' should be [%i %i]",bamgmesh_in.NumVertices,3));}
Note: See TracChangeset for help on using the changeset viewer.