AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM > Class Template Reference

#include <AbstractDynamicLinearPdeSolver.hpp>

Inherits AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >.

Inherited by LinearParabolicPdeSystemWithCoupledOdeSystemSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >.

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

List of all members.

Public Member Functions

 AbstractDynamicLinearPdeSolver (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh)
void SetTimes (double tStart, double tEnd)
void SetTimeStep (double dt)
void SetInitialCondition (Vec initialCondition)
Vec Solve ()
void SetMatrixIsNotAssembled ()
void SetTimeAdaptivityController (AbstractTimeAdaptivityController *pTimeAdaptivityController)
void SetOutputToVtk (bool output)
void SetOutputToParallelVtk (bool output)
void SetOutputToTxt (bool output)
void SetOutputDirectoryAndPrefix (std::string outputDirectory, std::string prefix)
void SetPrintingTimestepMultiple (unsigned multiple)

Protected Member Functions

void InitialiseHdf5Writer ()
void WriteOneStep (double time, Vec solution)

Protected Attributes

double mTstart
double mTend
bool mTimesSet
Vec mInitialCondition
bool mMatrixIsAssembled
bool mMatrixIsConstant
double mIdealTimeStep
double mLastWorkingTimeStep
AbstractTimeAdaptivityControllermpTimeAdaptivityController
bool mOutputToVtk
bool mOutputToParallelVtk
bool mOutputToTxt
std::string mOutputDirectory
std::string mFilenamePrefix
unsigned mPrintingTimestepMultiple
Hdf5DataWritermpHdf5Writer
std::vector< int > mVariableColumnIds

Friends

class TestSimpleLinearParabolicSolver

Detailed Description

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

Abstract class for dynamic linear PDE solves. This class defines the Solve() method. The concrete class should implement the SetupLinearSystem() method (defined in AbstractLinearPdeSolver), based on the PDE being solved and the numerical method.

Definition at line 49 of file AbstractDynamicLinearPdeSolver.hpp.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
pMesh the mesh

