Chaste Release::3.1
|
#include <AbstractDynamicLinearPdeSolver.hpp>
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 56 of file AbstractDynamicLinearPdeSolver.hpp.
AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::AbstractDynamicLinearPdeSolver | ( | AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * | pMesh | ) |
Constructor.
pMesh | the mesh |
Definition at line 260 of file AbstractDynamicLinearPdeSolver.hpp.
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::InitialiseHdf5Writer | ( | ) | [protected] |
Create and initialise the HDF5 writer. Called by Solve() if results are to be output.
Note: For now, writing variable names as 'Variable_0' etc; in the future, could allow user to specify units of time and names and units of dependent variables to be passed to the writer using DefineVariable() and DefineUnlimitedDimension()
Definition at line 221 of file AbstractDynamicLinearPdeSolver.hpp.
References EXCEPTION.
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetInitialCondition | ( | Vec | initialCondition | ) |
Set the initial condition.
initialCondition | the initial condition |
Definition at line 305 of file AbstractDynamicLinearPdeSolver.hpp.
Referenced by CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::Solve(), and AdaptiveBidomainProblem::Solve().
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetMatrixIsNotAssembled | ( | ) |
Tell the solver to assemble the matrix again next timestep.
Definition at line 480 of file AbstractDynamicLinearPdeSolver.hpp.
Referenced by CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::Solve().
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetOutputDirectoryAndPrefix | ( | std::string | outputDirectory, |
std::string | prefix | ||
) |
outputDirectory | the output directory |
prefix | the filename prefix |
Definition at line 512 of file AbstractDynamicLinearPdeSolver.hpp.
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetOutputToParallelVtk | ( | bool | output | ) |
output | whether to output to parallel VTK (.pvtu) file |
Definition at line 500 of file AbstractDynamicLinearPdeSolver.hpp.
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetOutputToTxt | ( | bool | output | ) |
output | whether to output to a .txt format that is readable by Matlab |
Definition at line 506 of file AbstractDynamicLinearPdeSolver.hpp.
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetOutputToVtk | ( | bool | output | ) |
output | whether to output to VTK (.vtu) file |
Definition at line 494 of file AbstractDynamicLinearPdeSolver.hpp.
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetPrintingTimestepMultiple | ( | unsigned | multiple | ) |
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 519 of file AbstractDynamicLinearPdeSolver.hpp.
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetTimeAdaptivityController | ( | AbstractTimeAdaptivityController * | pTimeAdaptivityController | ) |
Set a controller class which alters the dt used.
pTimeAdaptivityController | the controller |
Definition at line 486 of file AbstractDynamicLinearPdeSolver.hpp.
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetTimes | ( | double | tStart, |
double | tEnd | ||
) |
Set the times to solve between.
tStart | the start time |
tEnd | the end time |
Definition at line 280 of file AbstractDynamicLinearPdeSolver.hpp.
References EXCEPTION.
Referenced by CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::Solve(), and AdaptiveBidomainProblem::Solve().
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetTimeStep | ( | double | dt | ) |
Set (or reset) the timestep to use.
dt | timestep |
Definition at line 294 of file AbstractDynamicLinearPdeSolver.hpp.
References EXCEPTION.
Referenced by AdaptiveBidomainProblem::AdaptMesh(), CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::Solve(), and AdaptiveBidomainProblem::Solve().
Vec AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::Solve | ( | ) |
Dynamic solve method.
Definition at line 326 of file AbstractDynamicLinearPdeSolver.hpp.
References TimeStepper::AdvanceOneTimeStep(), GenericEventHandler< 16, HeartEventHandler >::BeginEvent(), PetscTools::Destroy(), GenericEventHandler< 16, HeartEventHandler >::EndEvent(), EXCEPTION, TimeStepper::GetNextTimeStep(), TimeStepper::GetTime(), TimeStepper::GetTotalTimeStepsTaken(), TimeStepper::IsTimeAtEnd(), NEVER_REACHED, TimeStepper::ResetTimeStep(), PdeSimulationTime::SetPdeTimeStep(), and PdeSimulationTime::SetTime().
Referenced by CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::Solve(), and AdaptiveBidomainProblem::Solve().
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::WriteOneStep | ( | double | time, |
Vec | solution | ||
) | [protected] |
Write one timestep of output data to HDF5 file.
time | the time |
solution | the solution vector to write |
Definition at line 312 of file AbstractDynamicLinearPdeSolver.hpp.
std::string AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mFilenamePrefix [protected] |
Filename prefix for HDF5 and other files.
Definition at line 116 of file AbstractDynamicLinearPdeSolver.hpp.
double AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mIdealTimeStep [protected] |
The timestep to use. This is either the last timestep passed in in SetTimeStep, or the last timestep suggested by the time adaptivity controller.
Definition at line 86 of file AbstractDynamicLinearPdeSolver.hpp.
Vec AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mInitialCondition [protected] |
The initial condition vector.
Definition at line 71 of file AbstractDynamicLinearPdeSolver.hpp.
double AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mLastWorkingTimeStep [protected] |
The last actual timestep used.
Definition at line 89 of file AbstractDynamicLinearPdeSolver.hpp.
bool AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mMatrixIsAssembled [protected] |
Whether the matrix has been assembled for the current time step.
Definition at line 74 of file AbstractDynamicLinearPdeSolver.hpp.
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 80 of file AbstractDynamicLinearPdeSolver.hpp.
std::string AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mOutputDirectory [protected] |
Output directory (a subfolder of tmp/[USERNAME]/testoutput).
Definition at line 113 of file AbstractDynamicLinearPdeSolver.hpp.
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 104 of file AbstractDynamicLinearPdeSolver.hpp.
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 110 of file AbstractDynamicLinearPdeSolver.hpp.
bool AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mOutputToVtk [protected] |
Flag to say if we need to output to VTK. Defaults to false in the constructor.
Definition at line 98 of file AbstractDynamicLinearPdeSolver.hpp.
Hdf5DataWriter* AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpHdf5Writer [protected] |
The object used to write results to HDF5 file.
Definition at line 126 of file AbstractDynamicLinearPdeSolver.hpp.
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 123 of file AbstractDynamicLinearPdeSolver.hpp.
AbstractTimeAdaptivityController* AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mpTimeAdaptivityController [protected] |
A controller which determines what timestep to use (defaults to NULL).
Definition at line 92 of file AbstractDynamicLinearPdeSolver.hpp.
double AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mTend [protected] |
Simulation end time.
Definition at line 65 of file AbstractDynamicLinearPdeSolver.hpp.
bool AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mTimesSet [protected] |
Whether SetTimes has been called with suitable parameters.
Definition at line 68 of file AbstractDynamicLinearPdeSolver.hpp.
double AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mTstart [protected] |
Simulation start time.
Definition at line 62 of file AbstractDynamicLinearPdeSolver.hpp.
std::vector<int> AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::mVariableColumnIds [protected] |
List of variable column IDs as written to HDF5 file.
Definition at line 129 of file AbstractDynamicLinearPdeSolver.hpp.