domainmeanfunctional.h

Go to the documentation of this file.
00001 #ifndef  __DomainMeanFunctional_h
00002 #define  __DomainMeanFunctional_h
00003 
00004 #include  "domainfunctional.h"
00005 #include  <set>
00006 
00007 /*-----------------------------------------*/
00008 
00009 namespace Gascoigne
00010 {
00011 class AllDomainFunctional  : public virtual DomainFunctional
00012 {
00013 protected:
00014 
00015   int  _comp, _ncomp;
00016 
00017 public:
00018 
00019   AllDomainFunctional(int nc, int c) { _ncomp = nc; _comp = c; }
00020   ~AllDomainFunctional() {}
00021 
00022   std::string GetName() const {return "AllDomainFunctional";}
00023 
00024   int    GetNcomp() const {return _ncomp;}
00025   int    GetComp()  const {return _comp;}
00026 
00027   double J(const FemFunction& U, const Vertex2d& v) const;
00028   double J(const FemFunction& U, const Vertex3d& v) const;
00029 };
00030 
00031 /*-----------------------------------------*/
00032 
00033 class SubDomainFunctional  : public AllDomainFunctional
00034 {
00035 protected:
00036 
00037   double  _x0, _x1, _y0, _y1, _z0, _z1;
00038 
00039 public:
00040 
00041   SubDomainFunctional(int nc, int c) : AllDomainFunctional(nc,c) {};
00042   ~SubDomainFunctional() {}
00043 
00044   std::string GetName() const {return "SubDomainFunctional";}
00045 
00046   void SetCoordinates(double x0, double x1, double y0, double y1, double z0=0, double z1=0);
00047 
00048   double J(const FemFunction& U, const Vertex2d& v) const;
00049   double J(const FemFunction& U, const Vertex3d& v) const;
00050 };
00051 }
00052 
00053 #endif

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