AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM > Class Template Reference

#include <AbstractCardiacProblem.hpp>

Inherits AbstractUntemplatedCardiacProblem.

Collaboration diagram for AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 AbstractCardiacProblem (AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM > *pCellFactory)
 AbstractCardiacProblem ()
virtual ~AbstractCardiacProblem ()
void Initialise ()
void SetNodesPerProcessorFilename (const std::string &rFilename)
void SetBoundaryConditionsContainer (BccType pBcc)
virtual void PreSolveChecks ()
virtual Vec CreateInitialCondition ()
void SetMesh (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
void PrintOutput (bool rPrintOutput)
void SetWriteInfo (bool writeInfo=true)
Vec GetSolution ()
DistributedVector GetSolutionDistributedVector ()
double GetCurrentTime ()
AbstractTetrahedralMesh
< ELEMENT_DIM, SPACE_DIM > & 
rGetMesh ()
AbstractCardiacTissue
< ELEMENT_DIM, SPACE_DIM > * 
GetTissue ()
void Solve ()
void CloseFilesAndPostProcess ()
virtual void WriteInfo (double time)=0
virtual void DefineWriterColumns (bool extending)
void DefineExtraVariablesWriterColumns (bool extending)
virtual void WriteOneStep (double time, Vec voltageVec)=0
void WriteExtraVariablesOneStep ()
void InitialiseWriter ()
void SetOutputNodes (std::vector< unsigned > &rNodesToOutput)
Hdf5DataReader GetDataReader ()
virtual void AtBeginningOfTimestep (double time)
virtual void OnEndOfTimestep (double time)
virtual void SetUpAdditionalStoppingTimes (std::vector< double > &rAdditionalStoppingTimes)
void SetUseTimeAdaptivityController (bool useAdaptivity, AbstractTimeAdaptivityController *pController=NULL)
template<class Archive >
void LoadExtraArchive (Archive &archive, unsigned version)
virtual bool GetHasBath ()
virtual void SetElectrodes ()

Protected Member Functions

virtual AbstractCardiacTissue
< ELEMENT_DIM, SPACE_DIM > * 
CreateCardiacTissue ()=0
virtual
AbstractDynamicLinearPdeSolver
< ELEMENT_DIM, SPACE_DIM,
PROBLEM_DIM > * 
CreateSolver ()=0

Protected Attributes

std::string mMeshFilename
bool mAllocatedMemoryForMesh
bool mWriteInfo
bool mPrintOutput
std::vector< unsignedmNodesToOutput
unsigned mVoltageColumnId
std::vector< unsignedmExtraVariablesId
unsigned mTimeColumnId
unsigned mNodeColumnId
AbstractCardiacTissue
< ELEMENT_DIM, SPACE_DIM > * 
mpCardiacTissue
BccType mpBoundaryConditionsContainer
BccType mpDefaultBoundaryConditionsContainer
AbstractDynamicLinearPdeSolver
< ELEMENT_DIM, SPACE_DIM,
PROBLEM_DIM > * 
mpSolver
AbstractCardiacCellFactory
< ELEMENT_DIM, SPACE_DIM > * 
mpCellFactory
AbstractTetrahedralMesh
< ELEMENT_DIM, SPACE_DIM > * 
mpMesh
Vec mSolution
double mCurrentTime
AbstractTimeAdaptivityControllermpTimeAdaptivityController
Hdf5DataWritermpWriter

Private Types

typedef boost::shared_ptr
< BoundaryConditionsContainer
< ELEMENT_DIM, SPACE_DIM,
PROBLEM_DIM > > 
BccType

Private Member Functions

template<class Archive >
void save (Archive &archive, const unsigned int version) const
template<class Archive >
void load (Archive &archive, const unsigned int version)
template<class Archive >
void SaveBoundaryConditions (Archive &archive, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh, BccType pBcc) const
template<class Archive >
BccType LoadBoundaryConditions (Archive &archive, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)

Friends

class TestBidomainWithBath
class TestCardiacSimulationArchiver
class boost::serialization::access
class CardiacElectroMechanicsProblem

Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
class AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >

Base class for cardiac problems; contains code generic to both mono- and bidomain.

See tutorials for usage.

Definition at line 98 of file AbstractCardiacProblem.hpp.


Member Typedef Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
typedef boost::shared_ptr<BoundaryConditionsContainer<ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM> > AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::BccType [private]

To save typing

Definition at line 105 of file AbstractCardiacProblem.hpp.


Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AbstractCardiacProblem ( AbstractCardiacCellFactory< ELEMENT_DIM, SPACE_DIM > *  pCellFactory  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AbstractCardiacProblem (  )  [inline]

Constructor used by archiving.

Definition at line 70 of file AbstractCardiacProblem.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::~AbstractCardiacProblem (  )  [inline, virtual]

Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
virtual void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AtBeginningOfTimestep ( double  time  )  [inline, virtual]

Called at beginning of each time step in the main time-loop in Solve(). Empty implementation but can be overloaded by child classes.

Parameters:
time the current time

Reimplemented in BidomainProblem< DIM >, and BidomainProblem< 3 >.

Definition at line 630 of file AbstractCardiacProblem.hpp.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CloseFilesAndPostProcess (  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
virtual AbstractCardiacTissue<ELEMENT_DIM,SPACE_DIM>* AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CreateCardiacTissue (  )  [protected, pure virtual]

Subclasses must override this method to create a PDE object of the appropriate type.

This class will take responsibility for freeing the object when it is finished with.

Implemented in BidomainProblem< DIM >, ExtendedBidomainProblem< DIM >, MonodomainProblem< ELEMENT_DIM, SPACE_DIM >, BidomainProblem< 3 >, and MonodomainProblem< DIM >.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Initialise().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
Vec AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CreateInitialCondition (  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
virtual AbstractDynamicLinearPdeSolver<ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM>* AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CreateSolver (  )  [protected, pure virtual]

Subclasses must override this method to create a suitable solver object.

This class will take responsibility for freeing the object when it is finished with.

Implemented in BidomainProblem< DIM >, ExtendedBidomainProblem< DIM >, MonodomainProblem< ELEMENT_DIM, SPACE_DIM >, BidomainProblem< 3 >, and MonodomainProblem< DIM >.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::DefineExtraVariablesWriterColumns ( bool  extending  )  [inline]

Define the user specified variables to be written to the primary results file

Parameters:
extending whether we are extending an existing results file

Definition at line 632 of file AbstractCardiacProblem.cpp.

References Hdf5DataWriter::DefineVariable(), HeartConfig::GetOutputVariables(), Hdf5DataWriter::GetVariableByName(), HeartConfig::Instance(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mExtraVariablesId, and AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpWriter.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::DefineWriterColumns ( bool  extending  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
double AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetCurrentTime (  )  [inline]
Returns:
the current time of the simulation

Definition at line 310 of file AbstractCardiacProblem.cpp.

References AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mCurrentTime.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
Hdf5DataReader AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetDataReader (  )  [inline]

Create and return a data reader configured to read the results we've been outputting.

Definition at line 763 of file AbstractCardiacProblem.cpp.

References EXCEPTION, and HeartConfig::Instance().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
bool AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetHasBath (  )  [inline, virtual]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
Vec AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetSolution (  )  [inline]

Get the final solution vector. This vector is distributed over all processes.

In case of Bidomain, this is of length 2*numNodes, and of the form (V_1, phi_1, V_2, phi_2, ......, V_N, phi_N). where V_j is the voltage at node j and phi_j is the extracellular potential at node j.

Use with caution since we don't want to alter the state of the PETSc vector.

Definition at line 298 of file AbstractCardiacProblem.cpp.

References AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mSolution.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
DistributedVector AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetSolutionDistributedVector (  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
AbstractCardiacTissue< ELEMENT_DIM, SPACE_DIM > * AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetTissue (  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Initialise (  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseWriter (  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
template<class Archive >
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::load ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Load the member variables.

Parameters:
archive 
version 

Todo:
#1317 code for saving/loading mSolution is PROBLEM_DIM specific, move it into the save/load methods fo Mono and BidomainProblem
Todo:
#1317 is there a reason we can't use PETSc's load/save vector functionality?

Reimplemented in BidomainProblem< DIM >, ExtendedBidomainProblem< DIM >, and BidomainProblem< 3 >.

Definition at line 205 of file AbstractCardiacProblem.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
template<class Archive >
BccType AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::LoadBoundaryConditions ( Archive &  archive,
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *  pMesh 
) [inline, private]

Serialization helper method to load a boundary conditions container.

Parameters:
archive the archive to load from
pMesh the mesh boundary conditions are to be defined on
Returns:
the loaded container

Definition at line 339 of file AbstractCardiacProblem.hpp.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, ELEMENT_DIM, 1 >::load().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
template<class Archive >
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::LoadExtraArchive ( Archive &  archive,
unsigned  version 
) [inline]

Used when loading a set of archives written by a parallel simulation onto a single process. Loads data from the given process-specific archive (written by a non-master process) and merges it into our data.

Parameters:
archive the archive to load
version the archive file version
Note:
The process-specific archives currently contain the following data. If the layout changes, then this method will need to be altered, since it hard-codes knowledge of the order in which things are archived.
  1. (via mpMesh) DistributedVectorFactory*
  2. (via mpCardiacTissue LoadCardiacCells) DistributedVectorFactory*
  3. (via mpCardiacTissue LoadCardiacCells) number_of_cells and sequence of AbstractCardiacCell*, possibly with Purkinje interleaved
  4. (via mpCardiacTissue) DistributedVectorFactory*
  5. mpBoundaryConditionsContainer
  6. mpDefaultBoundaryConditionsContainer
  7. (if we're a BidomainProblem) stuff in BidomainProblem::LoadExtraArchiveForBidomain

Todo:
#1159 sanity check that the contents of p_bcc and mpBoundaryConditionsContainer match.

Definition at line 709 of file AbstractCardiacProblem.hpp.

References BidomainProblem< DIM >::LoadExtraArchiveForBidomain().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
virtual void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::OnEndOfTimestep ( double  time  )  [inline, virtual]

Called at end of each time step in the main time-loop in Solve(). Empty implementation but can be overloaded by child classes.

Parameters:
time the current time

Reimplemented in BidomainProblem< DIM >, and BidomainProblem< 3 >.

Definition at line 640 of file AbstractCardiacProblem.hpp.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::PreSolveChecks (  )  [inline, virtual]

Performs a series of checks before solving. It checks whether the cardiac pde has been defined, whether the simulation time is greater than zero and whether the output directory is specified (or the output is set not to be produced). It throws exceptions if any of the above checks fails.

Todo:
remove magic number? (#1884)

Reimplemented in BidomainProblem< DIM >, ExtendedBidomainProblem< DIM >, and BidomainProblem< 3 >.

Definition at line 207 of file AbstractCardiacProblem.cpp.

References EXCEPTION, HeartConfig::GetPdeTimeStep(), HeartConfig::GetSimulationDuration(), HeartConfig::Instance(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mCurrentTime, AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpCardiacTissue, and AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mPrintOutput.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::PrintOutput ( bool  rPrintOutput  )  [inline]

Set whether the simulation will generate results files.

Parameters:
rPrintOutput 

Definition at line 286 of file AbstractCardiacProblem.cpp.

References AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mPrintOutput.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > & AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::rGetMesh (  )  [inline]
Returns:
the mesh used

Definition at line 316 of file AbstractCardiacProblem.cpp.

References AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
template<class Archive >
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::save ( Archive &  archive,
const unsigned int  version 
) const [inline, private]

Save the member variables.

Parameters:
archive 
version 

Todo:
#1317 code for saving/loading mSolution is PROBLEM_DIM specific, move it into the save/load methods for Mono and BidomainProblem
Todo:
#1369

Reimplemented in BidomainProblem< DIM >, ExtendedBidomainProblem< DIM >, and BidomainProblem< 3 >.

Definition at line 118 of file AbstractCardiacProblem.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
template<class Archive >
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SaveBoundaryConditions ( Archive &  archive,
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *  pMesh,
BccType  pBcc 
) const [inline, private]

Serialization helper method to save a boundary conditions container.

Parameters:
archive the archive to save to
pMesh the mesh boundary conditions are defined on
pBcc the container to save

Definition at line 324 of file AbstractCardiacProblem.hpp.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, ELEMENT_DIM, 1 >::save().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetBoundaryConditionsContainer ( BccType  pBcc  )  [inline]

Set the boundary conditions container.

Parameters:
pBcc is a pointer to a boundary conditions container

Definition at line 201 of file AbstractCardiacProblem.cpp.

References AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpBoundaryConditionsContainer.

Referenced by CardiacElectroMechanicsProblem< DIM >::Solve().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetElectrodes (  )  [inline, virtual]

Set an electrode object (which provides boundary conditions). Only valid if there is a bath.

Reimplemented in BidomainProblem< DIM >, and BidomainProblem< 3 >.

Definition at line 778 of file AbstractCardiacProblem.cpp.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Initialise().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetMesh ( AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *  pMesh  )  [inline]

This only needs to be called if a mesh filename has not been set.

Parameters:
pMesh the mesh object to use

Definition at line 273 of file AbstractCardiacProblem.cpp.

References AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mAllocatedMemoryForMesh, and AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh.

Referenced by CardiacElectroMechanicsProblem< DIM >::Initialise().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetNodesPerProcessorFilename ( const std::string &  rFilename  ) 

Set a file from which the nodes for each processor are read

Parameters:
rFilename 
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetOutputNodes ( std::vector< unsigned > &  rNodesToOutput  )  [inline]

Specifies which nodes in the mesh to output.

Parameters:
rNodesToOutput is a reference to a vector with the indexes of the nodes where the output is desired. If empty, the output will be for all the nodes in the mesh.

Definition at line 757 of file AbstractCardiacProblem.cpp.

References AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mNodesToOutput.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
virtual void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetUpAdditionalStoppingTimes ( std::vector< double > &  rAdditionalStoppingTimes  )  [inline, virtual]

Allow subclasses to define additional 'stopping times' for the printing time step loop. This allows bidomain simulations to specify exactly when the Electrodes should be turned on or off.

Parameters:
rAdditionalStoppingTimes to be filled in with the additional stopping times

Reimplemented in BidomainProblem< DIM >, and BidomainProblem< 3 >.

Definition at line 650 of file AbstractCardiacProblem.hpp.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetUseTimeAdaptivityController ( bool  useAdaptivity,
AbstractTimeAdaptivityController pController = NULL 
) [inline]
Todo:
#1704 add default adaptivity controller and allow the user just to call with true

Set whether (or not) to use a time adaptivity controller

Parameters:
useAdaptivity whether to use adaptivity
pController The controller (only relevant if useAdaptivity==true)

Definition at line 329 of file AbstractCardiacProblem.cpp.

References AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpTimeAdaptivityController.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetWriteInfo ( bool  writeInfo = true  )  [inline]

Set whether extra info will be written to stdout during computation.

Parameters:
writeInfo 

Definition at line 292 of file AbstractCardiacProblem.cpp.

References AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mWriteInfo.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve (  )  [inline]

First performs some checks by calling the PreSolveChecks method. It creates an solver to which it passes the boundary conditions specified by the user (otherwise it passes the defauls bcc). It then calls the Solve method on the solver class. It also handles the output, if necessary.

Note:
This method is collective, and hence must be called by all processes.

Todo:
#1318 the following line will deadlock if not every process throws in the Solve call

Reimplemented in AdaptiveBidomainProblem.

Definition at line 345 of file AbstractCardiacProblem.cpp.

References Hdf5DataWriter::AdvanceAlongUnlimitedDimension(), TimeStepper::AdvanceOneTimeStep(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AtBeginningOfTimestep(), GenericEventHandler< 16, HeartEventHandler >::BeginEvent(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CloseFilesAndPostProcess(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CreateInitialCondition(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CreateSolver(), GenericEventHandler< 16, HeartEventHandler >::EndEvent(), TimeStepper::GetNextTime(), HeartConfig::GetOutputDirectory(), TimeStepper::GetTime(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseWriter(), HeartConfig::Instance(), TimeStepper::IsTimeAtEnd(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mCurrentTime, AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpBoundaryConditionsContainer, AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpDefaultBoundaryConditionsContainer, AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh, AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mPrintOutput, AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpSolver, AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpTimeAdaptivityController, AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpWriter, AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mSolution, AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mWriteInfo, AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::OnEndOfTimestep(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::PreSolveChecks(), ProgressReporter::PrintFinalising(), PetscTools::ReplicateException(), GenericEventHandler< 16, HeartEventHandler >::Reset(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetUpAdditionalStoppingTimes(), ProgressReporter::Update(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::WriteInfo(), and AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::WriteOneStep().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::WriteExtraVariablesOneStep (  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
virtual void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::WriteInfo ( double  time  )  [pure virtual]

Write informative details about the progress of the simulation to standard output.

Implemented only in subclasses.

Parameters:
time the current time

Implemented in BidomainProblem< DIM >, ExtendedBidomainProblem< DIM >, MonodomainProblem< ELEMENT_DIM, SPACE_DIM >, BidomainProblem< 3 >, and MonodomainProblem< DIM >.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
virtual void AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::WriteOneStep ( double  time,
Vec  voltageVec 
) [pure virtual]

Write one timestep of output data to the primary results file.

Parameters:
time the current time
voltageVec the solution vector to write

Implemented in BidomainProblem< DIM >, ExtendedBidomainProblem< DIM >, MonodomainProblem< ELEMENT_DIM, SPACE_DIM >, BidomainProblem< 3 >, and MonodomainProblem< DIM >.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().


Friends And Related Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
friend class boost::serialization::access [friend]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
friend class CardiacElectroMechanicsProblem [friend]

CardiacElectroMechanicsProblem needs access to mpWriter.

Definition at line 431 of file AbstractCardiacProblem.hpp.


Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
bool AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mAllocatedMemoryForMesh [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
double AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mCurrentTime [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
std::vector<unsigned> AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mExtraVariablesId [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
std::string AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mMeshFilename [protected]

Meshes can be read from file or instantiated and passed directly to this class, this is for the former

Definition at line 359 of file AbstractCardiacProblem.hpp.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, ELEMENT_DIM, 1 >::load(), and AbstractCardiacProblem< ELEMENT_DIM, ELEMENT_DIM, 1 >::save().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
unsigned AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mNodeColumnId [protected]

Used by the writer

Definition at line 378 of file AbstractCardiacProblem.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
std::vector<unsigned> AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mNodesToOutput [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
BccType AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpBoundaryConditionsContainer [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
AbstractCardiacTissue<ELEMENT_DIM,SPACE_DIM>* AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpCardiacTissue [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
AbstractCardiacCellFactory<ELEMENT_DIM,SPACE_DIM>* AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpCellFactory [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
BccType AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpDefaultBoundaryConditionsContainer [protected]

It is convenient to also have a separate variable for default (zero-Neumann) boundary conditions

Definition at line 386 of file AbstractCardiacProblem.hpp.

Referenced by AbstractCardiacProblem< ELEMENT_DIM, ELEMENT_DIM, 1 >::load(), AbstractCardiacProblem< ELEMENT_DIM, ELEMENT_DIM, 1 >::save(), and AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
bool AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mPrintOutput [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
AbstractDynamicLinearPdeSolver<ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM>* AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpSolver [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
AbstractTimeAdaptivityController* AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpTimeAdaptivityController [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
Hdf5DataWriter* AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpWriter [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
Vec AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mSolution [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
unsigned AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mTimeColumnId [protected]

Used by the writer

Definition at line 376 of file AbstractCardiacProblem.hpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
unsigned AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mVoltageColumnId [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
bool AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mWriteInfo [protected]

The documentation for this class was generated from the following files:
Generated on Thu Dec 22 13:00:41 2011 for Chaste by  doxygen 1.6.3