forked from ZhengjieXiong2021/Annulus-domain-problem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle2.m
44 lines (30 loc) · 850 Bytes
/
circle2.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
%Annulus domain with inner radius 0.5 and outer radius 1, but unfortunatly named as "circle2"
clearvars; close all;
iseed = 8675309;
rng(iseed);
% discretize domain
cparams = [];
cparams.eps = 1.0e-10;
cparams.nover = 0;
cparams.maxchunklen = 0.1; % setting a chunk length helps when the
% frequency is known
pref = [];
chnkr1 = chunkerfunc(@(t) circle1(t,1),cparams,pref);
chnkr1 = chnkr1.refine;
chnkr1.n = chnkr1.normals;
chnkr2 = chunkerfunc(@(t) circle1(t,0.5),cparams,pref);
chnkr2 = reverse(chnkr2);
chnkr2 = chnkr2.refine;
chnkr2.n = chnkr2.normals;
chnkrs = [chnkr1,chnkr2];
chnkr = merge(chnkrs);
chnkr = chnkr.refine();
[~,~,info] = sortinfo(chnkr);
assert(info.ier == 0);
% plot geometry and data
figure(1)
clf
plot(chnkr,'-x')
hold on
quiver(chnkr)
axis equal