- 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 ----------------- -->
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
// 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
// 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
// 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
// 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
// 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)
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+
// 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
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
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();
}
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
//@{
}
-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> &
*
* 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
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];
}
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];
}
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,
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;
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,
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)
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)
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)
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];
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];
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)
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;
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,
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)
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)
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)
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];
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];
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)
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)
{
// 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)
{
// ---------------------------------------------------------------------
//
-// 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.
//
// 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)
{