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   class Poisson : public PDE {
00012   public:
00013     
00014     Poisson(Function& source) : PDE(3)
00015     {
00016       add(f, source);
00017     }
00018     
00019     real lhs(const ShapeFunction& u, const ShapeFunction& v)
00020     {
00021       return (grad(u),grad(v)) * dx;
00022     }
00023     
00024     real rhs(const ShapeFunction& v)
00025     {
00026       return f*v * dx;
00027     }
00028     
00029   private:
00030     
00031     ElementFunction f;
00032     
00033   };
00034   
00035 }
00036 
00037 #endif


Documentation automatically generated with Doxygen on 10 Sep 2004.