From: Wolfgang Bangerth Date: Sat, 25 Jun 2016 06:25:44 +0000 (-0500) Subject: Make class compile with other vector types. X-Git-Tag: v8.5.0-rc1~946^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65657d43f2db352c9c793d110048f3e27a2c1bbb;p=dealii.git Make class compile with other vector types. --- diff --git a/include/deal.II/fe/mapping_fe_field.h b/include/deal.II/fe/mapping_fe_field.h index aae3975343..b0d94cb8a2 100644 --- a/include/deal.II/fe/mapping_fe_field.h +++ b/include/deal.II/fe/mapping_fe_field.h @@ -553,14 +553,14 @@ private: * Update internal degrees of freedom. */ void update_internal_dofs(const typename Triangulation::cell_iterator &cell, - const typename MappingFEField::InternalData &data) const; + const typename MappingFEField::InternalData &data) const; /** * See the documentation of the base class for detailed information. */ virtual void compute_shapes_virtual (const std::vector > &unit_points, - typename MappingFEField::InternalData &data) const; + typename MappingFEField::InternalData &data) const; /* * Which components to use for the mapping. diff --git a/source/fe/mapping_fe_field.cc b/source/fe/mapping_fe_field.cc index 7f7f2297c9..39d5b65def 100644 --- a/source/fe/mapping_fe_field.cc +++ b/source/fe/mapping_fe_field.cc @@ -22,6 +22,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -252,8 +256,8 @@ MappingFEField::preserves_vertex_locatio template void MappingFEField:: -compute_shapes_virtual (const std::vector > &unit_points, - typename MappingFEField::InternalData &data) const +compute_shapes_virtual (const std::vector > &unit_points, + typename MappingFEField::InternalData &data) const { const unsigned int n_points=unit_points.size(); @@ -518,10 +522,10 @@ namespace internal * have already been set), but only if the update_flags of the @p data * argument indicate so. */ - template + template void maybe_compute_q_points (const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField::InternalData &data, + const typename dealii::MappingFEField::InternalData &data, const FiniteElement &fe, const ComponentMask &fe_mask, const std::vector &fe_to_real, @@ -555,11 +559,11 @@ namespace internal * * Skip the computation if possible as indicated by the first argument. */ - template + template void maybe_update_Jacobians (const CellSimilarity::Similarity cell_similarity, const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField::InternalData &data, + const typename dealii::MappingFEField::InternalData &data, const FiniteElement &fe, const ComponentMask &fe_mask, const std::vector &fe_to_real) @@ -624,11 +628,11 @@ namespace internal * * Skip the computation if possible as indicated by the first argument. */ - template + template void maybe_update_jacobian_grads (const CellSimilarity::Similarity cell_similarity, const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField::InternalData &data, + const typename dealii::MappingFEField::InternalData &data, const FiniteElement &fe, const ComponentMask &fe_mask, const std::vector &fe_to_real, @@ -675,12 +679,12 @@ namespace internal * * Skip the computation if possible as indicated by the first argument. */ - template + template void maybe_update_jacobian_pushed_forward_grads ( const CellSimilarity::Similarity cell_similarity, const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField::InternalData &data, + const typename dealii::MappingFEField::InternalData &data, const FiniteElement &fe, const ComponentMask &fe_mask, const std::vector &fe_to_real, @@ -750,11 +754,11 @@ namespace internal * * Skip the computation if possible as indicated by the first argument. */ - template + template void maybe_update_jacobian_2nd_derivatives (const CellSimilarity::Similarity cell_similarity, const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField::InternalData &data, + const typename dealii::MappingFEField::InternalData &data, const FiniteElement &fe, const ComponentMask &fe_mask, const std::vector &fe_to_real, @@ -803,12 +807,12 @@ namespace internal * * Skip the computation if possible as indicated by the first argument. */ - template + template void maybe_update_jacobian_pushed_forward_2nd_derivatives ( const CellSimilarity::Similarity cell_similarity, const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField::InternalData &data, + const typename dealii::MappingFEField::InternalData &data, const FiniteElement &fe, const ComponentMask &fe_mask, const std::vector &fe_to_real, @@ -896,11 +900,11 @@ namespace internal * * Skip the computation if possible as indicated by the first argument. */ - template + template void maybe_update_jacobian_3rd_derivatives (const CellSimilarity::Similarity cell_similarity, const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField::InternalData &data, + const typename dealii::MappingFEField::InternalData &data, const FiniteElement &fe, const ComponentMask &fe_mask, const std::vector &fe_to_real, @@ -952,12 +956,12 @@ namespace internal * * Skip the computation if possible as indicated by the first argument. */ - template + template void maybe_update_jacobian_pushed_forward_3rd_derivatives ( const CellSimilarity::Similarity cell_similarity, const typename dealii::QProjector::DataSetDescriptor data_set, - const typename dealii::MappingFEField::InternalData &data, + const typename dealii::MappingFEField::InternalData &data, const FiniteElement &fe, const ComponentMask &fe_mask, const std::vector &fe_to_real, @@ -1067,14 +1071,14 @@ namespace internal * * The resulting data is put into the @p output_data argument. */ - template + template void - maybe_compute_face_data (const dealii::MappingFEField &mapping, + maybe_compute_face_data (const dealii::Mapping &mapping, const typename dealii::Triangulation::cell_iterator &cell, const unsigned int face_no, const unsigned int subface_no, const std::vector &weights, - const typename dealii::MappingFEField::InternalData &data, + const typename dealii::MappingFEField::InternalData &data, internal::FEValues::MappingRelatedData &output_data) { const UpdateFlags update_flags = data.update_each; @@ -1205,70 +1209,79 @@ namespace internal * 'data_set' to differentiate whether we will work on a face (and if so, * which one) or subface. */ - template + template void - do_fill_fe_face_values (const dealii::MappingFEField &mapping, + do_fill_fe_face_values (const dealii::Mapping &mapping, const typename dealii::Triangulation::cell_iterator &cell, const unsigned int face_no, const unsigned int subface_no, const typename dealii::QProjector::DataSetDescriptor data_set, const Quadrature &quadrature, - const typename dealii::MappingFEField::InternalData &data, + const typename dealii::MappingFEField::InternalData &data, const FiniteElement &fe, const ComponentMask &fe_mask, const std::vector &fe_to_real, internal::FEValues::MappingRelatedData &output_data) { - maybe_compute_q_points (data_set, - data, - fe, fe_mask, fe_to_real, - output_data.quadrature_points); - - maybe_update_Jacobians (CellSimilarity::none, - data_set, - data, - fe, fe_mask, fe_to_real); - - maybe_update_jacobian_grads (CellSimilarity::none, - data_set, - data, - fe, fe_mask, fe_to_real, - output_data.jacobian_grads); - - maybe_update_jacobian_pushed_forward_grads (CellSimilarity::none, - data_set, - data, - fe, fe_mask, fe_to_real, - output_data.jacobian_pushed_forward_grads); - - maybe_update_jacobian_2nd_derivatives (CellSimilarity::none, - data_set, - data, - fe, fe_mask, fe_to_real, - output_data.jacobian_2nd_derivatives); - - maybe_update_jacobian_pushed_forward_2nd_derivatives (CellSimilarity::none, - data_set, - data, - fe, fe_mask, fe_to_real, - output_data.jacobian_pushed_forward_2nd_derivatives); - - maybe_update_jacobian_3rd_derivatives (CellSimilarity::none, - data_set, - data, - fe, fe_mask, fe_to_real, - output_data.jacobian_3rd_derivatives); - - maybe_update_jacobian_pushed_forward_3rd_derivatives (CellSimilarity::none, - data_set, - data, - fe, fe_mask, fe_to_real, - output_data.jacobian_pushed_forward_3rd_derivatives); - - maybe_compute_face_data (mapping, - cell, face_no, subface_no, - quadrature.get_weights(), data, - output_data); + maybe_compute_q_points + (data_set, + data, + fe, fe_mask, fe_to_real, + output_data.quadrature_points); + + maybe_update_Jacobians + (CellSimilarity::none, + data_set, + data, + fe, fe_mask, fe_to_real); + + maybe_update_jacobian_grads + (CellSimilarity::none, + data_set, + data, + fe, fe_mask, fe_to_real, + output_data.jacobian_grads); + + maybe_update_jacobian_pushed_forward_grads + (CellSimilarity::none, + data_set, + data, + fe, fe_mask, fe_to_real, + output_data.jacobian_pushed_forward_grads); + + maybe_update_jacobian_2nd_derivatives + (CellSimilarity::none, + data_set, + data, + fe, fe_mask, fe_to_real, + output_data.jacobian_2nd_derivatives); + + maybe_update_jacobian_pushed_forward_2nd_derivatives + (CellSimilarity::none, + data_set, + data, + fe, fe_mask, fe_to_real, + output_data.jacobian_pushed_forward_2nd_derivatives); + + maybe_update_jacobian_3rd_derivatives + (CellSimilarity::none, + data_set, + data, + fe, fe_mask, fe_to_real, + output_data.jacobian_3rd_derivatives); + + maybe_update_jacobian_pushed_forward_3rd_derivatives + (CellSimilarity::none, + data_set, + data, + fe, fe_mask, fe_to_real, + output_data.jacobian_pushed_forward_3rd_derivatives); + + maybe_compute_face_data + (mapping, + cell, face_no, subface_no, + quadrature.get_weights(), data, + output_data); } } @@ -1299,13 +1312,15 @@ fill_fe_values (const typename Triangulation::cell_iterator &cell, update_internal_dofs(cell, data); - internal::maybe_compute_q_points(QProjector::DataSetDescriptor::cell (), - data, *fe, fe_mask, fe_to_real, - output_data.quadrature_points); + internal::maybe_compute_q_points + (QProjector::DataSetDescriptor::cell (), + data, *fe, fe_mask, fe_to_real, + output_data.quadrature_points); - internal::maybe_update_Jacobians(cell_similarity, - QProjector::DataSetDescriptor::cell (), - data, *fe, fe_mask, fe_to_real); + internal::maybe_update_Jacobians + (cell_similarity, + QProjector::DataSetDescriptor::cell (), + data, *fe, fe_mask, fe_to_real); const UpdateFlags update_flags = data.update_each; const std::vector &weights=quadrature.get_weights(); @@ -1406,41 +1421,47 @@ fill_fe_values (const typename Triangulation::cell_iterator &cell, } // calculate derivatives of the Jacobians - internal::maybe_update_jacobian_grads(cell_similarity, - QProjector::DataSetDescriptor::cell(), - data, *fe, fe_mask, fe_to_real, - output_data.jacobian_grads); + internal::maybe_update_jacobian_grads + (cell_similarity, + QProjector::DataSetDescriptor::cell(), + data, *fe, fe_mask, fe_to_real, + output_data.jacobian_grads); // calculate derivatives of the Jacobians pushed forward to real cell coordinates - internal::maybe_update_jacobian_pushed_forward_grads(cell_similarity, - QProjector::DataSetDescriptor::cell(), - data, *fe, fe_mask, fe_to_real, - output_data.jacobian_pushed_forward_grads); + internal::maybe_update_jacobian_pushed_forward_grads + (cell_similarity, + QProjector::DataSetDescriptor::cell(), + data, *fe, fe_mask, fe_to_real, + output_data.jacobian_pushed_forward_grads); // calculate hessians of the Jacobians - internal::maybe_update_jacobian_2nd_derivatives(cell_similarity, - QProjector::DataSetDescriptor::cell(), - data, *fe, fe_mask, fe_to_real, - output_data.jacobian_2nd_derivatives); + internal::maybe_update_jacobian_2nd_derivatives + (cell_similarity, + QProjector::DataSetDescriptor::cell(), + data, *fe, fe_mask, fe_to_real, + output_data.jacobian_2nd_derivatives); // calculate hessians of the Jacobians pushed forward to real cell coordinates - internal::maybe_update_jacobian_pushed_forward_2nd_derivatives(cell_similarity, - QProjector::DataSetDescriptor::cell(), - data, *fe, fe_mask, fe_to_real, - output_data.jacobian_pushed_forward_2nd_derivatives); + internal::maybe_update_jacobian_pushed_forward_2nd_derivatives + (cell_similarity, + QProjector::DataSetDescriptor::cell(), + data, *fe, fe_mask, fe_to_real, + output_data.jacobian_pushed_forward_2nd_derivatives); // calculate gradients of the hessians of the Jacobians - internal::maybe_update_jacobian_3rd_derivatives(cell_similarity, - QProjector::DataSetDescriptor::cell(), - data, *fe, fe_mask, fe_to_real, - output_data.jacobian_3rd_derivatives); + internal::maybe_update_jacobian_3rd_derivatives + (cell_similarity, + QProjector::DataSetDescriptor::cell(), + data, *fe, fe_mask, fe_to_real, + output_data.jacobian_3rd_derivatives); // calculate gradients of the hessians of the Jacobians pushed forward to real // cell coordinates - internal::maybe_update_jacobian_pushed_forward_3rd_derivatives(cell_similarity, - QProjector::DataSetDescriptor::cell(), - data, *fe, fe_mask, fe_to_real, - output_data.jacobian_pushed_forward_3rd_derivatives); + internal::maybe_update_jacobian_pushed_forward_3rd_derivatives + (cell_similarity, + QProjector::DataSetDescriptor::cell(), + data, *fe, fe_mask, fe_to_real, + output_data.jacobian_pushed_forward_3rd_derivatives); return updated_cell_similarity; } @@ -1464,18 +1485,19 @@ fill_fe_face_values (const typename Triangulation::cell_iterator & update_internal_dofs(cell, data); - internal::do_fill_fe_face_values (*this, - cell, face_no, numbers::invalid_unsigned_int, - QProjector::DataSetDescriptor:: - face (face_no, - cell->face_orientation(face_no), - cell->face_flip(face_no), - cell->face_rotation(face_no), - quadrature.size()), - quadrature, - data, - *fe, fe_mask, fe_to_real, - output_data); + internal::do_fill_fe_face_values + (*this, + cell, face_no, numbers::invalid_unsigned_int, + QProjector::DataSetDescriptor:: + face (face_no, + cell->face_orientation(face_no), + cell->face_flip(face_no), + cell->face_rotation(face_no), + quadrature.size()), + quadrature, + data, + *fe, fe_mask, fe_to_real, + output_data); } @@ -1497,19 +1519,20 @@ fill_fe_subface_values (const typename Triangulation::cell_iterato update_internal_dofs(cell, data); - internal::do_fill_fe_face_values (*this, - cell, face_no, numbers::invalid_unsigned_int, - QProjector::DataSetDescriptor:: - subface (face_no, subface_no, - cell->face_orientation(face_no), - cell->face_flip(face_no), - cell->face_rotation(face_no), - quadrature.size(), - cell->subface_case(face_no)), - quadrature, - data, - *fe, fe_mask, fe_to_real, - output_data); + internal::do_fill_fe_face_values + (*this, + cell, face_no, numbers::invalid_unsigned_int, + QProjector::DataSetDescriptor:: + subface (face_no, subface_no, + cell->face_orientation(face_no), + cell->face_flip(face_no), + cell->face_rotation(face_no), + quadrature.size(), + cell->subface_case(face_no)), + quadrature, + data, + *fe, fe_mask, fe_to_real, + output_data); } @@ -1947,7 +1970,7 @@ template void MappingFEField::update_internal_dofs (const typename Triangulation::cell_iterator &cell, - const typename MappingFEField::InternalData &data) const + const typename MappingFEField::InternalData &data) const { Assert(euler_dof_handler != 0, ExcMessage("euler_dof_handler is empty"));