Definition at line 253 of file AbstractDynamicLinearPdeSolver.hpp.


Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseHdf5Writer (  )  [inline, protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetInitialCondition ( Vec  initialCondition  )  [inline]

Set the initial condition.

Note:
We do *not* take responsibility for destroying this vector - the caller must do so once the solver is no longer in use.
Parameters:
initialCondition the initial condition

Definition at line 298 of file AbstractDynamicLinearPdeSolver.hpp.

References AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mInitialCondition.

Referenced by CardiacElectroMechanicsProblem< DIM >::Solve(), and AdaptiveBidomainProblem::Solve().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetMatrixIsNotAssembled (  )  [inline]

Tell the solver to assemble the matrix again next timestep.

Definition at line 473 of file AbstractDynamicLinearPdeSolver.hpp.

References AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mMatrixIsAssembled.

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetOutputDirectoryAndPrefix ( std::string  outputDirectory,
std::string  prefix 
) [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetOutputToParallelVtk ( bool  output  )  [inline]
Parameters:
output whether to output to parallel VTK (.pvtu) file

Definition at line 493 of file AbstractDynamicLinearPdeSolver.hpp.

References AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mOutputToParallelVtk.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetOutputToTxt ( bool  output  )  [inline]
Parameters:
output whether to output to a .txt format that is readable by Matlab

Definition at line 499 of file AbstractDynamicLinearPdeSolver.hpp.

References AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mOutputToTxt.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetOutputToVtk ( bool  output  )  [inline]
Parameters:
output whether to output to VTK (.vtu) file

Definition at line 487 of file AbstractDynamicLinearPdeSolver.hpp.

References AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mOutputToVtk.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetPrintingTimestepMultiple ( unsigned  multiple  )  [inline]
Parameters:
multiple the ratio of the number of actual timesteps to the number of timesteps at which results are output to HDF5 and other files.

Definition at line 512 of file AbstractDynamicLinearPdeSolver.hpp.

References AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mPrintingTimestepMultiple.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetTimeAdaptivityController ( AbstractTimeAdaptivityController pTimeAdaptivityController  )  [inline]

Set a controller class which alters the dt used.

Parameters:
pTimeAdaptivityController the controller

Definition at line 479 of file AbstractDynamicLinearPdeSolver.hpp.

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetTimes ( double  tStart,
double  tEnd 
) [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetTimeStep ( double  dt  )  [inline]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
Vec AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve (  )  [inline]

Dynamic solve method.

Definition at line 319 of file AbstractDynamicLinearPdeSolver.hpp.

References Hdf5DataWriter::AdvanceAlongUnlimitedDimension(), TimeStepper::AdvanceOneTimeStep(), GenericEventHandler< 16, HeartEventHandler >::BeginEvent(), GenericEventHandler< 16, HeartEventHandler >::EndEvent(), EXCEPTION, AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::FinaliseLinearSystem(), AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::FollowingSolveLinearSystem(), TimeStepper::GetNextTimeStep(), AbstractTimeAdaptivityController::GetNextTimeStep(), TimeStepper::GetTime(), TimeStepper::GetTotalTimeStepsTaken(), AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseForSolve(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseHdf5Writer(), TimeStepper::IsTimeAtEnd(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mFilenamePrefix, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mIdealTimeStep, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mInitialCondition, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mLastWorkingTimeStep, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mMatrixIsAssembled, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mMatrixIsConstant, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mOutputDirectory, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mOutputToParallelVtk, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mOutputToTxt, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mOutputToVtk, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpHdf5Writer, AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpLinearSystem, AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpMesh, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mPrintingTimestepMultiple, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpTimeAdaptivityController, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mTend, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mTimesSet, AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mTstart, NEVER_REACHED, AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::PrepareForSetupLinearSystem(), LinearSystem::ResetKspSolver(), TimeStepper::ResetTimeStep(), PdeSimulationTime::SetPdeTimeStep(), PdeSimulationTime::SetTime(), AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetupLinearSystem(), LinearSystem::Solve(), and AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::WriteOneStep().

Referenced by CardiacElectroMechanicsProblem< DIM >::Solve(), AdaptiveBidomainProblem::Solve(), and LinearParabolicPdeSystemWithCoupledOdeSystemSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SolveAndWriteResultsToFile().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::WriteOneStep ( double  time,
Vec  solution 
) [inline, protected]

Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
std::string AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mFilenamePrefix [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
double AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mIdealTimeStep [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
Vec AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mInitialCondition [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
double AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mLastWorkingTimeStep [protected]

The last actual timestep used.

Definition at line 82 of file AbstractDynamicLinearPdeSolver.hpp.

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
bool AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mMatrixIsAssembled [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
bool AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mMatrixIsConstant [protected]

Whether the matrix is constant in time (if so the system need not be assembled at each time step). Defaults to false.

Definition at line 73 of file AbstractDynamicLinearPdeSolver.hpp.

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

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
std::string AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mOutputDirectory [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
bool AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mOutputToParallelVtk [protected]

Flag to say if we need to output to VTK parallel (.pvtu). Defaults to false in the constructor.

Definition at line 97 of file AbstractDynamicLinearPdeSolver.hpp.

Referenced by AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetOutputToParallelVtk(), and AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
bool AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mOutputToTxt [protected]

Flag to say if we need to output to a .txt format that is readable by Matlab. Defaults to false in the constructor.

Definition at line 103 of file AbstractDynamicLinearPdeSolver.hpp.

Referenced by AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetOutputToTxt(), and AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
bool AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mOutputToVtk [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
Hdf5DataWriter* AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpHdf5Writer [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
unsigned AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mPrintingTimestepMultiple [protected]

The ratio of the number of actual timesteps to the number of timesteps at which results are output to HDF5 and other files. Defaults to 1 in the constructor.

Definition at line 116 of file AbstractDynamicLinearPdeSolver.hpp.

Referenced by AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseHdf5Writer(), AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetPrintingTimestepMultiple(), and AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve().

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
AbstractTimeAdaptivityController* AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpTimeAdaptivityController [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
double AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mTend [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
bool AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mTimesSet [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
double AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mTstart [protected]
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM, unsigned PROBLEM_DIM>
std::vector<int> AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mVariableColumnIds [protected]

The documentation for this class was generated from the following file:
Generated on Thu Dec 22 13:01:02 2011 for Chaste by  doxygen 1.6.3