boundaryrighthandside.h

Go to the documentation of this file.
00001 #ifndef  __BoundaryRightHandSide_h
00002 #define  __BoundaryRightHandSide_h
00003 
00004 #include  "vertex.h"
00005 #include  <set>
00006 #include  "nvector.h"
00007 #include  <string>
00008 #include  "gascoigne.h"
00009 #include  "application.h"
00010 
00011 /*-------------------------------------------------------*/
00012 
00013 namespace Gascoigne
00014 {
00015   
00021 
00027 
00028   class BoundaryRightHandSide : public virtual Application
00029   {
00030     private:
00031 
00032     protected:
00033 
00034     public:
00035       BoundaryRightHandSide() : Application() {}
00036       ~BoundaryRightHandSide() {}
00037 
00038       virtual int GetNcomp() const=0;
00039 
00040       virtual double operator()(int c, const Vertex2d& v, const Vertex2d& n, int color) const {
00041         std::cerr << "\"BoundaryRightHandSide::operator()\" not written!" << std::endl;
00042         abort();
00043       }
00044       virtual double operator()(int c, const Vertex3d& v, const Vertex3d& n, int color) const {
00045         std::cerr << "\"BoundaryRightHandSide::operator()\" not written!" << std::endl;
00046         abort();
00047       }
00048 
00049       virtual void operator()(VectorIterator b, const TestFunction& N, const Vertex2d& v, const Vertex2d& n, int color) const {
00050         for(int c=0;c<GetNcomp();c++)
00051         {
00052           b[c] += N.m()* (*this)(c,v,n,color);
00053         }
00054       }
00055       virtual void operator()(VectorIterator b, const TestFunction& N, const Vertex3d& v, const Vertex3d& n, int color) const {
00056         for(int c=0;c<GetNcomp();c++)
00057         {
00058           b[c] += N.m()* (*this)(c,v,n,color);
00059         }
00060       }
00061   };
00062 
00063   typedef BoundaryRightHandSide BoundaryInitialCondition;
00064 
00065 /*-------------------------------------------------------*/
00066 
00067 }
00068 
00069 #endif

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