00001 /* hp extension for 3D FEM: ie. determine wether to refine or raise p 00002 * in an element 00003 */ 00004 00005 #ifndef hpExtension3D_hh 00006 #define hpExtension3D_hh 00007 00008 #include "basics/typedefs.hh" 00009 #include "basics/exceptions.hh" 00010 #include "space/postProcess.hh" 00011 00012 namespace concepts { 00013 // forward declaration 00014 template<typename F> 00015 class Vector; 00016 00017 template<typename F> 00018 class Array; 00019 } 00020 00021 namespace hp3D { 00022 using concepts::Real; 00023 00024 // ******************************************************** RefineOrRaise ** 00025 00037 template<typename F, typename G = typename concepts::Realtype<F>::type> 00038 class RefineOrRaise : public concepts::CellPostprocess<F> { 00039 public: 00045 RefineOrRaise(const concepts::Vector<F>& solution, const Real theta, 00046 concepts::AdaptiveSpace<G, 00047 concepts::AdaptiveAdjustP<3> >& spc); 00048 virtual void operator() (const concepts::Element<F>& elm) 00049 throw(concepts::MissingFeature); 00050 virtual void operator() (const concepts::Cell& cell) 00051 throw(concepts::MissingFeature) {} 00052 private: 00054 concepts::Array<F> coeff_; 00056 concepts::Array<F> legendre_; 00058 concepts::Array<F> regr_; 00060 const concepts::Vector<F>& solution_; 00062 concepts::AdaptiveSpace<G, concepts::AdaptiveAdjustP<3> >& spc_; 00064 const Real theta_; 00069 Real transCoeff_(const uint i, const uint j) const; 00081 bool regression_(concepts::Array<F>& coeff, const uint p) const; 00082 }; 00083 00084 } // namespace hp3D 00085 00086 #endif // hpExtension3D_hh