Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
|
#include <AbstractDynamicLinearPdeSolver.hpp>
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 |
AbstractTimeAdaptivityController * | mpTimeAdaptivityController |
bool | mOutputToVtk |
bool | mOutputToParallelVtk |
bool | mOutputToTxt |
std::string | mOutputDirectory |
std::string | mFilenamePrefix |
unsigned | mPrintingTimestepMultiple |
Hdf5DataWriter * | mpHdf5Writer |
std::vector< int > | mVariableColumnIds |
Protected Attributes inherited from AbstractLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM > | |
LinearSystem * | mpLinearSystem |
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * | mpMesh |
Friends | |
class | TestSimpleLinearParabolicSolver |
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 262 of file AbstractDynamicLinearPdeSolver.hpp.
|
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 223 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 307 of file AbstractDynamicLinearPdeSolver.hpp.
Referenced by CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::Solve(), ParabolicBoxDomainPdeModifier< DIM >::UpdateAtEndOfTimeStep(), and ParabolicGrowingDomainPdeModifier< DIM >::UpdateAtEndOfTimeStep().
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetMatrixIsNotAssembled | ( | ) |
Tell the solver to assemble the matrix again next timestep.
Definition at line 500 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 532 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 520 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 526 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 514 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 539 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 506 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 282 of file AbstractDynamicLinearPdeSolver.hpp.
References EXCEPTION.
Referenced by CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::Solve(), ParabolicBoxDomainPdeModifier< DIM >::UpdateAtEndOfTimeStep(), and ParabolicGrowingDomainPdeModifier< DIM >::UpdateAtEndOfTimeStep().
void AbstractDynamicLinearPdeSolver< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::SetTimeStep | ( | double | dt | ) |
Set (or reset) the timestep to use.
dt | timestep |
Definition at line 296 of file AbstractDynamicLinearPdeSolver.hpp.
References EXCEPTION.
Referenced by CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::Solve(), ParabolicBoxDomainPdeModifier< DIM >::UpdateAtEndOfTimeStep(), and ParabolicGrowingDomainPdeModifier< DIM >::UpdateAtEndOfTimeStep().
|
virtual |
Dynamic solve method.
Definition at line 328 of file AbstractDynamicLinearPdeSolver.hpp.
References TimeStepper::AdvanceOneTimeStep(), GenericEventHandler< 16, HeartEventHandler >::BeginEvent(), RelativeTo::ChasteTestOutput, PetscTools::Destroy(), GenericEventHandler< 16, HeartEventHandler >::EndEvent(), EXCEPTION, TimeStepper::GetNextTime(), TimeStepper::GetNextTimeStep(), TimeStepper::GetTime(), TimeStepper::GetTotalTimeStepsTaken(), TimeStepper::IsTimeAtEnd(), NEVER_REACHED, TimeStepper::ResetTimeStep(), PdeSimulationTime::SetPdeTimeStepAndNextTime(), and PdeSimulationTime::SetTime().
Referenced by CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::Solve(), ParabolicBoxDomainPdeModifier< DIM >::UpdateAtEndOfTimeStep(), and ParabolicGrowingDomainPdeModifier< DIM >::UpdateAtEndOfTimeStep().
|
protected |
Write one timestep of output data to HDF5 file.
time | the time |
solution | the solution vector to write |
Definition at line 314 of file AbstractDynamicLinearPdeSolver.hpp.
|
friend |
Definition at line 58 of file AbstractDynamicLinearPdeSolver.hpp.
|
protected |
Filename prefix for HDF5 and other files.
Definition at line 116 of file AbstractDynamicLinearPdeSolver.hpp.
|
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.
|
protected |
The initial condition vector.
Definition at line 71 of file AbstractDynamicLinearPdeSolver.hpp.
|
protected |
The last actual timestep used.
Definition at line 89 of file AbstractDynamicLinearPdeSolver.hpp.
|
protected |
Whether the matrix has been assembled for the current time step.
Definition at line 74 of file AbstractDynamicLinearPdeSolver.hpp.
|
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.
|
protected |
Output directory (a subfolder of tmp/[USERNAME]/testoutput).
Definition at line 113 of file AbstractDynamicLinearPdeSolver.hpp.
|
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.
|
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.
|
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.
|
protected |
The object used to write results to HDF5 file.
Definition at line 126 of file AbstractDynamicLinearPdeSolver.hpp.
|
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.
|
protected |
A controller which determines what timestep to use (defaults to NULL).
Definition at line 92 of file AbstractDynamicLinearPdeSolver.hpp.
|
protected |
Simulation end time.
Definition at line 65 of file AbstractDynamicLinearPdeSolver.hpp.
|
protected |
Whether SetTimes has been called with suitable parameters.
Definition at line 68 of file AbstractDynamicLinearPdeSolver.hpp.
|
protected |
Simulation start time.
Definition at line 62 of file AbstractDynamicLinearPdeSolver.hpp.
|
protected |
List of variable column IDs as written to HDF5 file.
Definition at line 129 of file AbstractDynamicLinearPdeSolver.hpp.