Changeset 19077


Ignore:
Timestamp:
02/02/15 14:53:55 (10 years ago)
Author:
Eric.Larour
Message:

CHG: added case for 3D surface mesh.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/mesh/bamg.m

    r17686 r19077  
    349349        %Now, build the connectivity tables for this mesh.
    350350        md.mesh.vertexonboundary=zeros(md.mesh.numberofvertices,1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
    351 else
     351
     352elseif getfieldvalue(options,'3dsurface',0),
     353       
     354        md.mesh=mesh3dsurface();
     355        md.mesh.x=bamgmesh_out.Vertices(:,1);
     356        md.mesh.y=bamgmesh_out.Vertices(:,2);
     357        md.mesh.z=md.mesh.x; md.mesh.z(:)=0;
     358        md.mesh.elements=bamgmesh_out.Triangles(:,1:3);
     359        md.mesh.edges=bamgmesh_out.IssmEdges;
     360        md.mesh.segments=bamgmesh_out.IssmSegments(:,1:3);
     361        md.mesh.segmentmarkers=bamgmesh_out.IssmSegments(:,4);
     362
     363        %Fill in rest of fields:
     364        md.mesh.numberofelements=size(md.mesh.elements,1);
     365        md.mesh.numberofvertices=length(md.mesh.x);
     366        md.mesh.numberofedges=size(md.mesh.edges,1);
     367        md.mesh.vertexonboundary=zeros(md.mesh.numberofvertices,1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
     368
     369else
    352370        md.mesh=mesh2d();
    353371        md.mesh.x=bamgmesh_out.Vertices(:,1);
Note: See TracChangeset for help on using the changeset viewer.