Dear Chucui,
The file in the production code for ASPECT with checkpoint/restart is here:
https://github.com/bangerth/aspect/blob/master/source/simulator/checkpoint_restart.cc

If a second example would be helpful, we implemented checkpoint/restart in 
PRISMS-PF using a similar approach:
https://github.com/prisms-center/phaseField/blob/master/src/matrixfree/checkpoint.cc

Best,
Steve

On Monday, November 5, 2018 at 4:01:06 AM UTC-5, Jean-Paul Pelteret wrote:
>
> Dear Chucui,
>
> I don’t use this functionality myself, so I can only point you to the 
> test suite 
> <https://github.com/dealii/dealii/tree/master/tests/serialization> where 
> its functionality is tested. Here 
> <https://github.com/dealii/dealii/blob/master/tests/mpi/p4est_save_01.cc> is 
> one example where a distributed triangulation is saved and loaded, and 
> here 
> <https://github.com/dealii/dealii/blob/master/tests/mpi/p4est_save_04.cc> is 
> one where a distributed triangulation + solution is saved and loaded with a 
> different number of MPI processes.
>
> Best,
> Jean-Paul
>
> On 05 Nov 2018, at 09:13, [email protected] <javascript:> wrote:
>
> Dear Jean-Paul,
>
> Thanks for your reply! And I am interested in 'the serialization 
> capabilities', can you give me a little example or code to show me how it 
> work. For me the ASPECT library 
> <https://www.google.com/url?q=https%3A%2F%2Faspect.geodynamics.org%2F&sa=D&sntz=1&usg=AFQjCNEohyzhbZ5uZr1UJ6cdCXdI3mAj1w>
>  is 
> an entile new one, I cannot find the example that shows the serialization 
> capabilities exactly, so I need some help. And is the point of  'the 
> serialization capabilities' a fundamental point of C++? Does it only work 
> at some projects such as  the ASPECT library 
> <https://www.google.com/url?q=https%3A%2F%2Faspect.geodynamics.org%2F&sa=D&sntz=1&usg=AFQjCNEohyzhbZ5uZr1UJ6cdCXdI3mAj1w>
>  you 
> mentioned above? Thank you very much!
>
> Best,
> Chucui
>
> 在 2018年11月5日星期一 UTC+8下午3:36:59,Jean-Paul Pelteret写道:
>>
>> Dear Chucui,
>>
>> The Triangulation 
>> <https://dealii.org/9.0.0/doxygen/deal.II/classTriangulation.html#a5ae613e76606c08f919aa6e4bdf5f94a>
>> , DoFHandler 
>> <https://dealii.org/9.0.0/doxygen/deal.II/classDoFHandler.html#aee69e8dd102b00e6e2e706ab43ea6c2a>
>>  and Vector 
>> <https://dealii.org/9.0.0/doxygen/deal.II/classVector.html#a753f299ab91013f742448f5bfc0f4b68>
>>  classes 
>> support serialization, that is to say that they have built-in save() / 
>> load() functions. The GridIn::read_vtk() 
>> <https://dealii.org/9.0.0/doxygen/deal.II/classGridIn.html#a058cd187cea704428ac1118410cd0fb8>
>>  function 
>> can supposedly construct a triangulation from a solution vector, but I’m 
>> not sure if this is working at the moment (see this GitHub issue 
>> <https://github.com/dealii/dealii/issues/7296>). I don’t think that 
>> there exists a mechanism to read in the numerical data from VTK file as of 
>> yet. So I would suggest that you utilise the serialization capabilities, 
>> which should allow a complete restart of a simulation from any tilmestep. I 
>> understand that this is what the ASPECT library 
>> <https://aspect.geodynamics.org/> does.
>>
>> Although it does not directly help you restart a simulation using VTK 
>> data, I hope that you find this information useful.
>>
>> Best,
>> Jean-Paul
>>
>>
>>
> -- 
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to