I did use unique names. I followed libmesh examples and used file_name << "out." << std::setw(3) << std::setfill('0') << std::right << t_step+1 << ".vtk";
Inspired by your reply, I avoided using dot in file name prefixes. I changed it to file_name << "out-" and got out-001.vtk out-002.vtk out-003.vtk out-001_0.vtu out-002_0.vtu out-003_0.vtu Now I can view the mesh at each time step with ParaView. --Junchao Zhang On Sat, Jul 9, 2016 at 3:33 PM, John Peterson <jwpeter...@gmail.com> wrote: > > > On Thu, Jul 7, 2016 at 4:29 PM, Junchao Zhang <junchao.zh...@gmail.com> > wrote: > >> I called VTKIO(mesh).write_equation_systems (file_name.str(), >> equation_systems) in a libmesh example code to dump an adaptive mesh with >> solutions to VTK files. I ran three time steps and dumped the mesh every >> time step. I got those files >> >> out.001.pvtu >> out.002.pvtu >> out.003.pvtu >> out_0.vtu >> >> > > >> I also found out_0.vtu only contained the mesh of the last time step. So, >> how can I get the mesh every time step so that I can see how the mesh is >> adaptively refined in ParaView? >> > > Hmm... what file name are you passing to write_equation_systems? If it's > just "out" each time, I suppose the writer might be overwriting the mesh > file each time with the same name. But I think this is controlled by VTK, > all we do is call > > writer->SetFileName(fname.c_str()); > > on the filename that you pass in. As a quick fix, try calling > write_equation_systems() with a unique name for each timestep? > > -- > John > ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users