AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM > Class Template Reference

#include <AbstractCardiacProblem.hpp>

Inheritance diagram for AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >:

Inheritance graph
[legend]
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 ()
void UseMatrixBasedRhsAssembly (bool useMatrixBasedRhsAssembly=true)
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 mUseMatrixBasedRhsAssembly
bool mAllocatedMemoryForMesh
bool mWriteInfo
bool mPrintOutput
std::vector< unsigned > mNodesToOutput
unsigned mVoltageColumnId
std::vector< unsigned > mExtraVariablesId
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 72 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>
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 >.

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 >::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 >.

Definition at line 198 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 311 of file AbstractCardiacProblem.hpp.

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

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 326 of file AbstractCardiacProblem.hpp.

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

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 >, MonodomainProblem< ELEMENT_DIM, SPACE_DIM >, and MonodomainProblem< DIM >.

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

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 >, MonodomainProblem< ELEMENT_DIM, SPACE_DIM >, 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 >::Initialise (  )  [inline]

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 >::SetBoundaryConditionsContainer ( BccType  pBcc  )  [inline]

Set the boundary conditions container.

Parameters:
pBcc is a pointer to a boundary conditions container

Definition at line 205 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 >::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.

Reimplemented in BidomainProblem< DIM >.

Definition at line 211 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 BidomainProblem< DIM >::PreSolveChecks(), and AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().

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>
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 >::PrintOutput ( bool  rPrintOutput  )  [inline]

Set whether the simulation will generate results files.

Parameters:
rPrintOutput 

Definition at line 284 of file AbstractCardiacProblem.cpp.

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

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 290 of file AbstractCardiacProblem.cpp.

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

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 296 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>
double AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetCurrentTime (  )  [inline]

Returns:
the current time of the simulation

Definition at line 308 of file AbstractCardiacProblem.cpp.

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

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 314 of file AbstractCardiacProblem.cpp.

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

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 >::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

Definition at line 345 of file AbstractCardiacProblem.cpp.

References Hdf5DataWriter::AdvanceAlongUnlimitedDimension(), TimeStepper::AdvanceOneTimeStep(), AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AtBeginningOfTimestep(), GenericEventHandler< 13, 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< 13, 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< 13, 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 >::CloseFilesAndPostProcess (  )  [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 >, MonodomainProblem< ELEMENT_DIM, SPACE_DIM >, 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 >::DefineWriterColumns ( bool  extending  )  [inline, virtual]

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

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 >, MonodomainProblem< ELEMENT_DIM, SPACE_DIM >, 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 >::WriteExtraVariablesOneStep (  )  [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>
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 732 of file AbstractCardiacProblem.cpp.

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

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 738 of file AbstractCardiacProblem.cpp.

References EXCEPTION, and HeartConfig::Instance().

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

Whether to use matrix-based RHS assembly or not.

Parameters:
useMatrixBasedRhsAssembly 

Definition at line 748 of file AbstractCardiacProblem.cpp.

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

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 >.

Definition at line 629 of file AbstractCardiacProblem.hpp.

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 >::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 >.

Definition at line 639 of file AbstractCardiacProblem.hpp.

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 >::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 >.

Definition at line 649 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 327 of file AbstractCardiacProblem.cpp.

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

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*
  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 708 of file AbstractCardiacProblem.hpp.

References BidomainProblem< DIM >::LoadExtraArchiveForBidomain().

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

Return whether there's bath defined in this problem

Reimplemented in BidomainProblem< DIM >.

Definition at line 754 of file AbstractCardiacProblem.cpp.

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

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 >.

Definition at line 759 of file AbstractCardiacProblem.cpp.

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


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 423 of file AbstractCardiacProblem.hpp.


Member Data Documentation

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 346 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>
bool AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mUseMatrixBasedRhsAssembly [protected]

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>
bool AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mWriteInfo [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>
std::vector<unsigned> AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mNodesToOutput [protected]

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>
std::vector<unsigned> AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mExtraVariablesId [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 368 of file AbstractCardiacProblem.hpp.

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 370 of file AbstractCardiacProblem.hpp.

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>
BccType AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpBoundaryConditionsContainer [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 378 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>
AbstractDynamicLinearPdeSolver<ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM>* AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpSolver [protected]

The PDE solver

Reimplemented in BidomainProblem< DIM >.

Definition at line 380 of file AbstractCardiacProblem.hpp.

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

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>
AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>* AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh [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>
double AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mCurrentTime [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]


The documentation for this class was generated from the following files:

Generated on Mon Apr 18 11:35:50 2011 for Chaste by  doxygen 1.5.5