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

hp2D/linearForm.hh
Go to the documentation of this file.
00001 /* Linear forms for hp 2D FEM
00002  */
00003 
00004 #ifndef hp2dlinearform_hh
00005 #define hp2dlinearform_hh
00006 
00007 #include <memory>
00008 #include "basics/typedefs.hh"
00009 #include "function/linearForm.hh"
00010 #include "linearFormHelper.hh"
00011 #include "arrayElementFormula.hh"
00012 
00013 namespace concepts {
00014   // forward declarations
00015   template<class F>
00016   class Formula;
00017 
00018   template<class F, int dim>
00019   class Point;
00020 
00021   class BoundaryConditions;
00022 
00023   template<class F>
00024   class Element;
00025 
00026   template<class F>
00027   class ElementMatrix;
00028 
00029   template<class F>
00030   class Array;
00031 }
00032 
00033 namespace hp2D {
00034   // forward declarations
00035   template<class F>
00036   class Quad;
00037 
00038   using concepts::Real;
00039 
00040 
00041   // ***************************************************************** Riesz **
00042 
00051   template<class F = Real>
00052   class Riesz : public concepts::LinearForm<F>, public LinearFormHelper_0<F> {
00053   public:
00059     Riesz(const concepts::ElementFormulaContainer<F> frm,
00060           concepts::BoundaryConditions* bc = 0,
00061           bool ignoreMissingElem = false);
00062     virtual ~Riesz();
00063 
00071     void operator()(const concepts::Element<Real>& elm,
00072                     concepts::ElementMatrix<F>& em);
00073   protected:
00074     virtual std::ostream& info(std::ostream& os) const;
00075   private:
00077     concepts::Array<Real> jacobian_;
00078 
00079     void operator()(const Quad<Real>& elm, concepts::ElementMatrix<F>& em);
00080 
00083     concepts::BoundaryConditions* bc_;
00084     bool ignoreMissingElem;
00085   };
00086 
00087 
00088   // ******************************************************** GradLinearForm **
00089 
00099   template<class F = concepts::Real>
00100   class GradLinearForm : public concepts::LinearForm<F>,
00101                          public LinearFormHelper_1<F> {
00102   public:
00107     GradLinearForm(const concepts::ElementFormulaContainer<F> frm1,
00108                    const concepts::ElementFormulaContainer<F> frm2,
00109                    bool ignoreMissingElem = false);
00115     GradLinearForm
00116     (const concepts::ElementFormulaContainer<concepts::Point<F, 2> > frm,
00117      bool ignoreMissingElem = false);
00118 
00125     virtual void operator()(const concepts::Element<Real>& elm,
00126                             concepts::ElementMatrix<F>& em);
00127   protected:
00128     virtual std::ostream& info(std::ostream& os) const;
00129   private:
00130     virtual void operator()(const Quad<Real>& elm,
00131                             concepts::ElementMatrix<F>& em);
00132 
00133     bool ignoreMissingElem_;
00134   };
00135 
00136 
00137   // ****************************************************** PlCurlLinearForm **
00138 
00148   template<class F>
00149   class PlCurlLinearForm : public GradLinearForm<F> {
00150   public:
00156     PlCurlLinearForm(const concepts::ElementFormulaContainer<F> frm1,
00157                      const concepts::ElementFormulaContainer<F> frm2);
00162     PlCurlLinearForm
00163     (const concepts::ElementFormulaContainer<concepts::Point<F,2> > frm);
00164   protected:
00165     virtual std::ostream& info(std::ostream& os) const;
00166   };
00167 
00168 
00169 } // namespace hp2D
00170 
00171 #endif // hp2dlinearform_hh

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