IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
BaseManager.h
Go to the documentation of this file.
1#ifndef IPPL_BASE_MANAGER_H
2#define IPPL_BASE_MANAGER_H
3
4#include "Ippl.h"
5
6namespace ippl {
7
15 public:
16 BaseManager() = default;
17 virtual ~BaseManager() = default;
18
25 virtual void pre_run() { /* default does nothing */
26 }
27
34
35 virtual void pre_step() { /* default does nothing */
36 }
37
44 virtual void post_step() { /* default does nothing */
45 }
46
53 virtual void advance() = 0;
54
63 void run(int nt) {
64 for (int it = 0; it < nt; it++) {
65 this->pre_step();
66
67 this->advance();
68
69 this->post_step();
70 }
71 }
72 };
73} // namespace ippl
74
75#endif
Definition Archive.h:20
virtual ~BaseManager()=default
void run(int nt)
The main for loop fro running a simulation.
Definition BaseManager.h:63
virtual void pre_step()
A method that should be used for preparation before perfoming a step of simulation.
Definition BaseManager.h:35
virtual void post_step()
A method that should be used after perfoming a step of simulation.
Definition BaseManager.h:44
virtual void advance()=0
A method that should be used to execute/advance a step of simulation.
BaseManager()=default
virtual void pre_run()
A method that should be used for setting up the simulation.
Definition BaseManager.h:25