]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove deprecated functions with names that contain functions_grads.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 8 Jan 2015 20:09:16 +0000 (14:09 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sat, 10 Jan 2015 22:19:42 +0000 (16:19 -0600)
16 files changed:
doc/news/changes.h
examples/step-14/step-14.cc
examples/step-18/step-18.cc
examples/step-33/step-33.cc
examples/step-43/step-43.cc
include/deal.II/fe/fe_values.h
include/deal.II/numerics/fe_field_function.h
include/deal.II/numerics/fe_field_function.templates.h
include/deal.II/numerics/vector_tools.templates.h
tests/bits/step-14.cc
tests/bits/step-15.cc
tests/fail/hp-step-14.cc
tests/fail/hp-step-15.cc
tests/fail/rt_distorted_02.cc
tests/fe/abf_01.cc
tests/fe/deformed_projection.h

index 9a5e11b35ae63b04847b7b5b46c1fe40e4ad5170..eeafdafe44fb2ad03458ae8b9919e17f68f90e77 100644 (file)
@@ -110,7 +110,9 @@ inconvenience this causes.
 
 - In FEValues and related classes, the functions that contain the
   term <code>2nd_derivatives</code> were removed in favor of those
-  with names containing <code>hessian</code>.
+  with names containing <code>hessian</code>. Similarly, functions
+  with names including <code>function_grads</code> were removed in
+  favor of those called <code>function_gradients</code>.
 
 <!-- ----------- GENERAL IMPROVEMENTS ----------------- -->
 
index dc5bd5e5d5bcca9ff338d11a19d379802dd72376..cbbf298207ac5792376384453217e4c557089edb 100644 (file)
@@ -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
index 05036284ed4d868a788a65c2d9f6861df302e23e..e340746db34e81b87d9e8fd2bccff400fb0c74b9 100644 (file)
@@ -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
-  // <code>fe_values.get_function_grads</code> function allows you to extract
+  // <code>fe_values.get_function_gradients</code> 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; q<quadrature_formula.size(); ++q)
index 51aea39cff69aaf50456498306cfdb6379798df4..dec7dbd95123e72da89249874562691e3033a4d3 100644 (file)
@@ -491,7 +491,7 @@ namespace Step33
       for (unsigned int cell_no=0; cell!=endc; ++cell, ++cell_no)
         {
           fe_v.reinit(cell);
-          fe_v.get_function_grads (solution, dU);
+          fe_v.get_function_gradients (solution, dU);
 
           refinement_indicators(cell_no)
             = std::log(1+
@@ -1720,7 +1720,7 @@ namespace Step33
     // computed in a similar way.
     //
     // Ideally, we could compute this information using a call into something
-    // like FEValues::get_function_values and FEValues::get_function_grads,
+    // like FEValues::get_function_values and FEValues::get_function_gradients,
     // but since (i) we would have to extend the FEValues class for this, and
     // (ii) we don't want to make the entire <code>old_solution</code> vector
     // fad types, only the local cell variables, we explicitly code the loop
index 2d89d116276f66cb2a37271ea9eef18de3527f72..56e3cbf1e016b8513882ebc063fcb021a089993e 100644 (file)
@@ -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();
         }
index ca92f01dd3f87471a81965391ea94f0f3dfc5310..abf488fb826948b0c5f63cefeecca18a4dd662cb 100644 (file)
@@ -1856,37 +1856,6 @@ public:
                                VectorSlice<std::vector<std::vector<Tensor<1,spacedim> > > > gradients,
                                bool quadrature_points_fastest = false) const;
 
-  /**
-   * @deprecated Use get_function_gradients() instead.
-   */
-  template <class InputVector>
-  void get_function_grads (const InputVector      &fe_function,
-                           std::vector<Tensor<1,spacedim> > &gradients) const DEAL_II_DEPRECATED;
-
-  /**
-   * @deprecated Use get_function_gradients() instead.
-   */
-  template <class InputVector>
-  void get_function_grads (const InputVector               &fe_function,
-                           std::vector<std::vector<Tensor<1,spacedim> > > &gradients) const DEAL_II_DEPRECATED;
-
-  /**
-   * @deprecated Use get_function_gradients() instead.
-   */
-  template <class InputVector>
-  void get_function_grads (const InputVector &fe_function,
-                           const VectorSlice<const std::vector<types::global_dof_index> > &indices,
-                           std::vector<Tensor<1,spacedim> > &gradients) const DEAL_II_DEPRECATED;
-
-  /**
-   * @deprecated Use get_function_gradients() instead.
-   */
-  template <class InputVector>
-  void get_function_grads (const InputVector &fe_function,
-                           const VectorSlice<const std::vector<types::global_dof_index> > &indices,
-                           std::vector<std::vector<Tensor<1,spacedim> > > &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<dim,spacedim>::inverse_jacobian (const unsigned int i) const
 }
 
 
-template <int dim, int spacedim>
-template <class InputVector>
-inline
-void
-FEValuesBase<dim,spacedim>::get_function_grads (const InputVector           &fe_function,
-                                                std::vector<Tensor<1,spacedim> > &gradients) const
-{
-  get_function_gradients(fe_function, gradients);
-}
-
-
-
-template <int dim, int spacedim>
-template <class InputVector>
-inline
-void
-FEValuesBase<dim,spacedim>::get_function_grads (
-  const InputVector &fe_function,
-  const VectorSlice<const std::vector<types::global_dof_index> > &indices,
-  std::vector<Tensor<1,spacedim> > &values) const
-{
-  get_function_gradients(fe_function, indices, values);
-}
-
-
-
-template <int dim, int spacedim>
-template <class InputVector>
-inline
-void
-FEValuesBase<dim,spacedim>::
-get_function_grads (const InputVector                         &fe_function,
-                    std::vector<std::vector<Tensor<1,spacedim> > > &gradients) const
-{
-  get_function_gradients(fe_function, gradients);
-}
-
-
-
-template <int dim, int spacedim>
-template <class InputVector>
-inline
-void
-FEValuesBase<dim,spacedim>::get_function_grads (
-  const InputVector &fe_function,
-  const VectorSlice<const std::vector<types::global_dof_index> > &indices,
-  std::vector<std::vector<Tensor<1,spacedim> > > &values,
-  bool q_points_fastest) const
-{
-  get_function_gradients(fe_function, indices, values, q_points_fastest);
-}
-
-
-
 template <int dim, int spacedim>
 inline
 const Point<spacedim> &
index c70472d80c2df202e62502978b9018d198618f13..9a46997c3efb8aab2be10de61a678851b47bb47c 100644 (file)
@@ -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
index b13770f4100481396e0abc830f9910038a1de265..1e79fd143393eceb719f75b82373899443eddca9 100644 (file)
@@ -139,7 +139,7 @@ namespace Functions
     fe_v.reinit(cell);
     std::vector< std::vector<Tensor<1,dim> > > vgrads
     (1,  std::vector<Tensor<1,dim> >(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<Tensor<1,dim> > >
         vgrads (nq, std::vector<Tensor<1,dim> >(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; q<nq; ++q)
           values[maps[i][q]] = vgrads[q];
       }
index 188d615ad39ff3854e88c57f78cfd16ae2075e80..bd9db81dbc02e5467ff4d473ad41aae60dd7eb23 100644 (file)
@@ -5466,7 +5466,7 @@ namespace VectorTools
             if (update_flags & update_values)
               fe_values.get_function_values (fe_function, data.function_values);
             if (update_flags & update_gradients)
-              fe_values.get_function_grads (fe_function, data.function_grads);
+              fe_values.get_function_gradients (fe_function, data.function_grads);
 
             difference(index) =
               integrate_difference_inner (exact_solution, norm, weight,
index ca9fb69638c5d7de82477c4f25a2d2c155e1a0bf..918f58488eebfd6e96438fb15c6554ee8f2622f5 100644 (file)
@@ -205,7 +205,7 @@ namespace Evaluation
         if (cell->vertex(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<n_q_points; ++p)
@@ -1913,11 +1913,11 @@ namespace LaplaceSolver
                 ExcInternalError());
 
         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.fe_subface_values_cell.get_function_gradients (primal_solution,
                                                              face_data.cell_grads);
         face_data.fe_face_values_neighbor.reinit (neighbor_child,
                                                   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<n_q_points; ++p)
index 81bb4929b710b2e9250dd80198a480bf9d09bf1c..dbfd831e2ac221e8d983b286a40be466903d27ae 100644 (file)
@@ -216,7 +216,7 @@ void MinimizationProblem<dim>::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<n_q_points; ++q_point)
@@ -457,7 +457,7 @@ void MinimizationProblem<1>::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<dim>::energy (const DoFHandler<dim> &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_point<n_q_points; ++q_point)
index 22d842a78a32f3c252b589177f4f6abbeeffcfc4..5ead93d10b51aae99ffc6336f0ac18d88aecbf07 100644 (file)
@@ -205,7 +205,7 @@ namespace Evaluation
         if (cell->vertex(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<n_q_points; ++p)
@@ -1907,11 +1907,11 @@ namespace LaplaceSolver
                 ExcInternalError());
 
         face_data.fe_subface_values_cell.reinit (cell, face_no, subface_no);
-        face_data.fe_subface_values_cell.get_present_fe_values().get_function_grads (primal_solution,
+        face_data.fe_subface_values_cell.get_present_fe_values().get_function_gradients (primal_solution,
             face_data.cell_grads);
         face_data.fe_face_values_neighbor.reinit (neighbor_child,
                                                   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<n_q_points; ++p)
index 73cbdda0f7712f69b2d63e7f7cea4fbdf512e5ca..f57afaf51e802d7065ed7a68087a541b5c826186 100644 (file)
@@ -217,7 +217,7 @@ void MinimizationProblem<dim>::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<n_q_points; ++q_point)
@@ -459,7 +459,7 @@ void MinimizationProblem<1>::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<dim>::energy (const hp::DoFHandler<dim> &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<n_q_points; ++q_point)
index dfe03247b78ac2fc628a33331287247e22e56b83..fbc40a1f45019bdbfbc7d1aeb9c66f95b38ffb1b 100644 (file)
@@ -311,7 +311,7 @@ double EvaluateDiver (Mapping<2> &mapping,
       std::vector<std::vector<Tensor<1,2> > >
       grads_here (n_q_points,
                   std::vector<Tensor<1,2> > (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<n_q_points; ++q_point)
         {
index d78e57bbfe6ad52be2417fa9fa59d751904ee406..ecfa256313b5fa40482de94a4b5ae97074dadde6 100644 (file)
@@ -103,7 +103,7 @@ void EvaluateDerivative (DoFHandler<2> *dof_handler,
       // Get values from solution vector (For Trap.Rule)
       std::vector<std::vector<Tensor<1,2> > >
       grads_here (n_q_points, std::vector<Tensor<1,2> > (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<n_q_points; ++q_point)
         {
index 060718943d23c6fcfe44a1c05ab063d42abc67dd..d820be92b1571606ee5ac7779c814a56ee043df7 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2003 - 2013 by the deal.II authors
+// Copyright (C) 2003 - 2013, 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -147,7 +147,7 @@ void EvaluateDerivative (DoFHandler<2> *dof_handler,
       // Get values from solution vector (For Trap.Rule)
       std::vector<std::vector<Tensor<1,2> > >
       grads_here (n_q_points, std::vector<Tensor<1,2> > (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<n_q_points; ++q_point)
         {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.