lpsintegrator.h

Go to the documentation of this file.
00001 #ifndef  __LpsIntegrator_h
00002 #define  __LpsIntegrator_h
00003 
00004 
00009 
00013 
00014 #include  "basicintegrator.h"
00015 #include  "integrationformula.h"
00016 #include  "lpsequation.h"
00017 
00018 namespace Gascoigne
00019 {
00020 
00021 template<int DIM>
00022 class LpsIntegrator : public BasicIntegrator
00023 {
00024 protected:
00025 
00026   mutable FemFunction   UHP;
00027   mutable FemFunction   NLPS, MLPS, MMM;
00028   void Projection(const FemInterface& FEM) const;
00029   double  CellWeight;
00030 
00031   IntegrationFormulaInterface* _IF;
00032 
00033   const IntegrationFormulaInterface& FormFormula() const { return *_IF;}
00034   double Volume2MeshSize(double vol) const { return pow(vol,1./float(DIM));}
00035   void Init(const LpsEquation& LEQ, const FemInterface& FEM, const LocalVector& U, 
00036             const LocalData& Q) const;
00037 
00038 public:
00039 
00040 //
00042 //
00043 
00044   LpsIntegrator<DIM>() : CellWeight(1.) {};
00045   ~LpsIntegrator<DIM>() {}
00046 
00047   std::string GetName() const {return "Lps";}
00048 
00049   virtual void Form(const Equation& EQ, LocalVector& F, const FemInterface& FEM, const LocalVector&U, 
00050       const LocalData& Q, const LocalData& QC) const;
00051   virtual void Matrix(const Equation& EQ, EntryMatrix& E, const FemInterface& FEM, const LocalVector& U, 
00052       const LocalData& Q, const LocalData& QC) const;
00053 };
00054 
00055 /*-----------------------------------------*/
00056 
00057 template<int DIM>
00058 class LpsIntegratorQ1 : public LpsIntegrator<DIM>
00059 {
00060 protected:
00061 
00062   std::string GetName() const {return "LpsIntegratorQ1";}
00063   void ResetMatrix(EntryMatrix& E, int n, int ncomp) const;
00064   void VectorReinit(LocalVector& F, int n, int ncomp) const;
00065 
00066 public:
00067 
00068   LpsIntegratorQ1<DIM>();
00069   ~LpsIntegratorQ1<DIM>() {}
00070 
00071   void Form(const Equation& EQ, LocalVector& F, const FemInterface& FEM, const LocalVector&U,
00072       const LocalData& Q, const LocalData& QC) const;
00073   void Matrix(const Equation& EQ, EntryMatrix& E, const FemInterface& FEM, const LocalVector& U, 
00074       const LocalData& Q, const LocalData& QC) const;
00075 };
00076 
00077 /*-----------------------------------------*/
00078 
00079 template<int DIM>
00080 class LpsIntegratorQ2 : public LpsIntegrator<DIM>
00081 {
00082 protected:
00083 
00084   std::string GetName() const {return "LpsIntegratorQ2";}
00085 
00086 public:
00087 
00088   LpsIntegratorQ2<DIM>();
00089   ~LpsIntegratorQ2<DIM>() {}
00090 };
00091 
00092 /*-----------------------------------------*/
00093 
00094 }
00095 
00096 #endif

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