11 convect()

(準備中)


border C(t=0, 2*pi) { x=cos(t); y=sin(t); }
mesh Th = buildmesh(C(100));
fespace Uh(Th,P1);
Uh cold, c = exp(-10*((x-0.3)^2+(y-0.3)^2));
real dt = 0.17,t=0;
Uh u1 = y, u2 = -x;
for (int m=0; m<2*pi/dt ; m++) {
   t += dt;
   cold=c;
   c=convect([u1,u2],-dt,cold);
   plot(c,cmm=" t="+t + ", min=" + c[].min + ", max=" + c[].max, dim=3);
}

桂田 祐史
2018-01-17