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

hp2D/bf_advection.hh
Go to the documentation of this file.
00001 
00004 #ifndef hp2dbf_advection_hh
00005 #define hp2dbf_advection_hh
00006 
00007 #include <memory>
00008 #include "operator/bilinearForm.hh"
00009 #include "basics/typedefs.hh"
00010 #include "geometry/sharedJacobian.hh"
00011 #include "hp2D/bilinearFormHelper.hh"
00012 #include "arrayElementFormula.hh"
00013 
00014 
00015 namespace concepts {
00016   // forward declarations
00017   template<class F>
00018   class Array;
00019 
00020   template<class F, int dim>
00021   class Point;
00022 
00023   template<class F>
00024   class Element;
00025 
00026   template<class F>
00027   class ElementMatrix;
00028 
00029   template<typename F, typename G>
00030   class ElementFormula;
00031 }
00032 
00033 namespace hp2D {
00034   // forward declarations
00035   template<class F>
00036   class Quad;
00037 
00038   class InfiniteLaguerreQuad;
00039 
00040   using concepts::Real;
00041 
00042 
00043   // ************************************************************* Advection **
00044 
00061   template<class F = Real>
00062   class Advection : public concepts::BilinearForm<F,Real>,
00063                     public hp2D::BilinearFormHelper_0_1<F> 
00064   {
00065   public:
00066     Advection(const concepts::ElementFormulaContainer<F> frm1,
00067               const concepts::ElementFormulaContainer<F> frm2, bool all=false) 
00068       : hp2D::BilinearFormHelper_0_1<F>(frm1, frm2)
00069       , all(all) 
00070     {}
00071 
00072     Advection(const concepts::ElementFormulaContainer<concepts::Point<F, 2> > frm
00073               , bool all=false) 
00074       : hp2D::BilinearFormHelper_0_1<F>(frm)
00075       , all(all) 
00076     {}
00077 
00078 //     Advection(const concepts::ElementFormula<concepts::Point<F,2> >& frm
00079 //               , bool all=false) 
00080 //       : hp2D::BilinearFormHelper_0_1<F>(concepts::makeRCP_weak(&frm))
00081 //       , all(all) 
00082 //     {}
00083 
00084     virtual ~Advection() {}
00085 
00086     virtual Advection<F>* clone() const { 
00087       return new Advection<F>(this->frm_, all);
00088     }
00089 
00090     virtual void operator()(const concepts::Element<Real>& elmX,
00091                             const concepts::Element<Real>& elmY, 
00092                             concepts::ElementMatrix<F>& em); 
00093 
00094   protected:
00095     virtual std::ostream& info(std::ostream& os) const;
00096   private:
00097     bool all;
00098 
00100     bool operator()(const Quad<Real>* elmX, 
00101                     const Quad<Real>* elmY, 
00102                     concepts::ElementMatrix<F>& em);
00104     bool operator()(const InfiniteLaguerreQuad* elmX,
00105                     const InfiniteLaguerreQuad* elmY, 
00106                     concepts::ElementMatrix<F>& em);
00107   };
00108 
00109 
00110 } // namespace hp2D
00111 
00112 #endif // hp2dbf_advection_hh

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