MathTL
|
00001 // -*- c++ -*- 00002 00003 // +--------------------------------------------------------------------+ 00004 // | This file is part of MathTL - the Mathematical Template Library | 00005 // | | 00006 // | Copyright (c) 2002-2009 | 00007 // | Thorsten Raasch, Manuel Werner | 00008 // +--------------------------------------------------------------------+ 00009 00010 #ifndef _MATHTL_ROW_METHOD_H 00011 #define _MATHTL_ROW_METHOD_H 00012 00013 #include <algebra/triangular_matrix.h> 00014 #include <algebra/vector.h> 00015 #include <numerics/w_method.h> 00016 00017 namespace MathTL 00018 { 00030 template <class VECTOR> 00031 class ROWMethod 00032 : public WMethod<VECTOR>, public WMethodStageEquationHelper<VECTOR> 00033 { 00034 public: 00038 ROWMethod(const typename WMethod<VECTOR>::Method method); 00039 00043 virtual ~ROWMethod() {} 00044 00049 void solve_W_stage_equation(const AbstractIVP<VECTOR>* ivp, 00050 const double t, 00051 const VECTOR& v, 00052 const double alpha, 00053 const VECTOR& y, 00054 const double tolerance, 00055 VECTOR& x) const 00056 { 00057 // use the exact jacobian 00058 ivp->solve_ROW_stage_equation(t, v, alpha, y, tolerance, x); 00059 } 00060 00065 void approximate_ft(const AbstractIVP<VECTOR>* ivp, 00066 const double t, 00067 const VECTOR& v, 00068 const double tolerance, 00069 VECTOR& result) const 00070 { 00071 // use the exact derivative f_t 00072 ivp->evaluate_ft(t, v, tolerance, result); 00073 } 00074 }; 00075 } 00076 00077 #include <numerics/row_method.cpp> 00078 00079 #endif