The CoarseGrainingIntervalWriter class is a decorator for another writer. Its purpose is to only call the underlying Writer object at fixed time intervals.
More...
#include <alsfvm/io/CoarseGrainingIntervalWriter.hpp>
The CoarseGrainingIntervalWriter class is a decorator for another writer. Its purpose is to only call the underlying Writer object at fixed time intervals.
This class is useful if you only want to save every x seconds of simulation.
- Note
- this is used specifically for the coarse graining algorithm, and will save a number of timesteps around a "main" time. eg it will save
◆ CoarseGrainingIntervalWriter()
alsfvm::io::CoarseGrainingIntervalWriter::CoarseGrainingIntervalWriter |
( |
alsfvm::shared_ptr< Writer > & |
writer, |
|
|
real |
timeInterval, |
|
|
int |
numberOfCoarseSaves, |
|
|
real |
endTime, |
|
|
int |
numberOfSkips |
|
) |
| |
- Parameters
-
writer | the underlying writer to actually use. |
timeInterval | the time interval (will save for every time n*timeInterval) |
numberOfCoarseSaves | the number of saves around a time save (corresponds to $f$f in the explanation for the class) |
endTime | the final time for the simulation. |
numberOfSkips | the number of timesteps to skip |
◆ ~CoarseGrainingIntervalWriter()
virtual alsfvm::io::CoarseGrainingIntervalWriter::~CoarseGrainingIntervalWriter |
( |
| ) |
|
|
inlinevirtual |
◆ adjustTimestep()
adjustTimestep returns the new timestep that the simulator should use
- Parameters
-
dt | the current timestep being used |
timestepInformation | timesteps information |
- Returns
- the new timestep
Implements alsfvm::integrator::TimestepAdjuster.
◆ finalize()
This method should be called at the end of the simulation.
Reimplemented from alsfvm::io::Writer.
◆ write()
write writes the data to disk
- Parameters
-
conservedVariables | the conservedVariables to write |
grid | the grid that is used (describes the whole domain) |
timestepInformation | |
Implements alsfvm::io::Writer.
The documentation for this class was generated from the following files: