Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
|
#include <AbstractOutputModifier.hpp>
Public Member Functions | |
AbstractOutputModifier (const std::string &rFilename, double flushTime=0.0) | |
virtual | ~AbstractOutputModifier () |
virtual void | InitialiseAtStart (DistributedVectorFactory *pVectorFactory, const std::vector< unsigned > &rNodePermutation)=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.
|
inlineprotected |
Constructor that does nothing, for archiving
Definition at line 74 of file AbstractOutputModifier.hpp.
|
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.
|
inlinevirtual |
Destructor should be overridden when necessary
Definition at line 103 of file AbstractOutputModifier.hpp.
|
pure virtual |
Finalise the modifier (close a file or dump the calculation to disk)
Implemented in ActivationOutputModifier, and SingleTraceOutputModifier.
|
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. That is, it might have been slicker to pass in the mesh but that would require multiple templates.
pVectorFactory | The vector factory which is associated with the calling problem's mesh |
rNodePermutation | The permutation associated with the calling problem's mesh (when running with parallel partitioning) |
Implemented in ActivationOutputModifier, and SingleTraceOutputModifier.
|
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.
|
inlineprivate |
Archive this modifier. Just calls the base class version.
archive | the archive |
version | the current version of this class |
Definition at line 66 of file AbstractOutputModifier.hpp.
References mFilename, and mFlushTime.
|
friend |
Needed for serialization.
Definition at line 58 of file AbstractOutputModifier.hpp.
|
friend |
For testing
Definition at line 55 of file AbstractOutputModifier.hpp.
|
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().
|
protected |
Simulation time period between flushes to disk
Definition at line 81 of file AbstractOutputModifier.hpp.
Referenced by SingleTraceOutputModifier::ProcessSolutionAtTimeStep(), and serialize().