Changeset 1266
- Timestamp:
- 07/08/09 20:05:56 (16 years ago)
- 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 )1 function md2=meshadaptation(md,field,scale,epsilon,threshold) 2 2 %MESHADAPTATION - remesh a model for a given field 3 3 % … … 5 5 % scale: 1.2 large scale leads to higher refining. 6 6 % epsilon: .5 large epsilon will refine fewer elements 7 % threshold: value under which no refinement is done. 7 8 % 8 9 % Usage: 9 % md2=meshadaptation(md,field,scale,epsilon )10 % md2=meshadaptation(md,field,scale,epsilon,threshold) 10 11 % 11 12 % Example: … … 29 30 grady=zeros(numberofgrids,1); 30 31 metric=zeros(numberofelements,1); 32 33 %take the threshold, a characteristic length, and get the area equivalent threshold: 34 threshold=threshold^2/2; 31 35 32 36 %build some usefull variables … … 83 87 84 88 %ok, metric can't go under 1km resolution. 85 metric(find(metric< 10^6))=10^6;89 metric(find(metric<threshold))=threshold; 86 90 87 91 %Remesh with this new metric
Note:
See TracChangeset
for help on using the changeset viewer.