dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #21344
Re: [Question #144722]: plot solution in different time steps
Question #144722 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/144722
Status: Answered => Open
Melanie Jahny is still having a problem:
Sorry, the answer doesn't solve my problem
I don't create u and p in the time loop.
How can I make sure that u and p are always written to
the already existing object? I thought there's perhaps a
parameter I have to define in the split function...
Thanks for helping me!
V = VectorFunctionSpace(mesh, "CG", 2)
W = FunctionSpace(mesh, "CG", 1)
VW = V*W
(u,p) = TrialFunctions(VW)
(phi,psi) = TestFunctions(VW)
a = ...
L = ...
problem = VariationalProblem(a, L, bc)
while t < T + DOLFIN_EPS:
(u,p) = problem.solve().split(deepcopy=True)
u_prev.assign(u)
t += dt
plot(u, wireframe=False,title="velocity", rescale=False, axes=True)
plot(p, wireframe=False,title="pressure", rescale=False, axes=True)
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.