Changeset 9734


Ignore:
Timestamp:
09/09/11 15:10:56 (14 years ago)
Author:
seroussi
Message:

finished mesh

Location:
issm/trunk
Files:
3 added
3 deleted
134 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/Container/Inputs.cpp

    r9320 r9734  
    412412/*}}}*/
    413413/*FUNCTION Inputs::AXPY{{{1*/
    414 void  Inputs::AXPY(int YEnum, double scalar, int XEnum){
     414void  Inputs::AXPY(int MeshYEnum, double scalar, int MeshXEnum){
    415415           
    416416        Input* xinput=NULL;
     
    418418
    419419        /*Find x and y inputs: */
    420         xinput=(Input*)this->GetInput(XEnum);
    421         yinput=(Input*)this->GetInput(YEnum);
     420        xinput=(Input*)this->GetInput(MeshXEnum);
     421        yinput=(Input*)this->GetInput(MeshYEnum);
    422422
    423423        /*some checks: */
    424         if(!xinput) _error_(" input %s could not be found!",EnumToStringx(XEnum));
    425         if(!yinput) _error_(" input %s could not be found!",EnumToStringx(YEnum));
     424        if(!xinput) _error_(" input %s could not be found!",EnumToStringx(MeshXEnum));
     425        if(!yinput) _error_(" input %s could not be found!",EnumToStringx(MeshYEnum));
    426426
    427427        /*Apply AXPY: */
  • issm/trunk/src/c/Container/Inputs.h

    r8363 r9734  
    3737                Input*  GetInput(int enum_name);
    3838                Inputs* SpawnTriaInputs(int* indices);
    39                 void    AXPY(int YEnum, double scalar, int XEnum);
     39                void    AXPY(int MeshYEnum, double scalar, int MeshXEnum);
    4040                double  InfinityNorm(int enumtype);
    4141                double  Max(int enumtype);
  • issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h

    r9733 r9734  
    165165        MeshElementsEnum,
    166166        MeshEdgesEnum,
     167        MeshYEnum,
     168        MeshZEnum,
     169        MeshXEnum,
    167170        /*}}}*/
    168171        /*Datasets {{{1*/
     
    473476        TransientInputEnum,
    474477        /*Temporary*/
    475         YEnum,
    476         ZEnum,
    477         XEnum,
    478478        OutputfilenameEnum,
    479479        WaterfractionEnum,
  • issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp

    r9733 r9734  
    169169                case MeshElementsEnum : return "MeshElements";
    170170                case MeshEdgesEnum : return "MeshEdges";
     171                case MeshYEnum : return "MeshY";
     172                case MeshZEnum : return "MeshZ";
     173                case MeshXEnum : return "MeshX";
    171174                case ConstraintsEnum : return "Constraints";
    172175                case LoadsEnum : return "Loads";
     
    416419                case DragCoefficientAbsGradientEnum : return "DragCoefficientAbsGradient";
    417420                case TransientInputEnum : return "TransientInput";
    418                 case YEnum : return "Y";
    419                 case ZEnum : return "Z";
    420                 case XEnum : return "X";
    421421                case OutputfilenameEnum : return "Outputfilename";
    422422                case WaterfractionEnum : return "Waterfraction";
  • issm/trunk/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp

    r9733 r9734  
    7272
    7373        /*Fetch data:*/
    74         iomodel->FetchData(5,XEnum,YEnum,ZEnum,BedEnum,ThicknessEnum);
     74        iomodel->FetchData(5,MeshXEnum,MeshYEnum,MeshZEnum,BedEnum,ThicknessEnum);
    7575       
    7676        for (i=0;i<numberofvertices;i++){
     
    8585
    8686        /*Free data: */
    87         iomodel->DeleteData(5,XEnum,YEnum,ZEnum,BedEnum,ThicknessEnum);
     87        iomodel->DeleteData(5,MeshXEnum,MeshYEnum,MeshZEnum,BedEnum,ThicknessEnum);
    8888
    8989        /*Assign output pointer: */
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp

    r9725 r9734  
    6969        iomodel->FetchData(&vertices_type,NULL,NULL,FlowequationVertexEquationEnum);
    7070        iomodel->FetchData(&surface,NULL,NULL,SurfaceEnum);
    71         iomodel->FetchData(&z,NULL,NULL,ZEnum);
     71        iomodel->FetchData(&z,NULL,NULL,MeshZEnum);
    7272
    7373        /*Initialize counter: */
  • issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp

    r9733 r9734  
    167167        else if (strcmp(name,"MeshElements")==0) return MeshElementsEnum;
    168168        else if (strcmp(name,"MeshEdges")==0) return MeshEdgesEnum;
     169        else if (strcmp(name,"MeshY")==0) return MeshYEnum;
     170        else if (strcmp(name,"MeshZ")==0) return MeshZEnum;
     171        else if (strcmp(name,"MeshX")==0) return MeshXEnum;
    169172        else if (strcmp(name,"Constraints")==0) return ConstraintsEnum;
    170173        else if (strcmp(name,"Loads")==0) return LoadsEnum;
     
    414417        else if (strcmp(name,"DragCoefficientAbsGradient")==0) return DragCoefficientAbsGradientEnum;
    415418        else if (strcmp(name,"TransientInput")==0) return TransientInputEnum;
    416         else if (strcmp(name,"Y")==0) return YEnum;
    417         else if (strcmp(name,"Z")==0) return ZEnum;
    418         else if (strcmp(name,"X")==0) return XEnum;
    419419        else if (strcmp(name,"Outputfilename")==0) return OutputfilenameEnum;
    420420        else if (strcmp(name,"Waterfraction")==0) return WaterfractionEnum;
  • issm/trunk/src/c/objects/Vertex.cpp

    r9405 r9734  
    3131Vertex::Vertex(int vertex_id, int vertex_sid,int i, IoModel* iomodel){
    3232
    33         this->Init(vertex_id, vertex_sid, iomodel->Data(XEnum)[i],iomodel->Data(YEnum)[i],iomodel->Data(ZEnum)[i],(iomodel->Data(ZEnum)[i]-iomodel->Data(BedEnum)[i])/(iomodel->Data(ThicknessEnum)[i]));
     33        this->Init(vertex_id, vertex_sid, iomodel->Data(MeshXEnum)[i],iomodel->Data(MeshYEnum)[i],iomodel->Data(MeshZEnum)[i],(iomodel->Data(MeshZEnum)[i]-iomodel->Data(BedEnum)[i])/(iomodel->Data(ThicknessEnum)[i]));
    3434
    3535}
  • issm/trunk/src/m/classes/mesh.m

    r9733 r9734  
    3737                elements            = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
    3838                edges               = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
     39                x                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
     40                y                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
     41                z                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
    3942        end
    4043        methods
  • issm/trunk/src/m/classes/model/model.m

    r9733 r9734  
    4141                 autodiff         = modelfield('default',0,'marshall',true);
    4242                 mesh             = modelfield('default',0,'marshall',true);
    43 
    44                  %FIXME: all other fields should belong to other classes
    45                  x                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
    46                  y                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
    47                  z                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
    4843
    4944                 %}}}
     
    265260                         if isfield(structmd,'elements'), md.mesh.elements=structmd.mesh.elements; end
    266261                         if isfield(structmd,'edges'), md.mesh.edges=structmd.mesh.edges; end
     262                         if isfield(structmd,'y'), md.mesh.y=structmd.y; end
     263                         if isfield(structmd,'x'), md.mesh.x=structmd.x; end
     264                         if isfield(structmd,'z'), md.mesh.z=structmd.z; end
    267265
    268266                         %Field changes
  • issm/trunk/src/m/model/BasinConstrain.m

    r9733 r9734  
    3333                end
    3434                %ok, flag elements and nodes
    35                 [vertexondomain elementondomain]=ContourToMesh(md.mesh.elements(:,1:3),md.x,md.y,domain,'element and node',2);
     35                [vertexondomain elementondomain]=ContourToMesh(md.mesh.elements(:,1:3),md.mesh.x,md.mesh.y,domain,'element and node',2);
    3636        end
    3737        if invert,
  • issm/trunk/src/m/model/BasinConstrainShelf.m

    r9733 r9734  
    3333                end
    3434                %ok, flag elements and nodes
    35                 [vertexondomain elementondomain]=ContourToMesh(md.mesh.elements(:,1:3),md.x,md.y,domain,'element and node',2);
     35                [vertexondomain elementondomain]=ContourToMesh(md.mesh.elements(:,1:3),md.mesh.x,md.mesh.y,domain,'element and node',2);
    3636        end
    3737        if invert,
  • issm/trunk/src/m/model/DepthAverage.m

    r9725 r9734  
    1717        vector_average=zeros(md.mesh.numberofvertices2d,1);
    1818        for i=1:md.mesh.numberoflayers-1,
    19                 vector_average=vector_average+(project2d(md,vector,i)+project2d(md,vector,i+1))/2.*(project2d(md,md.z,i+1)-project2d(md,md.z,i));
     19                vector_average=vector_average+(project2d(md,vector,i)+project2d(md,vector,i+1))/2.*(project2d(md,md.mesh.z,i+1)-project2d(md,md.mesh.z,i));
    2020        end
    2121        vector_average=vector_average./project2d(md,md.geometry.thickness,1);
     
    2525        vector_average=zeros(md.mesh.numberofelements2d,1);
    2626        for i=1:md.mesh.numberoflayers-1,
    27                 vector_average=vector_average+project2d(md,vector,i).*(project2d(md,md.z,i+1)-project2d(md,md.z,i));
     27                vector_average=vector_average+project2d(md,vector,i).*(project2d(md,md.mesh.z,i+1)-project2d(md,md.mesh.z,i));
    2828        end
    2929        vector_average=vector_average./project2d(md,md.geometry.thickness,1);
  • issm/trunk/src/m/model/MeltingGroundingLines.m

    r9733 r9734  
    1717
    1818        %search the node on ice sheet the closest to i
    19         [d posd]=min(sqrt((md.x(pos_shelf(i))-md.x(pos_GL)).^2+(md.y(pos_shelf(i))-md.y(pos_GL)).^2));
     19        [d posd]=min(sqrt((md.mesh.x(pos_shelf(i))-md.mesh.x(pos_GL)).^2+(md.mesh.y(pos_shelf(i))-md.mesh.y(pos_GL)).^2));
    2020
    2121        if d<distance,
  • issm/trunk/src/m/model/PropagateFlagsUntilDistance.m

    r9733 r9734  
    1313%make 3d work in 2d:
    1414if md.mesh.dimension==3,
    15         md.x=md.mesh.x2d;
    16         md.y=md.mesh.y2d;
     15        md.mesh.x=md.mesh.x2d;
     16        md.mesh.y=md.mesh.y2d;
    1717        md.mesh.elements=md.mesh.elements2d;
    1818end
     
    2727
    2828%average x and y over elements:
    29 x_elem=md.x(md.mesh.elements)*[1;1;1]/3;
    30 y_elem=md.y(md.mesh.elements)*[1;1;1]/3;
     29x_elem=md.mesh.x(md.mesh.elements)*[1;1;1]/3;
     30y_elem=md.mesh.y(md.mesh.elements)*[1;1;1]/3;
    3131
    3232while 1,
  • issm/trunk/src/m/model/SectionValues.m

    r9733 r9734  
    8282
    8383        %Interpolation of data on specified points
    84         data_interp=InterpFromMeshToMesh2d(md.mesh.elements,md.x,md.y,data,X,Y);
    85         %data_interp=griddata(md.x,md.y,data,X,Y);
     84        data_interp=InterpFromMeshToMesh2d(md.mesh.elements,md.mesh.x,md.mesh.y,data,X,Y);
     85        %data_interp=griddata(md.mesh.x,md.mesh.y,data,X,Y);
    8686
    8787        %Compute index
     
    120120
    121121        %Interpolation of data on specified points
    122         data_interp=InterpFromMeshToMesh3d(md.mesh.elements,md.x,md.y,md.z,data,X3,Y3,Z3,NaN);
     122        data_interp=InterpFromMeshToMesh3d(md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.z,data,X3,Y3,Z3,NaN);
    123123
    124124        %build outputs
  • issm/trunk/src/m/model/ThicknessCorrection.m

    r9733 r9734  
    4848
    4949        %search the node on ice sheet the closest to i
    50         [d posd]=min(sqrt((md.x(pos_shelf(i))-md.x(pos_GL)).^2+(md.y(pos_shelf(i))-md.y(pos_GL)).^2));
     50        [d posd]=min(sqrt((md.mesh.x(pos_shelf(i))-md.mesh.x(pos_GL)).^2+(md.mesh.y(pos_shelf(i))-md.mesh.y(pos_GL)).^2));
    5151
    5252        if d>distance,
  • issm/trunk/src/m/model/averaging.m

    r9733 r9734  
    3333if md.mesh.dimension==3
    3434        rep=6;
    35         areas=GetAreas(index,md.x,md.y,md.z);
     35        areas=GetAreas(index,md.mesh.x,md.mesh.y,md.mesh.z);
    3636else
    3737        rep=3;
    38         areas=GetAreas(index,md.x,md.y);
     38        areas=GetAreas(index,md.mesh.x,md.mesh.y);
    3939end
    4040summation=1/rep*ones(rep,1);
  • issm/trunk/src/m/model/bamg.m

    r9733 r9734  
    270270                bamg_mesh=bamgmesh(md.private.bamg.mesh);
    271271        else
    272                 bamg_mesh.Vertices=[md.x md.y ones(md.mesh.numberofvertices,1)];
     272                bamg_mesh.Vertices=[md.mesh.x md.mesh.y ones(md.mesh.numberofvertices,1)];
    273273                bamg_mesh.Triangles=[md.mesh.elements ones(md.mesh.numberofelements,1)];
    274274        end
     
    317317md.private.bamg.mesh=bamgmesh(bamgmesh_out);
    318318md.private.bamg.geometry=bamggeom(bamggeom_out);
    319 md.x=bamgmesh_out.Vertices(:,1);
    320 md.y=bamgmesh_out.Vertices(:,2);
     319md.mesh.x=bamgmesh_out.Vertices(:,1);
     320md.mesh.y=bamgmesh_out.Vertices(:,2);
    321321md.mesh.elements=bamgmesh_out.Triangles(:,1:3);
    322322md.mesh.edges=bamgmesh_out.IssmEdges;
     
    327327md.mesh.dimension=2;
    328328md.mesh.numberofelements=size(md.mesh.elements,1);
    329 md.mesh.numberofvertices=length(md.x);
     329md.mesh.numberofvertices=length(md.mesh.x);
    330330md.mesh.numberofedges=size(md.mesh.edges,1);
    331 md.z=zeros(md.mesh.numberofvertices,1);
     331md.mesh.z=zeros(md.mesh.numberofvertices,1);
    332332md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
    333333md.mask.vertexonwater=zeros(md.mesh.numberofvertices,1);
  • issm/trunk/src/m/model/basevert.m

    r9733 r9734  
    1414
    1515for n=1:md.mesh.numberofelements
    16         X=inv([md.x(md.mesh.elements(n,:)) md.y(md.mesh.elements(n,:)) ones(3,1)]);
     16        X=inv([md.mesh.x(md.mesh.elements(n,:)) md.mesh.y(md.mesh.elements(n,:)) ones(3,1)]);
    1717        alpha(n,:)=X(1,:);
    1818        beta(n,:)=X(2,:);
  • issm/trunk/src/m/model/bedslope.m

    r9733 r9734  
    1010        numberofnodes=md.mesh.numberofvertices;
    1111        index=md.mesh.elements;
    12         x=md.x; y=md.y;
     12        x=md.mesh.x; y=md.mesh.y;
    1313else
    1414        numberofelements=md.mesh.numberofelements2d;
  • issm/trunk/src/m/model/collapse.m

    r9733 r9734  
    9090
    9191%Initialize with the 2d mesh
    92 md.x=md.mesh.x2d;
    93 md.y=md.mesh.y2d;
    94 md.z=zeros(size(md.mesh.x2d));
     92md.mesh.x=md.mesh.x2d;
     93md.mesh.y=md.mesh.y2d;
     94md.mesh.z=zeros(size(md.mesh.x2d));
    9595md.mesh.numberofvertices=md.mesh.numberofvertices2d;
    9696md.mesh.numberofelements=md.mesh.numberofelements2d;
  • issm/trunk/src/m/model/contourenvelope.m

    r9733 r9734  
    4747        if isfile,
    4848                %get flag list of elements and nodes inside the contour
    49                 nodein=ContourToMesh(md.mesh.elements,md.x,md.y,file,'node',1);
     49                nodein=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,file,'node',1);
    5050                elemin=(sum(nodein(md.mesh.elements),2)==size(md.mesh.elements,2));
    5151                %modify element connectivity
  • issm/trunk/src/m/model/contourmassbalance.m

    r9733 r9734  
    2222
    2323%get flag list of elements and nodes inside the contour
    24 nodein=ContourToMesh(md.mesh.elements,md.x,md.y,file,'node',1);
     24nodein=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,file,'node',1);
    2525elemin=(sum(nodein(md.mesh.elements),2)==size(md.mesh.elements,2));
    2626
    2727%conputing Mass flux
    28 x=md.x;
    29 y=md.y;
     28x=md.mesh.x;
     29y=md.mesh.y;
    3030vx=mean(md.initialization.vx(segments(:,1:end-1)),2);
    3131vy=mean(md.initialization.vy(segments(:,1:end-1)),2);
     
    3636flux = - md.materials.rho_ice*sum(L.*H.*(vx.*nx+vy.*ny)); %outflux is negative!
    3737disp(['mass outflux on ' file ' = ' num2str(-flux/10^9) ' Gt/yr']);
    38 areas=GetAreas(md.mesh.elements,md.x,md.y);
     38areas=GetAreas(md.mesh.elements,md.mesh.x,md.mesh.y);
    3939dhdt=flux/(sum(areas(find(elemin)))*md.materials.rho_ice);
    4040disp(['dhdt on ' file ' (Flux  method) = ' num2str(dhdt) ' m/yr']);
  • issm/trunk/src/m/model/divergence.m

    r9733 r9734  
    99        numberofnodes=md.mesh.numberofvertices;
    1010        index=md.mesh.elements;
    11         x=md.x; y=md.y; z=md.z;
     11        x=md.mesh.x; y=md.mesh.y; z=md.mesh.z;
    1212else
    1313        numberofelements=md.mesh.numberofelements2d;
  • issm/trunk/src/m/model/extrude.m

    r9733 r9734  
    7272%Create the new layers
    7373for i=1:numlayers,
    74         x3d=[x3d; md.x];
    75         y3d=[y3d; md.y];
     74        x3d=[x3d; md.mesh.x];
     75        y3d=[y3d; md.mesh.y];
    7676        %nodes are distributed between bed and surface accordingly to the given exponent
    7777        z3d=[z3d; bed3d+thickness3d*extrusionlist(i)];
     
    103103
    104104%Save old mesh
    105 md.mesh.x2d=md.x;
    106 md.mesh.y2d=md.y;
     105md.mesh.x2d=md.mesh.x;
     106md.mesh.y2d=md.mesh.y;
    107107md.mesh.elements2d=md.mesh.elements;
    108108md.mesh.numberofelements2d=md.mesh.numberofelements;
     
    114114%Build global 3d mesh
    115115md.mesh.elements=elements3d;
    116 md.x=x3d;
    117 md.y=y3d;
    118 md.z=z3d;
     116md.mesh.x=x3d;
     117md.mesh.y=y3d;
     118md.mesh.z=z3d;
    119119md.mesh.numberofelements=number_el3d;
    120120md.mesh.numberofvertices=number_nodes3d;
     
    213213%Put lithostatic pressure is there is an existing pressure
    214214if ~isnan(md.initialization.pressure),
    215         md.initialization.pressure=md.constants.g*md.materials.rho_ice*(md.geometry.surface-md.z);
     215        md.initialization.pressure=md.constants.g*md.materials.rho_ice*(md.geometry.surface-md.mesh.z);
    216216end
    217217
  • issm/trunk/src/m/model/mechanicalproperties.m

    r9733 r9734  
    3434
    3535%compute nodal functions coefficients N(x,y)=alpha x + beta y +gamma
    36 [alpha beta]=GetNodalFunctionsCoeff(index,md.x,md.y);
     36[alpha beta]=GetNodalFunctionsCoeff(index,md.mesh.x,md.mesh.y);
    3737
    3838%compute shear
  • issm/trunk/src/m/model/mesh/meshadaptation.m

    r9733 r9734  
    4141
    4242%get areas and  nodal functions coefficients N(x,y)=alpha x + beta y + gamma
    43 [alpha beta]=GetNodalFunctionsCoeff(index,md.x,md.y);
    44 areas=GetAreas(index,md.x,md.y);
     43[alpha beta]=GetNodalFunctionsCoeff(index,md.mesh.x,md.mesh.y);
     44areas=GetAreas(index,md.mesh.x,md.mesh.y);
    4545
    4646%Compute gradient for each element
  • issm/trunk/src/m/model/mesh/meshbamg.m

    r9733 r9734  
    7777        disp('   interpolating velocities...');
    7878        if strcmpi(NamesV.interp,'node'),
    79                 vx_obs=InterpFromGridToMesh(Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vxname),md.x,md.y,0);
    80                 vy_obs=InterpFromGridToMesh(Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vyname),md.x,md.y,0);
     79                vx_obs=InterpFromGridToMesh(Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vxname),md.mesh.x,md.mesh.y,0);
     80                vy_obs=InterpFromGridToMesh(Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vyname),md.mesh.x,md.mesh.y,0);
    8181        else
    82                 vx_obs=InterpFromMeshToMesh2d(Vel.(NamesV.indexname),Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vxname),md.x,md.y,0);
    83                 vy_obs=InterpFromMeshToMesh2d(Vel.(NamesV.indexname),Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vyname),md.x,md.y,0);
     82                vx_obs=InterpFromMeshToMesh2d(Vel.(NamesV.indexname),Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vxname),md.mesh.x,md.mesh.y,0);
     83                vy_obs=InterpFromMeshToMesh2d(Vel.(NamesV.indexname),Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vyname),md.mesh.x,md.mesh.y,0);
    8484        end
    8585        field=sqrt(vx_obs.^2+vy_obs.^2);
     
    8888                disp('   interpolating thickness...');
    8989                if strcmpi(NamesH.interp,'node'),
    90                         h=InterpFromGridToMesh(Thi.(NamesH.xname),Thi.(NamesH.yname),Thi.(NamesH.dataname),md.x,md.y,0);
     90                        h=InterpFromGridToMesh(Thi.(NamesH.xname),Thi.(NamesH.yname),Thi.(NamesH.dataname),md.mesh.x,md.mesh.y,0);
    9191                else
    92                         h=InterpFromMeshToMesh2d(Thi.(NamesH.indexname),Thi.(NamesH.xname),Thi.(NamesH.yname),Thi.(NamesH.dataname),md.x,md.y,0);
     92                        h=InterpFromMeshToMesh2d(Thi.(NamesH.indexname),Thi.(NamesH.xname),Thi.(NamesH.yname),Thi.(NamesH.dataname),md.mesh.x,md.mesh.y,0);
    9393                end
    9494                field=[field h];
     
    9797        %set nodeonwater field
    9898        if ~strcmp(groundeddomain,'N/A'),
    99                 nodeground=ContourToMesh(md.mesh.elements,md.x,md.y,groundeddomain,'node',2);
     99                nodeground=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,groundeddomain,'node',2);
    100100                md.nodeonwater=ones(md.mesh.numberofvertices,1);
    101101                md.nodeonwater(find(nodeground))=0;
  • issm/trunk/src/m/model/mesh/meshconvert.m

    r9733 r9734  
    1212
    1313if nargin==1,
    14         x=md.x;
    15         y=md.y;
     14        x=md.mesh.x;
     15        y=md.mesh.y;
    1616        index=md.mesh.elements;
    1717else
     
    2828md.private.bamg.mesh=bamgmesh(bamgmesh_out);
    2929md.private.bamg.geometry=bamggeom(bamggeom_out);
    30 md.x=bamgmesh_out.Vertices(:,1);
    31 md.y=bamgmesh_out.Vertices(:,2);
     30md.mesh.x=bamgmesh_out.Vertices(:,1);
     31md.mesh.y=bamgmesh_out.Vertices(:,2);
    3232md.mesh.elements=bamgmesh_out.Triangles(:,1:3);
    3333md.mesh.edges=bamgmesh_out.IssmEdges;
     
    3838md.mesh.dimension=2;
    3939md.mesh.numberofelements=size(md.mesh.elements,1);
    40 md.mesh.numberofvertices=length(md.x);
     40md.mesh.numberofvertices=length(md.mesh.x);
    4141md.mesh.numberofedges=size(md.mesh.edges,1);
    42 md.z=zeros(md.mesh.numberofvertices,1);
     42md.mesh.z=zeros(md.mesh.numberofvertices,1);
    4343md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
    4444md.mask.vertexonwater=zeros(md.mesh.numberofvertices,1);
  • issm/trunk/src/m/model/mesh/meshexprefine.m

    r9733 r9734  
    3535
    3636%Read domainame file into a matlab array (x,y):
    37 refinearea=ContourToMesh(md.mesh.elements,md.x,md.y,domainname,'element',1);
    38 aires=GetAreas(md.mesh.elements,md.x,md.y);
     37refinearea=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,domainname,'element',1);
     38aires=GetAreas(md.mesh.elements,md.mesh.x,md.mesh.y);
    3939
    4040%flags areas within the domain
  • issm/trunk/src/m/model/mesh/meshnodensity.m

    r9733 r9734  
    2525%Mesh using TriMeshNoDensity
    2626if strcmp(riftname,''),
    27         [md.mesh.elements,md.x,md.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMeshNoDensity(domainname);
     27        [md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMeshNoDensity(domainname);
    2828else
    2929        [elements,x,y,segments,segmentmarkers]=TriMeshNoDensity(domainname,riftname);
     
    4747
    4848        %plug into md
    49         md.x=x;
    50         md.y=y;
     49        md.mesh.x=x;
     50        md.mesh.y=y;
    5151        md.mesh.elements=elements;
    5252        md.mesh.segments=segments;
     
    5656%Fill in rest of fields:
    5757md.mesh.numberofelements=length(md.mesh.elements);
    58 md.mesh.numberofvertices=length(md.x);
    59 md.z=zeros(md.mesh.numberofvertices,1);
     58md.mesh.numberofvertices=length(md.mesh.x);
     59md.mesh.z=zeros(md.mesh.numberofvertices,1);
    6060md.mesh.vertexonboundary=zeros(md.mesh.numberofvertices,1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
    6161md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
  • issm/trunk/src/m/model/mesh/meshrefine.m

    r9733 r9734  
    1616
    1717%Refine using TriMeshRefine
    18 [md.mesh.elements,md.x,md.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMeshRefine(md.mesh.elements,md.x,md.y,md.mesh.segments,md.mesh.segmentmarkers,areas,'yes');
     18[md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMeshRefine(md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers,areas,'yes');
    1919
    2020%Fill in rest of fields:
    2121md.mesh.numberofelements=length(md.mesh.elements);
    22 md.mesh.numberofvertices=length(md.x);
    23 md.z=zeros(md.mesh.numberofvertices,1);
     22md.mesh.numberofvertices=length(md.mesh.x);
     23md.mesh.z=zeros(md.mesh.numberofvertices,1);
    2424md.mesh.vertexonboundary=zeros(md.mesh.numberofvertices,1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
    2525md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
  • issm/trunk/src/m/model/mesh/meshyams.m

    r9733 r9734  
    7171        disp('   interpolating velocities...');
    7272        if strcmpi(Names.interp,'node'),
    73                 vx_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.x,md.y,0);
    74                 vy_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.x,md.y,0);
     73                vx_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.mesh.x,md.mesh.y,0);
     74                vy_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.mesh.x,md.mesh.y,0);
    7575        else
    76                 vx_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.x,md.y,0);
    77                 vy_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.x,md.y,0);
     76                vx_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.mesh.x,md.mesh.y,0);
     77                vy_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.mesh.x,md.mesh.y,0);
    7878        end
    7979        field=sqrt(vx_obs.^2+vy_obs.^2);
     
    8181        %set nodeonwater field
    8282        if ~strcmp(groundeddomain,'N/A'),
    83                 nodeground=ContourToMesh(md.mesh.elements,md.x,md.y,groundeddomain,'node',2);
     83                nodeground=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,groundeddomain,'node',2);
    8484                md.nodeonwater=ones(md.mesh.numberofvertices,1);
    8585                md.nodeonwater(find(nodeground))=0;
     
    114114
    115115%Fill in rest of fields:
    116 md.z=zeros(md.mesh.numberofvertices,1);
     116md.mesh.z=zeros(md.mesh.numberofvertices,1);
    117117md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
    118118md.mesh.vertexonsurface=ones(md.mesh.numberofvertices,1);
     
    120120md.mesh.elementonsurface=ones(md.mesh.numberofelements,1);
    121121if ~strcmp(groundeddomain,'N/A'),
    122         nodeground=ContourToMesh(md.mesh.elements,md.x,md.y,groundeddomain,'node',2);
     122        nodeground=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,groundeddomain,'node',2);
    123123        md.nodeonwater=ones(md.mesh.numberofvertices,1);
    124124        md.nodeonwater(find(nodeground))=0;
     
    127127end
    128128if strcmpi(Names.interp,'node'),
    129         md.inversion.vx_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.x,md.y,0);
    130         md.inversion.vy_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.x,md.y,0);
     129        md.inversion.vx_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.mesh.x,md.mesh.y,0);
     130        md.inversion.vy_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.mesh.x,md.mesh.y,0);
    131131else
    132         md.inversion.vx_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.x,md.y,0);
    133         md.inversion.vy_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.x,md.y,0);
     132        md.inversion.vx_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.mesh.x,md.mesh.y,0);
     133        md.inversion.vy_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.mesh.x,md.mesh.y,0);
    134134end
    135135md.inversion.vel_obs=sqrt(md.inversion.vx_obs.^2+md.inversion.vy_obs.^2);
     
    145145
    146146                %build normals and lengths of segments:
    147                 lengths=sqrt((md.x(rift.segments(:,1))-md.x(rift.segments(:,2))).^2 + (md.y(rift.segments(:,1))-md.y(rift.segments(:,2))).^2 );
    148                 normalsx=cos(atan2((md.x(rift.segments(:,1))-md.x(rift.segments(:,2))) , (md.y(rift.segments(:,2))-md.y(rift.segments(:,1)))));
    149                 normalsy=sin(atan2((md.x(rift.segments(:,1))-md.x(rift.segments(:,2))) , (md.y(rift.segments(:,2))-md.y(rift.segments(:,1)))));
     147                lengths=sqrt((md.mesh.x(rift.segments(:,1))-md.mesh.x(rift.segments(:,2))).^2 + (md.mesh.y(rift.segments(:,1))-md.mesh.y(rift.segments(:,2))).^2 );
     148                normalsx=cos(atan2((md.mesh.x(rift.segments(:,1))-md.mesh.x(rift.segments(:,2))) , (md.mesh.y(rift.segments(:,2))-md.mesh.y(rift.segments(:,1)))));
     149                normalsy=sin(atan2((md.mesh.x(rift.segments(:,1))-md.mesh.x(rift.segments(:,2))) , (md.mesh.y(rift.segments(:,2))-md.mesh.y(rift.segments(:,1)))));
    150150
    151151                %ok, build penaltypairs:
  • issm/trunk/src/m/model/mesh/reorder.m

    r9733 r9734  
    2222md.mesh.elements=tnewnodes(md.mesh.elements(newelements,:));
    2323md.mesh.segments=[tnewnodes(md.mesh.segments(:,1)) tnewnodes(md.mesh.segments(:,2)) tnewelements(md.mesh.segments(:,3))];
    24 md.x=md.x(newnodes);
    25 md.y=md.y(newnodes);
    26 md.z=md.z(newnodes);
     24md.mesh.x=md.mesh.x(newnodes);
     25md.mesh.y=md.mesh.y(newnodes);
     26md.mesh.z=md.mesh.z(newnodes);
    2727md.mesh.vertexonboundary=zeros(md.mesh.numberofvertices,1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
  • issm/trunk/src/m/model/mesh/rifts/meshaddrifts.m

    r9733 r9734  
    5656       
    5757        %plug md2 mesh into md mesh:
    58         [md.mesh.elements,md.x,md.y,md.z,md.mesh.numberofelements,md.mesh.numberofvertices,elconv,nodeconv,elconv2,nodeconv2]=meshplug(md.mesh.elements,md.x,md.y,md.z,...
     58        [md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.z,md.mesh.numberofelements,md.mesh.numberofvertices,elconv,nodeconv,elconv2,nodeconv2]=meshplug(md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.z,...
    5959                                                                md2.mesh.elements,md2.x,md2.y,md2.z,md2.extractednodes,md2.extractedelements,domain_index);
    6060
  • issm/trunk/src/m/model/mesh/rifts/meshprocessoutsiderifts.m

    r9733 r9734  
    1212       
    1313        %first, flag nodes that belong to the domain outline
    14         flags=ContourToMesh(md.mesh.elements,md.x,md.y,domainoutline,'node',0);
     14        flags=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,domainoutline,'node',0);
    1515
    1616        rift=md.rifts.riftstruct(i);
     
    5555                %take the list of elements on one side of the rift that connect to the tip,
    5656                %and duplicate the tip on them, so as to open the rift to the outside.
    57                 num=length(md.x)+1;
    58                 md.x=[md.x;md.x(tip)];
    59                 md.y=[md.y;md.y(tip)];
     57                num=length(md.mesh.x)+1;
     58                md.mesh.x=[md.mesh.x;md.mesh.x(tip)];
     59                md.mesh.y=[md.mesh.y;md.mesh.y(tip)];
    6060                md.mesh.numberofvertices=num;
    6161               
     
    8484%Fill in rest of fields:
    8585md.mesh.numberofelements=length(md.mesh.elements);
    86 md.mesh.numberofvertices=length(md.x);
    87 md.z=zeros(md.mesh.numberofvertices,1);
    88 md.mesh.vertexonboundary=zeros(length(md.x),1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
     86md.mesh.numberofvertices=length(md.mesh.x);
     87md.mesh.z=zeros(md.mesh.numberofvertices,1);
     88md.mesh.vertexonboundary=zeros(length(md.mesh.x),1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
    8989md.rifts.numrifts=length(md.rifts.riftstruct);
    9090md.flowequation.element_equation=3*ones(md.mesh.numberofelements,1);
  • issm/trunk/src/m/model/mesh/rifts/meshprocessrifts.m

    r9733 r9734  
    2525
    2626%Call MEX file
    27 [md.mesh.elements,md.x,md.y,md.mesh.segments,md.mesh.segmentmarkers,md.rifts.riftstruct]=TriMeshProcessRifts(md.mesh.elements,md.x,md.y,md.mesh.segments,md.mesh.segmentmarkers);
     27[md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers,md.rifts.riftstruct]=TriMeshProcessRifts(md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers);
    2828md.rifts
    2929md.rifts.riftstruct
     
    3434%Fill in rest of fields:
    3535md.mesh.numberofelements=length(md.mesh.elements);
    36 md.mesh.numberofvertices=length(md.x);
    37 md.z=zeros(md.mesh.numberofvertices,1);
    38 md.mesh.vertexonboundary=zeros(length(md.x),1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
     36md.mesh.numberofvertices=length(md.mesh.x);
     37md.mesh.z=zeros(md.mesh.numberofvertices,1);
     38md.mesh.vertexonboundary=zeros(length(md.mesh.x),1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
    3939md.rifts.numrifts=length(md.rifts.riftstruct);
    4040md.flowequation.element_equation=3*ones(md.mesh.numberofelements,1);
     
    4646%get coordinates of rift tips
    4747for i=1:md.rifts.numrifts,
    48         md.rifts.riftstruct(i).tip1coordinates=[md.x(md.rifts.riftstruct(i).tips(1)) md.y(md.rifts.riftstruct(i).tips(1))];
    49         md.rifts.riftstruct(i).tip2coordinates=[md.x(md.rifts.riftstruct(i).tips(2)) md.y(md.rifts.riftstruct(i).tips(2))];
     48        md.rifts.riftstruct(i).tip1coordinates=[md.mesh.x(md.rifts.riftstruct(i).tips(1)) md.mesh.y(md.rifts.riftstruct(i).tips(1))];
     49        md.rifts.riftstruct(i).tip2coordinates=[md.mesh.x(md.rifts.riftstruct(i).tips(2)) md.mesh.y(md.rifts.riftstruct(i).tips(2))];
    5050end
    5151
    5252%In case we have rifts that open up the domain outline, we need to open them:
    53 flags=ContourToMesh(md.mesh.elements,md.x,md.y,domainoutline,'node',0);
     53flags=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,domainoutline,'node',0);
    5454found=0;
    5555for i=1:md.rifts.numrifts,
     
    6868
    6969%get elements that are not correctly oriented in the correct direction:
    70 aires=GetAreas(md.mesh.elements,md.x,md.y);
     70aires=GetAreas(md.mesh.elements,md.mesh.x,md.mesh.y);
    7171pos=find(aires<0);
    7272md.mesh.elements(pos,:)=[md.mesh.elements(pos,2) md.mesh.elements(pos,1) md.mesh.elements(pos,3)];
  • issm/trunk/src/m/model/mesh/rifts/meshyamsrecreateriftsegments.m

    r9714 r9734  
    1111
    1212                                %find tip1 and tip2 for this rift, in the new mesh created by yams.
    13                                 pos=find_point(md.x(md.mesh.segments(:,1)),md.y(md.mesh.segments(:,1)),rift.tip1coordinates(1),rift.tip1coordinates(2));
     13                                pos=find_point(md.mesh.x(md.mesh.segments(:,1)),md.mesh.y(md.mesh.segments(:,1)),rift.tip1coordinates(1),rift.tip1coordinates(2));
    1414                                tip1=md.mesh.segments(pos,1);
    15                                 pos=find_point(md.x(md.mesh.segments(:,1)),md.y(md.mesh.segments(:,1)),rift.tip2coordinates(1),rift.tip2coordinates(2));
     15                                pos=find_point(md.mesh.x(md.mesh.segments(:,1)),md.mesh.y(md.mesh.segments(:,1)),rift.tip2coordinates(1),rift.tip2coordinates(2));
    1616                                tip2=md.mesh.segments(pos,1);
    1717
    1818                                %start from tip1, and build segments of this rift.
    19                                 pos=find_point(md.x(md.mesh.segments(:,1)),md.y(md.mesh.segments(:,1)),rift.tip1coordinates(1),rift.tip1coordinates(2));
     19                                pos=find_point(md.mesh.x(md.mesh.segments(:,1)),md.mesh.y(md.mesh.segments(:,1)),rift.tip1coordinates(1),rift.tip1coordinates(2));
    2020                                pos_record=[pos_record; pos];
    2121                                riftsegs=md.mesh.segments(pos,:);
     
    3939
    4040                                %find tip1 and tip2 for this rift, in the new mesh created by yams.
    41                                 pos1=find_point(md.x(md.mesh.segments(:,1)),md.y(md.mesh.segments(:,1)),rift.tip1coordinates(1),rift.tip1coordinates(2));
     41                                pos1=find_point(md.mesh.x(md.mesh.segments(:,1)),md.mesh.y(md.mesh.segments(:,1)),rift.tip1coordinates(1),rift.tip1coordinates(2));
    4242                                tip1=md.mesh.segments(pos1,1);
    43                                 pos2=find_point(md.x(md.mesh.segments(:,1)),md.y(md.mesh.segments(:,1)),rift.tip2coordinates(1),rift.tip2coordinates(2));
     43                                pos2=find_point(md.mesh.x(md.mesh.segments(:,1)),md.mesh.y(md.mesh.segments(:,1)),rift.tip2coordinates(1),rift.tip2coordinates(2));
    4444                                tip2=md.mesh.segments(pos2,1);
    4545                                if length(tip1)==2,
  • issm/trunk/src/m/model/mesh/setmesh.m

    r9733 r9734  
    3939%Mesh using TriMesh
    4040if strcmp(riftname,''),
    41         [md.mesh.elements,md.x,md.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMesh(domainname,area,'yes');
     41        [md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMesh(domainname,area,'yes');
    4242else
    4343        [elements,x,y,segments,segmentmarkers]=TriMesh(domainname,riftname,area,'yes');
     
    6161
    6262        %plug into md
    63         md.x=x;
    64         md.y=y;
     63        md.mesh.x=x;
     64        md.mesh.y=y;
    6565        md.mesh.elements=elements;
    6666        md.mesh.segments=segments;
     
    7070%Fill in rest of fields:
    7171md.mesh.numberofelements=length(md.mesh.elements);
    72 md.mesh.numberofvertices=length(md.x);
    73 md.z=zeros(md.mesh.numberofvertices,1);
     72md.mesh.numberofvertices=length(md.mesh.x);
     73md.mesh.z=zeros(md.mesh.numberofvertices,1);
    7474md.mesh.vertexonboundary=zeros(md.mesh.numberofvertices,1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
    7575md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
  • issm/trunk/src/m/model/misfit.m

    r9733 r9734  
    1111if md.mesh.dimension==2,
    1212        elements=md.mesh.elements;
    13         x=md.x;
    14         y=md.y;
     13        x=md.mesh.x;
     14        y=md.mesh.y;
    1515        vx=md.initialization.vx;
    1616        vy=md.initialization.vy;
  • issm/trunk/src/m/model/outflow.m

    r9725 r9734  
    77A=md.mesh.segments(:,1);
    88B=md.mesh.segments(:,2);
    9 Nx=-(md.y(A)-md.y(B));
    10 Ny=  md.x(A)-md.x(B);
     9Nx=-(md.mesh.y(A)-md.mesh.y(B));
     10Ny=  md.mesh.x(A)-md.mesh.x(B);
    1111Vx=(md.initialization.vx(A)+md.initialization.vx(B))/2;
    1212Vy=(md.initialization.vy(A)+md.initialization.vy(B))/2;
  • issm/trunk/src/m/model/partition/AreaAverageOntoPartition.m

    r9733 r9734  
    1717       
    1818        md.mesh.elements=md.mesh.elements2d;
    19         md.x=md.mesh.x2d;
    20         md.y=md.mesh.y2d;
     19        md.mesh.x=md.mesh.x2d;
     20        md.mesh.y=md.mesh.y2d;
    2121        md.mesh.numberofvertices=md.mesh.numberofvertices2d;
    2222        md.mesh.numberofelements=md.mesh.numberofelements2d;
  • issm/trunk/src/m/model/partition/adjacency.m

    r9733 r9734  
    1616
    1717%now, build vwgt:
    18 areas=GetAreas(md.mesh.elements,md.x,md.y);
     18areas=GetAreas(md.mesh.elements,md.mesh.x,md.mesh.y);
    1919
    2020%get node connectivity
  • issm/trunk/src/m/model/partition/partitioner.m

    r9733 r9734  
    3535        md3d=md; %save  for later
    3636        md.mesh.elements=md.mesh.elements2d;
    37         md.x=md.mesh.x2d;
    38         md.y=md.mesh.y2d;
     37        md.mesh.x=md.mesh.x2d;
     38        md.mesh.y=md.mesh.y2d;
    3939        md.mesh.numberofvertices=md.mesh.numberofvertices2d;
    4040        md.mesh.numberofelements=md.mesh.numberofelements2d;
     
    7070       
    7171        %  partition into nparts
    72         part=Chaco(md.qmu.adjacency,weights,[],md.x, md.y ,md.z,method,npart,[])'+1; %index partitions from 1 up. like metis.
     72        part=Chaco(md.qmu.adjacency,weights,[],md.mesh.x, md.mesh.y ,md.mesh.z,method,npart,[])'+1; %index partitions from 1 up. like metis.
    7373
    7474elseif strcmpi(package,'scotch'),
  • issm/trunk/src/m/model/plot/applyoptions.m

    r9733 r9734  
    424424                [mdx mdy]=basinzoom(options);
    425425        else
    426                 mdx=[min(md.x) max(md.x)];
    427                 mdy=[min(md.y) max(md.y)];
     426                mdx=[min(md.mesh.x) max(md.mesh.x)];
     427                mdy=[min(md.mesh.y) max(md.mesh.y)];
    428428        end
    429429        line(A.x,A.y,ones(size(A.x)),'color','b');
     
    437437%flag edges of a partition
    438438if exist(options,'partitionedges')
    439 [xsegments ysegments]=flagedges(md.mesh.elements,md.x,md.y,md.qmu.partition);
     439[xsegments ysegments]=flagedges(md.mesh.elements,md.mesh.x,md.mesh.y,md.qmu.partition);
    440440xsegments=xsegments*getfieldvalue(options,'unit',1);
    441441ysegments=ysegments*getfieldvalue(options,'unit',1);
  • issm/trunk/src/m/model/plot/checkplotoptions.m

    r9641 r9734  
    180180        if strcmpi(getfieldvalue(options,'northarrow'),'on')
    181181                %default values
    182                 Lx=max(md.y)-min(md.y);
    183                 Ly=max(md.y)-min(md.y);
    184                 %default values
    185                 options=changefieldvalue(options,'northarrow',[min(md.x)+1/6*Lx   min(md.y)+5/6*Ly   1/15*Ly   0.25   1/250*Ly]);
     182                Lx=max(md.mesh.y)-min(md.mesh.y);
     183                Ly=max(md.mesh.y)-min(md.mesh.y);
     184                %default values
     185                options=changefieldvalue(options,'northarrow',[min(md.mesh.x)+1/6*Lx   min(md.mesh.y)+5/6*Ly   1/15*Ly   0.25   1/250*Ly]);
    186186        end
    187187end
     
    191191        if strcmpi(getfieldvalue(options,'scaleruler'),'on')
    192192                %default values
    193                 Lx=max(md.y)-min(md.y);
    194                 Ly=max(md.y)-min(md.y);
    195                 %default values
    196                 options=changefieldvalue(options,'scaleruler',[min(md.x)+6/8*Lx   min(md.y)+1/10*Ly   10^(ceil(log10(Lx)))/5 floor(Lx/100) 5]);
     193                Lx=max(md.mesh.y)-min(md.mesh.y);
     194                Ly=max(md.mesh.y)-min(md.mesh.y);
     195                %default values
     196                options=changefieldvalue(options,'scaleruler',[min(md.mesh.x)+6/8*Lx   min(md.mesh.y)+1/10*Ly   10^(ceil(log10(Lx)))/5 floor(Lx/100) 5]);
    197197        end
    198198end
  • issm/trunk/src/m/model/plot/plot_BC.m

    r9679 r9734  
    77
    88%plot dirichlets
    9 h1=plot(md.x(find(~isnan(md.diagnostic.spcvx))),md.y(find(~isnan(md.diagnostic.spcvx))),'ro','MarkerSize',14,'MarkerFaceColor','r');
    10 h2=plot(md.x(find(~isnan(md.diagnostic.spcvy))),md.y(find(~isnan(md.diagnostic.spcvy))),'bo','MarkerSize',10,'MarkerFaceColor','b');
    11 h3=plot(md.x(find(~isnan(md.diagnostic.spcvz))),md.y(find(~isnan(md.diagnostic.spcvz))),'yo','MarkerSize',6 ,'MarkerFaceColor','y');
     9h1=plot(md.mesh.x(find(~isnan(md.diagnostic.spcvx))),md.mesh.y(find(~isnan(md.diagnostic.spcvx))),'ro','MarkerSize',14,'MarkerFaceColor','r');
     10h2=plot(md.mesh.x(find(~isnan(md.diagnostic.spcvy))),md.mesh.y(find(~isnan(md.diagnostic.spcvy))),'bo','MarkerSize',10,'MarkerFaceColor','b');
     11h3=plot(md.mesh.x(find(~isnan(md.diagnostic.spcvz))),md.mesh.y(find(~isnan(md.diagnostic.spcvz))),'yo','MarkerSize',6 ,'MarkerFaceColor','y');
    1212
    1313%update legend
  • issm/trunk/src/m/model/plot/plot_quiver.m

    r9684 r9734  
    88%
    99%   Example:
    10 %      plot_quiver(md.x,md.y,md.initialization.vx,md.initialization.vy,options);
     10%      plot_quiver(md.mesh.x,md.mesh.y,md.initialization.vx,md.initialization.vy,options);
    1111
    1212%process fields
  • issm/trunk/src/m/model/plot/plot_quiver3.m

    r9684 r9734  
    88%
    99%   Example:
    10 %      plot_quiver(md.x,md.y,md.z,md.initialization.vx,md.initialization.vy,md.initialization.vz,options);
     10%      plot_quiver(md.mesh.x,md.mesh.y,md.mesh.z,md.initialization.vx,md.initialization.vy,md.initialization.vz,options);
    1111
    1212%keep only non NaN elements
  • issm/trunk/src/m/model/plot/plot_sarpwr.m

    r9620 r9734  
    1313if exist(options,'unit'),
    1414        unit=getfieldvalue(options,'unit');
    15         md.x=md.x*unit;
    16         md.y=md.y*unit;
    17         md.z=md.z*unit;
     15        md.mesh.x=md.mesh.x*unit;
     16        md.mesh.y=md.mesh.y*unit;
     17        md.mesh.z=md.mesh.z*unit;
    1818end
    1919                                       
  • issm/trunk/src/m/model/plot/plot_section.m

    r9733 r9734  
    3232md3d=md;
    3333if exist(options,'layer')
    34         md.x=md.mesh.x2d; md.y=md.mesh.y2d; md.mesh.elements=md.mesh.elements2d; md.mesh.dimension=2;
     34        md.mesh.x=md.mesh.x2d; md.mesh.y=md.mesh.y2d; md.mesh.elements=md.mesh.elements2d; md.mesh.dimension=2;
    3535end
    3636
     
    9696                                text(x(end),y(end),'end','backgroundcolor',[0.8 0.9 0.8])
    9797                                plot(x,y,'-r')
    98                                 axis([min(md.x)-1 max(md.x)+1 min(md.y)-1 max(md.y)+1])
     98                                axis([min(md.mesh.x)-1 max(md.mesh.x)+1 min(md.mesh.y)-1 max(md.mesh.y)+1])
    9999                                view(2)
    100100                        end
     
    138138                                        text(x(end),y(end),'end','backgroundcolor',[0.8 0.9 0.8])
    139139                                        plot(x,y,'-r')
    140                                         axis([min(md.x)-1 max(md.x)+1 min(md.y)-1 max(md.y)+1])
     140                                        axis([min(md.mesh.x)-1 max(md.mesh.x)+1 min(md.mesh.y)-1 max(md.mesh.y)+1])
    141141                                        view(2)
    142142                                end
     
    173173                                        text(x(end),y(end),'end','backgroundcolor',[0.8 0.9 0.8])
    174174                                        plot(x,y,'-r')
    175                                         axis([min(md.x)-1 max(md.x)+1 min(md.y)-1 max(md.y)+1])
     175                                        axis([min(md.mesh.x)-1 max(md.mesh.x)+1 min(md.mesh.y)-1 max(md.mesh.y)+1])
    176176                                        view(2)
    177177                                end
  • issm/trunk/src/m/model/plot/plot_tensor_principalaxis.m

    r9733 r9734  
    2929%take the center of each element if ~isonnode
    3030if datatype==1,
    31         x=mean(md.x(md.mesh.elements'))'; y=mean(md.y(md.mesh.elements'))'; z=mean(md.z(md.mesh.elements'))';
     31        x=mean(md.mesh.x(md.mesh.elements'))'; y=mean(md.mesh.y(md.mesh.elements'))'; z=mean(md.mesh.z(md.mesh.elements'))';
    3232end
    3333
  • issm/trunk/src/m/model/plot/processmesh.m

    r9733 r9734  
    1616
    1717        if ~strcmpi(getfieldvalue(options,'coord','xy'),'latlon'),
    18                 x=md.x;
     18                x=md.mesh.x;
    1919                x2d=md.mesh.x2d;
    20                 y=md.y;
     20                y=md.mesh.y;
    2121                y2d=md.mesh.y2d;
    2222        else
     
    2727        end
    2828
    29         z_field=getfieldvalue(options,'z',md.z);
     29        z_field=getfieldvalue(options,'z',md.mesh.z);
    3030        if ischar(z_field),
    3131                z=md.(z_field);
     
    3333                z=z_field;
    3434        else
    35                 z=md.z;
     35                z=md.mesh.z;
    3636        end
    3737
     
    6868        if (md.mesh.dimension==2),
    6969                elements=transpose(reshape(1:3*md.mesh.numberofelements,3,md.mesh.numberofelements));
    70                 x=transpose(reshape(md.x(data.index)',1,3*md.mesh.numberofelements));
    71                 y=transpose(reshape(md.y(data.index)',1,3*md.mesh.numberofelements));
     70                x=transpose(reshape(md.mesh.x(data.index)',1,3*md.mesh.numberofelements));
     71                y=transpose(reshape(md.mesh.y(data.index)',1,3*md.mesh.numberofelements));
    7272                z=zeros(3*md.mesh.numberofelements,1);
    7373                is2d=1;
    7474        else
    7575                elements=transpose(reshape(1:6*md.mesh.numberofelements,6,md.mesh.numberofelements));
    76                 x=transpose(reshape(md.x(data.index)',1,6*md.mesh.numberofelements));
    77                 y=transpose(reshape(md.y(data.index)',1,6*md.mesh.numberofelements));
    78                 z=transpose(reshape(md.z(data.index)',1,6*md.mesh.numberofelements));
     76                x=transpose(reshape(md.mesh.x(data.index)',1,6*md.mesh.numberofelements));
     77                y=transpose(reshape(md.mesh.y(data.index)',1,6*md.mesh.numberofelements));
     78                z=transpose(reshape(md.mesh.z(data.index)',1,6*md.mesh.numberofelements));
    7979                is2d=0;
    8080        end
  • issm/trunk/src/m/model/plot/showregion.m

    r9714 r9734  
    2626Ay=[min(A.y) max(A.y)];
    2727
    28 mdx=[min(md.x) max(md.x)];
    29 mdy=[min(md.y) max(md.y)];
     28mdx=[min(md.mesh.x) max(md.mesh.x)];
     29mdy=[min(md.mesh.y) max(md.mesh.y)];
    3030
    3131line(A.x,A.y,'color','b');
  • issm/trunk/src/m/model/radarpower.m

    r9714 r9734  
    1919
    2020highres=getfieldvalue(options,'highres',0);
    21 xlim=getfieldvalue(options,'xlim',[min(md.x) max(md.x)]);
    22 ylim=getfieldvalue(options,'ylim',[min(md.y) max(md.y)]);
     21xlim=getfieldvalue(options,'xlim',[min(md.mesh.x) max(md.mesh.x)]);
     22ylim=getfieldvalue(options,'ylim',[min(md.mesh.y) max(md.mesh.y)]);
    2323posting=getfieldvalue(options,'posting',0); % 0 -> image posting default
    2424
  • issm/trunk/src/m/model/setmask.m

    r9733 r9734  
    2121
    2222%Get assigned fields
    23 x=md.x;
    24 y=md.y;
     23x=md.mesh.x;
     24y=md.mesh.y;
    2525elements=md.mesh.elements;
    2626
  • issm/trunk/src/m/model/setmask2.m

    r9733 r9734  
    99
    1010%Get assigned fields
    11 x=md.x;
    12 y=md.y;
     11x=md.mesh.x;
     12y=md.mesh.y;
    1313elements=md.mesh.elements;
    1414
  • issm/trunk/src/m/model/shear2d.m

    r9733 r9734  
    88%      s=shear2d(md);
    99
    10 [alpha beta]=GetNodalFunctionsCoeff(md.mesh.elements,md.x,md.y);
     10[alpha beta]=GetNodalFunctionsCoeff(md.mesh.elements,md.mesh.x,md.mesh.y);
    1111
    1212summation=[1;1;1];
  • issm/trunk/src/m/model/slope.m

    r9733 r9734  
    1010        numberofnodes=md.mesh.numberofvertices;
    1111        index=md.mesh.elements;
    12         x=md.x; y=md.y;
     12        x=md.mesh.x; y=md.mesh.y;
    1313else
    1414        numberofelements=md.mesh.numberofelements2d;
  • issm/trunk/src/m/model/thicknessevolution.m

    r9733 r9734  
    2020
    2121%compute nodal functions coefficients N(x,y)=alpha x + beta y + gamma
    22 [alpha beta]=GetNodalFunctionsCoeff(md.mesh.elements,md.x,md.y);
     22[alpha beta]=GetNodalFunctionsCoeff(md.mesh.elements,md.mesh.x,md.mesh.y);
    2323
    2424%compute dhdt=div(Hu)
  • issm/trunk/src/m/utils/BC/SetIceShelfBC.m

    r9733 r9734  
    1919        icefrontfile=varargin{1};
    2020        if ~exist(icefrontfile), error(['SetIceShelfBC error message: ice front file ' icefrontfile ' not found']); end
    21         nodeinsideicefront=ContourToMesh(md.mesh.elements,md.x,md.y,icefrontfile,'node',2);
     21        nodeinsideicefront=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,icefrontfile,'node',2);
    2222        nodeonicefront=double(md.mesh.vertexonboundary & nodeinsideicefront);
    2323elseif nargin==1,
  • issm/trunk/src/m/utils/BC/SetMarineIceSheetBC.m

    r9733 r9734  
    2323                error(['SetMarineIceSheetBC error message: ice front file ' icefrontfile ' not found']);
    2424        end
    25         nodeinsideicefront=ContourToMesh(md.mesh.elements,md.x,md.y,icefrontfile,'node',2);
     25        nodeinsideicefront=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,icefrontfile,'node',2);
    2626        vertexonicefront=double(md.mesh.vertexonboundary & nodeinsideicefront);
    2727else
  • issm/trunk/src/m/utils/Exp/clicktoflowline.m

    r9733 r9734  
    44% Usage: clicktoflowline(index,x,y,u,v,x0,y0,filename)
    55%
    6 % Ex: clicktoflowline(md.mesh.elements,md.x,md.y,md.inversion.vx_obs,md.inversion.vy_obs,'flowline1.exp')
     6% Ex: clicktoflowline(md.mesh.elements,md.mesh.x,md.mesh.y,md.inversion.vx_obs,md.inversion.vy_obs,'flowline1.exp')
    77
    88
  • issm/trunk/src/m/utils/Exp/downstreamflowlines.m

    r9733 r9734  
    1010%
    1111%   Example:
    12 %      flowpath=downstreamflowlines(md.mesh.elements,md.x,md.y,md.vx,md.initialization.vy,x0,y0)
     12%      flowpath=downstreamflowlines(md.mesh.elements,md.mesh.x,md.mesh.y,md.vx,md.initialization.vy,x0,y0)
    1313
    1414%check input size
  • issm/trunk/src/m/utils/Exp/flowlines.m

    r9733 r9734  
    1010%
    1111%   Example:
    12 %      flowpath=flowlines(md.mesh.elements,md.x,md.y,md.vx,md.initialization.vy,x0,y0)
     12%      flowpath=flowlines(md.mesh.elements,md.mesh.x,md.mesh.y,md.vx,md.initialization.vy,x0,y0)
    1313
    1414%check input size
  • issm/trunk/src/m/utils/Geometry/FlagElements.m

    r9733 r9734  
    3333                        if ~exist(region,'file'),
    3434                                [xlim,ylim]=basinzoom('basin',region);
    35                                 flag_nodes=double(md.x<xlim(2) & md.x>xlim(1) &  md.y<ylim(2) & md.y>ylim(1));
     35                                flag_nodes=double(md.mesh.x<xlim(2) & md.mesh.x>xlim(1) &  md.mesh.y<ylim(2) & md.mesh.y>ylim(1));
    3636                                flag=prod(flag_nodes(md.mesh.elements),2);
    3737                        else
    3838                                %ok, flag elements
    39                                 flag=ContourToMesh(md.mesh.elements(:,1:3),md.x,md.y,region,'element',1);
     39                                flag=ContourToMesh(md.mesh.elements(:,1:3),md.mesh.x,md.mesh.y,region,'element',1);
    4040                        end
    4141                end
  • issm/trunk/src/m/utils/Interp/FillHole.m

    r9733 r9734  
    66%
    77%   Example:
    8 %      md.geometry.surface=FillHole(md.mesh.elements,x,md.y,md.geometry.surface)
     8%      md.geometry.surface=FillHole(md.mesh.elements,x,md.mesh.y,md.geometry.surface)
    99%
    1010
  • issm/trunk/src/m/utils/Interp/InterpFromFile.m

    r9691 r9734  
    1919%
    2020%   Example:
    21 %      md.geometry.surface=InterpFromFile(md.x,md.y,'surfacefile.mat',0);
     21%      md.geometry.surface=InterpFromFile(md.mesh.x,md.mesh.y,'surfacefile.mat',0);
    2222%
    2323%   See also: PLUGVELOCITIES, INTERPFROMGRID, INTERPFROMMESH2D, INTERPFROMMESH3D
  • issm/trunk/src/m/utils/Interp/plugvelocities.m

    r9684 r9734  
    2929%Interpolation
    3030if strcmpi(Names.interp,'node'),
    31         md.inversion.vx_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.x,md.y,default_value);
    32         md.inversion.vy_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.x,md.y,default_value);
     31        md.inversion.vx_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.mesh.x,md.mesh.y,default_value);
     32        md.inversion.vy_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.mesh.x,md.mesh.y,default_value);
    3333else
    34         md.inversion.vx_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.x,md.y,default_value);
    35         md.inversion.vy_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.x,md.y,default_value);
     34        md.inversion.vx_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.mesh.x,md.mesh.y,default_value);
     35        md.inversion.vy_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.mesh.x,md.mesh.y,default_value);
    3636end
    3737
  • issm/trunk/src/m/utils/Mesh/BamgCall.m

    r9733 r9734  
    2020%Compute Hessian
    2121t1=clock; fprintf('%s','      computing Hessian...');
    22 hessian=ComputeHessian(md.mesh.elements,md.x,md.y,field,'node');
     22hessian=ComputeHessian(md.mesh.elements,md.mesh.x,md.mesh.y,field,'node');
    2323t2=clock;fprintf('%s\n',[' done (' num2str(etime(t2,t1)) ' seconds)']);
    2424
     
    5050%Vertices
    5151fprintf(fid,'\n%s\n%i\n\n','Vertices',md.mesh.numberofvertices);
    52 fprintf(fid,'%8g %8g %i\n',[md.x md.y ones(md.mesh.numberofvertices,1)]');
     52fprintf(fid,'%8g %8g %i\n',[md.mesh.x md.mesh.y ones(md.mesh.numberofvertices,1)]');
    5353
    5454%Triangles
     
    6868t1=clock; fprintf('\n%s','      reading final mesh files...');
    6969A=meshread('carre1.mesh');
    70 md.x=A.x;
    71 md.y=A.y;
     70md.mesh.x=A.x;
     71md.mesh.y=A.y;
    7272md.z=zeros(A.nods,1);
    7373md.mesh.elements=A.index;
  • issm/trunk/src/m/utils/Mesh/BamgCallFromMetric.m

    r9733 r9734  
    3131%Vertices
    3232fprintf(fid,'\n%s\n%i\n\n','Vertices',md.mesh.numberofvertices);
    33 fprintf(fid,'%8g %8g %i\n',[md.x md.y ones(md.mesh.numberofvertices,1)]');
     33fprintf(fid,'%8g %8g %i\n',[md.mesh.x md.mesh.y ones(md.mesh.numberofvertices,1)]');
    3434
    3535%Triangles
     
    4949t1=clock; fprintf('\n%s','      reading final mesh files...');
    5050A=meshread('carre1.mesh');
    51 md.x=A.x;
    52 md.y=A.y;
     51md.mesh.x=A.x;
     52md.mesh.y=A.y;
    5353md.z=zeros(A.nods,1);
    5454md.mesh.elements=A.index;
  • issm/trunk/src/m/utils/Mesh/ComputeHessian.m

    r9733 r9734  
    1010%
    1111%   Example:
    12 %      hessian=ComputeHessian(md.mesh.elements,md.x,md.y,md.inversion.vel_obs,'node')
     12%      hessian=ComputeHessian(md.mesh.elements,md.mesh.x,md.mesh.y,md.inversion.vel_obs,'node')
    1313
    1414%some variables
  • issm/trunk/src/m/utils/Mesh/GetAreas.m

    r9733 r9734  
    1010%
    1111%   Examples:
    12 %      areas  =GetAreas(md.mesh.elements,md.x,md.y);
    13 %      volumes=GetAreas(md.mesh.elements,md.x,md.y,md.z);
     12%      areas  =GetAreas(md.mesh.elements,md.mesh.x,md.mesh.y);
     13%      volumes=GetAreas(md.mesh.elements,md.mesh.x,md.mesh.y,md.z);
    1414
    1515%get number of elements and number of nodes
  • issm/trunk/src/m/utils/Mesh/GetCharacteristicLength.m

    r9733 r9734  
    99%
    1010%   Examples:
    11 %      length  =GetCharacteristicLength(md.mesh.elements,md.x,md.y);
    12 %      length  =GetCharacteristicLength(md.mesh.elements,md.x,md.y,md.z);
     11%      length  =GetCharacteristicLength(md.mesh.elements,md.mesh.x,md.mesh.y);
     12%      length  =GetCharacteristicLength(md.mesh.elements,md.mesh.x,md.mesh.y,md.z);
    1313
    1414
  • issm/trunk/src/m/utils/Mesh/GetNodalFunctionsCoeff.m

    r9733 r9734  
    1212%
    1313%   Example:
    14 %      [alpha beta gamma]=GetNodalFunctionsCoeff(md.mesh.elements,md.x,md.y);
     14%      [alpha beta gamma]=GetNodalFunctionsCoeff(md.mesh.elements,md.mesh.x,md.mesh.y);
    1515
    1616%make columns out of x and y
  • issm/trunk/src/m/utils/Mesh/MeshQuality.m

    r9733 r9734  
    77%Get some variables from the model
    88index=md.mesh.elements;
    9 x=md.x;
    10 y=md.y;
     9x=md.mesh.x;
     10y=md.mesh.y;
    1111
    1212%2d geometric parameter (do not change)
  • issm/trunk/src/m/utils/Mesh/ProfileProjectOntoMesh.m

    r9733 r9734  
    99%make a curve out of the mesh, to use the intersections routine.
    1010rows=[md.mesh.elements md.mesh.elements(:,1)]'; rows=rows(:);
    11 x=md.x(rows);
    12 y=md.y(rows);
     11x=md.mesh.x(rows);
     12y=md.mesh.y(rows);
    1313
    1414%[x0,y0] = intersections(profile.x,profile.y,x,y,1);
     
    4848
    4949%now, for each node, figure out which element it belongs to.
    50 node_in_element=NodeInElement(newx,newy,md.mesh.elements,md.x,md.y,md.mesh.vertexconnectivity);
     50node_in_element=NodeInElement(newx,newy,md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.vertexconnectivity);
    5151
    5252% eliminate nodes that don't fall in any element
  • issm/trunk/src/m/utils/Mesh/YamsCall.m

    r9733 r9734  
    2020%Compute Hessian
    2121t1=clock; fprintf('%s','      computing Hessian...');
    22 hessian=ComputeHessian(md.mesh.elements,md.x,md.y,field,'node');
     22hessian=ComputeHessian(md.mesh.elements,md.mesh.x,md.mesh.y,field,'node');
    2323t2=clock;fprintf('%s\n',[' done (' num2str(etime(t2,t1)) ' seconds)']);
    2424
     
    4747%Vertices
    4848fprintf(fid,'\n%s\n%i\n\n','Vertices',md.mesh.numberofvertices);
    49 fprintf(fid,'%8g %8g %i\n',[md.x md.y zeros(md.mesh.numberofvertices,1)]');
     49fprintf(fid,'%8g %8g %i\n',[md.mesh.x md.mesh.y zeros(md.mesh.numberofvertices,1)]');
    5050
    5151%Triangles
     
    8888Tria=load('carre1.tria');
    8989Coor=load('carre1.coor');
    90 md.x=Coor(:,1);
    91 md.y=Coor(:,2);
     90md.mesh.x=Coor(:,1);
     91md.mesh.y=Coor(:,2);
    9292md.z=zeros(size(Coor,1),1);
    9393md.mesh.elements=Tria;
  • issm/trunk/src/m/utils/Mesh/argusmesh.m

    r9733 r9734  
    7878%Finally, use model constructor to build a complete model:
    7979md.mesh.elements=elements;
    80 md.x=x;
    81 md.y=y;
     80md.mesh.x=x;
     81md.mesh.y=y;
    8282md.z=z;
    83 md.mesh.numberofvertices=size(md.x,1);
     83md.mesh.numberofvertices=size(md.mesh.x,1);
    8484md.mesh.numberofelements=size(md.mesh.elements,1);
    8585md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
  • issm/trunk/src/m/utils/Mesh/rifttipsonmesh.m

    r5819 r9734  
    1414        y_tip=rift.y(1);
    1515       
    16         index=find_point(md.x,md.y,x_tip,y_tip);
     16        index=find_point(md.mesh.x,md.mesh.y,x_tip,y_tip);
    1717        tips(end+1)=index;
    1818
     
    2020        y_tip=rift.y(end);
    2121       
    22         index=find_point(md.x,md.y,x_tip,y_tip);
     22        index=find_point(md.mesh.x,md.mesh.y,x_tip,y_tip);
    2323        tips(end+1)=index;
    2424
  • issm/trunk/src/m/utils/Mesh/roundmesh.m

    r9703 r9734  
    2727
    2828%move the closest node to the center
    29 [mini pos]=min(md.x.^2+md.y.^2);
    30 md.x(pos)=0;
    31 md.y(pos)=0;
     29[mini pos]=min(md.mesh.x.^2+md.mesh.y.^2);
     30md.mesh.x(pos)=0;
     31md.mesh.y(pos)=0;
    3232
    3333%delete domain
  • issm/trunk/src/m/utils/Mesh/squaremesh.m

    r9733 r9734  
    5656
    5757%plug coordinates and nodes
    58 md.x=x;
    59 md.y=y;
     58md.mesh.x=x;
     59md.mesh.y=y;
    6060md.z=zeros(nods,1);
    6161md.mesh.numberofvertices=nods;
  • issm/trunk/src/m/utils/Numerics/cfl_step.m

    r9733 r9734  
    1616
    1717index=md.mesh.elements;
    18 edgex=max(md.x(index),[],2)-min(md.x(index),[],2);
    19 edgey=max(md.y(index),[],2)-min(md.y(index),[],2);
     18edgex=max(md.mesh.x(index),[],2)-min(md.mesh.x(index),[],2);
     19edgey=max(md.mesh.y(index),[],2)-min(md.mesh.y(index),[],2);
    2020vx=max(abs(vx(index)),[],2);
    2121vy=max(abs(vy(index)),[],2);
  • issm/trunk/template

    r9729 r9734  
    1 mesh {{{
    2 
    3         projection
    4           x
    5           y
    6           z
    7           elements
    8           edges
    9 
    10           elements2d
    11           x2d
    12           y2d
    13 }}}
    14 
    151%To be completed
    162cluster{{{
  • issm/trunk/test/Miscellaneous/Bump/Bump.par

    r9733 r9734  
    55hmin=1000;
    66hmax=1000;
    7 ymin=min(md.y);
    8 ymax=max(md.y);
    9 md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
     7ymin=min(md.mesh.y);
     8ymax=max(md.mesh.y);
     9md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin);
    1010md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness+10;
    1111md.geometry.surface=md.geometry.bed+md.geometry.thickness;
    12 md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness+height*exp(-((md.x-50000).^2+(md.y-50000).^2)/(4000)^2)+10;
     12md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness+height*exp(-((md.mesh.x-50000).^2+(md.mesh.y-50000).^2)/(4000)^2)+10;
    1313md.geometry.thickness=md.geometry.surface-md.geometry.bed;
    1414
  • issm/trunk/test/Miscellaneous/GJM_test1/SquareShelf.par

    r9733 r9734  
    44hmin=300;
    55hmax=1000;
    6 ymin=min(md.y);
    7 ymax=max(md.y);
    8 md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
     6ymin=min(md.mesh.y);
     7ymax=max(md.mesh.y);
     8md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin);
    99md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
    1010md.geometry.surface=md.geometry.bed+md.geometry.thickness;
  • issm/trunk/test/Miscellaneous/connectivity/Square.par

    r9733 r9734  
    99hmin=300;
    1010hmax=1000;
    11 ymin=min(md.y);
    12 ymax=max(md.y);
    13 md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
     11ymin=min(md.mesh.y);
     12ymax=max(md.mesh.y);
     13md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin);
    1414md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
    1515md.geometry.surface=md.geometry.bed+md.geometry.thickness;
  • issm/trunk/test/NightlyRun/test1101.m

    r9729 r9734  
    3030
    3131        %Create MPCs to have periodic boundary conditions
    32         posx=find(md.x==0);
    33         posx2=find(md.x==max(md.x));
     32        posx=find(md.mesh.x==0);
     33        posx2=find(md.mesh.x==max(md.mesh.x));
    3434
    35         posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same nodes two times
    36         posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x));
     35        posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times
     36        posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x));
    3737
    3838        md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
  • issm/trunk/test/NightlyRun/test1102.m

    r9733 r9734  
    1717
    1818%       %Find elements at the corner and extract model
    19 %       posnodes=find((md.x==0 | md.x==max(md.x)) & (md.y==0 | md.y==max(md.y)));
     19%       posnodes=find((md.mesh.x==0 | md.mesh.x==max(md.mesh.x)) & (md.mesh.y==0 | md.mesh.y==max(md.mesh.y)));
    2020%       [a,b]=find(ismember(md.mesh.elements,posnodes));
    2121%       elements=ones(md.mesh.numberofelements,1);
     
    3434
    3535        %Create MPCs to have periodic boundary conditions
    36         %posx=find(md.x==0);
    37         %posx2=find(md.x==max(md.x));
    38         %posx=find(md.x==0 & md.y~=0 & md.y~=max(md.y) & ~md.mesh.vertexonbed);
    39         %posx2=find(md.x==max(md.x) &  md.y~=0 & md.y~=max(md.y) & ~md.mesh.vertexonbed);
     36        %posx=find(md.mesh.x==0);
     37        %posx2=find(md.mesh.x==max(md.mesh.x));
     38        %posx=find(md.mesh.x==0 & md.mesh.y~=0 & md.mesh.y~=max(md.mesh.y) & ~md.mesh.vertexonbed);
     39        %posx2=find(md.mesh.x==max(md.mesh.x) &  md.mesh.y~=0 & md.mesh.y~=max(md.mesh.y) & ~md.mesh.vertexonbed);
    4040
    41         %posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x) & ~md.mesh.vertexonbed); %Don't take the same nodes two times
    42         %posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x) & ~md.mesh.vertexonbed);
     41        %posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x) & ~md.mesh.vertexonbed); %Don't take the same nodes two times
     42        %posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x) & ~md.mesh.vertexonbed);
    4343
    4444        %md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
  • issm/trunk/test/NightlyRun/test1103.m

    r9729 r9734  
    2727
    2828        %Create MPCs to have periodic boundary conditions
    29         posx=find(md.x==0);
    30         posx2=find(md.x==max(md.x));
     29        posx=find(md.mesh.x==0);
     30        posx2=find(md.mesh.x==max(md.mesh.x));
    3131
    32         posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same nodes two times
    33         posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x));
     32        posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times
     33        posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x));
    3434
    3535        md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
  • issm/trunk/test/NightlyRun/test1104.m

    r9729 r9734  
    2727
    2828        %Create MPCs to have periodic boundary conditions
    29         posx=find(md.x==0);
    30         posx2=find(md.x==max(md.x));
     29        posx=find(md.mesh.x==0);
     30        posx2=find(md.mesh.x==max(md.mesh.x));
    3131
    32         posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same nodes two times
    33         posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x));
     32        posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times
     33        posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x));
    3434
    3535        md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
  • issm/trunk/test/NightlyRun/test1105.m

    r9729 r9734  
    2525        md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1);
    2626
    27         posx=find(md.x==0 & md.y~=0 & md.y~=L);
    28         posx2=find(md.x==L & md.y~=0 & md.y~=L);
     27        posx=find(md.mesh.x==0 & md.mesh.y~=0 & md.mesh.y~=L);
     28        posx2=find(md.mesh.x==L & md.mesh.y~=0 & md.mesh.y~=L);
    2929
    30         posy=find(md.y==0 & md.x~=0 & md.x~=L); %Don't take the same nodes two times
    31         posy2=find(md.y==L & md.x~=0 & md.x~=L);
     30        posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=L); %Don't take the same nodes two times
     31        posy2=find(md.mesh.y==L & md.mesh.x~=0 & md.mesh.x~=L);
    3232
    3333        md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
    3434
    3535        %Add spc on the corners
    36         pos=find((md.x==0 | md.x==L) & (md.y==0 | md.y==L) & md.mesh.vertexonbed);
     36        pos=find((md.mesh.x==0 | md.mesh.x==L) & (md.mesh.y==0 | md.mesh.y==L) & md.mesh.vertexonbed);
    3737        md.diagnostic.spcvx(pos)=0;
    3838        md.diagnostic.spcvy(pos)=0;
  • issm/trunk/test/NightlyRun/test1106.m

    r9725 r9734  
    1919        %Create MPCs to have periodic boundary conditions
    2020
    21         %posx=find(md.x==0);
    22         %posx2=find(md.x==L);
     21        %posx=find(md.mesh.x==0);
     22        %posx2=find(md.mesh.x==L);
    2323
    24         %posy=find(md.y==0 & md.x~=0 & md.x~=L); %Don't take the same nodes two times
    25         %posy2=find(md.y==L & md.x~=0 & md.x~=L);
     24        %posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=L); %Don't take the same nodes two times
     25        %posy2=find(md.mesh.y==L & md.mesh.x~=0 & md.mesh.x~=L);
    2626
    2727        %md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
  • issm/trunk/test/NightlyRun/test1107.m

    r9729 r9734  
    2626
    2727        %Create MPCs to have periodic boundary conditions
    28         posx=find(md.x==0 & ~(md.y==0 & md.mesh.vertexonbed) & ~(md.y==L & md.mesh.vertexonbed));
    29         posx2=find(md.x==max(md.x) & ~(md.y==0 & md.mesh.vertexonbed) & ~(md.y==L & md.mesh.vertexonbed));
     28        posx=find(md.mesh.x==0 & ~(md.mesh.y==0 & md.mesh.vertexonbed) & ~(md.mesh.y==L & md.mesh.vertexonbed));
     29        posx2=find(md.mesh.x==max(md.mesh.x) & ~(md.mesh.y==0 & md.mesh.vertexonbed) & ~(md.mesh.y==L & md.mesh.vertexonbed));
    3030
    31         posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same nodes two times
    32         posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x));
     31        posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times
     32        posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x));
    3333
    3434        md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
    3535
    3636        %Add spc on the corners
    37         pos=find((md.x==0 | md.x==L) & (md.y==0 | md.y==L) & md.mesh.vertexonbed);
     37        pos=find((md.mesh.x==0 | md.mesh.x==L) & (md.mesh.y==0 | md.mesh.y==L) & md.mesh.vertexonbed);
    3838        md.diagnostic.spcvy(:)=0;
    3939        md.diagnostic.spcvx(pos)=0;
  • issm/trunk/test/NightlyRun/test1108.m

    r9725 r9734  
    2222        %md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1);
    2323       
    24         %pos=find((md.x==0 | md.x==max(md.x)) & (md.y==0 | md.y==max(md.y)));
     24        %pos=find((md.mesh.x==0 | md.mesh.x==max(md.mesh.x)) & (md.mesh.y==0 | md.mesh.y==max(md.mesh.y)));
    2525        %md.diagnostic.spcvx(pos)=0;
    2626        %md.diagnostic.spcvy(pos)=0;
     
    2828
    2929        %%Create MPCs to have periodic boundary conditions
    30         %posx=find(md.x==0);
    31         %posx2=find(md.x==max(md.x));
     30        %posx=find(md.mesh.x==0);
     31        %posx2=find(md.mesh.x==max(md.mesh.x));
    3232
    33         %posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same nodes two times
    34         %posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x));
     33        %posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times
     34        %posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x));
    3535
    3636        %md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
  • issm/trunk/test/NightlyRun/test1109.m

    r9729 r9734  
    2626
    2727        %Create MPCs to have periodic boundary conditions
    28         posx=find(md.x==0);
    29         posx2=find(md.x==max(md.x));
     28        posx=find(md.mesh.x==0);
     29        posx2=find(md.mesh.x==max(md.mesh.x));
    3030        md.diagnostic.vertex_pairing=[posx,posx2];
    3131
     
    4141        %Remove the spc where there is some sliding (case 3 and 4):
    4242        if i==3 | i==4,
    43                 pos=find(md.y/max(md.y)>=0.44 & md.y/max(md.y)<=0.5);
     43                pos=find(md.mesh.y/max(md.mesh.y)>=0.44 & md.mesh.y/max(md.mesh.y)<=0.5);
    4444                md.diagnostic.spcvx(pos)=NaN;
    4545                md.diagnostic.spcvy(pos)=NaN;
  • issm/trunk/test/NightlyRun/test1110.m

    r9729 r9734  
    3030                md.diagnostic.spcvz(pos)=0;
    3131        else
    32                 pos=find(md.mesh.vertexonbed & (md.x==0 | md.x==max(md.x)) & (md.y==0 | md.y==max(md.y)));
     32                pos=find(md.mesh.vertexonbed & (md.mesh.x==0 | md.mesh.x==max(md.mesh.x)) & (md.mesh.y==0 | md.mesh.y==max(md.mesh.y)));
    3333                md.diagnostic.spcvx(pos)=100; %because we need a dirichlet somewhere
    3434                md.diagnostic.spcvy(pos)=0;
     
    3939
    4040        %Create MPCs to have periodic boundary conditions
    41         posx=find(md.x==0);
    42         posx2=find(md.x==max(md.x));
     41        posx=find(md.mesh.x==0);
     42        posx2=find(md.mesh.x==max(md.mesh.x));
    4343
    44         posy=find(md.y==0);
    45         posy2=find(md.y==max(md.y));
     44        posy=find(md.mesh.y==0);
     45        posy2=find(md.mesh.y==max(md.mesh.y));
    4646
    4747        md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
  • issm/trunk/test/NightlyRun/test1201.m

    r9725 r9734  
    2727
    2828        %spc thickness
    29         pos=find(md.y>199999.9);
     29        pos=find(md.mesh.y>199999.9);
    3030        times=0:1:500;
    3131        md.prognostic.spcthickness=NaN*ones(md.mesh.numberofvertices+1,length(times));
     
    4848[elements,x,y,z,s,h2]=SectionValues(md,results{2},'../Exp/CrossLineEISMINT.exp',100);
    4949[elements,x,y,z,s,h3]=SectionValues(md,results{3},'../Exp/CrossLineEISMINT.exp',100);
    50 [elements,x,y,z,s,hth]=SectionValues(md, 500+100*sin(2*pi/200*(500-md.y/400)),'../Exp/CrossLineEISMINT.exp',100);
     50[elements,x,y,z,s,hth]=SectionValues(md, 500+100*sin(2*pi/200*(500-md.mesh.y/400)),'../Exp/CrossLineEISMINT.exp',100);
    5151plot(s,h1,'r',s,h2,'b',s,h3,'g',s,hth,'k')
    5252legend('Art. diff.','No Art. diff.','D.G.','Theoretical')
  • issm/trunk/test/NightlyRun/test1203.m

    r9703 r9734  
    1010
    1111%Impose a non zero velocity on the upper boundary condition (y=max(y))
    12 pos=find(md.y==max(md.y));
    13 md.diagnostic.spcvy(pos)=400*(((md.x(pos)-100000)/25000).^2-ones(size(pos,1),1)).*heaviside((1+eps)*ones(size(pos,1),1)-((md.x(pos)-100000)/25000).^2);
     12pos=find(md.mesh.y==max(md.mesh.y));
     13md.diagnostic.spcvy(pos)=400*(((md.mesh.x(pos)-100000)/25000).^2-ones(size(pos,1),1)).*heaviside((1+eps)*ones(size(pos,1),1)-((md.mesh.x(pos)-100000)/25000).^2);
    1414
    1515%Compute solution for MacAyeal's model
  • issm/trunk/test/NightlyRun/test1204.m

    r9703 r9734  
    1010
    1111%Impose a non zero velocity on the upper boundary condition (y=max(y))
    12 pos=find(md.y==max(md.y));
    13 md.diagnostic.spcvy(pos)=400*(((md.x(pos)-100000)/25000).^2-ones(size(pos,1),1)).*heaviside((1+eps)*ones(size(pos,1),1)-((md.x(pos)-100000)/25000).^2);
     12pos=find(md.mesh.y==max(md.mesh.y));
     13md.diagnostic.spcvy(pos)=400*(((md.mesh.x(pos)-100000)/25000).^2-ones(size(pos,1),1)).*heaviside((1+eps)*ones(size(pos,1),1)-((md.mesh.x(pos)-100000)/25000).^2);
    1414
    1515%Compute solution for MacAyeal's model
  • issm/trunk/test/NightlyRun/test1205.m

    r9733 r9734  
    1313%Calculation of the analytical 2d velocity field
    1414constant=0.3;
    15 vx_obs=constant/2*md.x.*(md.geometry.thickness).^-1;
    16 vy_obs=constant/2*md.y.*(md.geometry.thickness).^-1;
     15vx_obs=constant/2*md.mesh.x.*(md.geometry.thickness).^-1;
     16vy_obs=constant/2*md.mesh.y.*(md.geometry.thickness).^-1;
    1717vel_obs=(sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));
    1818
     
    5151set(gcf,'Position',[1 1 1580 1150])
    5252subplot(2,2,1)
    53 p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
     53p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    5454vel,'FaceColor','interp','EdgeColor','none');
    5555title('Modelled velocity','FontSize',14,'FontWeight','bold')
     
    5858   
    5959subplot(2,2,2)
    60 p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
     60p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    6161vel_obs,'FaceColor','interp','EdgeColor','none');
    6262title('Analytical velocity','FontSize',14,'FontWeight','bold')
     
    6666subplot(2,2,3)
    6767hold on;
    68 plot(sqrt((md.x(1:md.mesh.numberofvertices2d)).^2+(md.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.');
    69 plot(sqrt((md.x2d).^2+(md.y2d).^2),vel_obs,'b.');
     68plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.');
     69plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.');
    7070title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold');
    7171xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold');
     
    7676
    7777subplot(2,2,4)
    78 p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
     78p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    7979abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none');
    8080title('Relative misfit [%]','FontSize',14,'FontWeight','bold')
  • issm/trunk/test/NightlyRun/test1206.m

    r9733 r9734  
    1313%Calculation of the analytical 2d velocity field
    1414constant=0.3;
    15 vx_obs=constant/2*md.x.*(md.geometry.thickness).^-1;
    16 vy_obs=constant/2*md.y.*(md.geometry.thickness).^-1;
     15vx_obs=constant/2*md.mesh.x.*(md.geometry.thickness).^-1;
     16vy_obs=constant/2*md.mesh.y.*(md.geometry.thickness).^-1;
    1717vel_obs=(sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));
    1818
     
    5050figure(1)
    5151subplot(2,2,1)
    52 p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
     52p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    5353vel,'FaceColor','interp','EdgeColor','none');
    5454title('Modelled velocity','FontSize',14,'FontWeight','bold')
     
    5757   
    5858subplot(2,2,2)
    59 p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
     59p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    6060vel_obs,'FaceColor','interp','EdgeColor','none');
    6161title('Analytical velocity','FontSize',14,'FontWeight','bold')
     
    6565subplot(2,2,3)
    6666hold on;
    67 plot(sqrt((md.x(1:md.mesh.numberofvertices2d)).^2+(md.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.');
    68 plot(sqrt((md.x2d).^2+(md.y2d).^2),vel_obs,'b.');
     67plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.');
     68plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.');
    6969title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold');
    7070xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold');
     
    7575
    7676subplot(2,2,4)
    77 p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
     77p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    7878abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none');
    7979title('Relative misfit [%]','FontSize',14,'FontWeight','bold')
  • issm/trunk/test/NightlyRun/test1207.m

    r9733 r9734  
    1313%Calculation of the analytical 2d velocity field
    1414constant=0.3;
    15 vx_obs=constant/2*md.x.*(md.geometry.thickness).^-1;
    16 vy_obs=constant/2*md.y.*(md.geometry.thickness).^-1;
     15vx_obs=constant/2*md.mesh.x.*(md.geometry.thickness).^-1;
     16vy_obs=constant/2*md.mesh.y.*(md.geometry.thickness).^-1;
    1717vel_obs=(sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));
    1818
     
    5050figure(1)
    5151subplot(2,2,1)
    52 p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
     52p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    5353vel,'FaceColor','interp','EdgeColor','none');
    5454title('Modelled velocity','FontSize',14,'FontWeight','bold')
     
    5757   
    5858subplot(2,2,2)
    59 p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
     59p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    6060vel_obs,'FaceColor','interp','EdgeColor','none');
    6161title('Analytical velocity','FontSize',14,'FontWeight','bold')
     
    6565subplot(2,2,3)
    6666hold on;
    67 plot(sqrt((md.x(1:md.mesh.numberofvertices2d)).^2+(md.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.');
    68 plot(sqrt((md.x2d).^2+(md.y2d).^2),vel_obs,'b.');
     67plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.');
     68plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.');
    6969title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold');
    7070xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold');
     
    7575
    7676subplot(2,2,4)
    77 p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
     77p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
    7878abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none');
    7979title('Relative misfit [%]','FontSize',14,'FontWeight','bold')
  • issm/trunk/test/NightlyRun/test1302.m

    r9733 r9734  
    2323A=10/(exp(alpha*(-1000))-1);    %A=T(bed)/(exp(alpha*bed)-1)  with bed=-1000 T(bed)=10
    2424B=-A;
    25 md.initialization.temperature=A*exp(alpha*md.z)+B;
     25md.initialization.temperature=A*exp(alpha*md.mesh.z)+B;
    2626
    2727%modeled  results
  • issm/trunk/test/NightlyRun/test1303.m

    r9733 r9734  
    1818%d2T/dz2=0 T(bed)=10 T(surface)=0  => T=0*(z-bed)/thickness+10*(surface-z)/thickness
    1919%each layer of the 3d mesh must have a constant value
    20 md.initialization.temperature=10*(md.geometry.surface-md.z)./md.geometry.thickness;
     20md.initialization.temperature=10*(md.geometry.surface-md.mesh.z)./md.geometry.thickness;
    2121
    2222%modeled  results
  • issm/trunk/test/NightlyRun/test1304.m

    r9733 r9734  
    1919%the result is linear with depth and is equal to 0 on the upper surface (See BC)
    2020%d2T/dz2=0  -k*dT/dz(bed)=G  T(surface)=0  => T=-G/k*(z-surface)
    21 md.initialization.temperature=-0.1/md.thermalconductivity*(md.z-md.geometry.surface); %G=0.1 W/m2
     21md.initialization.temperature=-0.1/md.thermalconductivity*(md.mesh.z-md.geometry.surface); %G=0.1 W/m2
    2222
    2323%modeled  results
  • issm/trunk/test/NightlyRun/test137.m

    r9725 r9734  
    22%Simple mesh
    33md=bamg(model,'domain','../Exp/Square.exp','hmax',100000);
    4 x1=md.x;
    5 y1=md.y;
     4x1=md.mesh.x;
     5y1=md.mesh.y;
    66
    77%hVertices
    88md=bamg(model,'domain','../Exp/Square.exp','hmax',300000,'hvertices',[10000 100000 400000 100000]');
    9 x2=md.x;
    10 y2=md.y;
     9x2=md.mesh.x;
     10y2=md.mesh.y;
    1111
    1212%big mesh
  • issm/trunk/test/NightlyRun/test1401.m

    r9681 r9734  
    11%test the anisotropic mesh adaptation
    2 %function to capture = exp(-(sqrt((md.x+0.1).^2+(md.y+0.1).^2)-0.75).^2*10^6)+((md.x+0.1).^2+(md.y+0.1).^2)/2;
     2%function to capture = exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
    33printingflag=false;
    44
     
    1111%mesh adaptation loop YAMS
    1212md=squaremesh(md,L,L,nx,ny);
    13 md.inversion.vel_obs=exp(-(sqrt((md.x+0.1).^2+(md.y+0.1).^2)-0.75).^2*10^6)+((md.x+0.1).^2+(md.y+0.1).^2)/2;
     13md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
    1414plotmodel(md,'data','vel_obs','data','vel_obs','nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    1515if printingflag,
     
    2020
    2121md=YamsCall(md,md.inversion.vel_obs,0.001,0.3,1.3,10^-4);
    22 md.inversion.vel_obs=exp(-(sqrt((md.x+0.1).^2+(md.y+0.1).^2)-0.75).^2*10^6)+((md.x+0.1).^2+(md.y+0.1).^2)/2;
     22md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
    2323plotmodel(md,'data','vel_obs','data','vel_obs','nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    2424if printingflag,
     
    2929
    3030md=YamsCall(md,md.inversion.vel_obs,0.001,0.3,2.5,0.008);
    31 md.inversion.vel_obs=exp(-(sqrt((md.x+0.1).^2+(md.y+0.1).^2)-0.75).^2*10^6)+((md.x+0.1).^2+(md.y+0.1).^2)/2;
     31md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
    3232plotmodel(md,'data','vel_obs','data','vel_obs','nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    3333if printingflag,
     
    3636        system(['mv mesh1_yams3.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Mesh/ ']);
    3737end
    38 x1=md.x;
    39 y1=md.y;
     38x1=md.mesh.x;
     39y1=md.mesh.y;
    4040
    4141%mesh adaptation loop BAMG
    4242md=squaremesh(md,L,L,nx,ny);
    43 md.inversion.vel_obs=exp(-(sqrt((md.x+0.1).^2+(md.y+0.1).^2)-0.75).^2*10^6)+((md.x+0.1).^2+(md.y+0.1).^2)/2;
     43md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
    4444plotmodel(md,'data','vel_obs','data','vel_obs','nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    4545if printingflag,
     
    5151md.bamg=NaN;
    5252md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.001,'hmax',0.3,'gradation',1.3,'err',10^-4);
    53 md.inversion.vel_obs=exp(-(sqrt((md.x+0.1).^2+(md.y+0.1).^2)-0.75).^2*10^6)+((md.x+0.1).^2+(md.y+0.1).^2)/2;
     53md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
    5454plotmodel(md,'data','vel_obs','data','vel_obs','nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    5555if printingflag,
     
    6161md.bamg=NaN;
    6262md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.001,'hmax',0.3,'gradation',2.5,'err',0.008);
    63 md.inversion.vel_obs=exp(-(sqrt((md.x+0.1).^2+(md.y+0.1).^2)-0.75).^2*10^6)+((md.x+0.1).^2+(md.y+0.1).^2)/2;
     63md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
    6464plotmodel(md,'data','vel_obs','data','vel_obs','nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
    6565if printingflag,
     
    6868        system(['mv mesh1_bamg3.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Mesh/ ']);
    6969end
    70 x2=md.x;
    71 y2=md.y;
     70x2=md.mesh.x;
     71y2=md.mesh.y;
    7272
    7373%Fields and tolerances to track changes
  • issm/trunk/test/NightlyRun/test1402.m

    r9681 r9734  
    1010%mesh adaptation loop YAMS
    1111md=squaremesh(md,L,L,nx,ny);
    12 u=4*md.x-2; v=4*md.y-2;
     12u=4*md.mesh.x-2; v=4*md.mesh.y-2;
    1313md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
    1414        +tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
     
    2222
    2323md=YamsCall(md,md.inversion.vel_obs,0.005,0.3,2.3,10^-2);
    24 u=4*md.x-2; v=4*md.y-2;
     24u=4*md.mesh.x-2; v=4*md.mesh.y-2;
    2525md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
    2626        +tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
     
    3434
    3535md=YamsCall(md,md.inversion.vel_obs,0.005,0.3,3,0.005);
    36 u=4*md.x-2; v=4*md.y-2;
     36u=4*md.mesh.x-2; v=4*md.mesh.y-2;
    3737md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
    3838        +tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
     
    4444        system(['mv mesh2_yams3.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Mesh/ ']);
    4545end
    46 x1=md.x;
    47 y1=md.y;
     46x1=md.mesh.x;
     47y1=md.mesh.y;
    4848
    4949%mesh adaptation loop BAMG
    5050md=squaremesh(md,L,L,nx,ny);
    51 u=4*md.x-2; v=4*md.y-2;
     51u=4*md.mesh.x-2; v=4*md.mesh.y-2;
    5252md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
    5353        +tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
     
    6262md.bamg=NaN;
    6363md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.005,'hmax',0.3,'gradation',2.3,'err',10^-2);
    64 u=4*md.x-2; v=4*md.y-2;
     64u=4*md.mesh.x-2; v=4*md.mesh.y-2;
    6565md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
    6666        +tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
     
    7575md.bamg=NaN;
    7676md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.005,'hmax',0.3,'gradation',3,'err',0.005);
    77 u=4*md.x-2; v=4*md.y-2;
     77u=4*md.mesh.x-2; v=4*md.mesh.y-2;
    7878md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
    7979        +tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
     
    8888md.bamg=NaN;
    8989md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.005,'hmax',0.3,'gradation',1.5,'err',0.003,'anisomax',1);
    90 u=4*md.x-2; v=4*md.y-2;
     90u=4*md.mesh.x-2; v=4*md.mesh.y-2;
    9191md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
    9292        +tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
     
    9898        system(['mv mesh2_bamgiso.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Mesh/ ']);
    9999end
    100 x2=md.x;
    101 y2=md.y;
     100x2=md.mesh.x;
     101y2=md.mesh.y;
    102102
    103103%Fields and tolerances to track changes
  • issm/trunk/test/NightlyRun/test1501.m

    r9733 r9734  
    9797
    9898        index = md.mesh.elements;
    99         x1=md.x(index(:,1)); x2=md.x(index(:,2)); x3=md.x(index(:,3));
    100         y1=md.y(index(:,1)); y2=md.y(index(:,2)); y3=md.y(index(:,3));
     99        x1=md.mesh.x(index(:,1)); x2=md.mesh.x(index(:,2)); x3=md.mesh.x(index(:,3));
     100        y1=md.mesh.y(index(:,1)); y2=md.mesh.y(index(:,2)); y3=md.mesh.y(index(:,3));
    101101        areas=(0.5*((x2-x1).*(y3-y1)-(y2-y1).*(x3-x1)));
    102102
  • issm/trunk/test/NightlyRun/test1502.m

    r9733 r9734  
    103103
    104104        index = md.mesh.elements;
    105         x1=md.x(index(:,1)); x2=md.x(index(:,2)); x3=md.x(index(:,3));
    106         y1=md.y(index(:,1)); y2=md.y(index(:,2)); y3=md.y(index(:,3));
     105        x1=md.mesh.x(index(:,1)); x2=md.mesh.x(index(:,2)); x3=md.mesh.x(index(:,3));
     106        y1=md.mesh.y(index(:,1)); y2=md.mesh.y(index(:,2)); y3=md.mesh.y(index(:,3));
    107107        areas=(0.5*((x2-x1).*(y3-y1)-(y2-y1).*(x3-x1)));
    108108
  • issm/trunk/test/NightlyRun/test233.m

    r9725 r9734  
    1313
    1414%needed later
    15 ymin=min(md.y);
    16 ymax=max(md.y);
    17 xmin=min(md.x);
    18 xmax=max(md.x);
     15ymin=min(md.mesh.y);
     16ymax=max(md.mesh.y);
     17xmin=min(md.mesh.x);
     18xmax=max(md.mesh.x);
    1919
    2020di=md.materials.rho_ice/md.materials.rho_water;
     
    4242
    4343%constrain flanks to 0 normal velocity
    44 pos=find(md.x==xmin | md.x==xmax);
     44pos=find(md.mesh.x==xmin | md.mesh.x==xmax);
    4545md.diagnostic.spcvx(pos)=0;
    4646md.diagnostic.spcvz(pos)=NaN;
    4747
    4848%constrain grounding line to 0 velocity
    49 pos=find(md.y==ymin);
     49pos=find(md.mesh.y==ymin);
    5050md.diagnostic.spcvx(pos)=0;
    5151md.diagnostic.spcvy(pos)=0;
     
    5353%icefront
    5454nodeonicefront=zeros(md.mesh.numberofvertices,1);
    55 pos=find(md.y==ymax); nodeonicefront(pos)=1;
     55pos=find(md.mesh.y==ymax); nodeonicefront(pos)=1;
    5656pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2))); diagnostic.icefront=md.mesh.segments(pos,:);
    5757diagnostic.icefront=[diagnostic.icefront 1*md.mask.elementonfloatingice(diagnostic.icefront(:,end))];
     
    6262%create analytical solution: strain rate is constant = ((rho_ice*g*h)/4B)^3 (Paterson, 4th Edition, page 292.
    6363%ey_c=(md.materials.rho_ice*md.constants.g*(1-di)*md.geometry.thickness./(4*md.materials.rheology_B)).^3;
    64 %vy_c=ey_c.*md.y*md.constants.yts;
     64%vy_c=ey_c.*md.mesh.y*md.constants.yts;
    6565
    6666%Fields and tolerances to track changes
  • issm/trunk/test/NightlyRun/test234.m

    r9725 r9734  
    1313
    1414%needed later
    15 ymin=min(md.y);
    16 ymax=max(md.y);
    17 xmin=min(md.x);
    18 xmax=max(md.x);
     15ymin=min(md.mesh.y);
     16ymax=max(md.mesh.y);
     17xmin=min(md.mesh.x);
     18xmax=max(md.mesh.x);
    1919
    2020di=md.materials.rho_ice/md.materials.rho_water;
     
    4242
    4343%constrain flanks to 0 normal velocity
    44 pos=find(md.x==xmin | md.x==xmax);
     44pos=find(md.mesh.x==xmin | md.mesh.x==xmax);
    4545md.diagnostic.spcvx(pos)=0;
    4646md.diagnostic.spcvz(pos)=NaN;
    4747
    4848%constrain grounding line to 0 velocity
    49 pos=find(md.y==ymin);
     49pos=find(md.mesh.y==ymin);
    5050md.diagnostic.spcvx(pos)=0;
    5151md.diagnostic.spcvy(pos)=0;
     
    5353%icefront
    5454nodeonicefront=zeros(md.mesh.numberofvertices,1);
    55 pos=find(md.y==ymax); nodeonicefront(pos)=1;
     55pos=find(md.mesh.y==ymax); nodeonicefront(pos)=1;
    5656pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2))); diagnostic.icefront=md.mesh.segments(pos,:);
    5757diagnostic.icefront=[diagnostic.icefront 1*md.mask.elementonfloatingice(diagnostic.icefront(:,end))];
     
    6262%create analytical solution: strain rate is constant = ((rho_ice*g*h)/4B)^3 (Paterson, 4th Edition, page 292.
    6363%ey_c=(md.materials.rho_ice*md.constants.g*(1-di)*md.geometry.thickness./(4*md.materials.rheology_B)).^3;
    64 %vy_c=ey_c.*md.y*md.constants.yts;
     64%vy_c=ey_c.*md.mesh.y*md.constants.yts;
    6565
    6666%Fields and tolerances to track changes
  • issm/trunk/test/NightlyRun/test235.m

    r9725 r9734  
    1010
    1111%needed later
    12 ymin=min(md.y);
    13 ymax=max(md.y);
    14 xmin=min(md.x);
    15 xmax=max(md.x);
     12ymin=min(md.mesh.y);
     13ymax=max(md.mesh.y);
     14xmin=min(md.mesh.x);
     15xmax=max(md.mesh.x);
    1616
    1717di=md.materials.rho_ice/md.materials.rho_water;
     
    3939
    4040%constrain flanks to 0 normal velocity
    41 pos=find(md.x==xmin | md.x==xmax);
     41pos=find(md.mesh.x==xmin | md.mesh.x==xmax);
    4242md.diagnostic.spcvx(pos)=0;
    4343md.diagnostic.spcvz(pos)=NaN;
    4444
    4545%constrain grounding line to 0 velocity
    46 pos=find(md.y==ymin);
     46pos=find(md.mesh.y==ymin);
    4747md.diagnostic.spcvx(pos)=0;
    4848md.diagnostic.spcvy(pos)=0;
     
    5050%icefront
    5151nodeonicefront=zeros(md.mesh.numberofvertices,1);
    52 pos=find(md.y==ymax); nodeonicefront(pos)=1;
     52pos=find(md.mesh.y==ymax); nodeonicefront(pos)=1;
    5353pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2))); diagnostic.icefront=md.mesh.segments(pos,:);
    5454diagnostic.icefront=[diagnostic.icefront 1*md.mask.elementonfloatingice(diagnostic.icefront(:,end))];
  • issm/trunk/test/NightlyRun/test236.m

    r9725 r9734  
    1010
    1111%needed later
    12 ymin=min(md.y);
    13 ymax=max(md.y);
    14 xmin=min(md.x);
    15 xmax=max(md.x);
     12ymin=min(md.mesh.y);
     13ymax=max(md.mesh.y);
     14xmin=min(md.mesh.x);
     15xmax=max(md.mesh.x);
    1616
    1717di=md.materials.rho_ice/md.materials.rho_water;
     
    3939
    4040%constrain flanks to 0 normal velocity
    41 pos=find(md.x==xmin | md.x==xmax);
     41pos=find(md.mesh.x==xmin | md.mesh.x==xmax);
    4242md.diagnostic.spcvx(pos)=0;
    4343md.diagnostic.spcvz(pos)=NaN;
    4444
    4545%constrain grounding line to 0 velocity
    46 pos=find(md.y==ymin);
     46pos=find(md.mesh.y==ymin);
    4747md.diagnostic.spcvx(pos)=0;
    4848md.diagnostic.spcvy(pos)=0;
     
    5050%icefront
    5151nodeonicefront=zeros(md.mesh.numberofvertices,1);
    52 pos=find(md.y==ymax); nodeonicefront(pos)=1;
     52pos=find(md.mesh.y==ymax); nodeonicefront(pos)=1;
    5353pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2))); diagnostic.icefront=md.mesh.segments(pos,:);
    5454diagnostic.icefront=[diagnostic.icefront 1*md.mask.elementonfloatingice(diagnostic.icefront(:,end))];
  • issm/trunk/test/NightlyRun/test446.m

    r9733 r9734  
    55md=roundmesh(model,radius,resolution);
    66%fix center node to 0,0
    7 rad=sqrt((md.x).*md.x+(md.y).*md.y);
     7rad=sqrt((md.mesh.x).*md.mesh.x+(md.mesh.y).*md.mesh.y);
    88pos=find(rad==min(rad));
    9 md.x(pos)=0; md.y(pos)=0; %the closest node to the center is changed to be exactly at the center
     9md.mesh.x(pos)=0; md.mesh.y(pos)=0; %the closest node to the center is changed to be exactly at the center
    1010%}}}
    1111%put our grounding line 'shelfextent' meters from the icefront {{{1
    12 xelem=md.x(md.mesh.elements)*[1;1;1]/3;
    13 yelem=md.y(md.mesh.elements)*[1;1;1]/3;
     12xelem=md.mesh.x(md.mesh.elements)*[1;1;1]/3;
     13yelem=md.mesh.y(md.mesh.elements)*[1;1;1]/3;
    1414rad=sqrt((xelem).*xelem+(yelem).*yelem);
    1515flags=zeros(md.mesh.numberofelements,1);
     
    2424%plug holes into the ice sheet, to test for grounding line migration. {{{1
    2525di=md.materials.rho_ice/md.materials.rho_water;
    26 rad=sqrt((md.x).*md.x+(md.y).*md.y);
     26rad=sqrt((md.mesh.x).*md.mesh.x+(md.mesh.y).*md.mesh.y);
    2727pos=find(rad<200000);
    2828md.geometry.thickness(pos)=100;
     
    3030md.geometry.surface(pos)=md.geometry.bed(pos)+md.geometry.thickness(pos);
    3131
    32 pos=find(md.x<.2*1e6 & md.x>-.2*1e6 & md.y>0);
     32pos=find(md.mesh.x<.2*1e6 & md.mesh.x>-.2*1e6 & md.mesh.y>0);
    3333md.geometry.thickness(pos)=100;
    3434md.geometry.bed(pos)=-di*md.geometry.thickness(pos)-20;
    3535md.geometry.surface(pos)=md.geometry.bed(pos)+md.geometry.thickness(pos);
    3636
    37 pos=find(md.x<.1*1e6 & md.x>-.1*1e6 & md.y<-.5*1e6 & md.y>-.6*1e6);
     37pos=find(md.mesh.x<.1*1e6 & md.mesh.x>-.1*1e6 & md.mesh.y<-.5*1e6 & md.mesh.y>-.6*1e6);
    3838md.geometry.thickness(pos)=100;
    3939md.geometry.bed(pos)=-di*md.geometry.thickness(pos)-20;
  • issm/trunk/test/NightlyRun/test527.m

    r9733 r9734  
    33hVertices(1:5)=1000;
    44md=bamg(model,'domain','../Exp/Pig.exp','hmax',20000,'hVertices',hVertices,'gradation',3,'geometricalmetric',1);
    5 x1=md.x;
    6 y1=md.y;
     5x1=md.mesh.x;
     6y1=md.mesh.y;
    77
    88%Simple mesh 2
     
    1010md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
    1111md=parameterize(md,'../Par/Pig.par');
    12 x2=md.x;
    13 y2=md.y;
     12x2=md.mesh.x;
     13y2=md.mesh.y;
    1414
    1515%refine existing mesh 1
    16 hessian=ComputeHessian(md.mesh.elements,md.x,md.y,md.inversion.vy_obs,'node');
     16hessian=ComputeHessian(md.mesh.elements,md.mesh.x,md.mesh.y,md.inversion.vy_obs,'node');
    1717metric=ComputeMetric(hessian,2/9,1,1000,25*10^3,[]);
    1818md.miscellaneous.dummy=metric;
  • issm/trunk/test/Par/79North.par

    r9733 r9734  
    33%Geometry and observation
    44load('../Data/79North.data','-mat');
    5 md.initialization.vx       =InterpFromMeshToMesh2d(index,x,y,vx,md.x,md.y);
    6 md.initialization.vy       =InterpFromMeshToMesh2d(index,x,y,vy,md.x,md.y);
    7 md.geometry.surface  =InterpFromMeshToMesh2d(index,x,y,surface,md.x,md.y);
    8 md.geometry.thickness=InterpFromMeshToMesh2d(index,x,y,thickness,md.x,md.y);
     5md.initialization.vx       =InterpFromMeshToMesh2d(index,x,y,vx,md.mesh.x,md.mesh.y);
     6md.initialization.vy       =InterpFromMeshToMesh2d(index,x,y,vy,md.mesh.x,md.mesh.y);
     7md.geometry.surface  =InterpFromMeshToMesh2d(index,x,y,surface,md.mesh.x,md.mesh.y);
     8md.geometry.thickness=InterpFromMeshToMesh2d(index,x,y,thickness,md.mesh.x,md.mesh.y);
    99md.geometry.bed=md.geometry.surface-md.geometry.thickness;
    1010clear surface thickness vx vy x y index;
  • issm/trunk/test/Par/ISMIPA.par

    r9733 r9734  
    22
    33disp('      creating thickness');
    4 md.geometry.surface=-md.x*tan(0.5*pi/180);
    5 md.geometry.bed=md.geometry.surface-1000+500*sin(md.x*2*pi/max(md.x)).*sin(md.y*2*pi/max(md.x));
     4md.geometry.surface=-md.mesh.x*tan(0.5*pi/180);
     5md.geometry.bed=md.geometry.surface-1000+500*sin(md.mesh.x*2*pi/max(md.mesh.x)).*sin(md.mesh.y*2*pi/max(md.mesh.x));
    66md.geometry.thickness=md.geometry.surface-md.geometry.bed;
    77
  • issm/trunk/test/Par/ISMIPB.par

    r9733 r9734  
    22
    33disp('      creating thickness');
    4 md.geometry.surface=-md.x*tan(0.5*pi/180);
    5 md.geometry.bed=md.geometry.surface-1000+500*sin(md.x*2*pi/max(md.x));
     4md.geometry.surface=-md.mesh.x*tan(0.5*pi/180);
     5md.geometry.bed=md.geometry.surface-1000+500*sin(md.mesh.x*2*pi/max(md.mesh.x));
    66md.geometry.thickness=md.geometry.surface-md.geometry.bed;
    77
  • issm/trunk/test/Par/ISMIPC.par

    r9733 r9734  
    22
    33disp('      creating thickness');
    4 md.geometry.surface=2000-md.x*tan(0.1*pi/180); %to have z>0
     4md.geometry.surface=2000-md.mesh.x*tan(0.1*pi/180); %to have z>0
    55md.geometry.bed=md.geometry.surface-1000;
    66md.geometry.thickness=md.geometry.surface-md.geometry.bed;
    77
    88disp('      creating drag');
    9 %md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.x*2*pi/max(md.x/2)).*sin(md.y*2*pi/max(md.x/2)))./(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.bed)));
    10 md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.x*2*pi/max(md.x)).*sin(md.y*2*pi/max(md.x))));
     9%md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.mesh.x*2*pi/max(md.mesh.x/2)).*sin(md.mesh.y*2*pi/max(md.mesh.x/2)))./(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.bed)));
     10md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.mesh.x*2*pi/max(md.mesh.x)).*sin(md.mesh.y*2*pi/max(md.mesh.x))));
    1111%Take care of iceshelves: no basal drag
    1212pos=find(md.mask.elementonfloatingice);
  • issm/trunk/test/Par/ISMIPD.par

    r9733 r9734  
    22
    33disp('      creating thickness');
    4 md.geometry.surface=2000-md.x*tan(0.1*pi/180); %to have z>0
     4md.geometry.surface=2000-md.mesh.x*tan(0.1*pi/180); %to have z>0
    55md.geometry.bed=md.geometry.surface-1000;
    66md.geometry.thickness=md.geometry.surface-md.geometry.bed;
    77
    88disp('      creating drag');
    9 md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.x*2*pi/max(md.x))));
     9md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.mesh.x*2*pi/max(md.mesh.x))));
    1010%Take care of iceshelves: no basal drag
    1111pos=find(md.mask.elementonfloatingice);
  • issm/trunk/test/Par/ISMIPE.par

    r9725 r9734  
    77md.geometry.bed=zeros(md.mesh.numberofvertices,1);
    88for i=1:md.mesh.numberofvertices
    9         y=md.y(i);
     9        y=md.mesh.y(i);
    1010        point1=floor(y/100)+1;
    1111        point2=min(point1+1,51);
  • issm/trunk/test/Par/ISMIPF.par

    r9725 r9734  
    33
    44disp('      creating thickness');
    5 md.geometry.surface=-md.x*tan(3*pi/180);
     5md.geometry.surface=-md.mesh.x*tan(3*pi/180);
    66%md.geometry.bed=md.geometry.surface-1000;
    7 md.geometry.bed=md.geometry.surface-1000+100*exp(-((md.x-max(md.x)/2).^2+(md.y-max(md.y)/2).^2)/(10000^2));
     7md.geometry.bed=md.geometry.surface-1000+100*exp(-((md.mesh.x-max(md.mesh.x)/2).^2+(md.mesh.y-max(md.mesh.y)/2).^2)/(10000^2));
    88md.geometry.thickness=md.geometry.surface-md.geometry.bed;
    99
     
    2828md.initialization.pressure=zeros(md.mesh.numberofvertices,1);
    2929md.initialization.temperature=255*ones(md.mesh.numberofvertices,1);
    30 pos=find(md.x==min(md.x) | md.x==max(md.x) | md.y==min(md.y) | md.y==max(md.y));
     30pos=find(md.mesh.x==min(md.mesh.x) | md.mesh.x==max(md.mesh.x) | md.mesh.y==min(md.mesh.y) | md.mesh.y==max(md.mesh.y));
    3131md.balancethickness.spcthickness=NaN*ones(md.mesh.numberofvertices,1);
    3232md.balancethickness.spcthickness(pos)=md.geometry.thickness(pos);
  • issm/trunk/test/Par/Pig.par

    r9733 r9734  
    33%Geometry and observation
    44load('../Data/Pig.data','-mat');
    5 md.inversion.vx_obs   =InterpFromMeshToMesh2d(index,x,y,vx_obs,md.x,md.y);
    6 md.inversion.vy_obs   =InterpFromMeshToMesh2d(index,x,y,vy_obs,md.x,md.y);
    7 md.geometry.surface  =InterpFromMeshToMesh2d(index,x,y,surface,md.x,md.y);
    8 md.geometry.thickness=InterpFromMeshToMesh2d(index,x,y,thickness,md.x,md.y);
     5md.inversion.vx_obs   =InterpFromMeshToMesh2d(index,x,y,vx_obs,md.mesh.x,md.mesh.y);
     6md.inversion.vy_obs   =InterpFromMeshToMesh2d(index,x,y,vy_obs,md.mesh.x,md.mesh.y);
     7md.geometry.surface  =InterpFromMeshToMesh2d(index,x,y,surface,md.mesh.x,md.mesh.y);
     8md.geometry.thickness=InterpFromMeshToMesh2d(index,x,y,thickness,md.mesh.x,md.mesh.y);
    99md.geometry.bed=md.geometry.surface-md.geometry.thickness;
    1010clear surface thickness vx_obs vy_obs x y index;
  • issm/trunk/test/Par/RoundSheetEISMINT.par

    r9725 r9734  
    1313tmin=238.15; %K
    1414st=1.67*10^-2/1000; %k/m;
    15 radius=sqrt((md.x).^2+(md.y).^2);
     15radius=sqrt((md.mesh.x).^2+(md.mesh.y).^2);
    1616md.initialization.temperature=(tmin+st*radius);
    1717md.basalforcings.geothermalflux=4.2*10^-2*ones(md.mesh.numberofvertices,1);
     
    2929disp('      creating velocities');
    3030constant=0.3;
    31 md.inversion.vx_obs=constant/2*md.x.*(md.geometry.thickness).^-1;
    32 md.inversion.vy_obs=constant/2*md.y.*(md.geometry.thickness).^-1;
     31md.inversion.vx_obs=constant/2*md.mesh.x.*(md.geometry.thickness).^-1;
     32md.inversion.vy_obs=constant/2*md.mesh.y.*(md.geometry.thickness).^-1;
    3333md.inversion.vel_obs=(sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));
    3434md.initialization.vx=zeros(md.mesh.numberofvertices,1);
     
    4141md=SetMarineIceSheetBC(md,'../Exp/RoundFrontEISMINT.exp');
    4242
    43 radius=sqrt((md.x).*md.x+(md.y).*md.y);
     43radius=sqrt((md.mesh.x).*md.mesh.x+(md.mesh.y).*md.mesh.y);
    4444pos=find(radius==min(radius));
    45 md.x(pos)=0; md.y(pos)=0; %the closest node to the center is changed to be exactly at the center
     45md.mesh.x(pos)=0; md.mesh.y(pos)=0; %the closest node to the center is changed to be exactly at the center
    4646
    4747md.diagnostic.spcvx(pos)=0;
  • issm/trunk/test/Par/RoundSheetShelf.par

    r9733 r9734  
    77hmin=300;
    88hmax=1000;
    9 radius=sqrt((md.x).*md.x+(md.y).*md.y);
     9radius=sqrt((md.mesh.x).*md.mesh.x+(md.mesh.y).*md.mesh.y);
    1010ymin=min(radius);
    1111ymax=max(radius);
     
    2323
    2424
    25 pos=find(md.x<.2*1e6 & md.x>-.2*1e6 & md.y>0);
     25pos=find(md.mesh.x<.2*1e6 & md.mesh.x>-.2*1e6 & md.mesh.y>0);
    2626md.geometry.thickness(pos)=100;
    2727md.geometry.bed(pos)=-di*md.geometry.thickness(pos)-20;
    2828md.geometry.surface(pos)=md.geometry.bed(pos)+md.geometry.thickness(pos);
    2929
    30 pos=find(md.x<.1*1e6 & md.x>-.1*1e6 & md.y<-.5*1e6 & md.y>-.6*1e6);
     30pos=find(md.mesh.x<.1*1e6 & md.mesh.x>-.1*1e6 & md.mesh.y<-.5*1e6 & md.mesh.y>-.6*1e6);
    3131md.geometry.thickness(pos)=100;
    3232md.geometry.bed(pos)=-di*md.geometry.thickness(pos)-20;
     
    7979md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1);
    8080
    81 pos=find(md.x==0 & md.y==0);
     81pos=find(md.mesh.x==0 & md.mesh.y==0);
    8282md.diagnostic.spcvx(pos)=0;
    8383md.diagnostic.spcvy(pos)=0;
  • issm/trunk/test/Par/RoundSheetStaticEISMINT.par

    r9733 r9734  
    22hmin=0.01;
    33hmax=2756.7;
    4 radius=(sqrt((md.x).^2+(md.y).^2));
     4radius=(sqrt((md.mesh.x).^2+(md.mesh.y).^2));
    55radiusmax=max(radius);
    6 md.geometry.thickness=hmin*ones(size(md.x,1),1)+hmax*(4*((1/2)^(4/3)*ones(size(md.x,1),1)-((radius)./(2*radiusmax)).^(4/3))).^(3/8);
     6md.geometry.thickness=hmin*ones(size(md.mesh.x,1),1)+hmax*(4*((1/2)^(4/3)*ones(size(md.mesh.x,1),1)-((radius)./(2*radiusmax)).^(4/3))).^(3/8);
    77md.geometry.bed=0*md.geometry.thickness;
    88md.geometry.surface=md.geometry.bed+md.geometry.thickness;
     
    3434disp('      creating velocities');
    3535constant=0.3;
    36 md.inversion.vx_obs=constant/2*md.x.*(md.geometry.thickness).^-1;
    37 md.inversion.vy_obs=constant/2*md.y.*(md.geometry.thickness).^-1;
     36md.inversion.vx_obs=constant/2*md.mesh.x.*(md.geometry.thickness).^-1;
     37md.inversion.vy_obs=constant/2*md.mesh.y.*(md.geometry.thickness).^-1;
    3838md.inversion.vel_obs=(sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));
    3939md.initialization.vx=zeros(md.mesh.numberofvertices,1);
     
    4646md=SetMarineIceSheetBC(md,'../Exp/RoundFrontEISMINT.exp');
    4747
    48 radius=sqrt((md.x).*md.x+(md.y).*md.y);
     48radius=sqrt((md.mesh.x).*md.mesh.x+(md.mesh.y).*md.mesh.y);
    4949pos=find(radius==min(radius));
    50 md.x(pos)=0; md.y(pos)=0; %the closest node to the center is changed to be exactly at the center
     50md.mesh.x(pos)=0; md.mesh.y(pos)=0; %the closest node to the center is changed to be exactly at the center
    5151
    5252md.diagnostic.spcvx(pos)=0;
  • issm/trunk/test/Par/SquareEISMINT.par

    r9733 r9734  
    22
    33disp('      creating thickness');
    4 ymin=min(md.y);
    5 ymax=max(md.y);
     4ymin=min(md.mesh.y);
     5ymax=max(md.mesh.y);
    66md.geometry.thickness=500*ones(md.mesh.numberofvertices,1);
    77md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
     
    3131
    3232%Evolution of the ice shelf
    33 pos=find(md.y==200000); %nodes on the upper boundary condition
     33pos=find(md.mesh.y==200000); %nodes on the upper boundary condition
    3434md.balancethickness.spcthickness=NaN*ones(md.mesh.numberofvertices,1);
    3535md.balancethickness.spcthickness(pos)=500;
  • issm/trunk/test/Par/SquareSheetConstrained.par

    r9733 r9734  
    44hmin=300;
    55hmax=1000;
    6 ymin=min(md.y);
    7 ymax=max(md.y);
    8 md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
     6ymin=min(md.mesh.y);
     7ymax=max(md.mesh.y);
     8md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin);
    99md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness+20;
    1010md.geometry.surface=md.geometry.bed+md.geometry.thickness;
     
    1212%Initial velocity
    1313load('../Data/SquareSheetConstrained.data','-mat');
    14 md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.x,md.y);
    15 md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.x,md.y);
     14md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.mesh.x,md.mesh.y);
     15md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.mesh.x,md.mesh.y);
    1616clear vx vy x y index;
    1717md.initialization.vz=zeros(md.mesh.numberofvertices,1);
  • issm/trunk/test/Par/SquareSheetShelf.par

    r9733 r9734  
    44hmin=300;
    55hmax=1000;
    6 ymin=min(md.y);
    7 ymax=max(md.y);
    8 md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
     6ymin=min(md.mesh.y);
     7ymax=max(md.mesh.y);
     8md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin);
    99md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
    1010bed_sheet=-md.materials.rho_ice/md.materials.rho_water*(hmax+(hmin-hmax)*(ymax/2-ymin)/(ymax-ymin));
    11 pos=find(md.y<=ymax/2);
     11pos=find(md.mesh.y<=ymax/2);
    1212md.geometry.bed(pos)=bed_sheet;
    1313md.geometry.surface=md.geometry.bed+md.geometry.thickness;
     
    1515%Initial velocity
    1616load('../Data/SquareSheetShelf.data','-mat');
    17 md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.x,md.y);
    18 md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.x,md.y);
     17md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.mesh.x,md.mesh.y);
     18md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.mesh.x,md.mesh.y);
    1919clear vx vy x y index;
    2020md.initialization.vz=zeros(md.mesh.numberofvertices,1);
  • issm/trunk/test/Par/SquareShelf.par

    r9733 r9734  
    44hmin=300;
    55hmax=1000;
    6 ymin=min(md.y);
    7 ymax=max(md.y);
    8 md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
     6ymin=min(md.mesh.y);
     7ymax=max(md.mesh.y);
     8md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin);
    99md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
    1010md.geometry.surface=md.geometry.bed+md.geometry.thickness;
     
    1212%Initial velocity and pressure
    1313load('../Data/SquareShelf.data','-mat');
    14 md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.x,md.y);
    15 md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.x,md.y);
     14md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.mesh.x,md.mesh.y);
     15md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.mesh.x,md.mesh.y);
    1616clear vx vy x y index;
    1717md.initialization.vz=zeros(md.mesh.numberofvertices,1);
  • issm/trunk/test/Par/SquareShelfConstrained.par

    r9733 r9734  
    44hmin=300;
    55hmax=1000;
    6 ymin=min(md.y);
    7 ymax=max(md.y);
    8 md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
     6ymin=min(md.mesh.y);
     7ymax=max(md.mesh.y);
     8md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin);
    99md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
    1010md.geometry.surface=md.geometry.bed+md.geometry.thickness;
     
    1212%Initial velocity
    1313load('../Data/SquareShelfConstrained.data','-mat');
    14 md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.x,md.y);
    15 md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.x,md.y);
     14md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.mesh.x,md.mesh.y);
     15md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.mesh.x,md.mesh.y);
    1616clear vx vy x y index;
    1717md.initialization.vz=zeros(md.mesh.numberofvertices,1);
Note: See TracChangeset for help on using the changeset viewer.