do_transform_real_to_unit_cell_internal(
const Point<spacedim, Number> &p,
const Point<dim, Number> &initial_p_unit,
- const std::vector<Point<spacedim>> &points,
+ const ArrayView<const Point<spacedim>> &points,
const std::vector<Polynomials::Polynomial<double>> &polynomials_1d,
const std::vector<unsigned int> &renumber,
const bool print_iterations_to_deallog = false)
do_transform_real_to_unit_cell_internal_codim1(
const Point<dim + 1> &p,
const Point<dim> &initial_p_unit,
- const std::vector<Point<dim + 1>> &points,
+ const ArrayView<const Point<dim + 1>> &points,
const std::vector<Polynomials::Polynomial<double>> &polynomials_1d,
const std::vector<unsigned int> &renumber)
{
std::vector<DerivativeForm<1, dim, spacedim>> &jacobians,
std::vector<DerivativeForm<1, spacedim, dim>> &inverse_jacobians)
{
- const UpdateFlags update_flags = data.update_each;
- const std::vector<Point<spacedim>> &support_points =
- data.mapping_support_points;
+ const UpdateFlags update_flags = data.update_each;
+ const ArrayView<const Point<spacedim>> support_points(
+ data.mapping_support_points);
const unsigned int n_points = unit_points.size();
const unsigned int n_lanes = VectorizedArray<double>::size();
{
if (data.update_each & update_jacobian_grads)
{
- const std::vector<Point<spacedim>> &support_points =
- data.mapping_support_points;
+ const ArrayView<const Point<spacedim>> support_points(
+ data.mapping_support_points);
const unsigned int n_q_points = jacobian_grads.size();
if (cell_similarity != CellSimilarity::translation)
{
if (data.update_each & update_jacobian_pushed_forward_grads)
{
- const std::vector<Point<spacedim>> &support_points =
- data.mapping_support_points;
+ const ArrayView<const Point<spacedim>> support_points(
+ data.mapping_support_points);
const unsigned int n_q_points = jacobian_pushed_forward_grads.size();
if (cell_similarity != CellSimilarity::translation)
{
if (data.update_each & update_jacobian_2nd_derivatives)
{
- const std::vector<Point<spacedim>> &support_points =
- data.mapping_support_points;
+ const ArrayView<const Point<spacedim>> support_points(
+ data.mapping_support_points);
const unsigned int n_q_points = jacobian_2nd_derivatives.size();
if (cell_similarity != CellSimilarity::translation)
{
if (data.update_each & update_jacobian_pushed_forward_2nd_derivatives)
{
- const std::vector<Point<spacedim>> &support_points =
- data.mapping_support_points;
+ const ArrayView<const Point<spacedim>> support_points(
+ data.mapping_support_points);
const unsigned int n_q_points =
jacobian_pushed_forward_2nd_derivatives.size();
{
if (data.update_each & update_jacobian_3rd_derivatives)
{
- const std::vector<Point<spacedim>> &support_points =
- data.mapping_support_points;
+ const ArrayView<const Point<spacedim>> support_points(
+ data.mapping_support_points);
const unsigned int n_q_points = jacobian_3rd_derivatives.size();
if (cell_similarity != CellSimilarity::translation)
{
if (data.update_each & update_jacobian_pushed_forward_3rd_derivatives)
{
- const std::vector<Point<spacedim>> &support_points =
- data.mapping_support_points;
+ const ArrayView<const Point<spacedim>> support_points(
+ data.mapping_support_points);
const unsigned int n_q_points =
jacobian_pushed_forward_3rd_derivatives.size();
Tensor<1, dim, typename ProductTypeNoPoint<Number, Number2>::type>>
evaluate_tensor_product_value_and_gradient(
const std::vector<Polynomials::Polynomial<double>> &poly,
- const std::vector<Number> &values,
+ const ArrayView<const Number> &values,
const Point<dim, Number2> &p,
const bool d_linear = false,
const std::vector<unsigned int> &renumber = {})
inline typename ProductTypeNoPoint<Number, Number2>::type
evaluate_tensor_product_value(
const std::vector<Polynomials::Polynomial<double>> &poly,
- const std::vector<Number> &values,
+ const ArrayView<const Number> &values,
const Point<dim, Number2> &p,
const bool d_linear = false,
const std::vector<unsigned int> &renumber = {})
inline Tensor<1, 1, typename ProductTypeNoPoint<Number, Number2>::type>
evaluate_tensor_product_higher_derivatives(
const std::vector<Polynomials::Polynomial<double>> &poly,
- const std::vector<Number> &values,
+ const ArrayView<const Number> &values,
const Point<1, Number2> &p,
const std::vector<unsigned int> &renumber = {})
{
typename ProductTypeNoPoint<Number, Number2>::type>
evaluate_tensor_product_higher_derivatives(
const std::vector<Polynomials::Polynomial<double>> &poly,
- const std::vector<Number> &values,
+ const ArrayView<const Number> &values,
const Point<2, Number2> &p,
const std::vector<unsigned int> &renumber = {})
{
typename ProductTypeNoPoint<Number, Number2>::type>
evaluate_tensor_product_higher_derivatives(
const std::vector<Polynomials::Polynomial<double>> &poly,
- const std::vector<Number> &values,
+ const ArrayView<const Number> &values,
const Point<3, Number2> &p,
const std::vector<unsigned int> &renumber = {})
{
SymmetricTensor<2, dim, typename ProductTypeNoPoint<Number, Number2>::type>
evaluate_tensor_product_hessian(
const std::vector<Polynomials::Polynomial<double>> &poly,
- const std::vector<Number> &values,
+ const ArrayView<const Number> &values,
const Point<dim, Number2> &p,
const std::vector<unsigned int> &renumber = {})
{
{
return Point<spacedim>(internal::evaluate_tensor_product_value(
polynomials_1d,
- this->compute_mapping_support_points(cell),
+ make_const_array_view(this->compute_mapping_support_points(cell)),
p,
polynomials_1d.size() == 2,
renumber_lexicographic_to_hierarchic));
do_transform_real_to_unit_cell_internal<1>(
p,
initial_p_unit,
- this->compute_mapping_support_points(cell),
+ make_const_array_view(this->compute_mapping_support_points(cell)),
polynomials_1d,
renumber_lexicographic_to_hierarchic);
}
do_transform_real_to_unit_cell_internal<2>(
p,
initial_p_unit,
- this->compute_mapping_support_points(cell),
+ make_const_array_view(this->compute_mapping_support_points(cell)),
polynomials_1d,
renumber_lexicographic_to_hierarchic);
}
do_transform_real_to_unit_cell_internal<3>(
p,
initial_p_unit,
- this->compute_mapping_support_points(cell),
+ make_const_array_view(this->compute_mapping_support_points(cell)),
polynomials_1d,
renumber_lexicographic_to_hierarchic);
}
do_transform_real_to_unit_cell_internal_codim1<1>(
p,
initial_p_unit,
- mdata->mapping_support_points,
+ make_const_array_view(mdata->mapping_support_points),
polynomials_1d,
renumber_lexicographic_to_hierarchic);
}
do_transform_real_to_unit_cell_internal_codim1<2>(
p,
initial_p_unit,
- mdata->mapping_support_points,
+ make_const_array_view(mdata->mapping_support_points),
polynomials_1d,
renumber_lexicographic_to_hierarchic);
}
return this->is_fe_q_iso_q1() ?
dealii::internal::evaluate_tensor_product_value(
poly,
- local_dof_values_subcell,
+ make_array_view(local_dof_values_subcell),
subcell_box.real_to_unit(point),
polynomials_are_hat_functions) :
dealii::internal::evaluate_tensor_product_value(
poly,
- local_dof_values,
+ make_array_view(local_dof_values),
point,
polynomials_are_hat_functions,
renumber);
dealii::internal::
evaluate_tensor_product_value_and_gradient(
poly,
- local_dof_values_subcell,
+ make_array_view(local_dof_values_subcell),
subcell_box.real_to_unit(point),
polynomials_are_hat_functions) :
dealii::internal::
evaluate_tensor_product_value_and_gradient(
poly,
- local_dof_values,
+ make_array_view(local_dof_values),
point,
polynomials_are_hat_functions,
renumber))
return this->is_fe_q_iso_q1() ?
dealii::internal::evaluate_tensor_product_hessian(
poly,
- local_dof_values_subcell,
+ make_array_view(local_dof_values_subcell),
subcell_box.real_to_unit(point)) :
dealii::internal::evaluate_tensor_product_hessian(
- poly, local_dof_values, point, renumber);
+ poly,
+ make_array_view(local_dof_values),
+ point,
+ renumber);
}
else
{
do_transform_real_to_unit_cell_internal(
p,
cell->real_to_unit_cell_affine_approximation(p),
- fe_values.get_quadrature_points(),
+ make_array_view(fe_values.get_quadrature_points()),
polynomials,
renumber,
/* print_iterations = */ true);
for (const auto &p : evaluation_points)
{
const auto val = internal::evaluate_tensor_product_value_and_gradient(
- polynomials, coefficients, p, false, renumbering);
+ polynomials,
+ make_const_array_view(coefficients),
+ p,
+ false,
+ renumbering);
deallog << "Value " << val.first << " vs "
<< transform * (matrix * p + offset) << " ; gradient "
<< val.second << " vs " << transform * matrix << std::endl;
for (const auto &p : evaluation_points)
{
const auto val = internal::evaluate_tensor_product_value_and_gradient(
- polynomials, coefficients, p, true, renumbering);
+ polynomials,
+ make_const_array_view(coefficients),
+ p,
+ true,
+ renumbering);
deallog << "Value " << val.first << " vs "
<< transform * (matrix * p + offset) << " ; gradient "
<< val.second << " vs " << transform * matrix << std::endl;
for (const auto &p : evaluation_points)
{
const auto val = internal::evaluate_tensor_product_value_and_gradient(
- polynomials, coefficients, p, false, renumbering);
+ polynomials,
+ make_const_array_view(coefficients),
+ p,
+ false,
+ renumbering);
deallog << "Value " << val.first << " vs " << matrix * p + offset
<< std::endl;
deallog << "Gradient " << val.second << " vs " << transpose(matrix)
for (const auto &p : evaluation_points)
{
const auto val = internal::evaluate_tensor_product_value_and_gradient(
- polynomials, coefficients, p, true, renumbering);
+ polynomials,
+ make_const_array_view(coefficients),
+ p,
+ true,
+ renumbering);
deallog << "Value " << val.first << " vs " << matrix * p + offset
<< std::endl;
deallog << "Gradient " << val.second << " vs " << transpose(matrix)
p_vec[d][v] = p[d] + 0.01 * v;
const auto val = internal::evaluate_tensor_product_value_and_gradient(
- polynomials, coefficients, p_vec, false, renumbering);
+ polynomials,
+ make_const_array_view(coefficients),
+ p_vec,
+ false,
+ renumbering);
const auto error_vec = val.first - matrix * p_vec;
double error = 0;
p_vec[d][v] = p[d] + 0.01 * v;
const auto val = internal::evaluate_tensor_product_value_and_gradient(
- polynomials, coefficients, p_vec, true, renumbering);
+ polynomials,
+ make_const_array_view(coefficients),
+ p_vec,
+ true,
+ renumbering);
const auto error_vec = val.first - matrix * p_vec;
double error = 0;
p_vec[d][v] = p[d] + 0.01 * v;
const auto val = internal::evaluate_tensor_product_value_and_gradient(
- polynomials, coefficients, p_vec, false);
+ polynomials, make_const_array_view(coefficients), p_vec, false);
const auto error_vec = val.first - matrix * p_vec;
double error = 0;
p_vec[d][v] = p[d] + 0.01 * v;
const auto val = internal::evaluate_tensor_product_value_and_gradient(
- polynomials, coefficients, p_vec, true);
+ polynomials, make_const_array_view(coefficients), p_vec, true);
const auto error_vec = val.first - matrix * p_vec;
double error = 0;
for (unsigned int d = 0; d < dim; ++d)
p_vec[d][v] = p[d] + 0.01 * v;
- const auto hess = internal::evaluate_tensor_product_hessian(polynomials,
- coefficients,
- p_vec,
- renumbering);
+ const auto hess = internal::evaluate_tensor_product_hessian(
+ polynomials, make_const_array_view(coefficients), p_vec, renumbering);
double error = 0;
for (unsigned int v = 0; v < VectorizedArray<double>::size(); ++v)
for (unsigned int d = 0; d < dim; ++d)
p_vec[d][v] = p[d] + 0.01 * v;
- const auto hess = internal::evaluate_tensor_product_hessian(polynomials,
- coefficients,
- p_vec);
+ const auto hess = internal::evaluate_tensor_product_hessian(
+ polynomials, make_const_array_view(coefficients), p_vec);
std::cout << hess << " " << matrix << std::endl;
deallog << "]: ";
const auto derivative =
internal::evaluate_tensor_product_higher_derivatives<derivative_order>(
- polynomials, function_values, p, renumbering);
+ polynomials, make_const_array_view(function_values), p, renumbering);
for (unsigned int d = 0; d < derivative.dimension; ++d)
deallog << (std::abs(derivative[d]) < 1e-11 ? 0. : derivative[d])
deallog << "]: ";
const auto derivative =
internal::evaluate_tensor_product_higher_derivatives<derivative_order>(
- polynomials, function_values, p);
+ polynomials, make_const_array_view(function_values), p);
for (unsigned int d = 0; d < derivative.dimension; ++d)
deallog << (std::abs(derivative[d]) < 1e-11 ? 0. : derivative[d])