Chaste Release::3.1
OdeLinearSystemSolver Class Reference

#include <OdeLinearSystemSolver.hpp>

Collaboration diagram for OdeLinearSystemSolver:

List of all members.

Public Member Functions

 OdeLinearSystemSolver (unsigned systemSize, double timeStep)
 ~OdeLinearSystemSolver ()
double GetTimeStep ()
MatrGetLhsMatrix ()
VecrGetForceVector ()
void SetInitialConditionVector (Vec initialConditionsVector)
Vec SolveOneTimeStep ()

Private Attributes

double mTimeStep
LinearSystem mLinearSystem
Vec mForceVector
Vec mCurrentSolution

Detailed Description

Solve large systems of ODEs of the form

M dr/dt = f(t,r),

where M is a matrix, typically large and sparse, and r and f are vectors.

This differs from the OdeSolver classes in the ode component, which are for systems of the form dr/dt = f(t,r) and for small numbers of unknowns.

The solver uses forward euler to dicretise as M r^{n+1} = M r^{n} + dt f and solves this linear system.

The calling code is responsible with setting up M and f each timestep.

Definition at line 56 of file OdeLinearSystemSolver.hpp.


Constructor & Destructor Documentation

OdeLinearSystemSolver::OdeLinearSystemSolver ( unsigned  systemSize,
double  timeStep 
)

Constructor.

Parameters:
systemSizesize of the ODE system
timeStepthe time step used to integrate the ODE system

Definition at line 40 of file OdeLinearSystemSolver.cpp.

References PetscTools::CreateAndSetVec(), mCurrentSolution, mForceVector, and mTimeStep.

OdeLinearSystemSolver::~OdeLinearSystemSolver ( )

Destructor.

Definition at line 51 of file OdeLinearSystemSolver.cpp.

References PetscTools::Destroy(), mCurrentSolution, and mForceVector.


Member Function Documentation

double OdeLinearSystemSolver::GetTimeStep ( )

Get the timestep for the solver.

Definition at line 57 of file OdeLinearSystemSolver.cpp.

References mTimeStep.

Vec & OdeLinearSystemSolver::rGetForceVector ( )

Get the force vector.

Definition at line 67 of file OdeLinearSystemSolver.cpp.

References mForceVector.

Referenced by NodeBasedCellPopulationWithBuskeUpdate< DIM >::UpdateNodeLocations().

Mat & OdeLinearSystemSolver::rGetLhsMatrix ( )
void OdeLinearSystemSolver::SetInitialConditionVector ( Vec  initialConditionsVector)

Set the initial conditions.

Parameters:
initialConditionsVectorthe initial condition

Definition at line 72 of file OdeLinearSystemSolver.cpp.

References mCurrentSolution.

Referenced by NodeBasedCellPopulationWithBuskeUpdate< DIM >::UpdateNodeLocations().


Member Data Documentation

Force vector (f in M dr/dt = f).

Definition at line 67 of file OdeLinearSystemSolver.hpp.

Referenced by OdeLinearSystemSolver(), rGetForceVector(), SolveOneTimeStep(), and ~OdeLinearSystemSolver().

The LHS matrix and the force vector. Solve() is called on this.

Definition at line 64 of file OdeLinearSystemSolver.hpp.

Referenced by rGetLhsMatrix(), and SolveOneTimeStep().

Timestep for solver.

Definition at line 61 of file OdeLinearSystemSolver.hpp.

Referenced by GetTimeStep(), OdeLinearSystemSolver(), and SolveOneTimeStep().


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