Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

linDG2D/bilinearForm.hh
Go to the documentation of this file.
00001 // Bilinear forms for linear DG FEM in 2D
00002 
00003 #ifndef linDG2DbilinearForm_hh
00004 #define linDG2DbilinearForm_hh
00005 
00006 #include "basics/typedefs.hh"
00007 #include "operator/bilinearForm.hh"
00008 #include "geometry/boundaryConditions.hh"
00009 
00010 using concepts::Real;
00011 
00012 namespace linDG2D {
00013 
00014   // ************************************************************ IdentityBf **
00015 
00020   class IdentityBf : public concepts::BilinearForm<Real> {
00021   public:
00023     IdentityBf() {}
00025     virtual void operator()(const concepts::Element<Real>& elmV,
00026                             const concepts::Element<Real>& elmU,
00027                             concepts::ElementMatrix<Real>& em);
00028     virtual IdentityBf* clone() const { return new IdentityBf(); }
00029   };
00030 
00031   // ********************************************************** LaplaceVolBf **
00032 
00038   class LaplaceVolBf : public concepts::BilinearForm<Real> {
00039   public:
00041     LaplaceVolBf() {}
00043     virtual void operator()(const concepts::Element<Real>& elmV,
00044                             const concepts::Element<Real>& elmU,
00045                             concepts::ElementMatrix<Real>& em);
00046     virtual LaplaceVolBf* clone() const { return new LaplaceVolBf(); }
00047   };
00048 
00049   // ********************************************************* LaplaceFluxBf **
00050 
00056   class LaplaceFluxBf : public concepts::BilinearForm<Real> {
00057   public:
00061     LaplaceFluxBf(const concepts::BoundaryConditions* bc) 
00062       : bc_(bc) {}
00064     virtual void operator()(const concepts::Element<Real>& elmV,
00065                             const concepts::Element<Real>& elmU,
00066                             concepts::ElementMatrix<Real>& em) {
00067       conceptsAssert(false, concepts::Assertion());
00068     }
00070     virtual void operator()(const concepts::Element<Real>& elmV,
00071                             const concepts::Element<Real>& elmU,
00072                             concepts::ElementMatrix<Real>& em,
00073                             const concepts::ElementPair<Real>& ep);
00074     virtual LaplaceFluxBf* clone() const { return new LaplaceFluxBf(bc_); }
00075   private:
00077     const concepts::BoundaryConditions* bc_;
00078   };
00079 
00080   // ********************************************************* LaplaceStabBf **
00081 
00087   class LaplaceStabBf : public concepts::BilinearForm<Real> {
00088   public:
00093     LaplaceStabBf(Real omega, const concepts::BoundaryConditions* bc)
00094       : omega_(omega), bc_(bc) {}
00096     virtual void operator()(const concepts::Element<Real>& elmV,
00097                             const concepts::Element<Real>& elmU,
00098                             concepts::ElementMatrix<Real>& em) {
00099       conceptsAssert(false, concepts::Assertion());
00100     }
00102     virtual void operator()(const concepts::Element<Real>& elmV,
00103                             const concepts::Element<Real>& elmU,
00104                             concepts::ElementMatrix<Real>& em,
00105                             const concepts::ElementPair<Real>& ep);
00106     virtual LaplaceStabBf* clone() const {
00107       return new LaplaceStabBf(omega_, bc_); }
00108   private:
00110     const Real omega_;
00112     const concepts::BoundaryConditions* bc_;
00113   };
00114 
00115 } // namespace linDG2D
00116 
00117 #endif // linDG2DbilinearForm_hh

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)