GADGET-4
restart Class Reference

#include <restart.h>

Inherits io_streamcount, and setcomm.

Public Member Functions

 restart (MPI_Comm comm)
 
void load (sim *Sim_ptr)
 This function loads the last restart file. More...
 
void write (sim *Sim_ptr)
 
- Public Member Functions inherited from io_streamcount
size_t my_fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream)
 A wrapper for the fwrite() function. More...
 
size_t my_fread (void *ptr, size_t size, size_t nmemb, FILE *stream)
 A wrapper for the fread() function. More...
 
void reset_io_byte_count (void)
 
long long get_io_byte_count (void)
 
- Public Member Functions inherited from setcomm
 setcomm (MPI_Comm Comm)
 
 setcomm (const char *str)
 
void initcomm (MPI_Comm Comm)
 
void mpi_printf (const char *fmt,...)
 
void determine_compute_nodes (void)
 

Additional Inherited Members

- Public Attributes inherited from io_streamcount
long long byte_count = 0
 
- Public Attributes inherited from setcomm
MPI_Comm Communicator
 
int NTask
 
int ThisTask
 
int PTask
 
int ThisNode
 
int NumNodes = 0
 
int TasksInThisNode
 
int RankInThisNode
 
int MinTasksPerNode
 
int MaxTasksPerNode
 
long long MemoryOnNode
 
long long SharedMemoryOnNode
 

Detailed Description

Definition at line 23 of file restart.h.

Constructor & Destructor Documentation

◆ restart()

restart ( MPI_Comm  comm)
inline

Definition at line 26 of file restart.h.

Member Function Documentation

◆ load()

void load ( sim Sim_ptr)

This function loads the last restart file.

Some parameters of the parameter file might be changed between restarting. This function ensures that only the allowed parameters change, otherwise the old value from the restart file is taken. If the end time of the simulation changed readjust_timebase() is called in the end.

Definition at line 50 of file restart.cc.

◆ write()

void write ( sim Sim_ptr)

Definition at line 37 of file restart.cc.


The documentation for this class was generated from the following files: