Line | |
---|
1 | function md=rifttipsrefine(md,filename,resolution,circleradius);
|
---|
2 | %RIFTTIPSREFINE - refine mesh near rift tips
|
---|
3 | %
|
---|
4 | % Usage:
|
---|
5 | % md=rifttipsrefine(md,filename,resolution,circleradius);
|
---|
6 |
|
---|
7 | numberofnodes=50;
|
---|
8 |
|
---|
9 | %take rifts, and create refinement circles around tips
|
---|
10 | rifts=expread(filename,1);
|
---|
11 |
|
---|
12 | !echo -n "" > Circles.exp
|
---|
13 | for i=1:length(rifts),
|
---|
14 | tip1=[rifts(i).x(1) rifts(i).y(1)];
|
---|
15 | tip2=[rifts(i).x(end) rifts(i).y(end)];
|
---|
16 | %create circle around tip
|
---|
17 | expcreatecircle('Circle1.exp',tip1(1),tip1(2),circleradius,numberofnodes);
|
---|
18 | expcreatecircle('Circle2.exp',tip2(1),tip2(2),circleradius,numberofnodes);
|
---|
19 | !cat Circles.exp Circle1.exp Circle2.exp > Circles2.exp
|
---|
20 | !mv Circles2.exp Circles.exp
|
---|
21 | !rm -rf Circle1.exp Circle2.exp
|
---|
22 | end
|
---|
23 |
|
---|
24 | md=meshexprefine(md,'Circles.exp',resolution);
|
---|
25 |
|
---|
26 | system('rm -rf Circles.exp');
|
---|
Note:
See
TracBrowser
for help on using the repository browser.