Electrons are explicitly stored between timesteps
and can be dumped using MPI-IO. Restarts read particles from earlier output.
This commit is contained in:
+14
-3
@@ -4,14 +4,20 @@
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "IO/hdf5_reader.h"
|
||||
#include "IO/mpi_particle_reader.h"
|
||||
|
||||
namespace species {
|
||||
class TrackedSpecie;
|
||||
enum class ImplementedSpecies;
|
||||
}; // namespace species
|
||||
|
||||
namespace particle {
|
||||
class SerializedParticle;
|
||||
};
|
||||
|
||||
class DynamicDensityField;
|
||||
class PoissonSolver;
|
||||
class RandomNumbers;
|
||||
@@ -23,11 +29,14 @@ class RandomNumbers;
|
||||
// here after the potential is loaded; would need the electric field class to be included
|
||||
class Restart {
|
||||
public:
|
||||
Restart(bool do_restart, std::string absolute_filename,
|
||||
std::string restart_identifier);
|
||||
// Restart(bool do_restart, std::string absolute_filename,
|
||||
// std::string restart_identifier);
|
||||
Restart(bool do_restart, std::string absolute_filename_without_extension,
|
||||
std::string restart_identifier, int particle_restart_at);
|
||||
|
||||
void restart(std::map<std::string, std::shared_ptr<species::TrackedSpecie>>& species,
|
||||
PoissonSolver* poisson_solver, RandomNumbers* random_numbers);
|
||||
PoissonSolver* poisson_solver, RandomNumbers* random_numbers,
|
||||
std::vector<particle::SerializedParticle>& storage_queue);
|
||||
|
||||
private:
|
||||
void restartTimer(species::TrackedSpecie* reference_specie);
|
||||
@@ -36,9 +45,11 @@ class Restart {
|
||||
// only load in the potential and calc the electric field
|
||||
void restartPoissonSolver(PoissonSolver* solver);
|
||||
void restartRandomNumbers(RandomNumbers* random);
|
||||
void restartParticles(std::vector<particle::SerializedParticle>& storage_queue);
|
||||
|
||||
bool do_restart_;
|
||||
std::string restart_identifier_; // i.e. "LastSyncPeriod" or "SyncPeriod_*"
|
||||
Hdf5Reader reader_;
|
||||
MpiParticleReader particle_reader_;
|
||||
};
|
||||
#endif /* RESTART_H */
|
||||
Reference in New Issue
Block a user