![]() |
00001 // Copyright (C) 2004 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 TestProblem2 : public ODE 00009 { 00010 public: 00011 00012 TestProblem2() : ODE(2), A(2,2) 00013 { 00014 dolfin_info("The simple test system."); 00015 00016 // Final time 00017 T = 10; 00018 00019 // The matrix A 00020 A(0,0) = 100; 00021 A(1,1) = 1000; 00022 00023 // Compute sparsity 00024 sparse(); 00025 } 00026 00027 real u0(unsigned int i) 00028 { 00029 return 1.0; 00030 } 00031 00032 real f(const Vector& u, real t, unsigned int i) 00033 { 00034 return -A.mult(u, i); 00035 } 00036 00037 private: 00038 00039 Matrix A; 00040 00041 };
Documentation automatically generated with Doxygen on 10 Sep 2004.