MathTL
numerics/ivp.h
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_IVP_H
00011 #define _MATHTL_IVP_H
00012 
00013 #include <geometry/point.h>
00014 
00015 namespace MathTL
00016 {
00028   template <unsigned int DIM>
00029   class IVP
00030   {
00031   public:
00035     Point<DIM> u0;
00036 
00040     virtual ~IVP ();
00041     
00045     virtual void apply_f(const double t, const Point<DIM>& v,
00046                          Point<DIM>& result) const = 0;
00047 
00051     virtual void apply_ft(const double t, const Point<DIM>& v,
00052                           Point<DIM>& result) const = 0;
00053 
00061     virtual void solve_jacobian(const double t, const Point<DIM>& v, const double alpha,
00062                                 Point<DIM>& result) const = 0;
00063   };
00064 
00076   template <class VECTOR>
00077   class AbstractIVP
00078   {
00079   public:
00083     VECTOR u0;
00084 
00088     virtual ~AbstractIVP() = 0;
00089 
00094     virtual void evaluate_f(const double t,
00095                             const VECTOR& v,
00096                             const double tolerance,
00097                             VECTOR& result) const = 0;
00098 
00103     virtual void evaluate_ft(const double t,
00104                              const VECTOR& v,
00105                              const double tolerance,
00106                              VECTOR& result) const = 0;
00107 
00118     virtual void solve_ROW_stage_equation(const double t,
00119                                           const VECTOR& v,
00120                                           const double alpha,
00121                                           const VECTOR& y,
00122                                           const double tolerancs,
00123                                           VECTOR& result) const = 0;
00124   };
00125 }
00126 
00127 #include <numerics/ivp.cpp>
00128 
00129 #endif
 All Classes Functions Variables Typedefs Enumerations