[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-commits] r5196 - /trunk/getfem/interface/tests/matlab/demo_tripo
From: |
Yves . Renard |
Subject: |
[Getfem-commits] r5196 - /trunk/getfem/interface/tests/matlab/demo_tripod_slice_anim.m |
Date: |
Thu, 17 Dec 2015 09:54:45 -0000 |
Author: renard
Date: Thu Dec 17 10:54:44 2015
New Revision: 5196
URL: http://svn.gna.org/viewcvs/getfem?rev=5196&view=rev
Log:
minor correction
Modified:
trunk/getfem/interface/tests/matlab/demo_tripod_slice_anim.m
Modified: trunk/getfem/interface/tests/matlab/demo_tripod_slice_anim.m
URL:
http://svn.gna.org/viewcvs/getfem/trunk/getfem/interface/tests/matlab/demo_tripod_slice_anim.m?rev=5196&r1=5195&r2=5196&view=diff
==============================================================================
--- trunk/getfem/interface/tests/matlab/demo_tripod_slice_anim.m
(original)
+++ trunk/getfem/interface/tests/matlab/demo_tripod_slice_anim.m Thu Dec
17 10:54:44 2015
@@ -17,6 +17,8 @@
disp('this file should be launched after demo_tripod.m as it assumes the
tripod mesh and solutions are in memory')
+cylinder = true; % plane or cylnder slice
+
gfObject(m)
%m=gf_mesh('from string',sm);
%mfu=gf_mesh_fem('from string',smfu,m);
@@ -24,12 +26,22 @@
disp('plotting ... can also take some minutes!');
%r=[0.7 .7 .7]; l = r(end,:); s=63; s1=20; s2=25; s3=48;s4=55; for i=1:s, c1 =
max(min((i-s1)/(s2-s1),1),0);c2 = max(min((i-s3)/(s4-s3),1),0);
r(end+1,:)=(1-c2)*((1-c1)*l + c1*[1 0 0]) + c2*[1 .8 .2]; end; colormap(r);
colorbar;
- c=[0 0 .5; 0 .2 1; 0 .5 .8; 0 .9 0; .4 1 0; .9 .7 0; .8 0 0; 1 0 0];
colormap(c);
+c=[0 0 .5; 0 .2 1; 0 .5 .8; 0 .9 0; .4 1 0; .9 .7 0; .8 0 0; 1 0 0];
colormap(c);
cnt=1;
-for r=-10.3:+.1:12 %46.1:-.1:4,
+
+if (cylinder)
+ I = 46.1:-.1:4;
+else
+ I = -10.3:+.1:12;
+end
+
+for r=I
clf
- %sl=gf_slice(mfu,U*10,{'boundary',{'cylinder',-1,[0;0;0],[0;1;0],r}},5);
- sl=gf_slice({'boundary',{'planar',-1,[0;r;0],[0;1;0]}},mfu,U*10,5);
+ if (cylinder)
+ sl=gf_slice({'boundary',{'cylinder',-1,[0;0;0],[0;1;0],r}},mfu,U*10, 5);
+ else
+ sl=gf_slice({'boundary',{'planar',-1,[0;r;0],[0;1;0]}},mfu,U*10,5);
+ end
Usl=gf_compute(mfdu,VM,'interpolate on',sl);
P=gf_slice_get(sl,'pts'); P=P([1 3 2],:); gf_slice_set(sl,'pts',P);
gf_plot_slice(sl,'data',Usl,'mesh','on','mesh_slice_edges_color',[.7 .7
.7],'mesh_edges_color',[.5 .5 1]);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Getfem-commits] r5196 - /trunk/getfem/interface/tests/matlab/demo_tripod_slice_anim.m,
Yves . Renard <=