From: Wolfgang Bangerth Date: Thu, 8 Jan 2015 20:09:16 +0000 (-0600) Subject: Remove deprecated functions with names that contain functions_grads. X-Git-Tag: v8.3.0-rc1~559^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f535ab758c66f02fa1f239ce6f48509004115d14;p=dealii.git Remove deprecated functions with names that contain functions_grads. --- diff --git a/doc/news/changes.h b/doc/news/changes.h index 9a5e11b35a..eeafdafe44 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -110,7 +110,9 @@ inconvenience this causes. - In FEValues and related classes, the functions that contain the term 2nd_derivatives were removed in favor of those - with names containing hessian. + with names containing hessian. Similarly, functions + with names including function_grads were removed in + favor of those called function_gradients. diff --git a/examples/step-14/step-14.cc b/examples/step-14/step-14.cc index dc5bd5e5d5..cbbf298207 100644 --- a/examples/step-14/step-14.cc +++ b/examples/step-14/step-14.cc @@ -259,8 +259,8 @@ namespace Step14 fe_values.reinit (cell); // and extract the gradients of the solution vector at the // vertices: - fe_values.get_function_grads (solution, - solution_gradients); + fe_values.get_function_gradients (solution, + solution_gradients); // Now we have the gradients at all vertices, so pick out that // one which belongs to the evaluation point (note that the @@ -2707,8 +2707,8 @@ namespace Step14 // corresponding to this side of the face, and extract the gradients // using that object. face_data.fe_face_values_cell.reinit (cell, face_no); - face_data.fe_face_values_cell.get_function_grads (primal_solution, - face_data.cell_grads); + face_data.fe_face_values_cell.get_function_gradients (primal_solution, + face_data.cell_grads); // The second step is then to extract the gradients of the finite // element solution at the quadrature points on the other side of the @@ -2732,8 +2732,8 @@ namespace Step14 // gradients on that cell: const active_cell_iterator neighbor = cell->neighbor(face_no); face_data.fe_face_values_neighbor.reinit (neighbor, neighbor_neighbor); - face_data.fe_face_values_neighbor.get_function_grads (primal_solution, - face_data.neighbor_grads); + face_data.fe_face_values_neighbor.get_function_gradients (primal_solution, + face_data.neighbor_grads); // Now that we have the gradients on this and the neighboring cell, // compute the jump residual by multiplying the jump in the gradient @@ -2833,13 +2833,13 @@ namespace Step14 // Now start the work by again getting the gradient of the solution // first at this side of the interface, face_data.fe_subface_values_cell.reinit (cell, face_no, subface_no); - face_data.fe_subface_values_cell.get_function_grads (primal_solution, - face_data.cell_grads); + face_data.fe_subface_values_cell.get_function_gradients (primal_solution, + face_data.cell_grads); // then at the other side, face_data.fe_face_values_neighbor.reinit (neighbor_child, neighbor_neighbor); - face_data.fe_face_values_neighbor.get_function_grads (primal_solution, - face_data.neighbor_grads); + face_data.fe_face_values_neighbor.get_function_gradients (primal_solution, + face_data.neighbor_grads); // and finally building the jump residuals. Since we take the normal // vector from the other cell this time, revert the sign of the diff --git a/examples/step-18/step-18.cc b/examples/step-18/step-18.cc index 05036284ed..e340746db3 100644 --- a/examples/step-18/step-18.cc +++ b/examples/step-18/step-18.cc @@ -216,7 +216,7 @@ namespace Step18 // The second function does something very similar (and therefore is given // the same name): compute the symmetric strain tensor from the gradient of // a vector-valued field. If you already have a solution field, the - // fe_values.get_function_grads function allows you to extract + // fe_values.get_function_gradients function allows you to extract // the gradients of each component of your solution field at a quadrature // point. It returns this as a vector of rank-1 tensors: one rank-1 tensor // (gradient) per vector component of the solution. From this we have to @@ -1962,8 +1962,8 @@ namespace Step18 // cell, and extract the gradients of the displacement at the // quadrature points for later computation of the strains fe_values.reinit (cell); - fe_values.get_function_grads (incremental_displacement, - displacement_increment_grads); + fe_values.get_function_gradients (incremental_displacement, + displacement_increment_grads); // Then loop over the quadrature points of this cell: for (unsigned int q=0; qold_solution vector // fad types, only the local cell variables, we explicitly code the loop diff --git a/examples/step-43/step-43.cc b/examples/step-43/step-43.cc index 2d89d11627..56e3cbf1e0 100644 --- a/examples/step-43/step-43.cc +++ b/examples/step-43/step-43.cc @@ -1388,8 +1388,8 @@ namespace Step43 saturation_fe_values.get_function_values (old_saturation_solution, old_saturation_solution_values); saturation_fe_values.get_function_values (old_old_saturation_solution, old_old_saturation_solution_values); - saturation_fe_values.get_function_grads (old_saturation_solution, old_grad_saturation_solution_values); - saturation_fe_values.get_function_grads (old_old_saturation_solution, old_old_grad_saturation_solution_values); + saturation_fe_values.get_function_gradients (old_saturation_solution, old_grad_saturation_solution_values); + saturation_fe_values.get_function_gradients (old_old_saturation_solution, old_old_grad_saturation_solution_values); darcy_fe_values.get_function_values (darcy_solution, present_darcy_solution_values); const double nu @@ -1686,8 +1686,8 @@ namespace Step43 for (unsigned int cell_no=0; cell!=endc; ++cell, ++cell_no) { fe_values.reinit(cell); - fe_values.get_function_grads (extrapolated_saturation_solution, - grad_saturation); + fe_values.get_function_gradients (extrapolated_saturation_solution, + grad_saturation); refinement_indicators(cell_no) = grad_saturation[0].norm(); } diff --git a/include/deal.II/fe/fe_values.h b/include/deal.II/fe/fe_values.h index ca92f01dd3..abf488fb82 100644 --- a/include/deal.II/fe/fe_values.h +++ b/include/deal.II/fe/fe_values.h @@ -1856,37 +1856,6 @@ public: VectorSlice > > > gradients, bool quadrature_points_fastest = false) const; - /** - * @deprecated Use get_function_gradients() instead. - */ - template - void get_function_grads (const InputVector &fe_function, - std::vector > &gradients) const DEAL_II_DEPRECATED; - - /** - * @deprecated Use get_function_gradients() instead. - */ - template - void get_function_grads (const InputVector &fe_function, - std::vector > > &gradients) const DEAL_II_DEPRECATED; - - /** - * @deprecated Use get_function_gradients() instead. - */ - template - void get_function_grads (const InputVector &fe_function, - const VectorSlice > &indices, - std::vector > &gradients) const DEAL_II_DEPRECATED; - - /** - * @deprecated Use get_function_gradients() instead. - */ - template - void get_function_grads (const InputVector &fe_function, - const VectorSlice > &indices, - std::vector > > &gradients, - bool quadrature_points_fastest = false) const DEAL_II_DEPRECATED; - //@} /// @name Access to second derivatives (Hessian matrices and Laplacians) of global finite element fields //@{ @@ -4096,60 +4065,6 @@ FEValuesBase::inverse_jacobian (const unsigned int i) const } -template -template -inline -void -FEValuesBase::get_function_grads (const InputVector &fe_function, - std::vector > &gradients) const -{ - get_function_gradients(fe_function, gradients); -} - - - -template -template -inline -void -FEValuesBase::get_function_grads ( - const InputVector &fe_function, - const VectorSlice > &indices, - std::vector > &values) const -{ - get_function_gradients(fe_function, indices, values); -} - - - -template -template -inline -void -FEValuesBase:: -get_function_grads (const InputVector &fe_function, - std::vector > > &gradients) const -{ - get_function_gradients(fe_function, gradients); -} - - - -template -template -inline -void -FEValuesBase::get_function_grads ( - const InputVector &fe_function, - const VectorSlice > &indices, - std::vector > > &values, - bool q_points_fastest) const -{ - get_function_gradients(fe_function, indices, values, q_points_fastest); -} - - - template inline const Point & diff --git a/include/deal.II/numerics/fe_field_function.h b/include/deal.II/numerics/fe_field_function.h index c70472d80c..9a46997c3e 100644 --- a/include/deal.II/numerics/fe_field_function.h +++ b/include/deal.II/numerics/fe_field_function.h @@ -54,7 +54,7 @@ namespace Functions * * Once the FEFieldFunction knows where the points lie, it creates a * quadrature formula for those points, and calls - * FEValues::get_function_values or FEValues::get_function_grads with the + * FEValues::get_function_values or FEValues::get_function_gradients with the * given quadrature points. * * If you only need the quadrature points but not the values of the finite diff --git a/include/deal.II/numerics/fe_field_function.templates.h b/include/deal.II/numerics/fe_field_function.templates.h index b13770f410..1e79fd1433 100644 --- a/include/deal.II/numerics/fe_field_function.templates.h +++ b/include/deal.II/numerics/fe_field_function.templates.h @@ -139,7 +139,7 @@ namespace Functions fe_v.reinit(cell); std::vector< std::vector > > vgrads (1, std::vector >(n_components) ); - fe_v.get_function_grads(data_vector, vgrads); + fe_v.get_function_gradients(data_vector, vgrads); gradients = vgrads[0]; } @@ -309,7 +309,7 @@ namespace Functions const unsigned int nq = qpoints[i].size(); std::vector< std::vector > > vgrads (nq, std::vector >(n_components)); - fe_v.get_present_fe_values ().get_function_grads(data_vector, vgrads); + fe_v.get_present_fe_values ().get_function_gradients(data_vector, vgrads); for (unsigned int q=0; qvertex(vertex) == evaluation_point) { fe_values.reinit (cell); - fe_values.get_function_grads (solution, + fe_values.get_function_gradients (solution, solution_gradients); unsigned int q_point = 0; @@ -1843,7 +1843,7 @@ namespace LaplaceSolver n_q_points = face_data.fe_face_values_cell.n_quadrature_points; face_data.fe_face_values_cell.reinit (cell, face_no); - face_data.fe_face_values_cell.get_function_grads (primal_solution, + face_data.fe_face_values_cell.get_function_gradients (primal_solution, face_data.cell_grads); Assert (cell->neighbor(face_no).state() == IteratorState::valid, @@ -1852,7 +1852,7 @@ namespace LaplaceSolver neighbor_neighbor = cell->neighbor_of_neighbor (face_no); const active_cell_iterator neighbor = cell->neighbor(face_no); face_data.fe_face_values_neighbor.reinit (neighbor, neighbor_neighbor); - face_data.fe_face_values_neighbor.get_function_grads (primal_solution, + face_data.fe_face_values_neighbor.get_function_gradients (primal_solution, face_data.neighbor_grads); for (unsigned int p=0; p::assemble_step () fe_values.get_function_values (present_solution, local_solution_values); - fe_values.get_function_grads (present_solution, + fe_values.get_function_gradients (present_solution, local_solution_grads); for (unsigned int q_point=0; q_point::refine_grid () left_neighbor = left_neighbor->child(1); neighbor_fe_values.reinit (left_neighbor); - neighbor_fe_values.get_function_grads (present_solution, local_gradients); + neighbor_fe_values.get_function_gradients (present_solution, local_gradients); const double neighbor_u_prime_left = local_gradients[1][0]; @@ -475,7 +475,7 @@ void MinimizationProblem<1>::refine_grid () right_neighbor = right_neighbor->child(0); neighbor_fe_values.reinit (right_neighbor); - neighbor_fe_values.get_function_grads (present_solution, local_gradients); + neighbor_fe_values.get_function_gradients (present_solution, local_gradients); const double neighbor_u_prime_right = local_gradients[0][0]; @@ -536,7 +536,7 @@ MinimizationProblem::energy (const DoFHandler &dof_handler, fe_values.reinit (cell); fe_values.get_function_values (function, local_solution_values); - fe_values.get_function_grads (function, + fe_values.get_function_gradients (function, local_solution_grads); for (unsigned int q_point=0; q_pointvertex(vertex) == evaluation_point) { fe_values.reinit (cell); - fe_values.get_present_fe_values().get_function_grads (solution, + fe_values.get_present_fe_values().get_function_gradients (solution, solution_gradients); unsigned int q_point = 0; @@ -1837,7 +1837,7 @@ namespace LaplaceSolver n_q_points = face_data.fe_face_values_cell.get_present_fe_values().n_quadrature_points; face_data.fe_face_values_cell.reinit (cell, face_no); - face_data.fe_face_values_cell.get_present_fe_values().get_function_grads (primal_solution, + face_data.fe_face_values_cell.get_present_fe_values().get_function_gradients (primal_solution, face_data.cell_grads); Assert (cell->neighbor(face_no).state() == IteratorState::valid, @@ -1846,7 +1846,7 @@ namespace LaplaceSolver neighbor_neighbor = cell->neighbor_of_neighbor (face_no); const active_cell_iterator neighbor = cell->neighbor(face_no); face_data.fe_face_values_neighbor.reinit (neighbor, neighbor_neighbor); - face_data.fe_face_values_neighbor.get_present_fe_values().get_function_grads (primal_solution, + face_data.fe_face_values_neighbor.get_present_fe_values().get_function_gradients (primal_solution, face_data.neighbor_grads); for (unsigned int p=0; p::assemble_step () fe_values.get_present_fe_values().get_function_values (present_solution, local_solution_values); - fe_values.get_present_fe_values().get_function_grads (present_solution, + fe_values.get_present_fe_values().get_function_gradients (present_solution, local_solution_grads); for (unsigned int q_point=0; q_point::refine_grid () left_neighbor = left_neighbor->child(1); neighbor_fe_values.reinit (left_neighbor); - neighbor_fe_values.get_present_fe_values().get_function_grads (present_solution, local_gradients); + neighbor_fe_values.get_present_fe_values().get_function_gradients (present_solution, local_gradients); const double neighbor_u_prime_left = local_gradients[1][0]; @@ -477,7 +477,7 @@ void MinimizationProblem<1>::refine_grid () right_neighbor = right_neighbor->child(0); neighbor_fe_values.reinit (right_neighbor); - neighbor_fe_values.get_present_fe_values().get_function_grads (present_solution, local_gradients); + neighbor_fe_values.get_present_fe_values().get_function_gradients (present_solution, local_gradients); const double neighbor_u_prime_right = local_gradients[0][0]; @@ -538,7 +538,7 @@ MinimizationProblem::energy (const hp::DoFHandler &dof_handler, fe_values.reinit (cell); fe_values.get_present_fe_values().get_function_values (function, local_solution_values); - fe_values.get_present_fe_values().get_function_grads (function, + fe_values.get_present_fe_values().get_function_gradients (function, local_solution_grads); for (unsigned int q_point=0; q_point &mapping, std::vector > > grads_here (n_q_points, std::vector > (n_components)); - fe_values.get_function_grads (solution, grads_here); + fe_values.get_function_gradients (solution, grads_here); for (unsigned int q_point=0; q_point *dof_handler, // Get values from solution vector (For Trap.Rule) std::vector > > grads_here (n_q_points, std::vector > (n_components)); - fe_values.get_function_grads (solution, grads_here); + fe_values.get_function_gradients (solution, grads_here); for (unsigned int q_point=0; q_point *dof_handler, // Get values from solution vector (For Trap.Rule) std::vector > > grads_here (n_q_points, std::vector > (n_components)); - fe_values.get_function_grads (solution, grads_here); + fe_values.get_function_gradients (solution, grads_here); for (unsigned int q_point=0; q_point