q1.h

Go to the documentation of this file.
00001 #ifndef  __Q1_h
00002 #define  __Q1_h
00003 
00004 
00005 #include  "celldiscretization.h"
00006 #include  "hnstructureinterface.h"
00007 #include  "edgeinfocontainer.h"
00008 
00009 namespace Gascoigne
00010 {
00011 
00016 
00020 
00021 class Q1 : public CellDiscretization
00022 {
00023 protected:
00024 
00025   HNStructureInterface*    HN;
00026 
00027   IntVector GetLocalIndices(int iq) const {
00028     return GetMesh()->IndicesOfCell(iq);
00029   }
00030   void LocalToGlobal(MatrixInterface& A, EntryMatrix& E, int iq, double s) const;
00031   
00032   virtual HNStructureInterface* NewHNStructure()=0;
00033 
00034 public:
00035 
00036 //
00038 //
00039 
00040   Q1();
00041   ~Q1();
00042 
00043   int n() const {
00044     return GetMesh()->nnodes();
00045   }
00046   int nc() const {
00047     return GetMesh()->ncells();
00048   }
00049   //  const HNStructureQ1* GetHNStructure() const { return HN;}
00050 
00051   void ReInit   (const MeshInterface* MP);
00052   void StrongDirichletMatrix       (MatrixInterface& A, int col, const std::vector<int>& comp) const;
00053   void StrongDirichletMatrixOnlyRow(MatrixInterface& A, int col, const std::vector<int>& comp) const;
00054   void StrongDirichletVectorZero(GlobalVector& u, int col, const std::vector<int>& comp) const;
00055   void InterpolateSolution(GlobalVector& u, const GlobalVector& uold)const;
00056   virtual void InterpolateSolutionByPatches(GlobalVector& u, const GlobalVector& uold) const {}
00057   void HNAverage   (GlobalVector& x) const;
00058   void HNDistribute(GlobalVector& x) const;
00059   void HNZero      (GlobalVector& x) const;
00060   bool HNZeroCheck (const GlobalVector& x) const;
00061   void Matrix(MatrixInterface& A, const GlobalVector& u, const Equation& EQ, double d) const;
00062   void MassMatrix(MatrixInterface& A) const;
00063   void Structure(SparseStructureInterface* SI) const;
00064   void InitFilter(DoubleVector& F) const;
00065   virtual void EnergyEstimator(EdgeInfoContainerInterface& EIC, DoubleVector& eta, const GlobalVector& u, const Equation& EQ, const DomainRightHandSide* RHS, const std::string & s_energytype, double d_visc) const=0;
00066 };
00067 }
00068 
00069 
00070 #endif

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