Go to the documentation of this file.00001
00002
00003
00004 #ifndef hp2dbilinearformhelper_hh
00005 #define hp2dbilinearformhelper_hh
00006
00007 #include "linearFormHelper.hh"
00008
00009 namespace concepts {
00010
00011
00012 class SharedJacobianDet;
00013
00014 template<class F>
00015 class Array;
00016
00017 template<class F, class G>
00018 class ElementFormula;
00019
00020 template<class F, int dim>
00021 class Point;
00022 }
00023
00024 namespace hp2D {
00025
00026
00027 template<class F>
00028 class BaseQuad;
00029
00030 template<class F>
00031 class ArrayElementFormula;
00032
00033 using concepts::Real;
00034
00035
00036
00043 template<class F>
00044 class BilinearFormHelper_0_0 : public LinearFormHelper_0<F> {
00045 public:
00046 BilinearFormHelper_0_0
00047 (const concepts::ElementFormulaContainer<F>
00048 frm = concepts::ElementFormulaContainer<F>())
00049 : LinearFormHelper_0<F>(frm) {}
00050
00051 const concepts::ElementFormulaContainer<F> formula() const {
00052 return this->frm_; }
00053 };
00054
00055
00056
00072 template<class F>
00073 class BilinearFormHelper_0_1 : public LinearFormHelper_1<F> {
00074 public:
00075 BilinearFormHelper_0_1(const concepts::ElementFormulaContainer<F> frm1,
00076 const concepts::ElementFormulaContainer<F> frm2)
00077 : LinearFormHelper_1<F>(frm1, frm2) {}
00078
00079 BilinearFormHelper_0_1
00080 (const concepts::ElementFormulaContainer<concepts::Point<F,2> >& frm)
00081 : LinearFormHelper_1<F>(frm) {}
00082 };
00083
00084
00085
00100 template<class F>
00101 class BilinearFormHelper_0_1_Part {
00102 public:
00103 BilinearFormHelper_0_1_Part(const concepts::ElementFormulaContainer<F> frm);
00104
00105 virtual ~BilinearFormHelper_0_1_Part();
00106
00108 void data(const concepts::RCP<concepts::SharedJacobianAdj<2> > d);
00110 concepts::RCP<concepts::SharedJacobianAdj<2> > data() const;
00111 protected:
00119 void computeIntermediate_(const BaseQuad<concepts::Real>& elm, const int i);
00124 ArrayElementFormula<concepts::Point<F,2> > intermediateVector_;
00126 concepts::ElementFormulaContainer<F> frm_;
00127
00129 concepts::RCP<concepts::SharedJacobianAdj<2> > sharedData_;
00130 };
00131
00132
00133
00162 template<class F, class G = typename concepts::Realtype<F>::type>
00163 class BilinearFormHelper_1_1 {
00164 public:
00166 BilinearFormHelper_1_1(const concepts::ElementFormulaContainer<F> frm);
00168 BilinearFormHelper_1_1
00169 (const concepts::ElementFormulaContainer<concepts::Mapping<G,2> > frmM);
00170
00172 virtual ~BilinearFormHelper_1_1();
00173
00175 void data(const concepts::RCP<concepts::SharedJacobianAdj<2> > d);
00177 concepts::RCP<concepts::SharedJacobianAdj<2> > data() const;
00178 protected:
00192 void computeIntermediate_(const BaseQuad<Real>& elm,
00193 const int i = -1, const int j = -1);
00202 concepts::Array<F> intermediateValue_;
00214 concepts::Array<concepts::Mapping<G,2> > intermediateMatrix_;
00216 concepts::ElementFormulaContainer<F> frm_;
00218 concepts::ElementFormulaContainer<concepts::Mapping<G,2> > frmM_;
00219 private:
00223 void computeJacobianMatrix_(const BaseQuad<Real>& elm,
00224 concepts::Array<concepts::Mapping<Real,2> >& J,
00225 concepts::Array<Real>& detJ_inv);
00230 void computeadjJ_adjJT_rank1_
00231 (concepts::Array<concepts::Mapping<Real,2> >& intermediateMatrix,
00232 const int i, const int j);
00233
00235 concepts::RCP<concepts::SharedJacobianAdj<2> > sharedData_;
00236 };
00237
00238
00239
00248 template<class F>
00249 class BilinearFormHelper_2_2 {
00250 public:
00251 BilinearFormHelper_2_2(const concepts::ElementFormulaContainer<F>
00252 frm = concepts::ElementFormulaContainer<F>());
00253 virtual ~BilinearFormHelper_2_2();
00254 protected:
00256 void computeIntermediate_(const BaseQuad<Real>& elm);
00261 concepts::Array<F> intermediateValue_;
00263 concepts::ElementFormulaContainer<F> frm_;
00264 };
00265
00266 }
00267
00268 #endif // hp2dbilinearformhelper_hh