void
evaluate(const EvaluationFlags::EvaluationFlags evaluation_flag);
- /**
- * Like above but with separate bool flags.
- * @deprecated use evaluate() with the EvaluationFlags argument.
- */
- DEAL_II_DEPRECATED void
- evaluate(const bool evaluate_values,
- const bool evaluate_gradients,
- const bool evaluate_hessians = false);
-
/**
* Evaluate the function values, the gradients, and the Hessians of the
* polynomial interpolation from the DoF values in the input array @p
evaluate(const VectorizedArrayType * values_array,
const EvaluationFlags::EvaluationFlags evaluation_flag);
- /**
- * Like above but using separate bool flags.
- * @deprecated use evaluate() with the EvaluationFlags argument.
- */
- DEAL_II_DEPRECATED void
- evaluate(const VectorizedArrayType *values_array,
- const bool evaluate_values,
- const bool evaluate_gradients,
- const bool evaluate_hessians = false);
-
/**
* Read from the input vector and evaluates the function values, the
* gradients, and the Hessians of the polynomial interpolation of the vector
gather_evaluate(const VectorType & input_vector,
const EvaluationFlags::EvaluationFlags evaluation_flag);
- /**
- * @deprecated Please use the gather_evaluate() function with the EvaluationFlags argument.
- */
- template <typename VectorType>
- DEAL_II_DEPRECATED void
- gather_evaluate(const VectorType &input_vector,
- const bool evaluate_values,
- const bool evaluate_gradients,
- const bool evaluate_hessians = false);
-
/**
* This function takes the values and/or gradients that are stored on
* quadrature points, tests them by all the basis functions/gradients on the
void
integrate(const EvaluationFlags::EvaluationFlags integration_flag);
- /**
- * @deprecated Please use the integrate() function with the EvaluationFlags argument.
- */
- DEAL_II_DEPRECATED void
- integrate(const bool integrate_values, const bool integrate_gradients);
-
/**
* This function takes the values and/or gradients that are stored on
* quadrature points, tests them by all the basis functions/gradients on the
VectorizedArrayType * values_array,
const bool sum_into_values = false);
- /**
- * @deprecated Please use the integrate() function with the EvaluationFlags argument.
- */
- DEAL_II_DEPRECATED void
- integrate(const bool integrate_values,
- const bool integrate_gradients,
- VectorizedArrayType *values_array);
-
/**
* This function takes the values and/or gradients that are stored on
* quadrature points, tests them by all the basis functions/gradients on the
integrate_scatter(const EvaluationFlags::EvaluationFlags integration_flag,
VectorType & output_vector);
- /**
- * @deprecated Please use the integrate_scatter() function with the EvaluationFlags argument.
- */
- template <typename VectorType>
- DEAL_II_DEPRECATED void
- integrate_scatter(const bool integrate_values,
- const bool integrate_gradients,
- VectorType &output_vector);
-
/**
* Return an object that can be thought of as an array containing all indices
* from zero to @p dofs_per_cell. This allows to write code using
void
evaluate(const EvaluationFlags::EvaluationFlags evaluation_flag);
- /**
- * @deprecated Please use the evaluate() function with the EvaluationFlags argument.
- */
- DEAL_II_DEPRECATED void
- evaluate(const bool evaluate_values, const bool evaluate_gradients);
-
/**
* Evaluates the function values, the gradients, and the Laplacians of the
* FE function given at the DoF values in the input array `values_array` at
evaluate(const VectorizedArrayType * values_array,
const EvaluationFlags::EvaluationFlags evaluation_flag);
- /**
- * @deprecated Please use the evaluate() function with the EvaluationFlags argument.
- */
- DEAL_II_DEPRECATED void
- evaluate(const VectorizedArrayType *values_array,
- const bool evaluate_values,
- const bool evaluate_gradients);
-
/**
* Reads from the input vector and evaluates the function values, the
* gradients, and the Laplacians of the FE function at the quadrature points
-template <int dim,
- int fe_degree,
- int n_q_points_1d,
- int n_components_,
- typename Number,
- typename VectorizedArrayType>
-inline void
-FEEvaluation<dim,
- fe_degree,
- n_q_points_1d,
- n_components_,
- Number,
- VectorizedArrayType>::evaluate(const bool evaluate_values,
- const bool evaluate_gradients,
- const bool evaluate_hessians)
-{
-# ifdef DEBUG
- Assert(this->dof_values_initialized == true,
- internal::ExcAccessToUninitializedField());
-# endif
- evaluate(this->values_dofs,
- evaluate_values,
- evaluate_gradients,
- evaluate_hessians);
-}
-
-
template <int dim,
int fe_degree,
int n_q_points_1d,
-template <int dim,
- int fe_degree,
- int n_q_points_1d,
- int n_components_,
- typename Number,
- typename VectorizedArrayType>
-inline void
-FEEvaluation<dim,
- fe_degree,
- n_q_points_1d,
- n_components_,
- Number,
- VectorizedArrayType>::evaluate(const VectorizedArrayType
- * values_array,
- const bool evaluate_values,
- const bool evaluate_gradients,
- const bool evaluate_hessians)
-{
- const EvaluationFlags::EvaluationFlags flag =
- ((evaluate_values) ? EvaluationFlags::values : EvaluationFlags::nothing) |
- ((evaluate_gradients) ? EvaluationFlags::gradients :
- EvaluationFlags::nothing) |
- ((evaluate_hessians) ? EvaluationFlags::hessians :
- EvaluationFlags::nothing);
-
- evaluate(values_array, flag);
-}
-
-
-
template <int dim,
int fe_degree,
int n_q_points_1d,
}
-
-template <int dim,
- int fe_degree,
- int n_q_points_1d,
- int n_components_,
- typename Number,
- typename VectorizedArrayType>
-template <typename VectorType>
-inline void
-FEEvaluation<
- dim,
- fe_degree,
- n_q_points_1d,
- n_components_,
- Number,
- VectorizedArrayType>::gather_evaluate(const VectorType &input_vector,
- const bool evaluate_values,
- const bool evaluate_gradients,
- const bool evaluate_hessians)
-{
- const EvaluationFlags::EvaluationFlags flag =
- ((evaluate_values) ? EvaluationFlags::values : EvaluationFlags::nothing) |
- ((evaluate_gradients) ? EvaluationFlags::gradients :
- EvaluationFlags::nothing) |
- ((evaluate_hessians) ? EvaluationFlags::hessians :
- EvaluationFlags::nothing);
-
- gather_evaluate(input_vector, flag);
-}
-
-
namespace internal
{
/**
-template <int dim,
- int fe_degree,
- int n_q_points_1d,
- int n_components_,
- typename Number,
- typename VectorizedArrayType>
-inline void
-FEEvaluation<dim,
- fe_degree,
- n_q_points_1d,
- n_components_,
- Number,
- VectorizedArrayType>::integrate(const bool integrate_values,
- const bool integrate_gradients)
-{
- integrate(integrate_values, integrate_gradients, this->values_dofs);
-
-# ifdef DEBUG
- this->dof_values_initialized = true;
-# endif
-}
-
-
-
template <int dim,
int fe_degree,
int n_q_points_1d,
-template <int dim,
- int fe_degree,
- int n_q_points_1d,
- int n_components_,
- typename Number,
- typename VectorizedArrayType>
-inline void
-FEEvaluation<dim,
- fe_degree,
- n_q_points_1d,
- n_components_,
- Number,
- VectorizedArrayType>::integrate(const bool integrate_values,
- const bool integrate_gradients,
- VectorizedArrayType *values_array)
-{
- EvaluationFlags::EvaluationFlags flag =
- (integrate_values ? EvaluationFlags::values : EvaluationFlags::nothing) |
- (integrate_gradients ? EvaluationFlags::gradients :
- EvaluationFlags::nothing);
- integrate(flag, values_array);
-}
-
-
-
template <int dim,
int fe_degree,
int n_q_points_1d,
-template <int dim,
- int fe_degree,
- int n_q_points_1d,
- int n_components_,
- typename Number,
- typename VectorizedArrayType>
-template <typename VectorType>
-inline void
-FEEvaluation<
- dim,
- fe_degree,
- n_q_points_1d,
- n_components_,
- Number,
- VectorizedArrayType>::integrate_scatter(const bool integrate_values,
- const bool integrate_gradients,
- VectorType &destination)
-{
- const EvaluationFlags::EvaluationFlags flag =
- ((integrate_values) ? EvaluationFlags::values : EvaluationFlags::nothing) |
- ((integrate_gradients) ? EvaluationFlags::gradients :
- EvaluationFlags::nothing);
-
- integrate_scatter(flag, destination);
-}
-
-
-
template <int dim,
int fe_degree,
int n_q_points_1d,
-template <int dim,
- int fe_degree,
- int n_q_points_1d,
- int n_components_,
- typename Number,
- typename VectorizedArrayType>
-inline void
-FEFaceEvaluation<dim,
- fe_degree,
- n_q_points_1d,
- n_components_,
- Number,
- VectorizedArrayType>::evaluate(const bool evaluate_values,
- const bool evaluate_gradients)
-{
-# ifdef DEBUG
- Assert(this->dof_values_initialized, ExcNotInitialized());
-# endif
-
- evaluate(this->values_dofs, evaluate_values, evaluate_gradients);
-}
-
-
-
template <int dim,
int fe_degree,
int n_q_points_1d,
-template <int dim,
- int fe_degree,
- int n_q_points_1d,
- int n_components_,
- typename Number,
- typename VectorizedArrayType>
-inline void
-FEFaceEvaluation<dim,
- fe_degree,
- n_q_points_1d,
- n_components_,
- Number,
- VectorizedArrayType>::evaluate(const VectorizedArrayType
- * values_array,
- const bool evaluate_values,
- const bool evaluate_gradients)
-{
- const EvaluationFlags::EvaluationFlags flag =
- ((evaluate_values) ? EvaluationFlags::values : EvaluationFlags::nothing) |
- ((evaluate_gradients) ? EvaluationFlags::gradients :
- EvaluationFlags::nothing);
-
- evaluate(values_array, flag);
-}
-
-
-
template <int dim,
int fe_degree,
int n_q_points_1d,
n_components,
Number,
VectorizedArrayType> &phi) {
- phi.evaluate(false, true);
+ phi.evaluate(EvaluationFlags::gradients);
for (unsigned int q = 0; q < phi.n_q_points; ++q)
phi.submit_gradient(phi.get_gradient(q), q);
- phi.integrate(false, true);
+ phi.integrate(EvaluationFlags::gradients);
});
test.do_test();
n_components,
Number,
VectorizedArrayType> &phi) {
- phi.evaluate(false, true, false);
+ phi.evaluate(EvaluationFlags::gradients);
for (unsigned int q = 0; q < phi.n_q_points; ++q)
{
phi.submit_symmetric_gradient(2.0 *
phi.get_symmetric_gradient(q),
q);
}
- phi.integrate(false, true);
+ phi.integrate(EvaluationFlags::gradients);
});
test.do_test();
n_components,
Number,
VectorizedArrayType> &phi) {
- phi.evaluate(false, true);
+ phi.evaluate(EvaluationFlags::gradients);
for (unsigned int q = 0; q < phi.n_q_points; ++q)
{
auto quadrature_point = phi.quadrature_point(q);
phi.submit_gradient(coefficient * phi.get_gradient(q), q);
}
- phi.integrate(false, true);
+ phi.integrate(EvaluationFlags::gradients);
});
test.do_test();
constraint,
[](FEEvaluation<dim, -1, 0, n_components, Number, VectorizedArrayType>
&phi) {
- phi.evaluate(false, true);
+ phi.evaluate(EvaluationFlags::gradients);
for (unsigned int q = 0; q < phi.n_q_points; ++q)
phi.submit_gradient(phi.get_gradient(q), q);
- phi.integrate(false, true);
+ phi.integrate(EvaluationFlags::gradients);
});
test.do_test();
constraint,
[](FEEvaluation<dim, -1, 0, n_components, Number, VectorizedArrayType>
&phi) {
- phi.evaluate(false, true);
+ phi.evaluate(EvaluationFlags::gradients);
for (unsigned int q = 0; q < phi.n_q_points; ++q)
phi.submit_gradient(phi.get_gradient(q), q);
- phi.integrate(false, true);
+ phi.integrate(EvaluationFlags::gradients);
});
test.do_test();
n_components,
Number,
VectorizedArrayType> &phi) {
- phi.evaluate(false, true);
+ phi.evaluate(EvaluationFlags::gradients);
for (unsigned int q = 0; q < phi.n_q_points; ++q)
phi.submit_gradient(phi.get_gradient(q), q);
- phi.integrate(false, true);
+ phi.integrate(EvaluationFlags::gradients);
});
test.do_test();
n_components,
Number,
VectorizedArrayType> &phi) {
- phi.evaluate(false, true, false);
+ phi.evaluate(EvaluationFlags::gradients);
for (unsigned int q = 0; q < phi.n_q_points; ++q)
{
phi.submit_symmetric_gradient(2.0 * phi.get_symmetric_gradient(q), q);
}
- phi.integrate(false, true);
+ phi.integrate(EvaluationFlags::gradients);
};
LinearAlgebra::distributed::Vector<Number> diagonal_global;
{
phi.reinit(cell);
phi.read_dof_values(src);
- phi.evaluate(false, true, false);
+ phi.evaluate(EvaluationFlags::gradients);
for (unsigned int q = 0; q < phi.n_q_points; ++q)
phi.submit_gradient(phi.get_gradient(q), q);
- phi.integrate(false, true);
+ phi.integrate(EvaluationFlags::gradients);
phi.set_dof_values(dst);
}
},
phi_p.reinit(face);
phi_m.read_dof_values(src);
- phi_m.evaluate(true, true);
+ phi_m.evaluate(EvaluationFlags::values | EvaluationFlags::gradients);
phi_p.read_dof_values(src);
- phi_p.evaluate(true, true);
+ phi_p.evaluate(EvaluationFlags::values | EvaluationFlags::gradients);
VectorizedArrayType sigmaF =
(std::abs(
(phi_m.normal_vector(0) * phi_m.inverse_jacobian(0))[dim - 1]) +
{
phi.reinit(cell);
phi.read_dof_values(src);
- phi.evaluate(false, true, false);
+ phi.evaluate(EvaluationFlags::gradients);
for (unsigned int q = 0; q < phi.n_q_points; ++q)
phi.submit_gradient(phi.get_gradient(q), q);
- phi.integrate(false, true);
+ phi.integrate(EvaluationFlags::gradients);
for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
++face)
{
phi.reinit(cell);
- phi.gather_evaluate(src, true, false);
+ phi.gather_evaluate(src, EvaluationFlags::values);
for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
face++)
for (unsigned int q = 0; q < phi.n_q_points; ++q)
phi.submit_value(1.0, q);
- phi.integrate_scatter(true, false, dst);
+ phi.integrate_scatter(EvaluationFlags::values, dst);
}
},
vec,
for (unsigned int q = 0; q < phi.n_q_points; ++q)
phi.submit_value(1.0, q);
- phi.integrate_scatter(true, false, dst);
+ phi.integrate_scatter(EvaluationFlags::values, dst);
}
},
vec,
matrix_free.template cell_loop<VectorType, VectorType>(
[&](const auto &, auto &dst, const auto &src, const auto cells) {
FEEvaluation<dim, -1, 0, 1, double> phi(matrix_free);
+ EvaluationFlags::EvaluationFlags fe_eval_flags =
+ EvaluationFlags::gradients;
+ if (do_helmholtz)
+ fe_eval_flags |= EvaluationFlags::values;
for (unsigned int cell = cells.first; cell < cells.second; ++cell)
{
phi.reinit(cell);
- phi.gather_evaluate(src, do_helmholtz, true);
+ phi.gather_evaluate(src, fe_eval_flags);
for (unsigned int q = 0; q < phi.n_q_points; ++q)
{
phi.submit_gradient(phi.get_gradient(q), q);
}
- phi.integrate_scatter(do_helmholtz, true, dst);
+ phi.integrate_scatter(fe_eval_flags, dst);
}
},
dst,
for (unsigned int q = 0; q < phi.n_q_points; ++q)
phi.submit_value(1.0, q);
- phi.integrate_scatter(true, false, dst);
+ phi.integrate_scatter(EvaluationFlags::values, dst);
}
},
vec,
{
matrix_free.template cell_loop<VectorType, VectorType>(
[&](const auto &data, auto &dst, const auto &src, const auto range) {
- FECellIntegrator phi(matrix_free, range);
+ FECellIntegrator phi(matrix_free, range);
+ EvaluationFlags::EvaluationFlags fe_eval_flags =
+ EvaluationFlags::gradients;
+ if (do_helmholtz)
+ fe_eval_flags |= EvaluationFlags::values;
for (unsigned int cell = range.first; cell < range.second; ++cell)
{
phi.reinit(cell);
- phi.gather_evaluate(src, do_helmholtz, true);
+ phi.gather_evaluate(src, fe_eval_flags);
for (unsigned int q = 0; q < phi.n_q_points; ++q)
{
phi.submit_gradient(phi.get_gradient(q), q);
}
- phi.integrate_scatter(do_helmholtz, true, dst);
+ phi.integrate_scatter(fe_eval_flags, dst);
}
},
dst,
for (unsigned int q = 0; q < phi.n_q_points; ++q)
phi.submit_value(1.0, q);
- phi.integrate_scatter(true, false, dst);
+ phi.integrate_scatter(EvaluationFlags::values, dst);
}
},
vec,
for (unsigned int q = 0; q < phi.n_q_points; ++q)
phi.submit_value(1.0, q);
- phi.integrate_scatter(true, false, dst);
+ phi.integrate_scatter(EvaluationFlags::values, dst);
}
},
vec,
for (unsigned int q = 0; q < phi.n_q_points; ++q)
phi.submit_value(0.0, q);
- phi.integrate_scatter(true, false, dst);
+ phi.integrate_scatter(EvaluationFlags::values, dst);
}
},
[&](const auto &data, auto &dst, const auto &src, const auto face_range) {
q);
}
- phi.integrate_scatter(true, false, dst);
+ phi.integrate_scatter(EvaluationFlags::values, dst);
}
},
vec,
++cell)
{
phi.reinit(cell);
- phi.gather_evaluate(src, true, false);
+ phi.gather_evaluate(src, EvaluationFlags::values);
for (unsigned int q = 0; q < phi.n_q_points; ++q)
phi.submit_gradient(-this->beta(phi.quadrature_point(q)) *
phi.get_value(q),
q);
- phi.integrate_scatter(false, true, dst);
+ phi.integrate_scatter(EvaluationFlags::gradients, dst);
}
},
[&](const auto &data, auto &dst, const auto &src, const auto face_range) {
++cell)
{
phi.reinit(cell);
- phi.gather_evaluate(src, true, false);
+ phi.gather_evaluate(src, EvaluationFlags::values);
for (unsigned int q = 0; q < phi.n_q_points; ++q)
{
const auto beta_n =