Changeset 19955


Ignore:
Timestamp:
01/15/16 10:15:22 (9 years ago)
Author:
Eric.Larour
Message:

CHG: contourenvelope now deals only with a mesh class instead of a model class. model.m had to be
adapted accordingly.
New routines meshtodomain which takes the segments in the mesh and dumps a domain outline out of them.
New routine alignsegments which puts unordered segments into order (prior for example to calling meshtodomain).

Location:
issm/trunk-jpl/src/m
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/src/m/classes/model.m

    r19894 r19955  
    303303                        md.mesh.vertexconnectivity=NodeConnectivity(md.mesh.elements,md.mesh.numberofvertices);
    304304                        md.mesh.elementconnectivity=ElementConnectivity(md.mesh.elements,md.mesh.vertexconnectivity);
    305                         md.mesh.segments=contourenvelope(md);
     305                        md.mesh.segments=contourenvelope(md.mesh);
    306306
    307307                end % }}}
  • TabularUnified issm/trunk-jpl/src/m/parameterization/contourenvelope.m

    r17687 r19955  
    1 function segments=contourenvelope(md,varargin)
     1function segments=contourenvelope(mh,varargin)
    22%CONTOURENVELOPE - build a set of segments enveloping a contour .exp
    33%
    44%   Usage:
    5 %      segments=contourenvelope(md,varargin)
     5%      segments=contourenvelope(mh,varargin)
    66%
    77%   Example:
    8 %      segments=contourenvelope(md,'Stream.exp');
    9 %      segments=contourenvelope(md);
     8%      segments=contourenvelope(mh,'Stream.exp');
     9%      segments=contourenvelope(mh);
    1010
    1111%some checks
     
    3333%Now, build the connectivity tables for this mesh.
    3434%Computing connectivity
    35 if (size(md.mesh.vertexconnectivity,1)~=md.mesh.numberofvertices & size(md.mesh.vertexconnectivity,1)~=md.mesh.numberofvertices2d),
    36         md.mesh.vertexconnectivity=NodeConnectivity(md.mesh.elements,md.mesh.numberofvertices);
     35if isnan(mh.vertexconnectivity),
     36        mh.vertexconnectivity=NodeConnectivity(mh.elements,mh.numberofvertices);
    3737end
    38 if (size(md.mesh.elementconnectivity,1)~=md.mesh.numberofelements & size(md.mesh.elementconnectivity,1)~=md.mesh.numberofelements2d),
    39         md.mesh.elementconnectivity=ElementConnectivity(md.mesh.elements,md.mesh.vertexconnectivity);
     38if isnan(mh.elementconnectivity),
     39        mh.elementconnectivity=ElementConnectivity(mh.elements,mh.vertexconnectivity);
    4040end
    4141
    4242%get nodes inside profile
    43 mesh.elementconnectivity=md.mesh.elementconnectivity;
    44 if dimension(md.mesh)==2,
    45         mesh.elements=md.mesh.elements;
    46         mesh.x=md.mesh.x;
    47         mesh.y=md.mesh.y;
    48         mesh.numberofvertices=md.mesh.numberofvertices;
    49         mesh.numberofelements=md.mesh.numberofelements;
     43mesh.elementconnectivity=mh.elementconnectivity;
     44if dimension(mh)==2,
     45        mesh.elements=mh.elements;
     46        mesh.x=mh.x;
     47        mesh.y=mh.y;
     48        mesh.numberofvertices=mh.numberofvertices;
     49        mesh.numberofelements=mh.numberofelements;
    5050else
    51         mesh.elements=md.mesh.elements2d;
    52         mesh.x=md.mesh.x2d;
    53         mesh.y=md.mesh.y2d;
    54         mesh.numberofvertices=md.mesh.numberofvertices2d;
    55         mesh.numberofelements=md.mesh.numberofelements2d;
     51        mesh.elements=mh.elements2d;
     52        mesh.x=mh.x2d;
     53        mesh.y=mh.y2d;
     54        mesh.numberofvertices=mh.numberofvertices2d;
     55        mesh.numberofelements=mh.numberofelements2d;
    5656end
    5757
Note: See TracChangeset for help on using the changeset viewer.