Changeset 1266


Ignore:
Timestamp:
07/08/09 20:05:56 (16 years ago)
Author:
Eric.Larour
Message:

Added threshold

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/public/mesh/meshadaptation.m

    r1245 r1266  
    1 function md2=meshadaptation(md,field,scale,epsilon)
     1function md2=meshadaptation(md,field,scale,epsilon,threshold)
    22%MESHADAPTATION - remesh a model for a given field
    33%
     
    55%   scale: 1.2 large scale leads to higher refining.
    66%   epsilon: .5  large epsilon will refine fewer elements
     7%   threshold: value under which no refinement is done.
    78%
    89%   Usage:
    9 %      md2=meshadaptation(md,field,scale,epsilon)
     10%      md2=meshadaptation(md,field,scale,epsilon,threshold)
    1011%
    1112%   Example:
     
    2930grady=zeros(numberofgrids,1);
    3031metric=zeros(numberofelements,1);
     32
     33%take the threshold, a characteristic length, and get the area equivalent threshold:
     34threshold=threshold^2/2;
    3135
    3236%build some usefull variables
     
    8387
    8488%ok, metric can't go under 1km resolution.
    85 metric(find(metric<10^6))=10^6;
     89metric(find(metric<threshold))=threshold;
    8690
    8791%Remesh with this new metric
Note: See TracChangeset for help on using the changeset viewer.