Another example is to add additional output to the Example.ene file, in this case the number of particles.
void writeEneHeader(std::ostream& os) const override
{
os << setw(8) << "N";
}
void writeEneTimestep(std::ostream& os) const override
{
os << setw(8) << particleHandler.getNumberOfObjects();
}
To change the terminal output after each written time step, use:
void printTime() const override
{
std::cout << "N" << particleHandler.getNumberOfObjects() << std::endl;
}
Other functions can be overridden, most notably:
void actionsOnRestart() override {...}
void actionsBeforeTimeLoop() override {...}
void actionsBeforeTimeStep() override {...}
void actionsAfterTimeStep() override {...}
void actionsAfterSolve() override {...}