#include <AbstractCardiacProblem.hpp>
Public Member Functions | |
AbstractCardiacProblem (AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM > *pCellFactory) | |
virtual | ~AbstractCardiacProblem () |
void | Initialise () |
void | SetNodesPerProcessorFilename (const std::string &rFilename) |
void | SetBoundaryConditionsContainer (BoundaryConditionsContainer< ELEM_DIM, SPACE_DIM, PROBLEM_DIM > *pbcc) |
virtual void | PreSolveChecks () |
virtual Vec | CreateInitialCondition () |
void | ConvertOutputToMeshalyzerFormat (bool call=true) |
void | SetMesh (AbstractTetrahedralMesh< ELEM_DIM, SPACE_DIM > *pMesh) |
void | PrintOutput (bool rPrintOutput) |
void | SetWriteInfo (bool writeInfo=true) |
Vec | GetSolution () |
DistributedVector | GetSolutionDistributedVector () |
AbstractTetrahedralMesh < ELEM_DIM, SPACE_DIM > & | rGetMesh () |
AbstractCardiacPde< ELEM_DIM, SPACE_DIM > * | GetPde () |
void | Solve () |
void | CloseFilesAndPostProcess () |
virtual void | WriteInfo (double time)=0 |
virtual void | DefineWriterColumns () |
virtual void | WriteOneStep (double time, Vec voltageVec) |
void | InitialiseWriter () |
void | SetOutputNodes (std::vector< unsigned > &rNodesToOutput) |
Hdf5DataReader | GetDataReader () |
void | UseMatrixBasedRhsAssembly (bool usematrix=true) |
virtual void | OnEndOfTimestep (double time) |
void | SetArchiveLinearSystemObject (bool archive=true) |
Public Attributes | |
Hdf5DataWriter * | mpWriter |
Protected Member Functions | |
virtual AbstractCardiacPde < ELEM_DIM, SPACE_DIM > * | CreateCardiacPde ()=0 |
virtual AbstractDynamicAssemblerMixin < ELEM_DIM, SPACE_DIM, PROBLEM_DIM > * | CreateAssembler ()=0 |
Protected Attributes | |
std::string | mMeshFilename |
std::string | mNodesPerProcessorFilename |
bool | mUseMatrixBasedRhsAssembly |
bool | mAllocatedMemoryForMesh |
bool | mWriteInfo |
bool | mPrintOutput |
bool | mCallChaste2Meshalyzer |
std::vector< unsigned > | mNodesToOutput |
unsigned | mVoltageColumnId |
unsigned | mTimeColumnId |
unsigned | mNodeColumnId |
AbstractCardiacPde< ELEM_DIM, SPACE_DIM > * | mpCardiacPde |
BoundaryConditionsContainer < ELEM_DIM, SPACE_DIM, PROBLEM_DIM > * | mpBoundaryConditionsContainer |
BoundaryConditionsContainer < ELEM_DIM, SPACE_DIM, PROBLEM_DIM > * | mpDefaultBoundaryConditionsContainer |
AbstractDynamicAssemblerMixin < ELEM_DIM, SPACE_DIM, PROBLEM_DIM > * | mpAssembler |
AbstractCardiacCellFactory < ELEM_DIM, SPACE_DIM > * | mpCellFactory |
AbstractTetrahedralMesh < ELEM_DIM, SPACE_DIM > * | mpMesh |
Vec | mSolution |
bool | mArchiveKSP |
Friends | |
class | TestBidomainWithBathAssembler |
See tutorials for usage.
Definition at line 51 of file AbstractCardiacProblem.hpp.
AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::AbstractCardiacProblem | ( | AbstractCardiacCellFactory< ELEM_DIM, SPACE_DIM > * | pCellFactory | ) | [inline] |
Constructor
pCellFactory | User defined cell factory which shows how the pde should create cells. |
Definition at line 49 of file AbstractCardiacProblem.cpp.
References GenericEventHandler< 11, HeartEventHandler >::BeginEvent(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mAllocatedMemoryForMesh, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mCallChaste2Meshalyzer, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mNodesToOutput, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpAssembler, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpCardiacPde, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mPrintOutput, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mSolution, and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mWriteInfo.
AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::~AbstractCardiacProblem | ( | ) | [inline, virtual] |
Destructor
Definition at line 74 of file AbstractCardiacProblem.cpp.
References AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mAllocatedMemoryForMesh, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpCardiacPde, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpDefaultBoundaryConditionsContainer, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh, and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mSolution.
virtual AbstractCardiacPde<ELEM_DIM,SPACE_DIM>* AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CreateCardiacPde | ( | ) | [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< ELEM_DIM, SPACE_DIM >, and MonodomainProblem< DIM >.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Initialise().
virtual AbstractDynamicAssemblerMixin<ELEM_DIM, SPACE_DIM, PROBLEM_DIM>* AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CreateAssembler | ( | ) | [protected, pure virtual] |
Subclasses must override this method to create a suitable assembler object.
This class will take responsibility for freeing the object when it is finished with.
Implemented in BidomainProblem< DIM >, MonodomainProblem< ELEM_DIM, SPACE_DIM >, and MonodomainProblem< DIM >.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
void AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Initialise | ( | ) | [inline] |
Initialise the system. Must be called before Solve()
Definition at line 94 of file AbstractCardiacProblem.cpp.
References GenericEventHandler< 11, HeartEventHandler >::BeginEvent(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::ConstructFromMeshReader(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CreateCardiacPde(), GenericEventHandler< 11, HeartEventHandler >::EndEvent(), HeartConfig::GetFibreLength(), HeartConfig::GetInterNodeSpace(), Exception::GetMessage(), HeartConfig::GetSheetDimensions(), HeartConfig::GetSlabDimensions(), HeartConfig::Instance(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mAllocatedMemoryForMesh, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mNodesPerProcessorFilename, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpCardiacPde, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpCellFactory, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh, and AbstractMesh< ELEMENT_DIM, SPACE_DIM >::ReadNodesPerProcessorFile().
Referenced by CardiacElectroMechanicsProblem< DIM >::Initialise().
void AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::SetNodesPerProcessorFilename | ( | const std::string & | rFilename | ) | [inline] |
Set a file from which the nodes for each processor are read
rFilename |
Definition at line 225 of file AbstractCardiacProblem.cpp.
References AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mNodesPerProcessorFilename.
void AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::SetBoundaryConditionsContainer | ( | BoundaryConditionsContainer< ELEM_DIM, SPACE_DIM, PROBLEM_DIM > * | pbcc | ) | [inline] |
Set the boundary conditions container.
pbcc | is a pointer to a boundary conditions container |
Definition at line 231 of file AbstractCardiacProblem.cpp.
References AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpBoundaryConditionsContainer.
Referenced by CardiacElectroMechanicsProblem< DIM >::Solve().
void AbstractCardiacProblem< ELEM_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 237 of file AbstractCardiacProblem.cpp.
References HeartConfig::GetPdeTimeStep(), HeartConfig::GetSimulationDuration(), HeartConfig::Instance(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpCardiacPde, and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mPrintOutput.
Referenced by BidomainProblem< DIM >::PreSolveChecks(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
Vec AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CreateInitialCondition | ( | ) | [inline, virtual] |
Perhaps this should be a method of AbstractCardiacPde?? This is virtual so BidomainProblem can overwrite V to zero for bath nodes, if there are any.
Reimplemented in BidomainProblem< DIM >.
Definition at line 269 of file AbstractCardiacProblem.cpp.
References DistributedVector::Begin(), DistributedVectorFactory::CreateDistributedVector(), DistributedVectorFactory::CreateVec(), DistributedVector::End(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetDistributedVectorFactory(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpCardiacPde, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh, and DistributedVector::Restore().
Referenced by BidomainProblem< DIM >::CreateInitialCondition(), CardiacElectroMechanicsProblem< DIM >::Solve(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
void AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::ConvertOutputToMeshalyzerFormat | ( | bool | call = true |
) | [inline] |
Set whether to call the Chaste2Meshalyzer script. This script gets everything ready to visualize the results with meshalyser and is useful in testing. By default the script is called. In performance testing for example it desirable to disable the script.
call | whether to call the script |
Definition at line 303 of file AbstractCardiacProblem.cpp.
References AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mCallChaste2Meshalyzer.
void AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::SetMesh | ( | AbstractTetrahedralMesh< ELEM_DIM, SPACE_DIM > * | pMesh | ) | [inline] |
This only needs to be called if a mesh filename has not been set.
pMesh | the mesh object to use |
Definition at line 309 of file AbstractCardiacProblem.cpp.
References AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mAllocatedMemoryForMesh, and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh.
Referenced by CardiacElectroMechanicsProblem< DIM >::Initialise().
void AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::PrintOutput | ( | bool | rPrintOutput | ) | [inline] |
Set whether the simulation will generate results files.
rPrintOutput |
Definition at line 320 of file AbstractCardiacProblem.cpp.
References AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mPrintOutput.
void AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::SetWriteInfo | ( | bool | writeInfo = true |
) | [inline] |
Set whether extra info will be written to stdout during computation.
writeInfo |
Definition at line 326 of file AbstractCardiacProblem.cpp.
References AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mWriteInfo.
Vec AbstractCardiacProblem< ELEM_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 332 of file AbstractCardiacProblem.cpp.
References AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mSolution.
DistributedVector AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::GetSolutionDistributedVector | ( | ) | [inline] |
Get the solution vector, wrapped in a DistributedVector.
See also GetSolution.
Definition at line 338 of file AbstractCardiacProblem.cpp.
References DistributedVectorFactory::CreateDistributedVector(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetDistributedVectorFactory(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh, and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mSolution.
AbstractTetrahedralMesh< ELEM_DIM, SPACE_DIM > & AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::rGetMesh | ( | ) | [inline] |
Definition at line 344 of file AbstractCardiacProblem.cpp.
References AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh.
AbstractCardiacPde< ELEM_DIM, SPACE_DIM > * AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::GetPde | ( | ) | [inline] |
Definition at line 351 of file AbstractCardiacProblem.cpp.
References AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpCardiacPde.
Referenced by CardiacElectroMechanicsProblem< DIM >::Solve().
void AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve | ( | ) | [inline] |
First performs some checks by calling the PreSolveChecks method. It creates an assembler to which it passes the boundary conditions specified by the user (otherwise it passes the defauls bcc). It then calls the Solve method in the assembler class. It also handles the output, if necessary.
Definition at line 357 of file AbstractCardiacProblem.cpp.
References Hdf5DataWriter::AdvanceAlongUnlimitedDimension(), TimeStepper::AdvanceOneTimeStep(), GenericEventHandler< 11, HeartEventHandler >::BeginEvent(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CloseFilesAndPostProcess(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CreateAssembler(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CreateInitialCondition(), GenericEventHandler< 11, HeartEventHandler >::EndEvent(), AbstractAssembler< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::GetLinearSystem(), TimeStepper::GetNextTime(), HeartConfig::GetOutputDirectory(), OutputFileHandler::GetOutputDirectoryFullPath(), HeartConfig::GetOutputFilenamePrefix(), HeartConfig::GetPdeTimeStep(), TimeStepper::GetTime(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseWriter(), HeartConfig::Instance(), TimeStepper::IsTimeAtEnd(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mArchiveKSP, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpAssembler, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpBoundaryConditionsContainer, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpDefaultBoundaryConditionsContainer, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mPrintOutput, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpWriter, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mSolution, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mWriteInfo, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::OnEndOfTimestep(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::PreSolveChecks(), ProgressReporter::PrintFinalising(), PetscTools::ReplicateException(), GenericEventHandler< 11, HeartEventHandler >::Reset(), OutputFileHandler::SetArchiveDirectory(), AbstractDynamicAssemblerMixin< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetInitialCondition(), AbstractDynamicAssemblerMixin< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetTimes(), AbstractDynamicAssemblerMixin< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), ProgressReporter::Update(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::WriteInfo(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::WriteOneStep().
void AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CloseFilesAndPostProcess | ( | ) | [inline] |
Closes the files where the solution is stored and, if specified so (as it is by default), converts the output to Meshalyzer format by calling the WriteFilesUsingMesh method in the MeshalyzerWriter class.
Definition at line 496 of file AbstractCardiacProblem.cpp.
References PetscTools::AmMaster(), GenericEventHandler< 11, HeartEventHandler >::BeginEvent(), Hdf5DataWriter::Close(), GenericEventHandler< 11, HeartEventHandler >::EndEvent(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetMeshFileBaseName(), HeartConfig::GetOutputDirectory(), HeartConfig::Instance(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mCallChaste2Meshalyzer, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mNodesToOutput, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mPrintOutput, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpWriter, AbstractMesh< ELEMENT_DIM, SPACE_DIM >::rGetNodePermutation(), HeartConfig::Write(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader().
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
virtual void AbstractCardiacProblem< ELEM_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.
time | the current time |
Implemented in BidomainProblem< DIM >, MonodomainProblem< ELEM_DIM, SPACE_DIM >, and MonodomainProblem< DIM >.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
void AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::DefineWriterColumns | ( | ) | [inline, virtual] |
Define what variables are written to the primary results file.
Reimplemented in BidomainProblem< DIM >.
Definition at line 542 of file AbstractCardiacProblem.cpp.
References Hdf5DataWriter::DefineFixedDimension(), Hdf5DataWriter::DefineUnlimitedDimension(), Hdf5DataWriter::DefineVariable(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mNodesToOutput, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpWriter, and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mVoltageColumnId.
Referenced by BidomainProblem< DIM >::DefineWriterColumns(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseWriter().
void AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::WriteOneStep | ( | double | time, | |
Vec | voltageVec | |||
) | [inline, virtual] |
Write one timestep of output data to the primary results file.
time | the current time | |
voltageVec | the solution vector to write |
Reimplemented in BidomainProblem< DIM >.
Definition at line 562 of file AbstractCardiacProblem.cpp.
References AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpWriter, AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mVoltageColumnId, Hdf5DataWriter::PutUnlimitedVariable(), and Hdf5DataWriter::PutVector().
Referenced by CardiacElectroMechanicsProblem< DIM >::Solve(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
void AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseWriter | ( | ) | [inline] |
It creates and initialises the hdf writer from the Hdf5DataWriter class. It passes the output directory and file name to it. It is called by Solve(), if the output needs to be generated.
Definition at line 571 of file AbstractCardiacProblem.cpp.
References AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::DefineWriterColumns(), Hdf5DataWriter::EndDefineMode(), HeartConfig::GetOutputDirectory(), HeartConfig::GetOutputFilenamePrefix(), HeartConfig::Instance(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpCellFactory, and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpWriter.
Referenced by CardiacElectroMechanicsProblem< DIM >::Solve(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
void AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::SetOutputNodes | ( | std::vector< unsigned > & | rNodesToOutput | ) | [inline] |
Specifies which nodes in the mesh to output.
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 579 of file AbstractCardiacProblem.cpp.
References AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mNodesToOutput.
Hdf5DataReader AbstractCardiacProblem< ELEM_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 585 of file AbstractCardiacProblem.cpp.
References HeartConfig::Instance().
void AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::UseMatrixBasedRhsAssembly | ( | bool | usematrix = true |
) | [inline] |
Whether to use matrix-based RHS assembly or not.
usematrix |
Definition at line 595 of file AbstractCardiacProblem.cpp.
References AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mUseMatrixBasedRhsAssembly.
virtual void AbstractCardiacProblem< ELEM_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.
time | the current time |
Reimplemented in BidomainProblem< DIM >.
Definition at line 314 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
void AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::SetArchiveLinearSystemObject | ( | bool | archive = true |
) | [inline] |
Tells the problem class to archive the linear system after every call to Solve()
archive | set true to archive the LinearSystem object at the end |
Definition at line 601 of file AbstractCardiacProblem.cpp.
References AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mArchiveKSP.
std::string AbstractCardiacProblem< ELEM_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 58 of file AbstractCardiacProblem.hpp.
std::string AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mNodesPerProcessorFilename [protected] |
If this is set, the nodes for each processor are read
Definition at line 61 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Initialise(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::SetNodesPerProcessorFilename().
bool AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mUseMatrixBasedRhsAssembly [protected] |
Whether to use matrix-based assembly of the RHS vector (much more efficient). True by default
Definition at line 67 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::UseMatrixBasedRhsAssembly().
bool AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mAllocatedMemoryForMesh [protected] |
Whether this problem class has created the mesh itself, as opposed to being given it
Definition at line 69 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::AbstractCardiacProblem(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Initialise(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::SetMesh(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::~AbstractCardiacProblem().
bool AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mWriteInfo [protected] |
Whether to print some statistics (max/min voltage) to screen during the simulation
Definition at line 71 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::AbstractCardiacProblem(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::SetWriteInfo(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
bool AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mPrintOutput [protected] |
Whether to write any output at all
Definition at line 73 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::AbstractCardiacProblem(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CloseFilesAndPostProcess(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::PreSolveChecks(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::PrintOutput(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
bool AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mCallChaste2Meshalyzer [protected] |
Whether to convert the output from HDF5 to meshalyzer readable format
Definition at line 75 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::AbstractCardiacProblem(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CloseFilesAndPostProcess(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::ConvertOutputToMeshalyzerFormat().
std::vector<unsigned> AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mNodesToOutput [protected] |
If only outputing voltage for selected nodes, which nodes to output at
Definition at line 78 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::AbstractCardiacProblem(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CloseFilesAndPostProcess(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::DefineWriterColumns(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::SetOutputNodes().
unsigned AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mVoltageColumnId [protected] |
Used by the writer
Definition at line 81 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::DefineWriterColumns(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::WriteOneStep().
unsigned AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mTimeColumnId [protected] |
Used by the writer
Definition at line 83 of file AbstractCardiacProblem.hpp.
unsigned AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mNodeColumnId [protected] |
Used by the writer
Definition at line 85 of file AbstractCardiacProblem.hpp.
AbstractCardiacPde<ELEM_DIM,SPACE_DIM>* AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpCardiacPde [protected] |
The monodomain or bidomain pde
Definition at line 88 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::AbstractCardiacProblem(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CreateInitialCondition(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::GetPde(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Initialise(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::PreSolveChecks(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::~AbstractCardiacProblem().
BoundaryConditionsContainer<ELEM_DIM, SPACE_DIM, PROBLEM_DIM>* AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpBoundaryConditionsContainer [protected] |
Boundary conditions container used in the simulation
Definition at line 91 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::SetBoundaryConditionsContainer(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
BoundaryConditionsContainer<ELEM_DIM, SPACE_DIM, PROBLEM_DIM>* AbstractCardiacProblem< ELEM_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 93 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::~AbstractCardiacProblem().
AbstractDynamicAssemblerMixin<ELEM_DIM, SPACE_DIM, PROBLEM_DIM>* AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpAssembler [protected] |
The PDE solver
Reimplemented in BidomainProblem< DIM >.
Definition at line 95 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::AbstractCardiacProblem(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
AbstractCardiacCellFactory<ELEM_DIM,SPACE_DIM>* AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpCellFactory [protected] |
The cell factory creates the cells for each node
Definition at line 97 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Initialise(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseWriter().
AbstractTetrahedralMesh<ELEM_DIM,SPACE_DIM>* AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh [protected] |
The mesh. Can either by passed in, or the mesh filename can be set
Definition at line 99 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CloseFilesAndPostProcess(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CreateInitialCondition(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::DefineWriterColumns(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::GetSolutionDistributedVector(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Initialise(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::rGetMesh(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::SetMesh(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::~AbstractCardiacProblem().
Vec AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mSolution [protected] |
The current solution vector, of the form [V_0 .. V_N ] for monodomain and [V_0 phi_0 .. V_N phi_N] for bidomain
Definition at line 103 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::AbstractCardiacProblem(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::GetSolution(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::GetSolutionDistributedVector(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::~AbstractCardiacProblem().
bool AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mArchiveKSP [protected] |
Tells the destructor to archive the linear system
Definition at line 106 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::SetArchiveLinearSystemObject(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().
Hdf5DataWriter* AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::mpWriter |
The object to use to write results to disk.
This (and things in MonodomainProblem) being public are hacks for CardiacElectroMechanicsProblem to work.
Definition at line 132 of file AbstractCardiacProblem.hpp.
Referenced by AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::CloseFilesAndPostProcess(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::DefineWriterColumns(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseWriter(), CardiacElectroMechanicsProblem< DIM >::Solve(), AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::Solve(), and AbstractCardiacProblem< ELEM_DIM, SPACE_DIM, PROBLEM_DIM >::WriteOneStep().