From dceced15c8ee6b507b697f48913abe8be2299578 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 2 Sep 2015 09:59:33 -0500 Subject: [PATCH] Reorder the arguments to Mapping::transform(). --- include/deal.II/fe/fe_poly.templates.h | 55 ++++++--- include/deal.II/fe/mapping.h | 30 ++--- include/deal.II/fe/mapping_cartesian.h | 36 +++--- include/deal.II/fe/mapping_fe_field.h | 32 ++--- include/deal.II/fe/mapping_q.h | 26 ++-- include/deal.II/fe/mapping_q1.h | 32 ++--- source/fe/fe.cc | 2 +- source/fe/fe_poly.cc | 56 +++++---- source/fe/fe_poly_tensor.cc | 160 ++++++++++++++++--------- source/fe/fe_values.cc | 2 +- source/fe/mapping_cartesian.cc | 50 ++++---- source/fe/mapping_fe_field.cc | 79 ++++++------ source/fe/mapping_q.cc | 36 +++--- source/fe/mapping_q1.cc | 92 +++++++------- 14 files changed, 388 insertions(+), 300 deletions(-) diff --git a/include/deal.II/fe/fe_poly.templates.h b/include/deal.II/fe/fe_poly.templates.h index a9ac62087a..6050446263 100644 --- a/include/deal.II/fe/fe_poly.templates.h +++ b/include/deal.II/fe/fe_poly.templates.h @@ -244,9 +244,10 @@ fill_fe_values (const Mapping &ma output_data.shape_values(k,i) = fe_data.shape_values[k][i]; if (flags & update_gradients && cell_similarity != CellSimilarity::translation) - mapping.transform(fe_data.shape_gradients[k], - output_data.shape_gradients[k], - mapping_internal, mapping_covariant); + mapping.transform (fe_data.shape_gradients[k], + mapping_covariant, + mapping_internal, + output_data.shape_gradients[k]); if (flags & update_hessians && cell_similarity != CellSimilarity::translation) { @@ -259,9 +260,10 @@ fill_fe_values (const Mapping &ma correct_untransformed_hessians (fe_data.untransformed_shape_hessians, mapping_data, output_data, quadrature.size(), k); - mapping.transform(fe_data.untransformed_shape_hessians, - output_data.shape_hessians[k], - mapping_internal, mapping_covariant_gradient); + mapping.transform (fe_data.untransformed_shape_hessians, + mapping_covariant_gradient, + mapping_internal, + output_data.shape_hessians[k]); } } } @@ -307,9 +309,10 @@ fill_fe_face_values (const Mapping output_data.shape_values(k,i) = fe_data.shape_values[k][i+offset]; if (flags & update_gradients) - mapping.transform(make_slice(fe_data.shape_gradients[k], offset, quadrature.size()), - output_data.shape_gradients[k], - mapping_internal, mapping_covariant); + mapping.transform (make_slice(fe_data.shape_gradients[k], offset, quadrature.size()), + mapping_covariant, + mapping_internal, + output_data.shape_gradients[k]); if (flags & update_hessians) { @@ -323,8 +326,12 @@ fill_fe_face_values (const Mapping ( fe_data.untransformed_shape_hessians, offset , quadrature.size()), mapping_data, output_data, quadrature.size(), k); - mapping.transform(make_slice(fe_data.untransformed_shape_hessians, offset, quadrature.size()), - output_data.shape_hessians[k], mapping_internal, mapping_covariant_gradient); + mapping.transform (make_slice(fe_data.untransformed_shape_hessians, + offset, + quadrature.size()), + mapping_covariant_gradient, + mapping_internal, + output_data.shape_hessians[k]); } } } @@ -370,9 +377,10 @@ fill_fe_subface_values (const Mapping output_data.shape_values(k,i) = fe_data.shape_values[k][i+offset]; if (flags & update_gradients) - mapping.transform(make_slice(fe_data.shape_gradients[k], offset, quadrature.size()), - output_data.shape_gradients[k], - mapping_internal, mapping_covariant); + mapping.transform (make_slice(fe_data.shape_gradients[k], offset, quadrature.size()), + mapping_covariant, + mapping_internal, + output_data.shape_gradients[k]); if (flags & update_hessians) { @@ -383,11 +391,20 @@ fill_fe_subface_values (const Mapping } correct_untransformed_hessians(VectorSlice< std::vector > > - ( fe_data.untransformed_shape_hessians, offset , quadrature.size()), - mapping_data, output_data, quadrature.size(), k); - - mapping.transform(make_slice(fe_data.untransformed_shape_hessians, offset, quadrature.size()), - output_data.shape_hessians[k], mapping_internal, mapping_covariant_gradient); + (fe_data.untransformed_shape_hessians, + offset, + quadrature.size()), + mapping_data, + output_data, + quadrature.size(), + k); + + mapping.transform (make_slice(fe_data.untransformed_shape_hessians, + offset, + quadrature.size()), + mapping_covariant_gradient, + mapping_internal, + output_data.shape_hessians[k]); } } } diff --git a/include/deal.II/fe/mapping.h b/include/deal.II/fe/mapping.h index 96403dbf47..6e7eefce2d 100644 --- a/include/deal.II/fe/mapping.h +++ b/include/deal.II/fe/mapping.h @@ -910,10 +910,10 @@ public: */ virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, + transform (const VectorSlice > > input, + const MappingType type, const typename Mapping::InternalDataBase &internal, - const MappingType type) const = 0; + VectorSlice > > output) const = 0; @@ -949,9 +949,9 @@ public: virtual void transform (const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &internal, - const MappingType type) const = 0; + const MappingType type, + const typename Mapping::InternalDataBase &internal, + VectorSlice > > output) const = 0; /** @@ -992,10 +992,10 @@ public: */ virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, + transform (const VectorSlice > > input, + const MappingType type, const typename Mapping::InternalDataBase &internal, - const MappingType type) const = 0; + VectorSlice > > output) const = 0; /** * Transform a tensor field from the reference cell to the physical cell. @@ -1023,9 +1023,9 @@ public: virtual void transform (const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &internal, - const MappingType type) const = 0; + const MappingType type, + const typename Mapping::InternalDataBase &internal, + VectorSlice > > output) const = 0; /** * Transform a field of 3-differential forms from the reference cell to the @@ -1062,10 +1062,10 @@ public: */ virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, + transform (const VectorSlice > > input, + const MappingType type, const typename Mapping::InternalDataBase &internal, - const MappingType type) const = 0; + VectorSlice > > output) const = 0; /** * @} diff --git a/include/deal.II/fe/mapping_cartesian.h b/include/deal.II/fe/mapping_cartesian.h index f830b9e001..fba4ce74bd 100644 --- a/include/deal.II/fe/mapping_cartesian.h +++ b/include/deal.II/fe/mapping_cartesian.h @@ -92,42 +92,44 @@ public: */ // for documentation, see the Mapping base class - virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, + virtual + void + transform (const VectorSlice > > input, + const MappingType type, const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + VectorSlice > > output) const; // for documentation, see the Mapping base class - virtual void + virtual + void transform (const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + const MappingType type, + const typename Mapping::InternalDataBase &internal, + VectorSlice > > output) const; // for documentation, see the Mapping base class virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, + transform (const VectorSlice > > input, + const MappingType type, const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + VectorSlice > > output) const; // for documentation, see the Mapping base class virtual void transform (const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + const MappingType type, + const typename Mapping::InternalDataBase &internal, + VectorSlice > > output) const; // for documentation, see the Mapping base class virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, + transform (const VectorSlice > > input, + const MappingType type, const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + VectorSlice > > output) const; /** * @} diff --git a/include/deal.II/fe/mapping_fe_field.h b/include/deal.II/fe/mapping_fe_field.h index 6f2b106c5a..8983d1e33d 100644 --- a/include/deal.II/fe/mapping_fe_field.h +++ b/include/deal.II/fe/mapping_fe_field.h @@ -160,42 +160,42 @@ public: // for documentation, see the Mapping base class virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, + transform (const VectorSlice > > input, + const MappingType type, const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + VectorSlice > > output) const; // for documentation, see the Mapping base class virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + transform (const VectorSlice > > input, + const MappingType type, + const typename Mapping::InternalDataBase &internal, + VectorSlice > > output) const; // for documentation, see the Mapping base class virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, + transform (const VectorSlice > > input, + const MappingType type, const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + VectorSlice > > output) const; // for documentation, see the Mapping base class virtual void transform (const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + const MappingType type, + const typename Mapping::InternalDataBase &internal, + VectorSlice > > output) const; // for documentation, see the Mapping base class virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, + transform (const VectorSlice > > input, + const MappingType type, const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + VectorSlice > > output) const; /** * @} diff --git a/include/deal.II/fe/mapping_q.h b/include/deal.II/fe/mapping_q.h index a02259e448..35252a8a48 100644 --- a/include/deal.II/fe/mapping_q.h +++ b/include/deal.II/fe/mapping_q.h @@ -118,24 +118,26 @@ public: const typename Triangulation::cell_iterator &cell, const Point &p) const; - virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, + virtual + void + transform (const VectorSlice > > input, + const MappingType type, const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + VectorSlice > > output) const; - virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + virtual + void + transform (const VectorSlice > > input, + const MappingType type, + const typename Mapping::InternalDataBase &internal, + VectorSlice > > output) const; virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, + transform (const VectorSlice > > input, + const MappingType type, const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + VectorSlice > > output) const; /** * Return the degree of the mapping, i.e. the value which was passed to the diff --git a/include/deal.II/fe/mapping_q1.h b/include/deal.II/fe/mapping_q1.h index e09340b9ef..1b4c05bc77 100644 --- a/include/deal.II/fe/mapping_q1.h +++ b/include/deal.II/fe/mapping_q1.h @@ -98,42 +98,42 @@ public: // for documentation, see the Mapping base class virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, + transform (const VectorSlice > > input, + const MappingType type, const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + VectorSlice > > output) const; // for documentation, see the Mapping base class virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + transform (const VectorSlice > > input, + const MappingType type, + const typename Mapping::InternalDataBase &internal, + VectorSlice > > output) const; // for documentation, see the Mapping base class virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, + transform (const VectorSlice > > input, + const MappingType type, const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + VectorSlice > > output) const; // for documentation, see the Mapping base class virtual void transform (const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + const MappingType type, + const typename Mapping::InternalDataBase &internal, + VectorSlice > > output) const; // for documentation, see the Mapping base class virtual void - transform (const VectorSlice > > input, - VectorSlice > > output, + transform (const VectorSlice > > input, + const MappingType type, const typename Mapping::InternalDataBase &internal, - const MappingType type) const; + VectorSlice > > output) const; /** * @} diff --git a/source/fe/fe.cc b/source/fe/fe.cc index 4d0c5cdd2f..28d06a68f6 100644 --- a/source/fe/fe.cc +++ b/source/fe/fe.cc @@ -1461,7 +1461,7 @@ FiniteElement::compute_2nd ( // cell for (unsigned int d=0; d &mapping, output_data.shape_values(k,i) = fe_data.shape_values[k][i]; if (flags & update_gradients && cell_similarity != CellSimilarity::translation) - mapping.transform(fe_data.shape_gradients[k], - output_data.shape_gradients[k], - mapping_internal, mapping_covariant); + mapping.transform (fe_data.shape_gradients[k], + mapping_covariant, + mapping_internal, + output_data.shape_gradients[k]); if (flags & update_hessians && cell_similarity != CellSimilarity::translation) { @@ -71,9 +72,10 @@ fill_fe_values (const Mapping<1,2> &mapping, correct_untransformed_hessians (fe_data.untransformed_shape_hessians, mapping_data, output_data, quadrature.size(), k); - mapping.transform(fe_data.untransformed_shape_hessians, - output_data.shape_hessians[k], - mapping_internal, mapping_covariant_gradient); + mapping.transform (fe_data.untransformed_shape_hessians, + mapping_covariant_gradient, + mapping_internal, + output_data.shape_hessians[k]); } } } @@ -107,9 +109,10 @@ fill_fe_values (const Mapping<2,3> &mapping, output_data.shape_values(k,i) = fe_data.shape_values[k][i]; if (flags & update_gradients && cell_similarity != CellSimilarity::translation) - mapping.transform(fe_data.shape_gradients[k], - output_data.shape_gradients[k], - mapping_internal, mapping_covariant); + mapping.transform (fe_data.shape_gradients[k], + mapping_covariant, + mapping_internal, + output_data.shape_gradients[k]); if (flags & update_hessians && cell_similarity != CellSimilarity::translation) { @@ -122,9 +125,10 @@ fill_fe_values (const Mapping<2,3> &mapping, correct_untransformed_hessians (fe_data.untransformed_shape_hessians, mapping_data, output_data, quadrature.size(), k); - mapping.transform(fe_data.untransformed_shape_hessians, - output_data.shape_hessians[k], - mapping_internal, mapping_covariant_gradient); + mapping.transform (fe_data.untransformed_shape_hessians, + mapping_covariant_gradient, + mapping_internal, + output_data.shape_hessians[k]); } } } @@ -159,9 +163,10 @@ fill_fe_values (const Mapping<1,2> &mapping, output_data.shape_values(k,i) = fe_data.shape_values[k][i]; if (flags & update_gradients && cell_similarity != CellSimilarity::translation) - mapping.transform(fe_data.shape_gradients[k], - output_data.shape_gradients[k], - mapping_internal, mapping_covariant); + mapping.transform (fe_data.shape_gradients[k], + mapping_covariant, + mapping_internal, + output_data.shape_gradients[k]); if (flags & update_hessians && cell_similarity != CellSimilarity::translation) { @@ -174,9 +179,10 @@ fill_fe_values (const Mapping<1,2> &mapping, correct_untransformed_hessians (fe_data.untransformed_shape_hessians, mapping_data, output_data, quadrature.size(), k); - mapping.transform(fe_data.untransformed_shape_hessians, - output_data.shape_hessians[k], - mapping_internal, mapping_covariant_gradient); + mapping.transform (fe_data.untransformed_shape_hessians, + mapping_covariant_gradient, + mapping_internal, + output_data.shape_hessians[k]); } } } @@ -207,9 +213,10 @@ fill_fe_values (const Mapping<2,3> &mapping, if (flags & update_gradients && cell_similarity != CellSimilarity::translation) - mapping.transform(fe_data.shape_gradients[k], - output_data.shape_gradients[k], - mapping_internal, mapping_covariant); + mapping.transform (fe_data.shape_gradients[k], + mapping_covariant, + mapping_internal, + output_data.shape_gradients[k]); if (flags & update_hessians && cell_similarity != CellSimilarity::translation) { @@ -222,9 +229,10 @@ fill_fe_values (const Mapping<2,3> &mapping, correct_untransformed_hessians (fe_data.untransformed_shape_hessians, mapping_data, output_data, quadrature.size(), k); - mapping.transform(fe_data.untransformed_shape_hessians, - output_data.shape_hessians[k], - mapping_internal, mapping_covariant_gradient); + mapping.transform (fe_data.untransformed_shape_hessians, + mapping_covariant_gradient, + mapping_internal, + output_data.shape_hessians[k]); } } } diff --git a/source/fe/fe_poly_tensor.cc b/source/fe/fe_poly_tensor.cc index 11242ad8ca..a71302ea83 100644 --- a/source/fe/fe_poly_tensor.cc +++ b/source/fe/fe_poly_tensor.cc @@ -328,8 +328,10 @@ fill_fe_values (const Mapping &ma if ( (flags & update_gradients) && mapping_type != mapping_none ) - mapping.transform(mapping_data.jacobian_grads, fe_data.transformed_jacobian_grads, - mapping_internal, mapping_covariant_gradient); + mapping.transform (mapping_data.jacobian_grads, + mapping_covariant_gradient, + mapping_internal, + fe_data.transformed_jacobian_grads); for (unsigned int i=0; idofs_per_cell; ++i) { @@ -361,8 +363,10 @@ fill_fe_values (const Mapping &ma case mapping_covariant: case mapping_contravariant: { - mapping.transform(fe_data.shape_values[i], - fe_data.transformed_shape_values, mapping_internal, mapping_type); + mapping.transform (fe_data.shape_values[i], + mapping_type, + mapping_internal, + fe_data.transformed_shape_values); for (unsigned int k=0; k &ma case mapping_raviart_thomas: case mapping_piola: { - mapping.transform(fe_data.shape_values[i], fe_data.transformed_shape_values, - mapping_internal, mapping_piola); + mapping.transform (fe_data.shape_values[i], + mapping_piola, + mapping_internal, + fe_data.transformed_shape_values); for (unsigned int k=0; k &ma case mapping_nedelec: { - mapping.transform (fe_data.shape_values[i], fe_data.transformed_shape_values, - mapping_internal, mapping_covariant); + mapping.transform (fe_data.shape_values[i], + mapping_covariant, + mapping_internal, + fe_data.transformed_shape_values); for (unsigned int k = 0; k < n_q_points; ++k) for (unsigned int d = 0; d < dim; ++d) @@ -414,8 +422,10 @@ fill_fe_values (const Mapping &ma { case mapping_none: { - mapping.transform(fe_data.shape_grads[i], fe_data.transformed_shape_grads, - mapping_internal, mapping_covariant); + mapping.transform (fe_data.shape_grads[i], + mapping_covariant, + mapping_internal, + fe_data.transformed_shape_grads); for (unsigned int k=0; k &ma } case mapping_covariant: { - mapping.transform(fe_data.shape_grads[i], fe_data.transformed_shape_grads, - mapping_internal, mapping_covariant_gradient); + mapping.transform (fe_data.shape_grads[i], + mapping_covariant_gradient, + mapping_internal, + fe_data.transformed_shape_grads); for (unsigned int k=0; k &ma } case mapping_contravariant: { - mapping.transform(fe_data.shape_grads[i], fe_data.transformed_shape_grads, - mapping_internal, mapping_contravariant_gradient); + mapping.transform(fe_data.shape_grads[i], + mapping_contravariant_gradient, + mapping_internal, + fe_data.transformed_shape_grads); for (unsigned int k=0; k &ma { for (unsigned int k=0; k &ma for (unsigned int k=0; k get_face_sign_change_nedelec (cell, this->dofs_per_face, fe_data.sign_change); if ( (flags & update_gradients) && mapping_type != mapping_none ) - mapping.transform(mapping_data.jacobian_grads, - VectorSlice< std::vector > > - (fe_data.transformed_jacobian_grads, offset, n_q_points), - mapping_internal, mapping_covariant_gradient); + mapping.transform (mapping_data.jacobian_grads, + mapping_covariant_gradient, + mapping_internal, + VectorSlice< std::vector > > + (fe_data.transformed_jacobian_grads, offset, n_q_points)); for (unsigned int i=0; idofs_per_cell; ++i) { @@ -614,8 +633,10 @@ fill_fe_face_values (const Mapping { // Use auxiliary vector // for transformation - mapping.transform(make_slice(fe_data.shape_values[i], offset, n_q_points), - transformed_shape_values, mapping_internal, mapping_type); + mapping.transform (make_slice(fe_data.shape_values[i], offset, n_q_points), + mapping_type, + mapping_internal, + transformed_shape_values); for (unsigned int k=0; k case mapping_piola: { - mapping.transform(make_slice(fe_data.shape_values[i], offset, n_q_points), - transformed_shape_values, mapping_internal, mapping_piola); + mapping.transform (make_slice(fe_data.shape_values[i], offset, n_q_points), + mapping_piola, + mapping_internal, + transformed_shape_values); for (unsigned int k=0; k case mapping_nedelec: { mapping.transform (make_slice (fe_data.shape_values[i], offset, n_q_points), - transformed_shape_values, mapping_internal, mapping_covariant); + mapping_covariant, + mapping_internal, + transformed_shape_values); for (unsigned int k = 0; k < n_q_points; ++k) for (unsigned int d = 0; d < dim; ++d) @@ -663,8 +688,10 @@ fill_fe_face_values (const Mapping { case mapping_none: { - mapping.transform(make_slice(fe_data.shape_grads[i], offset, n_q_points), - transformed_shape_grads, mapping_internal, mapping_covariant); + mapping.transform (make_slice(fe_data.shape_grads[i], offset, n_q_points), + mapping_covariant, + mapping_internal, + transformed_shape_grads); for (unsigned int k=0; k case mapping_covariant: { - mapping.transform(make_slice(fe_data.shape_grads[i], offset, n_q_points), - transformed_shape_grads, mapping_internal, mapping_covariant_gradient); + mapping.transform (make_slice(fe_data.shape_grads[i], offset, n_q_points), + mapping_covariant_gradient, + mapping_internal, + transformed_shape_grads); for (unsigned int k=0; k } case mapping_contravariant: { - mapping.transform(make_slice(fe_data.shape_grads[i], offset, n_q_points), - transformed_shape_grads, mapping_internal, mapping_contravariant_gradient); + mapping.transform (make_slice(fe_data.shape_grads[i], offset, n_q_points), + mapping_contravariant_gradient, + mapping_internal, + transformed_shape_grads); for (unsigned int k=0; k { for (unsigned int k=0; k fe_data.untransformed_shape_grads[k+offset] = fe_data.shape_grads[i][k+offset]; mapping.transform (make_slice (fe_data.untransformed_shape_grads, offset, n_q_points), - transformed_shape_grads, mapping_internal, mapping_covariant_gradient); + mapping_covariant_gradient, + mapping_internal, + transformed_shape_grads); for (unsigned int k=0; k get_face_sign_change_nedelec (cell, this->dofs_per_face, fe_data.sign_change); if ( (flags & update_gradients) && mapping_type != mapping_none) - mapping.transform(mapping_data.jacobian_grads, - VectorSlice< std::vector > > - (fe_data.transformed_jacobian_grads, offset, n_q_points), - mapping_internal, mapping_covariant_gradient); + mapping.transform (mapping_data.jacobian_grads, + mapping_covariant_gradient, + mapping_internal, + VectorSlice< std::vector > > + (fe_data.transformed_jacobian_grads, offset, n_q_points)); for (unsigned int i=0; idofs_per_cell; ++i) @@ -859,8 +895,10 @@ fill_fe_subface_values (const Mapping { // Use auxiliary vector for // transformation - mapping.transform(make_slice(fe_data.shape_values[i], offset, n_q_points), - transformed_shape_values, mapping_internal, mapping_type); + mapping.transform (make_slice(fe_data.shape_values[i], offset, n_q_points), + mapping_type, + mapping_internal, + transformed_shape_values); for (unsigned int k=0; k case mapping_raviart_thomas: case mapping_piola: { - mapping.transform(make_slice(fe_data.shape_values[i], offset, n_q_points), - transformed_shape_values, mapping_internal, mapping_piola); + mapping.transform (make_slice(fe_data.shape_values[i], offset, n_q_points), + mapping_piola, + mapping_internal, + transformed_shape_values); for (unsigned int k=0; k case mapping_nedelec: { mapping.transform (make_slice (fe_data.shape_values[i], offset, n_q_points), - transformed_shape_values, mapping_internal, mapping_covariant); + mapping_covariant, + mapping_internal, + transformed_shape_values); for (unsigned int k = 0; k < n_q_points; ++k) for (unsigned int d = 0; d < dim; ++d) @@ -903,8 +945,10 @@ fill_fe_subface_values (const Mapping { case mapping_none: { - mapping.transform(make_slice(fe_data.shape_grads[i], offset, n_q_points), - transformed_shape_grads, mapping_internal, mapping_covariant); + mapping.transform (make_slice(fe_data.shape_grads[i], offset, n_q_points), + mapping_covariant, + mapping_internal, + transformed_shape_grads); for (unsigned int k=0; k case mapping_covariant: { - mapping.transform(make_slice(fe_data.shape_grads[i], offset, n_q_points), - transformed_shape_grads, mapping_internal, mapping_covariant_gradient); + mapping.transform (make_slice(fe_data.shape_grads[i], offset, n_q_points), + mapping_covariant_gradient, + mapping_internal, + transformed_shape_grads); for (unsigned int k=0; k case mapping_contravariant: { - mapping.transform(make_slice(fe_data.shape_grads[i], offset, n_q_points), - transformed_shape_grads, mapping_internal, mapping_contravariant_gradient); + mapping.transform (make_slice(fe_data.shape_grads[i], offset, n_q_points), + mapping_contravariant_gradient, + mapping_internal, + transformed_shape_grads); for (unsigned int k=0; k for (unsigned int k=0; k fe_data.untransformed_shape_grads[k+offset] = fe_data.shape_grads[i][k+offset]; mapping.transform (make_slice (fe_data.untransformed_shape_grads, offset, n_q_points), - transformed_shape_grads, mapping_internal, mapping_covariant_gradient); + mapping_covariant_gradient, + mapping_internal, + transformed_shape_grads); for (unsigned int k=0; k::transform ( { VectorSlice > > src(original); VectorSlice > > dst(transformed); - mapping->transform(src, dst, *mapping_data, type); + mapping->transform(src, type,*mapping_data, dst); } diff --git a/source/fe/mapping_cartesian.cc b/source/fe/mapping_cartesian.cc index c2e707ab94..72fe571824 100644 --- a/source/fe/mapping_cartesian.cc +++ b/source/fe/mapping_cartesian.cc @@ -584,11 +584,11 @@ fill_fe_subface_values (const typename Triangulation::cell_iterato template void -MappingCartesian::transform ( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const +MappingCartesian:: +transform (const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { AssertDimension (input.size(), output.size()); Assert (dynamic_cast(&mapping_data) != 0, @@ -639,11 +639,11 @@ MappingCartesian::transform ( template void -MappingCartesian::transform ( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const +MappingCartesian:: +transform (const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { AssertDimension (input.size(), output.size()); Assert (dynamic_cast(&mapping_data) != 0, @@ -740,11 +740,11 @@ MappingCartesian::transform ( template void -MappingCartesian::transform ( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const +MappingCartesian:: +transform (const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { AssertDimension (input.size(), output.size()); @@ -841,11 +841,11 @@ MappingCartesian::transform ( template void -MappingCartesian::transform ( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const +MappingCartesian:: +transform (const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { AssertDimension (input.size(), output.size()); @@ -879,11 +879,11 @@ MappingCartesian::transform ( template void -MappingCartesian::transform ( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const +MappingCartesian:: +transform (const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { AssertDimension (input.size(), output.size()); diff --git a/source/fe/mapping_fe_field.cc b/source/fe/mapping_fe_field.cc index e0795fb756..12429b4154 100644 --- a/source/fe/mapping_fe_field.cc +++ b/source/fe/mapping_fe_field.cc @@ -1022,9 +1022,9 @@ namespace internal ExcInternalError()); mapping.transform (data.unit_tangentials[face_no+GeometryInfo::faces_per_cell*d], - data.aux[d], + mapping_contravariant, data, - mapping_contravariant); + data.aux[d]); } // if dim==spacedim, we can use the unit tangentials to compute the @@ -1437,9 +1437,9 @@ namespace template void transform_fields(const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) { AssertDimension (input.size(), output.size()); Assert ((dynamic_cast::InternalData *>(&mapping_data) != 0), @@ -1499,9 +1499,9 @@ namespace template void transform_differential_forms(const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) { AssertDimension (input.size(), output.size()); @@ -1533,40 +1533,41 @@ namespace template void -MappingFEField::transform ( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const +MappingFEField:: +transform (const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { AssertDimension (input.size(), output.size()); - transform_fields(input, output, mapping_data, mapping_type); + transform_fields(input, mapping_type, mapping_data, output); } template void -MappingFEField::transform ( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const +MappingFEField:: +transform (const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { AssertDimension (input.size(), output.size()); - transform_differential_forms(input, output, mapping_data, mapping_type); - + transform_differential_forms(input, mapping_type, mapping_data, output); } + template -void MappingFEField::transform -(const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType) const +void +MappingFEField:: +transform (const VectorSlice > > input, + const MappingType, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { (void)input; (void)output; @@ -1579,11 +1580,12 @@ void MappingFEField::transform template -void MappingFEField::transform ( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const +void +MappingFEField:: +transform (const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { AssertDimension (input.size(), output.size()); @@ -1618,18 +1620,22 @@ void MappingFEField::transform ( } return; } + default: Assert(false, ExcNotImplemented()); } } + + template -void MappingFEField::transform ( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType /*mapping_type*/) const +void +MappingFEField:: +transform (const VectorSlice > > input, + const MappingType /*mapping_type*/, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { (void)input; @@ -1642,6 +1648,7 @@ void MappingFEField::transform ( } + template Point MappingFEField:: diff --git a/source/fe/mapping_q.cc b/source/fe/mapping_q.cc index 4fddd102e1..5c69092a75 100644 --- a/source/fe/mapping_q.cc +++ b/source/fe/mapping_q.cc @@ -995,11 +995,11 @@ add_quad_support_points(const typename Triangulation::cell_iterato template void -MappingQ::transform ( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const +MappingQ:: +transform (const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { AssertDimension (input.size(), output.size()); // The data object may be just a MappingQ1::InternalData, so we have to test @@ -1020,18 +1020,18 @@ MappingQ::transform ( } // Now, q1_data should have the right tensors in it and we call the base // classes transform function - MappingQ1::transform(input, output, *q1_data, mapping_type); + MappingQ1::transform(input, mapping_type, *q1_data, output); } template void -MappingQ::transform ( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const +MappingQ:: +transform (const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { AssertDimension (input.size(), output.size()); // The data object may be just a MappingQ1::InternalData, so we have to test @@ -1052,16 +1052,16 @@ MappingQ::transform ( } // Now, q1_data should have the right tensors in it and we call the base // classes transform function - MappingQ1::transform(input, output, *q1_data, mapping_type); + MappingQ1::transform(input, mapping_type, *q1_data, output); } template -void MappingQ::transform -(const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const +void MappingQ:: +transform (const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { AssertDimension (input.size(), output.size()); // The data object may be just a MappingQ1::InternalData, so we have to test @@ -1082,7 +1082,7 @@ void MappingQ::transform } // Now, q1_data should have the right tensors in it and we call the base // classes transform function - MappingQ1::transform(input, output, *q1_data, mapping_type); + MappingQ1::transform(input, mapping_type, *q1_data, output); } diff --git a/source/fe/mapping_q1.cc b/source/fe/mapping_q1.cc index 8104bb1aa5..f5872e3545 100644 --- a/source/fe/mapping_q1.cc +++ b/source/fe/mapping_q1.cc @@ -1507,9 +1507,9 @@ namespace internal ExcInternalError()); mapping.transform (data.unit_tangentials[face_no+GeometryInfo::faces_per_cell*d], - data.aux[d], + mapping_contravariant, data, - mapping_contravariant); + data.aux[d]); } // if dim==spacedim, we can use the unit tangentials to compute the @@ -1758,9 +1758,9 @@ namespace template void transform_fields(const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) { AssertDimension (input.size(), output.size()); Assert ((dynamic_cast::InternalData *>(&mapping_data) != 0), @@ -1821,9 +1821,9 @@ namespace template void transform_gradients(const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) { AssertDimension (input.size(), output.size()); Assert ((dynamic_cast::InternalData *>(&mapping_data) != 0), @@ -1901,10 +1901,10 @@ namespace template void - transform_hessians(const VectorSlice > > input, - VectorSlice > > output, + transform_hessians(const VectorSlice > > input, + const MappingType mapping_type, const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) + VectorSlice > > output) { AssertDimension (input.size(), output.size()); Assert ((dynamic_cast::InternalData *>(&mapping_data) != 0), @@ -2019,12 +2019,12 @@ namespace - template + template void - transform_differential_forms(const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) + transform_differential_forms(const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) { AssertDimension (input.size(), output.size()); Assert ((dynamic_cast::InternalData *>(&mapping_data) != 0), @@ -2054,48 +2054,48 @@ namespace template void -MappingQ1::transform ( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const +MappingQ1:: +transform (const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { - transform_fields(input, output, mapping_data, mapping_type); + transform_fields(input, mapping_type, mapping_data, output); } template void -MappingQ1::transform ( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const +MappingQ1:: +transform (const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { - transform_differential_forms(input, output, mapping_data, mapping_type); + transform_differential_forms(input, mapping_type, mapping_data, output); } template void -MappingQ1::transform ( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const +MappingQ1:: +transform (const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { switch (mapping_type) { case mapping_contravariant: - transform_fields(input, output, mapping_data, mapping_type); + transform_fields(input, mapping_type, mapping_data, output); return; case mapping_piola_gradient: case mapping_contravariant_gradient: case mapping_covariant_gradient: - transform_gradients(input, output, mapping_data, mapping_type); + transform_gradients(input, mapping_type, mapping_data, output); return; default: Assert(false, ExcNotImplemented()); @@ -2106,11 +2106,11 @@ MappingQ1::transform ( template void -MappingQ1::transform ( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const +MappingQ1:: +transform (const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { AssertDimension (input.size(), output.size()); @@ -2155,11 +2155,11 @@ MappingQ1::transform ( template void -MappingQ1::transform ( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const +MappingQ1:: +transform (const VectorSlice > > input, + const MappingType mapping_type, + const typename Mapping::InternalDataBase &mapping_data, + VectorSlice > > output) const { switch (mapping_type) @@ -2167,7 +2167,7 @@ MappingQ1::transform ( case mapping_piola_hessian: case mapping_contravariant_hessian: case mapping_covariant_hessian: - transform_hessians(input, output, mapping_data, mapping_type); + transform_hessians(input, mapping_type, mapping_data, output); return; default: Assert(false, ExcNotImplemented()); -- 2.39.5