From 29afeb6c442ce300bbb00d1bc9febce489d55745 Mon Sep 17 00:00:00 2001 From: wolf Date: Tue, 30 Sep 2003 16:14:36 +0000 Subject: [PATCH] Fix one problem. git-svn-id: https://svn.dealii.org/trunk@8074 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/fe/fe_nedelec.cc | 28 +++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/deal.II/deal.II/source/fe/fe_nedelec.cc b/deal.II/deal.II/source/fe/fe_nedelec.cc index 40b269c9d6..03a21ead75 100644 --- a/deal.II/deal.II/source/fe/fe_nedelec.cc +++ b/deal.II/deal.II/source/fe/fe_nedelec.cc @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -1096,7 +1097,9 @@ FE_Nedelec::fill_fe_values (const Mapping &mapping, } if (flags & update_second_derivatives) - this->compute_2nd (mapping, cell, 0, mapping_data, fe_data, data); + this->compute_2nd (mapping, cell, + internal::DataSetDescriptor::cell().offset(), + mapping_data, fe_data, data); } @@ -1120,7 +1123,10 @@ FE_Nedelec::fill_fe_face_values (const Mapping &mapp // offset determines which data set // to take (all data sets for all // faces are stored contiguously) - const unsigned int offset = face * quadrature.n_quadrature_points; + const unsigned int offset + = (internal::DataSetDescriptor:: + face (cell, face, + quadrature.n_quadrature_points)).offset(); // get the flags indicating the // fields that have to be filled @@ -1141,8 +1147,12 @@ FE_Nedelec::fill_fe_face_values (const Mapping &mapp // number of conversions if (flags & update_values) { + // check size of array. in 3d, + // we have faces oriented both + // ways Assert (fe_data.shape_values.n_cols() == - GeometryInfo::faces_per_cell * n_q_points, + GeometryInfo::faces_per_cell * n_q_points * + (dim == 3 ? 2 : 1), ExcInternalError()); std::vector > shape_values (n_q_points); @@ -1171,8 +1181,12 @@ FE_Nedelec::fill_fe_face_values (const Mapping &mapp if (flags & update_gradients) { + // check size of array. in 3d, + // we have faces oriented both + // ways Assert (fe_data.shape_gradients.n_cols() == - GeometryInfo::faces_per_cell * n_q_points, + GeometryInfo::faces_per_cell * n_q_points * + (dim == 3 ? 2 : 1), ExcInternalError()); std::vector > shape_grads1 (n_q_points); @@ -1259,8 +1273,10 @@ FE_Nedelec::fill_fe_subface_values (const Mapping &m // offset determines which data set // to take (all data sets for all // faces are stored contiguously) - const unsigned int offset = ((face * GeometryInfo::subfaces_per_face + subface) - * quadrature.n_quadrature_points); + const unsigned int offset + = (internal::DataSetDescriptor:: + sub_face (cell, face, subface, + quadrature.n_quadrature_points)).offset(); // get the flags indicating the // fields that have to be filled -- 2.39.5