Hi John,

Thanks. The code is working now. However, I still have some problem to write 
solutions in different time step into a single file. Therefore, I write them 
into separate files.

The following code is the one I used. Hopefully it can help the others.
//============ export results ================
Nemesis_IO(mesh).write(file_name.str());
Nemesis_IO(mesh).write_timestep(file_name.str(), equation_systems,
                                                         iter+1, cntT);
//========================================

I also noticed I have to write mesh into each separate file at different time 
step as well. On the other hand, the the version of paraview above 4.4.0 report 
the same error, "cannot find any mesh file". Whereas, the versions lower than 
that are fine to open those nemesis format files. Is there a compatibility 
issue?

Ken

________________________________
From: John Peterson <jwpeter...@gmail.com>
Sent: Monday, January 28, 2019 10:05 PM
To: Bin Liu
Cc: libmesh-users@lists.sourceforge.net
Subject: Re: [Libmesh-users] output results of very huge mesh



On Mon, Jan 28, 2019 at 12:15 AM Bin Liu 
<kenneth....@hotmail.com<mailto:kenneth....@hotmail.com>> wrote:
Hi John,
The following codes are used for import and export mesh and solution.

//============= import mesh ===============
DistributedMesh mesh(init.comm());
mesh.read("BOX.cpr");
//=======================================

//============ export solution ==============
MeshSerializer serialize(mesh);
Nemesis_IO(mesh).write_equation_systems (file_name.str(),equation_systems);
//=======================================

In fact, I was trying to avoid using "MeshSerializer", since it took too much 
memory. Did I miss anything to ouptut solution in nemesis format? Should I 
write out mesh as well? Could you suggest a successful example to write out 
solution and mesh in parallel through each processor?

You should not use a MeshSerializer when using the Nemesis_IO format... Can you 
try replacing those two lines of code with the following, and let us know what 
happens?

Nemesis_IO(mesh).write_timestep("filename.e", equation_systems, /*timestep=*/1, 
/*time=*/0.);

--
John


_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to