Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

Poisson.h

Go to the documentation of this file.
00001 // Copyright (C) 2003 Johan Hoffman and Anders Logg.
00002 // Licensed under the GNU GPL Version 2.
00003 
00004 #ifndef __POISSON_H
00005 #define __POISSON_H
00006 
00007 #include <dolfin/PDE.h>
00008 
00009 namespace dolfin
00010 {
00011   
00012   class Poisson : public PDE
00013   {
00014   public:
00015     
00016     Poisson(Function& source) : PDE(3)
00017     {
00018       add(f, source);
00019     }
00020     
00021     real lhs(const ShapeFunction& u, const ShapeFunction& v)
00022     {
00023       return (grad(u),grad(v))*dx;
00024     }
00025     
00026     real rhs(const ShapeFunction& v)
00027     {
00028       return f*v*dx;
00029     }
00030     
00031   private:
00032     
00033     ElementFunction f;
00034     
00035   };
00036   
00037 }
00038 
00039 #endif


Documentation automatically generated with Doxygen on 10 Sep 2004.