00001 #pragma once 00002 00003 #include "gfemQuadFast.h" 00004 #include "riesz.h" 00005 00006 namespace concepts { 00007 namespace gfem { 00008 00009 class GfemIdentityIgnore : public hp2D::Identity<Cmplx> 00010 { 00011 public: 00012 typedef concepts::RCP<const concepts::ElementFormula<Cmplx> > 00013 ElementFormulaRCP; 00014 00015 GfemIdentityIgnore(ElementFormulaRCP frm) 00016 : hp2D::Identity<Cmplx>(frm) 00017 { } 00018 00019 virtual GfemIdentityIgnore* clone() const { 00020 return new GfemIdentityIgnore(this->frm_); 00021 } 00022 00023 virtual void operator()( 00024 const concepts::Element<Real>& elmX, 00025 const concepts::Element<Real>& elmY, 00026 concepts::ElementMatrix<Cmplx>& em) 00027 { 00028 const hp2D::Quad<Real>* elmYH = dynamic_cast<const hp2D::Quad<Real>* >(&elmY); 00029 const hp2D::Quad<Real>* elmXH = dynamic_cast<const hp2D::Quad<Real>* >(&elmX); 00030 if (elmYH && elmXH) { 00031 hp2D::Identity<Cmplx>::operator()(*elmXH, *elmYH, em); 00032 return; 00033 } 00034 00035 // FIXME: this should not be necessary ... change concepts 00036 uint n = elmX.T().m(); 00037 uint m = elmX.T().m(); 00038 em.resize(n, m); 00039 em.zeros(); 00040 00041 // simply ignore all non-quad elements 00042 return; 00043 } 00044 00045 virtual ~GfemIdentityIgnore() {} 00046 }; 00047 00048 } // namespace 00049 } // namespace