00001 /* @file linearFormHelper.hh Helper classes for linear forms in hp2D 00002 */ 00003 00004 #ifndef hp2dlinearformhelper_hh 00005 #define hp2dlinearformhelper_hh 00006 00007 #include "formula/elementFormulaContainer.hh" 00008 00009 namespace concepts { 00010 00011 // forward declarations 00012 class SharedJacobianDet; 00013 00014 template<class F> 00015 class Array; 00016 00017 template<class F, int dim> 00018 class Point; 00019 } 00020 00021 namespace hp2D { 00022 00023 // forward declarations 00024 template<class F> 00025 class BaseQuad; 00026 00027 template<class F> 00028 class ArrayElementFormula; 00029 00030 using concepts::Real; 00031 00032 // *************************************************** LinearFormHelper_0 ** 00033 00048 template<class F> 00049 class LinearFormHelper_0 { 00050 public: 00051 LinearFormHelper_0 00052 (const concepts::ElementFormulaContainer<F> 00053 frm = concepts::ElementFormulaContainer<F>()); 00054 00055 virtual ~LinearFormHelper_0(); 00056 00058 void data(const concepts::RCP<concepts::SharedJacobianDet> d); 00060 concepts::RCP<concepts::SharedJacobianDet> data() const; 00061 protected: 00066 void computeIntermediate_(const BaseQuad<concepts::Real>& elm); 00067 00072 concepts::Array<F> intermediateValue_; 00073 00075 concepts::ElementFormulaContainer<F> frm_; 00077 concepts::RCP<concepts::SharedJacobianDet> sharedData_; 00078 }; 00079 00080 // **************************************************** LinearFormHelper_1 ** 00081 00098 template<class F> 00099 class LinearFormHelper_1 { 00100 public: 00101 LinearFormHelper_1(const concepts::ElementFormulaContainer<F> frm1, 00102 const concepts::ElementFormulaContainer<F> frm2); 00103 00104 LinearFormHelper_1 00105 (const concepts::ElementFormulaContainer<concepts::Point<F, 2> > frm); 00106 virtual ~LinearFormHelper_1(); 00107 protected: 00112 void computeIntermediate_(const BaseQuad<concepts::Real>& elm); 00117 ArrayElementFormula<concepts::Point<F,2> > intermediateVector_; 00119 concepts::ElementFormulaContainer<concepts::Point<F, 2> > frm_; 00120 }; 00121 00122 } // namespace hp2D 00123 00124 #endif // hp2dlinearformhelper_hh