![]() |
00001 // Copyright (C) 2003 Johan Hoffman and Anders Logg. 00002 // Licensed under the GNU GPL Version 2. 00003 00004 #include <dolfin.h> 00005 00006 using namespace dolfin; 00007 00008 class TestProblem3 : public ODE 00009 { 00010 public: 00011 00012 TestProblem3() : ODE(2), A(2,2) 00013 { 00014 dolfin_info("A non-normal test problem, critically damped oscillation"); 00015 dolfin_info("with eigenvalues l1 = l2 = 100."); 00016 00017 // Final time 00018 T = 1.0; 00019 00020 // The matrix A 00021 A(0,0) = 0.0; 00022 A(0,1) = -1.0; 00023 A(1,0) = 1e4; 00024 A(1,1) = 200; 00025 00026 // Compute sparsity 00027 sparse(); 00028 } 00029 00030 real u0(unsigned int i) 00031 { 00032 return 1.0; 00033 } 00034 00035 real f(const Vector& u, real t, unsigned int i) 00036 { 00037 return -A.mult(u, i); 00038 } 00039 00040 private: 00041 00042 Matrix A; 00043 00044 };
Documentation automatically generated with Doxygen on 10 Sep 2004.