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_STURM_BVP_H 00011 #define _MATHTL_STURM_BVP_H 00012 00013 #include <numerics/bvp.h> 00014 00015 namespace MathTL 00016 { 00030 class SturmBVP 00031 : public TwoPointBVP<2> 00032 { 00033 public: 00037 virtual ~SturmBVP (); 00038 00042 virtual double p(const double t) const = 0; 00043 00047 virtual double p_prime(const double t) const = 0; 00048 00052 virtual double q(const double t) const = 0; 00053 00057 virtual double g(const double t) const = 0; 00058 00062 virtual double alpha0() const = 0; 00063 00067 virtual double alpha1() const = 0; 00068 00072 virtual double beta0() const = 0; 00073 00077 virtual double beta1() const = 0; 00078 00080 void apply_f(const double t, const Point<2>& v, Point<2>& result) const; 00081 00083 void apply_A(const Point<2>& v, Point<2>& result) const; 00084 00086 void apply_B(const Point<2>& v, Point<2>& result) const; 00087 }; 00088 00093 class SimpleSturmBVP 00094 : public SturmBVP 00095 { 00096 public: 00100 virtual ~SimpleSturmBVP (); 00101 00105 virtual double p(const double t) const = 0; 00106 00110 virtual double p_prime(const double t) const = 0; 00111 00115 virtual double q(const double t) const = 0; 00116 00120 virtual double g(const double t) const = 0; 00121 00125 virtual bool bc_left() const = 0; 00126 00130 virtual bool bc_right() const = 0; 00131 00133 double alpha0() const { return bc_left() ? 1 : 0; } 00134 00136 double alpha1() const { return 0;} 00137 00139 double beta0() const { return bc_right() ? 1 : 0; } 00140 00142 double beta1() const { return 0; } 00143 }; 00144 00154 class PeriodicSturmBVP 00155 { 00156 public: 00160 virtual ~PeriodicSturmBVP (); 00161 00165 virtual double p(const double t) const = 0; 00166 00170 virtual double p_prime(const double t) const = 0; 00171 00175 virtual double q(const double t) const = 0; 00176 00180 virtual double g(const double t) const = 0; 00181 }; 00182 } 00183 00184 #include <numerics/sturm_bvp.cpp> 00185 00186 #endif