#include <AbstractOutputModifier.hpp>
Inherited by ActivationOutputModifier, and SingleTraceOutputModifier.
Public Member Functions | |
AbstractOutputModifier (const std::string &rFilename, double flushTime=0.0) | |
virtual | ~AbstractOutputModifier () |
virtual void | InitialiseAtStart (DistributedVectorFactory *pVectorFactory)=0 |
virtual void | FinaliseAtEnd ()=0 |
virtual void | ProcessSolutionAtTimeStep (double time, Vec solution, unsigned problemDim)=0 |
Protected Member Functions | |
AbstractOutputModifier () | |
Protected Attributes | |
std::string | mFilename |
double | mFlushTime |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Friends | |
class | TestMonodomainProblem |
class | boost::serialization::access |
A plug-in class for on-the-fly output. This is designed so that a user can insert something in order to monitor the progress of a simulation or to produce "post processed" output during the simulation.
Definition at line 51 of file AbstractOutputModifier.hpp.
AbstractOutputModifier::AbstractOutputModifier | ( | ) | [inline, protected] |
Constructor that does nothing, for archiving
Definition at line 74 of file AbstractOutputModifier.hpp.
AbstractOutputModifier::AbstractOutputModifier | ( | const std::string & | rFilename, | |
double | flushTime = 0.0 | |||
) | [inline] |
Standard construction method contains only the name of the file which this simulation modifier should produce.
Note that construction occurs before the Solve() loop and probably before initialisation. This means that it will not be possible to view certain data (e.g the mesh) at the time of construction
Note the problem passes parameters in a non-templated fashion in order to keep the interface as lightweight as possible.
rFilename | The file which is eventually produced by this modifier | |
flushTime | The (simulation) time between flushing the file to disk. Default (0) means don't flush. |
Definition at line 96 of file AbstractOutputModifier.hpp.
virtual AbstractOutputModifier::~AbstractOutputModifier | ( | ) | [inline, virtual] |
Destructor should be overridden when necessary
Definition at line 103 of file AbstractOutputModifier.hpp.
virtual void AbstractOutputModifier::FinaliseAtEnd | ( | ) | [pure virtual] |
Finalise the modifier (close a file or dump the calculation to disk)
Implemented in ActivationOutputModifier, and SingleTraceOutputModifier.
virtual void AbstractOutputModifier::InitialiseAtStart | ( | DistributedVectorFactory * | pVectorFactory | ) | [pure virtual] |
Initialise the modifier (open a file or make some memory) when the solve loop is starting
Note the problem passes parameters in a non-templated fashion in order to keep the interface as lightweight as possible.
pVectorFactory | The vector factory which is associated with the calling problem's mesh |
Implemented in ActivationOutputModifier, and SingleTraceOutputModifier.
virtual void AbstractOutputModifier::ProcessSolutionAtTimeStep | ( | double | time, | |
Vec | solution, | |||
unsigned | problemDim | |||
) | [pure virtual] |
Process a solution time-step (dump a small line to file or compute the latest activation times)
time | The current simulation time | |
solution | A working copy of the solution at the current time-step. This is the PETSc vector which is distributed across the processes. | |
problemDim | The calling problem dimension. Used here to avoid probing the size of the solution vector |
Implemented in ActivationOutputModifier, and SingleTraceOutputModifier.
void AbstractOutputModifier::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Archive this modifier. Just calls the base class version.
archive | the archive | |
version | the current version of this class |
Reimplemented in ActivationOutputModifier, and SingleTraceOutputModifier.
Definition at line 66 of file AbstractOutputModifier.hpp.
References mFilename, and mFlushTime.
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented in ActivationOutputModifier, and SingleTraceOutputModifier.
Definition at line 58 of file AbstractOutputModifier.hpp.
friend class TestMonodomainProblem [friend] |
For testing
Reimplemented in SingleTraceOutputModifier.
Definition at line 55 of file AbstractOutputModifier.hpp.
std::string AbstractOutputModifier::mFilename [protected] |
The file which is eventually produced by this modifier
Definition at line 78 of file AbstractOutputModifier.hpp.
Referenced by ActivationOutputModifier::FinaliseAtEnd(), SingleTraceOutputModifier::InitialiseAtStart(), and serialize().
double AbstractOutputModifier::mFlushTime [protected] |
Simulation time period between flushes to disk
Definition at line 81 of file AbstractOutputModifier.hpp.
Referenced by SingleTraceOutputModifier::ProcessSolutionAtTimeStep(), and serialize().