Go to the documentation of this file.00001
00002
00003
00004 #ifndef hp2dbf_laplace_hh
00005 #define hp2dbf_laplace_hh
00006
00007 #include <memory>
00008 #include "basics/typedefs.hh"
00009 #include "basics/vectorsMatrices.hh"
00010 #include "toolbox/sharedPointer.hh"
00011 #include "geometry/sharedJacobian.hh"
00012 #include "operator/bilinearForm.hh"
00013 #include "hp2D/bilinearFormHelper.hh"
00014 #include "arrayElementFormula.hh"
00015
00016
00017 namespace concepts {
00018
00019 template<class F>
00020 class Array;
00021
00022 template<class F, int dim>
00023 class Point;
00024
00025 template<class F>
00026 class Element;
00027
00028 template<class F>
00029 class ElementMatrix;
00030
00031 template<typename F, typename G>
00032 class ElementFormula;
00033 }
00034
00035 namespace vectorial {
00036
00037 template<class F, class G>
00038 class BilinearForm;
00039 }
00040
00041 namespace hp2D {
00042
00043 template<class F>
00044 class Quad;
00045
00046 class InfiniteLaguerreQuad;
00047
00048 using concepts::Real;
00049
00050
00051
00052
00059 template<class F = Real, class G = typename concepts::Realtype<F>::type>
00060 class LaplaceBase : public BilinearFormHelper_1_1<F,G> {
00061 public:
00062 typedef typename concepts::Combtype<F,G>::type value_type;
00063
00067 LaplaceBase(const concepts::ElementFormulaContainer<F> frm, bool all = false);
00068
00069 LaplaceBase(const concepts::ElementFormulaContainer<concepts::Mapping<G,2> > frm
00070 , bool all = false);
00071 protected:
00073 bool all_;
00074
00075 bool assemble_(const Quad<Real>* elmX, const Quad<Real>* elmY,
00076 concepts::ElementMatrix<value_type>& em);
00077 };
00078
00079
00080
00081
00087 template<class F = Real>
00088 class Laplace : public concepts::BilinearForm<F>,
00089 public LaplaceBase<F> {
00090 public:
00094 Laplace(const concepts::ElementFormulaContainer<F>
00095 frm = concepts::ElementFormulaContainer<F>()
00096 , bool all = false);
00097
00098 virtual ~Laplace();
00099 virtual Laplace<F>* clone() const;
00100 virtual void operator()(const concepts::Element<Real>& elmX,
00101 const concepts::Element<Real>& elmY,
00102 concepts::ElementMatrix<F>& em);
00103 protected:
00104 virtual std::ostream& info(std::ostream& os) const;
00105 private:
00107 bool all_;
00108
00110 concepts::ElementMatrix<Real> stiff1D_, mass1D_;
00111
00112 bool assembleLaguerre_(const InfiniteLaguerreQuad* elmX,
00113 const InfiniteLaguerreQuad* elmY,
00114 concepts::ElementMatrix<F>& em);
00115 };
00116
00117
00118
00125 template<class F = Real>
00126 class LaplaceMatrix : public concepts::BilinearForm<F>,
00127 public LaplaceBase<Real,F> {
00128 public:
00129 typedef typename concepts::ElementFormulaContainer<concepts::Mapping<F,2> >
00130 FrmE_Matrix;
00131
00135 LaplaceMatrix(const FrmE_Matrix frm = FrmE_Matrix()
00136 , bool all = false);
00137 virtual ~LaplaceMatrix();
00138 virtual LaplaceMatrix<F>* clone() const;
00139 virtual void operator()(const concepts::Element<Real>& elmX,
00140 const concepts::Element<Real>& elmY,
00141 concepts::ElementMatrix<F>& em);
00142 protected:
00143 virtual std::ostream& info(std::ostream& os) const;
00144 };
00145
00146
00147
00152 template<class F>
00153 void setupLaplace
00154 (vectorial::BilinearForm<F, typename concepts::Realtype<F>::type>& bf,
00155 const concepts::ElementFormulaContainer<F,typename concepts::Realtype<F>::type>
00156 frm = concepts::ElementFormulaContainer<F,typename concepts::Realtype<F>::type>());
00157
00158
00159 }
00160
00161 #endif // hp2dbf_laplace_hh