Changeset 5187


Ignore:
Timestamp:
08/12/10 11:38:54 (15 years ago)
Author:
Mathieu Morlighem
Message:

As usual (Bamg)

Location:
issm/trunk/src
Files:
16 edited

Legend:

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

    r5148 r5187  
    116116
    117117                // change using hVertices if provided
    118                 if (bamgmesh_in->hVertices){
     118                if(bamgopts->hVertices && bamgopts->hVerticesSize[0]==BTh.nbv){
    119119                        if (verbosity>1) printf("   Merging Metric with hVertices...\n");
    120120                        for (i=0;i<BTh.nbv;i++){
    121                                 if (!isnan(bamgmesh_in->hVertices[i])){
    122                                         BTh[i].m=Metric((float)bamgmesh_in->hVertices[i]);
     121                                if (!isnan(bamgopts->hVertices[i])){
     122                                        BTh[i].m=Metric((float)bamgopts->hVertices[i]);
    123123                                }
    124124                        }
  • TabularUnified issm/trunk/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp

    r5149 r5187  
    8282                        //Get current point coordinates
    8383                        r.x=x_interp[i]; r.y=y_interp[i];
    84                         I2 I=Th.toI2(r);
     84                        I2 I=Th.R2ToI2(r);
    8585
    8686                        //Find triangle holding r/I
  • TabularUnified issm/trunk/src/c/objects/Bamg/BamgGeom.cpp

    r5177 r5187  
    99        this->VerticesSize[0]=0,          this->VerticesSize[1]=0;          this->Vertices=NULL;
    1010        this->EdgesSize[0]=0,             this->EdgesSize[1]=0;             this->Edges=NULL;
    11         this->hVertices=NULL;
    12         this->MetricVertices=NULL;
    1311        this->TangentAtEdgesSize[0]=0,    this->TangentAtEdgesSize[1]=0;    this->TangentAtEdges=NULL;
    1412        this->CornersSize[0]=0,           this->CornersSize[1]=0;           this->Corners=NULL;
     
    2422BamgGeom::BamgGeom(mxArray* matlab_struct){
    2523
    26         int lines,cols;
    27 
    2824        FetchData(&this->Vertices,        &this->VerticesSize[0],        &this->VerticesSize[1],        mxGetField(matlab_struct,0,"Vertices"));
    2925        FetchData(&this->Edges,           &this->EdgesSize[0],           &this->EdgesSize[1],           mxGetField(matlab_struct,0,"Edges"));
    30         FetchData(&this->hVertices,&lines,&cols,mxGetField(matlab_struct,0,"hVertices"));
    31         this->MetricVertices=NULL;
    3226        this->TangentAtEdgesSize[0]=0,    this->TangentAtEdgesSize[1]=0;    this->TangentAtEdges=NULL;
    3327        FetchData(&this->Corners,         &this->CornersSize[0],         &this->CornersSize[1],         mxGetField(matlab_struct,0,"Corners"));
     
    3630        FetchData(&this->CrackedEdges,    &this->CrackedEdgesSize[0],    &this->CrackedEdgesSize[1],    mxGetField(matlab_struct,0,"CrackedEdges"));
    3731        FetchData(&this->SubDomains,      &this->SubDomainsSize[0],      &this->SubDomainsSize[1],      mxGetField(matlab_struct,0,"SubDomains"));
    38 
    39         /*Some checks*/
    40         if (this->hVertices && (cols!=1 || lines!=this->VerticesSize[0])){ISSMERROR("the size of 'hVertices' should be [%i %i]",this->VerticesSize[0],1);}
    4132
    4233}
     
    4839        xfree((void**)&this->Vertices);
    4940        xfree((void**)&this->Edges);
    50         xfree((void**)&this->hVertices);
    51         xfree((void**)&this->MetricVertices);
    5241        xfree((void**)&this->TangentAtEdges);
    5342        xfree((void**)&this->Corners);
  • TabularUnified issm/trunk/src/c/objects/Bamg/BamgGeom.h

    r5177 r5187  
    1616                int     EdgesSize[2];
    1717                double* Edges;
    18                 double* hVertices;
    19                 double* MetricVertices;
    2018                int     TangentAtEdgesSize[2];
    2119                double* TangentAtEdges;
  • TabularUnified issm/trunk/src/c/objects/Bamg/BamgMesh.cpp

    r5177 r5187  
    2020        this->VerticesOnGeometricEdgeSize[0]=0,   this->VerticesOnGeometricEdgeSize[1]=0;  this->VerticesOnGeometricEdge=NULL;
    2121        this->EdgesOnGeometricEdgeSize[0]=0,      this->EdgesOnGeometricEdgeSize[1]=0;     this->EdgesOnGeometricEdge=NULL;
    22 
    23         this->hVertices=NULL;
    2422
    2523        this->IssmEdgesSize[0]=0,                 this->IssmEdgesSize[1]=0;                this->IssmEdges=NULL;
     
    5351        FetchData(&this->EdgesOnGeometricEdge,     &this->EdgesOnGeometricEdgeSize[0],     &this->EdgesOnGeometricEdgeSize[1],     mxGetField(matlab_struct,0,"EdgesOnGeometricEdge"));
    5452
    55         FetchData(&this->hVertices,                &lines,                                 &cols,                                  mxGetField(matlab_struct,0,"hVertices"));
    56 
    5753        this->IssmEdgesSize[0]=0,                 this->IssmEdgesSize[1]=0;                this->IssmEdges=NULL;
    5854        FetchData(&this->IssmSegments,             &this->IssmSegmentsSize[0],             &this->IssmSegmentsSize[1],             mxGetField(matlab_struct,0,"IssmSegments"));
     
    6157        this->NodalConnectivitySize[0]=0,         this->NodalConnectivitySize[1]=0;        this->NodalConnectivity=NULL;
    6258        this->NodalElementConnectivitySize[0]=0,  this->NodalElementConnectivitySize[1]=0; this->NodalElementConnectivity=NULL;
    63 
    64         /*Checks*/
    65         if (this->hVertices && (cols!=1 || lines!=this->VerticesSize[0])){ISSMERROR("the size of 'hVertices' should be [%i %i]",this->VerticesSize[0],1);}
    6659
    6760}
     
    8477        xfree((void**)&this->VerticesOnGeometricEdge);
    8578        xfree((void**)&this->EdgesOnGeometricEdge);
    86 
    87         xfree((void**)&this->hVertices);
    8879
    8980        xfree((void**)&this->IssmEdges);
  • TabularUnified issm/trunk/src/c/objects/Bamg/BamgMesh.h

    r5177 r5187  
    3838                double* CrackedEdges;
    3939
    40                 double* hVertices;
    41 
    4240                /*Output for ISSM*/
    4341                int     IssmEdgesSize[2];
  • TabularUnified issm/trunk/src/c/objects/Bamg/BamgOpts.cpp

    r5177 r5187  
    99BamgOpts::BamgOpts(){
    1010
     11        this->anisomax=0;
     12        this->cutoff=0;
     13        this->coeff=0;
     14        this->errg=0;
     15        this->gradation=0;
     16        this->Hessiantype=0;
     17        this->MaxCornerAngle=0;
    1118        this->maxnbv=0;
    12         this->MaxCornerAngle=0;
     19        this->maxsubdiv=0;
     20        this->Metrictype=0;
     21        this->nbjacobi=0;
     22        this->nbsmooth=0;
     23        this->omega=0;
     24        this->power=0;
     25        this->verbose=0;
     26
    1327        this->Crack=0;
    14         this->Hessiantype=0;
    15         this->Metrictype=0;
     28        this->geometricalmetric=0;
    1629        this->KeepVertices=0;
    17         this->maxsubdiv=0;
    18         this->power=0;
    19         this->anisomax=0;
    20         this->nbsmooth=0;
    21         this->nbjacobi=0;
    22         this->omega=0;
     30        this->splitcorners=0;
     31
    2332        this->hmin=0;
    2433        this->hmax=0;
    25         this->hminVertices=NULL;
    26         this->hmaxVertices=NULL;
    27         this->gradation=0;
    28         this->cutoff=0;
    29         this->splitcorners=0;
    30         this->geometricalmetric=0;
    31         this->verbose=0;
    32         this->err=NULL;
    33         this->errg=0;
    34         this->coeff=0;
    35         this->metric=NULL;
    36         this->field=NULL;
    37         this->numfields=0;
     34        this->hminVertices=NULL; this->hminVerticesSize[0]=this->hminVerticesSize[1]=0;
     35        this->hmaxVertices=NULL; this->hmaxVerticesSize[0]=this->hmaxVerticesSize[1]=0;
     36        this->hVertices=NULL;    this->hVerticesSize[0]=this->hVerticesSize[1]=0;
     37        this->metric=NULL;       this->metricSize[0]=this->metricSize[1]=0;
     38        this->field=NULL;        this->fieldSize[0]=this->fieldSize[1]=0;
     39        this->err=NULL;          this->errSize[0]=this->errSize[1]=0;
    3840
    3941}
     
    4345BamgOpts::BamgOpts(mxArray* matlab_struct){
    4446
    45         int lines,cols;
     47        FetchData(&this->anisomax,mxGetField(matlab_struct,0,"anisomax"));
     48        FetchData(&this->cutoff,mxGetField(matlab_struct,0,"cutoff"));
     49        FetchData(&this->coeff,mxGetField(matlab_struct,0,"coeff"));
     50        FetchData(&this->errg,mxGetField(matlab_struct,0,"errg"));
     51        FetchData(&this->gradation,mxGetField(matlab_struct,0,"gradation"));
     52        FetchData(&this->Hessiantype,mxGetField(matlab_struct,0,"Hessiantype"));
     53        FetchData(&this->MaxCornerAngle,mxGetField(matlab_struct,0,"MaxCornerAngle"));
     54        FetchData(&this->maxnbv,mxGetField(matlab_struct,0,"maxnbv"));
     55        FetchData(&this->maxsubdiv,mxGetField(matlab_struct,0,"maxsubdiv"));
     56        FetchData(&this->Metrictype,mxGetField(matlab_struct,0,"Metrictype"));
     57        FetchData(&this->nbjacobi,mxGetField(matlab_struct,0,"nbjacobi"));
     58        FetchData(&this->nbsmooth,mxGetField(matlab_struct,0,"nbsmooth"));
     59        FetchData(&this->omega,mxGetField(matlab_struct,0,"omega"));
     60        FetchData(&this->power,mxGetField(matlab_struct,0,"power"));
     61        FetchData(&this->verbose,mxGetField(matlab_struct,0,"verbose"));
    4662
    47         FetchData(&this->maxnbv,mxGetField(matlab_struct,0,"maxnbv"));
    48         FetchData(&this->MaxCornerAngle,mxGetField(matlab_struct,0,"MaxCornerAngle"));
    4963        FetchData(&this->Crack,mxGetField(matlab_struct,0,"Crack"));
    50         FetchData(&this->Hessiantype,mxGetField(matlab_struct,0,"Hessiantype"));
    51         FetchData(&this->Metrictype,mxGetField(matlab_struct,0,"Metrictype"));
     64        FetchData(&this->geometricalmetric,mxGetField(matlab_struct,0,"geometricalmetric"));
    5265        FetchData(&this->KeepVertices,mxGetField(matlab_struct,0,"KeepVertices"));
    53         FetchData(&this->maxsubdiv,mxGetField(matlab_struct,0,"maxsubdiv"));
    54         FetchData(&this->power,mxGetField(matlab_struct,0,"power"));
    55         FetchData(&this->anisomax,mxGetField(matlab_struct,0,"anisomax"));
    56         FetchData(&this->nbsmooth,mxGetField(matlab_struct,0,"nbsmooth"));
    57         FetchData(&this->nbjacobi,mxGetField(matlab_struct,0,"nbjacobi"));
    58         FetchData(&this->omega,mxGetField(matlab_struct,0,"omega"));
     66        FetchData(&this->splitcorners,mxGetField(matlab_struct,0,"splitcorners"));
     67
    5968        FetchData(&this->hmin,mxGetField(matlab_struct,0,"hmin"));
    6069        FetchData(&this->hmax,mxGetField(matlab_struct,0,"hmax"));
    61         FetchData(&this->hminVertices,&lines,&cols,mxGetField(matlab_struct,0,"hminVertices"));
    62         FetchData(&this->hmaxVertices,&lines,&cols,mxGetField(matlab_struct,0,"hmaxVertices"));
    63         FetchData(&this->gradation,mxGetField(matlab_struct,0,"gradation"));
    64         FetchData(&this->cutoff,mxGetField(matlab_struct,0,"cutoff"));
    65         FetchData(&this->splitcorners,mxGetField(matlab_struct,0,"splitcorners"));
    66         FetchData(&this->geometricalmetric,mxGetField(matlab_struct,0,"geometricalmetric"));
    67         FetchData(&this->verbose,mxGetField(matlab_struct,0,"verbose"));
    68         FetchData(&this->field,&lines,&this->numfields,mxGetField(matlab_struct,0,"field"));
    69         FetchData(&this->err,NULL,&cols,mxGetField(matlab_struct,0,"err"));
    70         if (this->numfields!=0 && cols!=this->numfields){ISSMERROR("the size of 'err' should be the same as 'field'");}
    71         FetchData(&this->errg,mxGetField(matlab_struct,0,"errg"));
    72         FetchData(&this->coeff,mxGetField(matlab_struct,0,"coeff"));
    73         FetchData(&this->metric,&lines,&cols,mxGetField(matlab_struct,0,"metric"));
     70        FetchData(&this->hminVertices,&this->hminVerticesSize[0],&this->hminVerticesSize[1],mxGetField(matlab_struct,0,"hminVertices"));
     71        FetchData(&this->hmaxVertices,&this->hmaxVerticesSize[0],&this->hmaxVerticesSize[1],mxGetField(matlab_struct,0,"hmaxVertices"));
     72        FetchData(&this->hVertices,&this->hVerticesSize[0],&this->hVerticesSize[1],mxGetField(matlab_struct,0,"hVertices"));
     73        FetchData(&this->metric,&this->metricSize[0],&this->metricSize[1],mxGetField(matlab_struct,0,"metric"));
     74        FetchData(&this->field,&this->fieldSize[0],&this->fieldSize[1],mxGetField(matlab_struct,0,"field"));
     75        FetchData(&this->err,&this->errSize[0],&this->errSize[1],mxGetField(matlab_struct,0,"err"));
    7476
    7577        /*Additional checks*/
     
    8486        xfree((void**)&this->hminVertices);
    8587        xfree((void**)&this->hmaxVertices);
    86         xfree((void**)&this->err);
     88        xfree((void**)&this->hVertices);
    8789        xfree((void**)&this->metric);
    8890        xfree((void**)&this->field);
     91        xfree((void**)&this->err);
    8992
    9093}
     
    97100        int i;
    98101
     102        if (this->anisomax<1) ISSMERROR("'anisomax' option should be >=1");
    99103        if (this->coeff==0) ISSMERROR("'coeff' should be positive");
     104        if (this->errg<0) ISSMERROR("'errg' option should be >0");
     105        if (this->gradation<1) ISSMERROR("'gradation' option should be >=1");
     106        if (this->Hessiantype!=0  && this->Hessiantype!=1) ISSMERROR("'Hessiantype' supported options are 0 and 1");
     107        if (this->maxnbv<3) ISSMERROR("'maxnbv' option should be >3");
    100108        if (this->maxsubdiv<=1) ISSMERROR("'maxsubdiv' should be >1");
     109        if (this->Metrictype!=0   && this->Metrictype!=1 && this->Metrictype!=2) ISSMERROR("'Metrictype' supported options are 0, 1 and 2");
     110        if (this->nbjacobi<=0) ISSMERROR("'nbjacobi' option should be >0");
     111        if (this->nbsmooth<=0) ISSMERROR("'nbsmooth' option should be >0");
     112
    101113        if (this->Crack!=0  && this->Crack!=1) ISSMERROR("'Crack' supported options are 0 and 1");
    102         if (this->Hessiantype!=0  && this->Hessiantype!=1) ISSMERROR("'Hessiantype' supported options are 0 and 1");
    103         if (this->Metrictype!=0   && this->Metrictype!=1 && this->Metrictype!=2) ISSMERROR("'Metrictype' supported options are 0, 1 and 2");
    104114        if (this->KeepVertices!=0 && this->KeepVertices!=1) ISSMERROR("'KeepVertices' supported options are 0 and 1");
    105         if (this->errg<0) ISSMERROR("'errg' option should be >0");
    106         if (this->nbjacobi<=0) ISSMERROR("'nbjacobi' option should be >0");
    107115        if (this->geometricalmetric!=0  && this->geometricalmetric!=1) ISSMERROR("'geometricalmetric' supported options are 0 and 1");
    108         if (this->nbsmooth<=0) ISSMERROR("'nbsmooth' option should be >0");
    109         if (this->maxnbv<3) ISSMERROR("'maxnbv' option should be >3");
     116
    110117        if (this->hmin<=0) ISSMERROR("'hmin' option should be >0");
    111118        if (this->hmax<=0 || this->hmax<this->hmin) ISSMERROR("'hmax' option should be between 0 and hmin=%g",this->hmin);
    112         if (this->anisomax<1) ISSMERROR("'anisomax' option should be >=1");
    113         if (this->gradation<1) ISSMERROR("'gradation' option should be >=1");
    114         for (i=0;i<this->numfields;i++) {if (this->err[i]<=0) ISSMERROR("'err' option should be >0");};
     119        if (this->hminVertices && this->hminVerticesSize[1]!=1) ISSMERROR("'hminVertices' should be a column");
     120        if (this->hmaxVertices && this->hmaxVerticesSize[1]!=1) ISSMERROR("'hmaxVertices' should be a column");
     121        if (this->hVertices && this->hVerticesSize[1]!=1) ISSMERROR("'hVertices' should be a column");
     122        if (this->metric && (this->metricSize[1]!=1 && this->metricSize[1]!=3)) ISSMERROR("'metric' should have either 1 (iso) or 3 (aniso) columns.");
     123        if (this->field){
     124                if (this->errSize[0]!=1 || this->errSize[1]!=this->fieldSize[1]) ISSMERROR("'err' should be of size %i x %i",1,this->fieldSize[1]);
     125                for (i=0;i<this->fieldSize[1];i++) {if (this->err[i]<=0) ISSMERROR("'err' option should be >0");};
     126        }
    115127
    116128}
  • TabularUnified issm/trunk/src/c/objects/Bamg/BamgOpts.h

    r5177 r5187  
    1414        public:
    1515
     16                /*Parameters*/
     17                double  anisomax;
     18                double  cutoff;
     19                double  coeff;
     20                double  errg;
     21                double  gradation;
     22                int     Hessiantype;
     23                double  MaxCornerAngle;
    1624                int     maxnbv;
    17                 double  MaxCornerAngle;
     25                double  maxsubdiv;
     26                int     Metrictype;
     27                int     nbjacobi;
     28                int     nbsmooth;
     29                double  omega;
     30                double  power;
     31                int     verbose;
     32
     33                /*Flags*/
    1834                int     Crack;
    19                 int     Hessiantype;
    20                 int     Metrictype;
     35                int     geometricalmetric;
    2136                int     KeepVertices;
    22                 double  maxsubdiv;
    23                 double  power;
    24                 double  anisomax;
    25                 int     nbsmooth;
    26                 int     nbjacobi;
    27                 double  omega;
     37                int     splitcorners;
     38
     39                /*Metric related*/
    2840                double  hmin;
    2941                double  hmax;
     42                int     hminVerticesSize[2];
    3043                double* hminVertices;
     44                int     hmaxVerticesSize[2];
    3145                double* hmaxVertices;
    32                 double  gradation;
    33                 double  cutoff;
    34                 int     splitcorners;
    35                 int     geometricalmetric;
    36                 int     verbose;
     46                int     hVerticesSize[2];
     47                double* hVertices;
     48                int     metricSize[2];
     49                double* metric;
     50                int     fieldSize[2];
     51                double* field;
     52                int     errSize[2];
    3753                double* err;
    38                 double  errg;
    39                 double  coeff;
    40                 double* metric;
    41                 double* field;
    42                 int     numfields;
    4354
    4455                BamgOpts();
  • TabularUnified issm/trunk/src/c/objects/Bamg/Geometry.cpp

    r5180 r5187  
    180180
    181181                //hVertices
    182                 if(bamggeom->hVertices){
     182                if(bamgopts->hVertices && bamgopts->hVerticesSize[0]==nbv){
    183183                        if(verbose>5) printf("      processing hVertices\n");
    184184                        for (i=0;i< nbv;i++){
    185                                 if (!isnan(bamggeom->hVertices[i])){
    186                                         vertices[i].m=Metric((double)bamggeom->hVertices[i]);
     185                                if (!isnan(bamgopts->hVertices[i])){
     186                                        vertices[i].m=Metric((double)bamgopts->hVertices[i]);
    187187                                }
    188188                        }
     
    190190
    191191                //MetricVertices
    192                 if(bamggeom->MetricVertices){
     192                if(bamgopts->metric && bamgopts->metric[0]==nbv){
    193193                        if(verbose>5) printf("      processing MetricVertices\n");
    194194                        for (i=0;i< nbv;i++) {
    195                                 vertices[i].m = Metric((double)bamggeom->MetricVertices[i*3+0],(double)bamggeom->MetricVertices[i*3+1],(double)bamggeom->MetricVertices[i*3+2]);
     195                                vertices[i].m = Metric((double)bamgopts->metric[i*3+0],(double)bamgopts->metric[i*3+1],(double)bamgopts->metric[i*3+2]);
    196196                        }
    197197                }
  • TabularUnified issm/trunk/src/c/objects/Bamg/Mesh.cpp

    r5180 r5187  
    483483                                }
    484484                                edges[i].GeometricalEdgeHook=Gh.edges+j;
    485                         }
    486                 }
    487 
    488                 //hVertices
    489                 if(bamgmesh->hVertices){
    490                         if(verbose>5) printf("      processing hVertices\n");
    491                         for (i=0;i< nbv;i++){
    492                                 if (!isnan(bamgmesh->hVertices[i])){
    493                                         vertices[i].m=Metric((double)bamgmesh->hVertices[i]);
    494                                 }
    495485                        }
    496486                }
     
    17101700                /*Get and process fields*/
    17111701                s=bamgopts->field;
    1712                 nbsol=bamgopts->numfields;
     1702                nbsol=bamgopts->fieldSize[1];
     1703
     1704                /*Check size*/
     1705                if (bamgopts->fieldSize[0] != nbv) ISSMERROR("'field' should have %i rows",nbv);
    17131706
    17141707                //initialization of some variables
     
    19121905                /*Get and process fields*/
    19131906                s=bamgopts->field;
    1914                 nbsol=bamgopts->numfields;
     1907                nbsol=bamgopts->fieldSize[1];
     1908
     1909                /*Check size*/
     1910                if (bamgopts->fieldSize[0] != nbv) ISSMERROR("'field' should have %i rows",nbv);
    19151911
    19161912                //initialization of some variables
  • TabularUnified issm/trunk/src/c/objects/Bamg/Triangle.cpp

    r5151 r5187  
    138138        /*FUNCTION Triangle::NuEdgeTriangleAdj{{{1*/
    139139        short  Triangle::NuEdgeTriangleAdj(int i) const {
    140                 // Number of the  adjacent edge in adj tria 
     140                /*Number of the  adjacent edge in adj tria (make sure it is between 0 and 2*/
    141141                return AdjEdgeNumber[i&3]&3;
    142142        }/*}}}*/
  • TabularUnified issm/trunk/src/m/classes/@bamggeom/bamggeom.m

    r5093 r5187  
    1515        bg.RequiredEdges=[];
    1616        bg.CrackedEdges=[];
    17         bg.hVertices=[];
    18         bg.MetricVertices=[];
    1917        bg.SubDomains=[];
    2018
  • TabularUnified issm/trunk/src/m/classes/@bamgmesh/bamgmesh.m

    r5093 r5187  
    2424        bm.CrackedVertices=[];
    2525        bm.CrackedEdges=[];
    26         bm.hVertices=[];
    2726
    2827        bm=class(bm,'bamgmesh');
  • TabularUnified issm/trunk/src/m/classes/public/bamg.m

    r5093 r5187  
    224224        end
    225225
    226         if exist(options,'hVertices'),
    227                 bamg_geometry.hVertices=getfieldvalue(options,'hVertices');
    228                 if length(bamg_geometry.hVertices)~=nods,
    229                         error(['hVertices option should be of size [' num2str(nods) ',1]']);
    230                 end
    231         end
    232 
    233226        %process geom
    234227        %bamg_geometry=processgeometry(bamg_geometry,getfieldvalue(options,'tol',NaN),domain(1));
     
    253246                bamg_mesh.Vertices=[md.x md.y ones(md.numberofgrids,1)];
    254247                bamg_mesh.Triangles=[md.elements ones(md.numberofelements,1)];
    255         end
    256 
    257         if exist(options,'hVertices'),
    258                 bamg_mesh.hVertices=getfieldvalue(options,'hVertices');
    259                 if length(bamg_mesh.hVertices)~=md.numberofgrids,
    260                         error(['hVertices option should be of size [' num2str(md.numberofgrids) ',1]']);
    261                 end
    262248        end
    263249
     
    282268bamg_options.hminVertices=getfieldvalue(options,'hminVertices',[]);
    283269bamg_options.hmaxVertices=getfieldvalue(options,'hmaxVertices',[]);
     270bamg_options.hVertices=getfieldvalue(options,'hVertices',[]);
    284271bamg_options.KeepVertices=getfieldvalue(options,'KeepVertices',1);
    285272bamg_options.MaxCornerAngle=getfieldvalue(options,'MaxCornerAngle',10);
  • TabularUnified issm/trunk/src/mex/Bamg/Bamg.cpp

    r5177 r5187  
    2525        /*Initialize variables*/
    2626        bamgopts   = new BamgOpts(BAMGOPTIONS);
    27         bamggeom_in= new BamgGeom(BAMGGEOMETRY);
    28         bamgmesh_in= new BamgMesh(BAMGMESH);
     27        bamggeom_in= new BamgGeom(BAMGGEOMIN);
     28        bamgmesh_in= new BamgMesh(BAMGMESHIN);
    2929
    3030        /*Initialize outputs*/
  • TabularUnified issm/trunk/src/mex/Bamg/Bamg.h

    r4236 r5187  
    1717   
    1818/* serial input macros: */
    19 #define BAMGMESH     (mxArray*)prhs[0]
    20 #define BAMGGEOMETRY (mxArray*)prhs[1]
    21 #define BAMGOPTIONS  (mxArray*)prhs[2]
     19#define BAMGMESHIN  (mxArray*)prhs[0]
     20#define BAMGGEOMIN (mxArray*)prhs[1]
     21#define BAMGOPTIONS (mxArray*)prhs[2]
    2222
    2323/* serial output macros: */
Note: See TracChangeset for help on using the changeset viewer.