From eb27c875c1a7f30aeb1b24733985d52eb67e7fb6 Mon Sep 17 00:00:00 2001 From: buerg Date: Tue, 22 Feb 2011 15:20:21 +0000 Subject: [PATCH] Exclude FESystem from checks. git-svn-id: https://svn.dealii.org/trunk@23416 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/numerics/vectors.templates.h | 97 +++++++++++++------ 1 file changed, 67 insertions(+), 30 deletions(-) diff --git a/deal.II/include/deal.II/numerics/vectors.templates.h b/deal.II/include/deal.II/numerics/vectors.templates.h index 5ba6cd452f..bf3e78eb84 100644 --- a/deal.II/include/deal.II/numerics/vectors.templates.h +++ b/deal.II/include/deal.II/numerics/vectors.templates.h @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -3404,13 +3405,19 @@ project_boundary_values_curl_conforming (const hp::DoFHandler& dof_handler, for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) if (cell->face (face)->boundary_indicator () == boundary_component) { - // this is only + // This is only // implemented, if the // FE is a Nedelec - // element - typedef FiniteElement FEL; - AssertThrow (dynamic_cast *> (&cell->get_fe ()) != 0, - typename FEL::ExcInterpolationNotImplemented ()); + // element. If the FE is + // a FESystem we cannot + // check this. + if (dynamic_cast*> (&cell->get_fe ()) == 0) + { + typedef FiniteElement FEL; + + AssertThrow (dynamic_cast*> (&cell->get_fe ()) != 0, + typename FEL::ExcInterpolationNotImplemented ()); + } const unsigned int dofs_per_face = cell->get_fe ().dofs_per_face; @@ -3476,13 +3483,19 @@ project_boundary_values_curl_conforming (const hp::DoFHandler& dof_handler, for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) if (cell->face (face)->boundary_indicator () == boundary_component) { - // this is only + // This is only // implemented, if the // FE is a Nedelec - // element - typedef FiniteElement FEL; - AssertThrow (dynamic_cast *> (&cell->get_fe ()) != 0, - typename FEL::ExcInterpolationNotImplemented ()); + // element. If the FE is + // a FESystem we cannot + // check this. + if (dynamic_cast*> (&cell->get_fe ()) == 0) + { + typedef FiniteElement FEL; + + AssertThrow (dynamic_cast*> (&cell->get_fe ()) != 0, + typename FEL::ExcInterpolationNotImplemented ()); + } const unsigned int superdegree = cell->get_fe ().degree; const unsigned int degree = superdegree - 1; @@ -3798,14 +3811,20 @@ VectorTools::project_boundary_values_div_conforming (const DoFHandler& dof_ for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) if (cell->face (face)->boundary_indicator () == boundary_component) { - // this is only + // This is only // implemented, if the // FE is a Raviart-Thomas - // element - typedef FiniteElement FEL; + // element. If the FE is + // a FESystem we cannot + // check this. + if (dynamic_cast*> (&cell->get_fe ()) == 0) + { + typedef FiniteElement FEL; + + AssertThrow (dynamic_cast*> (&cell->get_fe ()) != 0, + typename FEL::ExcInterpolationNotImplemented ()); + } - AssertThrow (dynamic_cast*> (&cell->get_fe ()) != 0, - typename FEL::ExcInterpolationNotImplemented ()); fe_values.reinit (cell, face + cell->active_fe_index () * GeometryInfo::faces_per_cell); @@ -3856,14 +3875,20 @@ VectorTools::project_boundary_values_div_conforming (const DoFHandler& dof_ for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) if (cell->face (face)->boundary_indicator () == boundary_component) { - // this is only + // This is only // implemented, if the // FE is a Raviart-Thomas - // element - typedef FiniteElement FEL; + // element. If the FE is + // a FESystem we cannot + // check this. + if (dynamic_cast*> (&cell->get_fe ()) == 0) + { + typedef FiniteElement FEL; + + AssertThrow (dynamic_cast*> (&cell->get_fe ()) != 0, + typename FEL::ExcInterpolationNotImplemented ()); + } - AssertThrow (dynamic_cast*> (&cell->get_fe ()) != 0, - typename FEL::ExcInterpolationNotImplemented ()); fe_values.reinit (cell, face + cell->active_fe_index () * GeometryInfo::faces_per_cell); @@ -3939,14 +3964,20 @@ VectorTools::project_boundary_values_div_conforming (const hp::DoFHandler& for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) if (cell->face (face)->boundary_indicator () == boundary_component) { - // this is only + // This is only // implemented, if the // FE is a Raviart-Thomas - // element - typedef FiniteElement FEL; + // element. If the FE is + // a FESystem we cannot + // check this. + if (dynamic_cast*> (&cell->get_fe ()) == 0) + { + typedef FiniteElement FEL; + + AssertThrow (dynamic_cast*> (&cell->get_fe ()) != 0, + typename FEL::ExcInterpolationNotImplemented ()); + } - AssertThrow (dynamic_cast*> (&cell->get_fe ()) != 0, - typename FEL::ExcInterpolationNotImplemented ()); fe_values.reinit (cell, face + cell->active_fe_index () * GeometryInfo::faces_per_cell); @@ -3980,14 +4011,20 @@ VectorTools::project_boundary_values_div_conforming (const hp::DoFHandler& for (unsigned int face = 0; face < GeometryInfo::faces_per_cell; ++face) if (cell->face (face)->boundary_indicator () == boundary_component) { - // this is only + // This is only // implemented, if the // FE is a Raviart-Thomas - // element - typedef FiniteElement FEL; + // element. If the FE is + // a FESystem we cannot + // check this. + if (dynamic_cast*> (&cell->get_fe ()) == 0) + { + typedef FiniteElement FEL; + + AssertThrow (dynamic_cast*> (&cell->get_fe ()) != 0, + typename FEL::ExcInterpolationNotImplemented ()); + } - AssertThrow (dynamic_cast*> (&cell->get_fe ()) != 0, - typename FEL::ExcInterpolationNotImplemented ()); fe_values.reinit (cell, face + cell->active_fe_index () * GeometryInfo::faces_per_cell); -- 2.39.5