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

linDG3D/linearForm.hh
Go to the documentation of this file.
00001 /* Class for DG linear forms
00002  */
00003 
00004 #ifndef dgLinearForms_hh
00005 #define dgLinearForms_hh
00006 
00007 #include "basics/typedefs.hh"
00008 #include "formula/formula.hh"
00009 #include "formula/boundary.hh"
00010 #include "geometry/boundaryConditions.hh"
00011 #include "timestepping/vectors.hh"
00012 #include "element.hh"
00013 
00014 #include <vector>
00015 
00016 #define DEBUG_FILLDATA 0
00017 
00018 namespace linDG3D {
00019   using concepts::Real;
00020 
00021   // ************************************************************** ConstRhs **
00022 
00028   class ConstRhs : public timestepping::TimeLinearForm {
00029   public:
00030     ConstRhs(Real c = 1.0) : c_(c) {}
00036     virtual void operator()(const concepts::Element<Real>& elm,
00037                             concepts::ElementMatrix<Real>& em);
00042     void operator()(const FvdgElement& elm,
00043                     concepts::ElementMatrix<Real>& em);
00044   private:
00045     Real c_;
00046   };
00047 
00048   // *********************************************************** FvdgTimeRhs **
00050   class FvdgTimeRhs : public timestepping::TimeLinearForm {
00051   public:
00056     FvdgTimeRhs(concepts::Formula<Real>& frm) :
00057       timestepping::TimeLinearForm(),
00058       frm_(frm) {}
00063     void operator() (const concepts::Element<Real> &elmBase,
00064                      concepts::ElementMatrix<Real> &em);
00065   private:
00066     const concepts::Formula<Real>& frm_;
00067   };
00068 
00069   //******************************************************** FvdgTimeRhsDiff **
00071   class FvdgTimeRhsDiff : public timestepping::TimeLinearForm {
00072   public:
00080     FvdgTimeRhsDiff(concepts::Formula<Real>& frm, Real eps,
00081                     concepts::BoundaryConditions* bc, bool symm = false) :
00082       timestepping::TimeLinearForm(), frm_(frm), eps_(eps), bc_(bc) {
00083         symm_ = symm ? -1 : 1;
00084       }
00089     void operator() (const concepts::Element<Real> &elmBase,
00090                      concepts::ElementMatrix<Real> &em);
00091   private:
00092     const concepts::Formula<Real>& frm_;
00093     const Real eps_;
00094     const concepts::BoundaryConditions* bc_;
00095     int symm_;
00096     };
00097 
00098 } // namespace linDG3D
00099 
00100 #endif //dgLinearForms_hh

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