galerkinintegrator.h

Go to the documentation of this file.
00001 #ifndef  __GalerkinIntegrator_h
00002 #define  __GalerkinIntegrator_h
00003 
00004 #include  "basicintegrator.h"
00005 #include  "integrationformula.h"
00006 #include  "integrationformulasummed.h"
00007 
00008 namespace Gascoigne
00009 {
00010 
00018 
00019 template<int DIM>
00020 class GalerkinIntegrator : public BasicIntegrator
00021 {
00022 private:
00023 
00024   IntegrationFormulaInterface*  IFF;
00025   IntegrationFormulaInterface*  IFE;
00026   IntegrationFormulaInterface*  IFB;
00027   IntegrationFormulaInterface*  IFM;
00028 
00029 protected:
00030 
00031   IntegrationFormulaInterface*& FormFormulaPointer() { return IFF;}
00032   IntegrationFormulaInterface*& ErrorFormulaPointer() { return IFE;}
00033   IntegrationFormulaInterface*& MassFormulaPointer() { return IFM;}
00034   IntegrationFormulaInterface*& BoundaryFormulaPointer() { return IFB;}
00035 
00036   const IntegrationFormulaInterface* FormFormula() const { assert(IFF); return IFF;}
00037   const IntegrationFormulaInterface* MassFormula() const { assert(IFM); return IFM;}
00038   const IntegrationFormulaInterface* ErrorFormula() const { assert(IFE); return IFE;}
00039   const IntegrationFormulaInterface* BoundaryFormula() const { assert(IFB); return IFB;}
00040 
00041   double Volume2MeshSize(double vol) const { return pow(vol,1./float(DIM));}
00042 
00043 public:
00044 
00045 //
00047 //
00048 
00049   GalerkinIntegrator<DIM>();
00050   ~GalerkinIntegrator<DIM>();
00051   
00052   std::string GetName() const {return "Galerkin";}
00053   void BasicInit();
00054 
00055   void Rhs(const DomainRightHandSide& RHS, LocalVector& F, const FemInterface& FEM, 
00056       const LocalData& Q, const LocalData& QC) const;
00057   void Form(const Equation& EQ, LocalVector& F, const FemInterface& FEM, const LocalVector& U, 
00058       const LocalData& Q, const LocalData& QC) const;
00059   void AdjointForm(const Equation& EQ, LocalVector& F, const FemInterface& FEM, const LocalVector& U, 
00060       const LocalData& Q, const LocalData& QC) const;
00061   void BoundaryForm(const BoundaryEquation& BE, LocalVector& F, const FemInterface& FEM, const LocalVector& U, int ile, int col, 
00062       const LocalData& Q, const LocalData& QC) const;
00063   void Matrix(const Equation& EQ, EntryMatrix& E, const FemInterface& FEM, const LocalVector& U, 
00064       const LocalData& Q, const LocalData& QC) const;
00065   void BoundaryMatrix (const BoundaryEquation& BE, EntryMatrix& E, const FemInterface& FEM, const LocalVector& U, int ile, int col, 
00066       const LocalData& Q, const LocalData& QC) const;
00067   double MassMatrix(EntryMatrix& E, const FemInterface& FEM) const;
00068   void MassForm(const TimePattern& TP, LocalVector& F, const FemInterface& FEM, const LocalVector& U) const;
00069 
00070   void RhsPoint(LocalVector& b, const FemInterface& E, const Vertex<DIM>& p, int comp) const;
00071   void DiracRhsPoint(LocalVector& b, const FemInterface& E, const Vertex<DIM>& p, const DiracRightHandSide& DRHS, int j,
00072       const LocalData& Q, const LocalData& QC) const;
00073   double ComputePointValue(const FemInterface& E, const Vertex<DIM>& p, const LocalVector& U, int comp) const;
00074   double ComputeDomainFunctional(const DomainFunctional& F, const FemInterface& FEM, const LocalVector& U,
00075       const LocalData& Q, const LocalData& QC) const;
00076   double ComputeBoundaryFunctional(const BoundaryFunctional& F, const FemInterface& FEM, int ile, int col, const LocalVector& U,
00077       const LocalData& Q, const LocalData& QC) const;
00078   void EvaluateCellRightHandSide(LocalVector& F, const DomainRightHandSide& CF,const FemInterface& FEM, 
00079       const LocalData& Q, const LocalData& QC) const;
00080 
00081   void ErrorsByExactSolution(LocalVector& dst, const FemInterface& FE, const ExactSolution& ES, const LocalVector& U, 
00082       const LocalData& Q, const LocalData& QC) const;
00083 
00084   void BoundaryRhs(const BoundaryRightHandSide& RHS, LocalVector& F, const FemInterface& FEM, int ile, int col,
00085       const LocalData& Q, const LocalData& QC) const;
00086 
00087   void IntegrateMassDiag(DoubleVector& F, const FemInterface& FEM) const ;
00088 
00089   void IntegrateBoundaryMassDiag(DoubleVector& F, const FemInterface& FEM, int ile, int col) const ;
00090 };
00091 }
00092 
00093 
00094 #endif

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