From: Wolfgang Bangerth Date: Thu, 23 Feb 2006 21:48:18 +0000 (+0000) Subject: Fix crash_04 by avoiding the use of wicked SelectFEValues objects. X-Git-Tag: v8.0.0~12197 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77957940e129dff18553e9069efa317cb26c3730;p=dealii.git Fix crash_04 by avoiding the use of wicked SelectFEValues objects. git-svn-id: https://svn.dealii.org/trunk@12485 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/numerics/derivative_approximation.cc b/deal.II/deal.II/source/numerics/derivative_approximation.cc index c516101546..68322ea795 100644 --- a/deal.II/deal.II/source/numerics/derivative_approximation.cc +++ b/deal.II/deal.II/source/numerics/derivative_approximation.cc @@ -27,6 +27,9 @@ #include #include #include +#include +#include +#include #include #include @@ -537,11 +540,22 @@ DerivativeApproximation::approximate (const Mapping &mapping, Vector &derivative_norm) { QMidpoint midpoint_rule; - typename SelectFEValues >::FEValues - x_fe_midpoint_value (mapping, dof_handler.get_fe(), - midpoint_rule, - UpdateFlags(DerivativeDescription::update_flags | - update_q_points)); + + // create collection objects from + // single quadratures, mappings, + // and finite elements. if we have + // an hp DoFHandler, + // dof_handler.get_fe() returns a + // collection of which we do a + // shallow copy instead + const hp::QCollection q_collection (midpoint_rule); + const hp::FECollection fe_collection(dof_handler.get_fe()); + const hp::MappingCollection mapping_collection (mapping); + + hp::FEValues x_fe_midpoint_value (mapping_collection, fe_collection, + q_collection, + DerivativeDescription::update_flags | + update_q_points); // matrix Y=sum_i y_i y_i^T Tensor<2,dim> Y;