dwrfemq2.h

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

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