I don’t know how to name the *. vtk file in a loop. Please help me.
For example,
"int t=0, dt=0.01;
for(int i=0;i<61;++i)
{
t=t+dt;
Lame;
if (i%20==0)
savevtk(“u.vtk”, Th1, [u1,u2,u3], dataname=“u1,u2,u3”, order=Order);
}
The above statement can only output one file, i.e., u.vtk. How can I output three files with varying name in the loop, such as u20.vtk, u40.vtk, and u60.vtk?
Actually, if the solutions as i=20, 40, and 60 could be saved in the only file of u.vtk in succession, this would be better than three files. However, how can I distinguish the solutions of different i or t values?
Please forgive my frequent questions.
According to the code,
“int t=0, dt=0.01;
for(int i=0;i<61;++i)
{
t=t+dt;
Lame;
}”,
could FF++ output the solutions with varying time into a file such as .ex2, which could be played as an animation by Paraview?
Thank you very much.