CardiacNewtonSolver< SIZE > Class Template Reference

#include <CardiacNewtonSolver.hpp>

Collaboration diagram for CardiacNewtonSolver< SIZE >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void Solve (AbstractBackwardEulerCardiacCell< SIZE > &rCell, double rCurrentGuess[SIZE])

Static Public Member Functions

static CardiacNewtonSolver
< SIZE > * 
Instance ()

Protected Member Functions

 CardiacNewtonSolver (const CardiacNewtonSolver< SIZE > &)
CardiacNewtonSolver< SIZE > & operator= (const CardiacNewtonSolver< SIZE > &)
double ComputeNorm (double vector[SIZE])
void SolveLinearSystem ()

Private Attributes

double mResidual [SIZE]
double mJacobian [SIZE][SIZE]
double mUpdate [SIZE]


Detailed Description

template<unsigned SIZE>
class CardiacNewtonSolver< SIZE >

Specialised Newton solver for solving the nonlinear systems arising when simulating a cardiac cell using Backward Euler.

The class is templated by the size of the nonlinear system, and uses the singleton pattern to ensure only 1 solver for any given system size is created. This allows us to be both computationally and memory efficient.

It would be nice to have a test of this class directly, but you need a cardiac cell in order to test it. So all tests occur when testing particular cardiac cells, e.g. the BackwardEulerLuoRudyIModel1991.

Definition at line 48 of file CardiacNewtonSolver.hpp.


Member Function Documentation

template<unsigned SIZE>
static CardiacNewtonSolver<SIZE>* CardiacNewtonSolver< SIZE >::Instance (  )  [inline, static]

Call this method to obtain a solver instance.

Returns:
a single instance of the class

Definition at line 56 of file CardiacNewtonSolver.hpp.

Referenced by BackwardEulerLuoRudyIModel1991::ComputeOneStepExceptVoltage(), and BackwardEulerFoxModel2002Modified::ComputeOneStepExceptVoltage().

template<unsigned SIZE>
void CardiacNewtonSolver< SIZE >::Solve ( AbstractBackwardEulerCardiacCell< SIZE > &  rCell,
double  rCurrentGuess[SIZE] 
) [inline]

template<unsigned SIZE>
double CardiacNewtonSolver< SIZE >::ComputeNorm ( double  vector[SIZE]  )  [inline, protected]

Compute a norm of a vector.

Definition at line 194 of file CardiacNewtonSolver.hpp.

Referenced by CardiacNewtonSolver< SIZE >::Solve().

template<unsigned SIZE>
void CardiacNewtonSolver< SIZE >::SolveLinearSystem (  )  [inline, protected]

Solve a linear system to calculate the Newton update step

Definition at line 210 of file CardiacNewtonSolver.hpp.

References CardiacNewtonSolver< SIZE >::mJacobian, CardiacNewtonSolver< SIZE >::mResidual, and CardiacNewtonSolver< SIZE >::mUpdate.

Referenced by CardiacNewtonSolver< SIZE >::Solve().


Member Data Documentation

template<unsigned SIZE>
double CardiacNewtonSolver< SIZE >::mResidual[SIZE] [private]

Working memory : residual vector

Definition at line 239 of file CardiacNewtonSolver.hpp.

Referenced by CardiacNewtonSolver< SIZE >::Solve(), and CardiacNewtonSolver< SIZE >::SolveLinearSystem().

template<unsigned SIZE>
double CardiacNewtonSolver< SIZE >::mJacobian[SIZE][SIZE] [private]

Working memory : Jacobian matrix

Definition at line 241 of file CardiacNewtonSolver.hpp.

Referenced by CardiacNewtonSolver< SIZE >::Solve(), and CardiacNewtonSolver< SIZE >::SolveLinearSystem().

template<unsigned SIZE>
double CardiacNewtonSolver< SIZE >::mUpdate[SIZE] [private]

Working memory : update vector

Definition at line 243 of file CardiacNewtonSolver.hpp.

Referenced by CardiacNewtonSolver< SIZE >::Solve(), and CardiacNewtonSolver< SIZE >::SolveLinearSystem().


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

Generated on Wed Mar 18 12:52:24 2009 for Chaste by  doxygen 1.5.5