domainrighthandside.h

Go to the documentation of this file.
00001 #ifndef __DomainRightHandSide_h
00002 #define __DomainRightHandSide_h
00003 
00004 #include  "application.h"
00005 #include  "vertex.h"
00006 
00007 namespace Gascoigne
00008 {
00009 
00010 /*-------------------------------------------------------*/
00011 
00012   class DomainRightHandSide : public virtual Application
00013   {
00014     private:
00015 
00016     protected:
00017 
00018     public:
00019       DomainRightHandSide() { }
00020       ~DomainRightHandSide() { }
00021 
00022       virtual int GetNcomp() const=0;
00023 
00024       virtual double operator()(int c, const Vertex2d& v) const {
00025         std::cerr << "\"DomainRightHandSide::operator()\" not written" << std::endl;
00026         abort();
00027       }
00028       virtual double operator()(int c, const Vertex3d& v) const {
00029         std::cerr << "\"DomainRightHandSide::operator()\" not written" << std::endl;
00030         abort();
00031       }
00032 
00033       virtual void operator()(VectorIterator b, const TestFunction& N, const Vertex2d& v) const 
00034         {
00035           for(int c=0;c<GetNcomp();c++)
00036             {
00037               b[c] += N.m()* (*this)(c,v);
00038             }
00039         }
00040       virtual void operator()(VectorIterator b, const TestFunction& N, const Vertex3d& v) const 
00041         {
00042           for(int c=0;c<GetNcomp();c++)
00043             {
00044               b[c] += N.m()* (*this)(c,v);
00045             }
00046         }
00047   };
00048   
00049   typedef DomainRightHandSide DomainInitialCondition;
00050 
00051 /*-------------------------------------------------------*/
00052 
00053 }
00054 
00055 #endif

Generated on Thu Sep 14 10:34:36 2006 for Gascoigne by  doxygen 1.4.7