libMesh / libmesh

libMesh github repository
http://libmesh.github.io
GNU Lesser General Public License v2.1
651 stars 285 forks source link

checkpointing with refined meshes #2830

Open BalticPinguin opened 3 years ago

BalticPinguin commented 3 years ago

Dear all, I need some help to implement a scheme to restart calculations that broke for some reason (batch-system). In particular, I use some iterative scheme with adaptive mesh refinement (which I implemented recently, so I am not yet familiar with the tricks related to that). When such calculations stop, I currently always have to start from the beginning. I blindly tried the CheckpointIO-class, but trying to read-in a refined mesh failed with Assertion `elem->n_nodes() == conn_data.size()' failed. Thus, my question is if this known to fail or if this error is due to wrong usage/problems with infinite elements or so?

Also, my impression is that CheckpointIO saves/restores only the mesh, so any solution vectors, matrices etc. are lost. Is this correct? Is there any built-in way to safe/restore vectors?

Many thanks in advance Hubert

BalticPinguin commented 3 years ago

Finally I had time to look at it in more detail. The error is due to some typo in elem.C:

  128     18, // INFHEX18
  129 
  130     6,  // INFPRISM6
  131     16, // INFPRISM12
  132 
  133     1,  // NODEELEM
  134 

and I did use INFPRISM12.

BalticPinguin commented 3 years ago

Continuing, I tried to use CheckpointIO::write_equation_systems which failed with

include/libmesh/mesh_output.h, line 108, 

which is a not-implemented()-flag for the function MeshOutput::write_nodal_data(). Referring to my question above, I hoped that write_equation_systems is meant to store all abjects; but this maybe is not implemented?

Probably @roystgnr or @jwpeterson or someone else can comment on the status of that class? Is it supposed to work flawlessly or are there some known caveats?

Many thanks in advance Hubert