Changeset 16560 for issm/trunk/src/m/mesh/meshconvert.m
- Timestamp:
- 10/28/13 14:43:03 (11 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk ¶
- Property svn:mergeinfo changed
/issm/trunk-jpl merged: 16138-16453,16455-16554
- Property svn:mergeinfo changed
-
issm/trunk/src ¶
- Property svn:mergeinfo changed
-
TabularUnified issm/trunk/src/m/mesh/meshconvert.m ¶
r16137 r16560 12 12 13 13 if nargin==1, 14 x=md.mesh.x;15 y=md.mesh.y;16 index=md.mesh.elements;14 index = md.mesh.elements; 15 x = md.mesh.x; 16 y = md.mesh.y; 17 17 else 18 x=varargin{1};19 y=varargin{2};20 index=varargin{3};18 index = varargin{1}; 19 x = varargin{2}; 20 y = varargin{3}; 21 21 end 22 22 … … 25 25 26 26 % plug results onto model 27 md.private.bamg =struct();28 md.private.bamg.mesh =bamgmesh(bamgmesh_out);29 md.private.bamg.geometry =bamggeom(bamggeom_out);30 md.mesh.x =bamgmesh_out.Vertices(:,1);31 md.mesh.y =bamgmesh_out.Vertices(:,2);32 md.mesh.elements =bamgmesh_out.Triangles(:,1:3);33 md.mesh.edges =bamgmesh_out.IssmEdges;34 md.mesh.segments =bamgmesh_out.IssmSegments(:,1:3);35 md.mesh.segmentmarkers =bamgmesh_out.IssmSegments(:,4);27 md.private.bamg = struct(); 28 md.private.bamg.mesh = bamgmesh(bamgmesh_out); 29 md.private.bamg.geometry = bamggeom(bamggeom_out); 30 md.mesh.x = bamgmesh_out.Vertices(:,1); 31 md.mesh.y = bamgmesh_out.Vertices(:,2); 32 md.mesh.elements = bamgmesh_out.Triangles(:,1:3); 33 md.mesh.edges = bamgmesh_out.IssmEdges; 34 md.mesh.segments = bamgmesh_out.IssmSegments(:,1:3); 35 md.mesh.segmentmarkers = bamgmesh_out.IssmSegments(:,4); 36 36 37 37 %Fill in rest of fields: 38 md.mesh.dimension =2;39 md.mesh.numberofelements =size(md.mesh.elements,1);40 md.mesh.numberofvertices =length(md.mesh.x);41 md.mesh.numberofedges =size(md.mesh.edges,1);42 md.mesh.z =zeros(md.mesh.numberofvertices,1);43 md.mesh.vertexonbed =ones(md.mesh.numberofvertices,1);44 md.mesh.vertexonsurface =ones(md.mesh.numberofvertices,1);45 md.mesh.elementonbed =ones(md.mesh.numberofelements,1);46 md.mesh.elementonsurface =ones(md.mesh.numberofelements,1);47 md.mesh.vertexonboundary =zeros(md.mesh.numberofvertices,1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;38 md.mesh.dimension = 2; 39 md.mesh.numberofelements = size(md.mesh.elements,1); 40 md.mesh.numberofvertices = length(md.mesh.x); 41 md.mesh.numberofedges = size(md.mesh.edges,1); 42 md.mesh.z = zeros(md.mesh.numberofvertices,1); 43 md.mesh.vertexonbed = ones(md.mesh.numberofvertices,1); 44 md.mesh.vertexonsurface = ones(md.mesh.numberofvertices,1); 45 md.mesh.elementonbed = ones(md.mesh.numberofelements,1); 46 md.mesh.elementonsurface = ones(md.mesh.numberofelements,1); 47 md.mesh.vertexonboundary = zeros(md.mesh.numberofvertices,1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2)) = 1;
Note:
See TracChangeset
for help on using the changeset viewer.