Skip to content

Commit b646412

Browse files
committed
Upgrade to latest jigsaw-0.9.13.x
1 parent fb0956e commit b646412

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

example.m

+21-3
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,13 @@ function example(varargin)
100100
opts.optm_qlim = +.95 ;
101101
opts.optm_iter = + 32 ;
102102

103-
mesh = tetris(opts, +4) ;
103+
rbar = mean(geom.radii) ;
104+
105+
nlev = round(log2( ...
106+
rbar / sin(.4 * pi) / opts.hfun_hmax) ...
107+
) ;
108+
109+
mesh = tetris(opts, nlev - 1) ;
104110

105111
topo = loadmsh( ...
106112
fullfile(rootpath, ...
@@ -192,7 +198,13 @@ function example(varargin)
192198
opts.optm_qlim = +.95 ;
193199
opts.optm_iter = + 32 ;
194200

195-
mesh = tetris(opts, +4) ;
201+
rbar = mean(geom.radii(:)) ;
202+
hbar = mean(hmat.value(:)) ;
203+
204+
nlev = round(log2( ...
205+
rbar / sin(.4 * pi) / hbar) ) ;
206+
207+
mesh = tetris(opts, nlev - 1) ;
196208

197209
plotsphere(geom,mesh,hmat,topo) ;
198210

@@ -394,7 +406,13 @@ function example(varargin)
394406
opts.optm_qlim = +.95 ;
395407
opts.optm_iter = + 32 ;
396408

397-
mesh = tetris(opts, +4) ;
409+
rbar = mean(geom.radii(:)) ;
410+
hbar = mean(hmat.value(:)) ;
411+
412+
nlev = round(log2( ...
413+
rbar / sin(.4 * pi) / hbar) ) ;
414+
415+
mesh = tetris(opts, nlev - 1) ;
398416

399417
plotsphere(geom,mesh,hmat,topo) ;
400418

0 commit comments

Comments
 (0)