How can I save and reload a simulation using the contact history ?

JF's picture
Submitted by JF on Tue, 02/01/2011 - 08:51

Hi Christoph,

I saw that the commands : read_restart and restart can save and reload a simulation.
However, I would want to know if these commands also save and reload the values held by the array "shear" (contact history).

Regards
JF

ckloss's picture

ckloss | Tue, 02/01/2011 - 09:06

Yes, they do. See the dedicated pack_restart, unpack_restart functions. This is done automatically and you get notified about that during the restart.

Cheers,
Christoph

JF's picture

JF | Tue, 02/01/2011 - 11:33

Thanks for your reply, I saw the function in the contact_history.cpp file.

However when I wrote the command "restart 1000 post/restart.*.equil" the simulation is stopped once the first file is saved, maybe it is resolved with the version 1.2.4 beta released.

Regards
JF

JF's picture

JF | Tue, 02/01/2011 - 15:52

With the last version (1.2.4 beta) the command "restart" works, but when I reload the simulation with "read_restart", I have this error: "ERROR: Did not assign all atoms correctly".

In the file read_restart.cpp, the variables (natoms,atom->natoms) are different and their values (natoms 20704912 and atom->natom 6875091) are huge against the initial number of atoms (1302 atoms).

Please, can you give me some hints to resolve this problem ?

Regards
JF

The first lines of my script:

units si

atom_style granular
atom_modify map array
boundary s s s
newton off

# Read data

#read_data file.sys
read_restart ./post/restart.5000.equil

# Some grouping (useful for fixing)
group A type 1
group top type 2
group bott type 3

ckloss's picture

ckloss | Tue, 02/01/2011 - 16:08

Did you generate the restart file with the same version than the one you are restarting with? If yes, this could you please send me the script so I can have a look?

Christoph

JF's picture

JF | Tue, 02/01/2011 - 17:09

Yes, I use only the LIGGGHTS version 1.2.4.
I send you by mail my script and the *.sys file.

Thank you for your help.

Regards
JF

ckloss's picture

ckloss | Wed, 02/02/2011 - 09:56

Hi JF,

I had a look and found that this is a LAMMPS bug. I will fix it for LIGGGHTS and send a message to Steve Plimpton so he can fix it for LAMMPS.
I will post version 1.2.5 hopefully today, with a remedy for that

Christoph