dwrfem.h

Go to the documentation of this file.
00001 #ifndef __Dwrfem_h
00002 #define __Dwrfem_h
00003 
00004 #include "q22d.h"
00005 #include "q23d.h"
00006 #include "baseq1patch.h"
00007 #include "baseq13dpatch.h"
00008 #include "transformation2d.h"
00009 #include "transformation3d.h"
00010 #include "finiteelement.h"
00011 
00012 /*---------------------------------------------------*/
00013 
00014 namespace Gascoigne
00015 {
00016 class DwrFem2d : public Q22d
00017 {
00018  protected:
00019   typedef Transformation2d<BaseQ12d>         TransQ1;
00020   FiniteElement<2,1,TransQ1,BaseQ12dPatch>   LowOrderFem;
00021   HNStructureQ1*                             HNLow;
00022   
00023   void TransformationQ1(FemInterface::Matrix& T, int iq) const;
00024 
00025  public:
00026   DwrFem2d();
00027   ~DwrFem2d();
00028 
00029   void BasicInit(const ParamFile* paramfile);
00030   void ReInit(const MeshInterface* MP);
00031 };
00032 
00033 /*---------------------------------------------------*/
00034 
00035 class DwrFem3d : public Q23d
00036 {
00037  protected:
00038   typedef Transformation3d<BaseQ13d>         TransQ1;
00039   FiniteElement<3,2,TransQ1,BaseQ13dPatch>   LowOrderFem;
00040   HNStructureQ1*                             HNLow;
00041   
00042   void TransformationQ1(FemInterface::Matrix& T, int iq) const;
00043 
00044  public:
00045   DwrFem3d();
00046   ~DwrFem3d();
00047 
00048   void BasicInit(const ParamFile* paramfile);
00049   void ReInit(const MeshInterface* MP);
00050 };
00051 
00052 /*---------------------------------------------------*/
00053 /*---------------------------------------------------*/
00054 
00055 class DwrFemQ1Q22d : virtual public DwrFem2d
00056 {
00057  protected:
00058   void DiracRhsPoint(GlobalVector& f, const DiracRightHandSide& DRHS, const Vertex2d& p0, int i, double s) const;
00059 
00060  public:
00061   DwrFemQ1Q22d() : DwrFem2d() {}
00062   ~DwrFemQ1Q22d() {}
00063 
00064   void Form(GlobalVector& f, const GlobalVector& u, const Equation& EQ, double d) const;
00065   void AdjointForm(GlobalVector& f, const GlobalVector& u, const Equation& EQ, double d) const;
00066   void BoundaryForm(GlobalVector& f, const GlobalVector& u, const IntSet& Colors, const BoundaryEquation& BE, double d) const;
00067   void Rhs(GlobalVector& f, const DomainRightHandSide& RHS, double s) const;
00068   void BoundaryRhs(GlobalVector& f, const IntSet& Colors, const BoundaryRightHandSide& NRHS, double s) const;
00069   
00070   void MassMatrix(MatrixInterface& M) const;
00071   void MassForm(GlobalVector& f, const GlobalVector& u, const TimePattern& TP, double s) const;
00072 
00073   void LocalToGlobal(MatrixInterface& A, EntryMatrix& E, int iq, double s) const;
00074 
00075   void HNAverage   (GlobalVector& x)       const { HNLow->Average(x); }
00076   void HNDistribute(GlobalVector& x)       const { HN->Distribute(x); }
00077   void HNZero      (GlobalVector& x)       const { HNLow->Zero(x); }
00078   bool HNZeroCheck (const GlobalVector& x) const { return HNLow->ZeroCheck(x); }
00079 };
00080 
00081 /*---------------------------------------------------*/
00082 
00083 class DwrFemQ1Q23d : virtual public DwrFem3d
00084 {
00085  protected:
00086   void DiracRhsPoint(GlobalVector& f, const DiracRightHandSide& DRHS, const Vertex3d& p0, int i, double s) const;
00087 
00088  public:
00089   DwrFemQ1Q23d() : DwrFem3d() {}
00090   ~DwrFemQ1Q23d() {}
00091 
00092   void Form(GlobalVector& f, const GlobalVector& u, const Equation& EQ, double d) const;
00093   void AdjointForm(GlobalVector& f, const GlobalVector& u, const Equation& EQ, double d) const;
00094   void BoundaryForm(GlobalVector& f, const GlobalVector& u, const IntSet& Colors, const BoundaryEquation& BE, double d) const;
00095   void Rhs(GlobalVector& f, const DomainRightHandSide& RHS, double s) const;
00096   void BoundaryRhs(GlobalVector& f, const IntSet& Colors, const BoundaryRightHandSide& NRHS, double s) const;
00097   
00098   void MassMatrix(MatrixInterface& M) const;
00099   void MassForm(GlobalVector& f, const GlobalVector& u, const TimePattern& TP, double s) const;
00100 
00101   void LocalToGlobal(MatrixInterface& A, EntryMatrix& E, int iq, double s) const;
00102 
00103   void HNAverage   (GlobalVector& x)       const { HNLow->Average(x); }
00104   void HNDistribute(GlobalVector& x)       const { HN->Distribute(x); }
00105   void HNZero      (GlobalVector& x)       const { HNLow->Zero(x); }
00106   bool HNZeroCheck (const GlobalVector& x) const { return HNLow->ZeroCheck(x); }
00107 };
00108 
00109 /*---------------------------------------------------*/
00110 /*---------------------------------------------------*/
00111 
00112 class DwrFemQ2Q12d : virtual public DwrFem2d
00113 {
00114  protected:
00115   void DiracRhsPoint(GlobalVector& f, const DiracRightHandSide& DRHS, const Vertex2d& p0, int i, double s) const;
00116 
00117  public:
00118   DwrFemQ2Q12d() : DwrFem2d() {}
00119   ~DwrFemQ2Q12d() {}
00120 
00121   void Form(GlobalVector& f, const GlobalVector& u, const Equation& EQ, double d) const;
00122   void AdjointForm(GlobalVector& f, const GlobalVector& u, const Equation& EQ, double d) const;
00123   void BoundaryForm(GlobalVector& f, const GlobalVector& u, const IntSet& Colors, const BoundaryEquation& BE, double d) const;
00124   void Rhs(GlobalVector& f, const DomainRightHandSide& RHS, double s) const;
00125   void BoundaryRhs(GlobalVector& f, const IntSet& Colors, const BoundaryRightHandSide& NRHS, double s) const;
00126  
00127   void MassMatrix(MatrixInterface& M) const;
00128   void MassForm(GlobalVector& f, const GlobalVector& u, const TimePattern& TP, double s) const;
00129 
00130   void LocalToGlobal(MatrixInterface& A, EntryMatrix& E, int iq, double s) const;
00131 
00132   void HNAverage   (GlobalVector& x)       const { HN->Average(x); }
00133   void HNDistribute(GlobalVector& x)       const { HNLow->Distribute(x); }
00134   void HNZero      (GlobalVector& x)       const { HN->Zero(x); }
00135   bool HNZeroCheck (const GlobalVector& x) const { return HN->ZeroCheck(x); }
00136 };
00137 
00138 /*---------------------------------------------------*/
00139 
00140 class DwrFemQ2Q13d : virtual public DwrFem3d
00141 {
00142  protected:
00143   void DiracRhsPoint(GlobalVector& f, const DiracRightHandSide& DRHS, const Vertex3d& p0, int i, double s) const;
00144 
00145  public:
00146   DwrFemQ2Q13d() : DwrFem3d() {}
00147   ~DwrFemQ2Q13d() {}
00148 
00149   void Form(GlobalVector& f, const GlobalVector& u, const Equation& EQ, double d) const;
00150   void AdjointForm(GlobalVector& f, const GlobalVector& u, const Equation& EQ, double d) const;
00151   void BoundaryForm(GlobalVector& f, const GlobalVector& u, const IntSet& Colors, const BoundaryEquation& BE, double d) const;
00152   void Rhs(GlobalVector& f, const DomainRightHandSide& RHS, double s) const;
00153   void BoundaryRhs(GlobalVector& f, const IntSet& Colors, const BoundaryRightHandSide& NRHS, double s) const;
00154   
00155   void MassMatrix(MatrixInterface& M) const;
00156   void MassForm(GlobalVector& f, const GlobalVector& u, const TimePattern& TP, double s) const;
00157 
00158   void LocalToGlobal(MatrixInterface& A, EntryMatrix& E, int iq, double s) const;
00159 
00160   void HNAverage   (GlobalVector& x)       const { HN->Average(x); }
00161   void HNDistribute(GlobalVector& x)       const { HNLow->Distribute(x); }
00162   void HNZero      (GlobalVector& x)       const { HN->Zero(x); }
00163   bool HNZeroCheck (const GlobalVector& x) const { return HN->ZeroCheck(x); }
00164 };
00165 }
00166 
00167 /*---------------------------------------------------*/
00168 
00169 #endif 

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