16#ifndef dealii_fe_point_evaluation_h
17#define dealii_fe_point_evaluation_h
47 <<
"You are requesting information from an FEPointEvaluation "
48 <<
"object for which this kind of information has not been computed. "
49 <<
"What information these objects compute is determined by the update_* "
50 <<
"flags you pass to MappingInfo() in the Constructor. Here, "
51 <<
"the operation you are attempting requires the <" << arg1
52 <<
"> flag to be set, but it was apparently not specified "
53 <<
"upon initialization.");
59 template <
int dim,
int n_components,
typename Number>
65 typename ::internal::VectorizedArrayTrait<
81 const unsigned int component,
85 result[component] = vector_entry;
90 const unsigned int component,
94 vector_entry = result[component];
99 const unsigned int vector_lane,
102 for (
unsigned int i = 0; i < n_components; ++i)
103 for (
unsigned int d = 0; d < dim; ++d)
106 value[d][i], vector_lane);
111 const unsigned int vector_lane,
114 for (
unsigned int i = 0; i < n_components; ++i)
115 for (
unsigned int d = 0; d < dim; ++d)
117 value[d][i], vector_lane) = result[i][d];
123 for (
unsigned int i = 0; i < n_components; ++i)
124 for (
unsigned int d = 0; d < dim; ++d)
131 const unsigned int vector_lane,
134 for (
unsigned int i = 0; i < n_components; ++i)
135 result[i] =
value[i][vector_lane];
148 const unsigned int vector_lane,
151 for (
unsigned int i = 0; i < n_components; ++i)
152 value[i][vector_lane] = result[i];
166 for (
unsigned int i = 0; i < n_components; ++i)
173 const unsigned int vector_lane,
174 const unsigned int component,
178 vector_lane) += shape_value;
183 const unsigned int vector_lane,
184 const unsigned int component)
192 const unsigned int vector_lane,
193 const unsigned int component,
196 for (
unsigned int d = 0; d < dim; ++d)
204 const unsigned int vector_lane,
205 const unsigned int component)
208 for (
unsigned int d = 0; d < dim; ++d)
216 template <
int dim,
typename Number>
222 typename ::internal::VectorizedArrayTrait<
237 result = vector_entry;
245 vector_entry = result;
250 const unsigned int vector_lane,
253 for (
unsigned int d = 0; d < dim; ++d)
254 result[d] =
value[d][vector_lane];
267 const unsigned int vector_lane,
270 for (
unsigned int d = 0; d < dim; ++d)
271 value[d][vector_lane] = result[d];
285 for (
unsigned int d = 0; d < dim; ++d)
292 const unsigned int vector_lane,
295 result =
value[vector_lane];
308 const unsigned int vector_lane,
311 value[vector_lane] = result;
330 const unsigned int vector_lane,
340 const unsigned int vector_lane,
348 const unsigned int vector_lane,
352 for (
unsigned int d = 0; d < dim; ++d)
359 const unsigned int vector_lane,
363 for (
unsigned int d = 0; d < dim; ++d)
370 template <
int dim,
typename Number>
376 typename ::internal::VectorizedArrayTrait<
389 const unsigned int component,
392 result[component] = vector_entry;
397 const unsigned int component,
400 vector_entry = result[component];
405 const unsigned int vector_lane,
408 for (
unsigned int i = 0; i < dim; ++i)
409 for (
unsigned int d = 0; d < dim; ++d)
412 value[d][i], vector_lane);
417 const unsigned int vector_lane,
420 for (
unsigned int i = 0; i < dim; ++i)
421 for (
unsigned int d = 0; d < dim; ++d)
423 value[d][i], vector_lane) = result[i][d];
429 for (
unsigned int i = 0; i < dim; ++i)
430 for (
unsigned int d = 0; d < dim; ++d)
437 const unsigned int vector_lane,
440 for (
unsigned int i = 0; i < dim; ++i)
441 result[i] =
value[i][vector_lane];
454 const unsigned int vector_lane,
457 for (
unsigned int i = 0; i < dim; ++i)
458 value[i][vector_lane] = result[i];
472 for (
unsigned int i = 0; i < dim; ++i)
479 const unsigned int vector_lane,
480 const unsigned int component,
484 vector_lane) += shape_value;
489 const unsigned int vector_lane,
490 const unsigned int component)
498 const unsigned int vector_lane,
499 const unsigned int component,
502 for (
unsigned int d = 0; d < dim; ++d)
510 const unsigned int vector_lane,
511 const unsigned int component)
514 for (
unsigned int d = 0; d < dim; ++d)
522 template <
typename Number>
528 typename ::internal::VectorizedArrayTrait<
543 result = vector_entry;
551 vector_entry = result;
556 const unsigned int vector_lane,
559 result[0] =
value[0][vector_lane];
572 const unsigned int vector_lane,
575 value[0][vector_lane] = result[0];
594 const unsigned int vector_lane,
597 result =
value[vector_lane];
610 const unsigned int vector_lane,
613 value[vector_lane] = result;
632 const unsigned int vector_lane,
642 const unsigned int vector_lane,
650 const unsigned int vector_lane,
660 const unsigned int vector_lane,
670 template <
int dim,
int spacedim>
673 const unsigned int base_element_number);
675 template <
int dim,
int spacedim>
679 template <
int dim,
int spacedim>
680 std::vector<Polynomials::Polynomial<double>>
717template <
int n_components_,
720 typename Number =
double>
733 using ETT =
typename internal::FEPointEvaluation::
734 EvaluatorTypeTraits<dim, n_components, Number>;
740 typename ETT::interface_vectorized_gradient_type;
763 const unsigned int first_selected_component = 0);
784 const unsigned int first_selected_component = 0);
908 get_value(
const unsigned int point_index)
const;
962 jacobian(
const unsigned int point_index)
const;
979 JxW(
const unsigned int point_index)
const;
994 real_point(
const unsigned int point_index)
const;
1001 unit_point(
const unsigned int point_index)
const;
1028 setup(
const unsigned int first_selected_component);
1054 const unsigned int n_shapes,
1055 const unsigned int qb,
1081 const unsigned int n_shapes,
1082 const unsigned int qb,
1099 template <
bool do_JxW>
1107 template <
bool do_JxW>
1115 template <
bool do_JxW>
1144 std::vector<Polynomials::Polynomial<double>>
poly;
1286 std::unique_ptr<NonMatching::MappingInfo<dim, spacedim, Number>>
1337template <
int n_components_,
int dim,
int spacedim,
typename Number>
1342 const unsigned int first_selected_component)
1343 : n_q_points(
numbers::invalid_unsigned_int)
1344 , n_q_points_scalar(
numbers::invalid_unsigned_int)
1348 , use_face_path(false)
1349 , update_flags(update_flags)
1350 , mapping_info_on_the_fly(
1351 std::make_unique<
NonMatching::MappingInfo<dim, spacedim, Number>>(
1354 , mapping_info(mapping_info_on_the_fly.get())
1355 , current_cell_index(
numbers::invalid_unsigned_int)
1356 , current_face_number(
numbers::invalid_unsigned_int)
1357 , is_reinitialized(false)
1359 setup(first_selected_component);
1364template <
int n_components_,
int dim,
int spacedim,
typename Number>
1368 const unsigned int first_selected_component)
1369 : n_q_points(
numbers::invalid_unsigned_int)
1370 , n_q_points_scalar(
numbers::invalid_unsigned_int)
1371 , mapping(&mapping_info.get_mapping())
1374 , use_face_path(false)
1375 , update_flags(mapping_info.get_update_flags())
1376 , mapping_info(&mapping_info)
1377 , current_cell_index(
numbers::invalid_unsigned_int)
1378 , current_face_number(
numbers::invalid_unsigned_int)
1379 , is_reinitialized(false)
1381 setup(first_selected_component);
1388template <
int n_components_,
int dim,
int spacedim,
typename Number>
1391 : n_q_points(other.n_q_points)
1392 , n_q_points_scalar(other.n_q_points_scalar)
1393 , mapping(other.mapping)
1396 , polynomials_are_hat_functions(other.polynomials_are_hat_functions)
1397 , renumber(other.renumber)
1398 , solution_renumbered(other.solution_renumbered)
1399 , solution_renumbered_vectorized(other.solution_renumbered_vectorized)
1400 , values(other.values)
1401 , unit_gradients(other.unit_gradients)
1402 , gradients(other.gradients)
1403 , dofs_per_component(other.dofs_per_component)
1404 , dofs_per_component_face(other.dofs_per_component_face)
1405 , use_face_path(
false)
1406 , component_in_base_element(other.component_in_base_element)
1407 , nonzero_shape_function_component(other.nonzero_shape_function_component)
1408 , update_flags(other.update_flags)
1409 , fe_values(other.fe_values)
1410 , mapping_info_on_the_fly(
1411 other.mapping_info_on_the_fly ?
1416 , mapping_info(other.mapping_info)
1417 , current_cell_index(other.current_cell_index)
1418 , current_face_number(other.current_face_number)
1419 , fast_path(other.fast_path)
1420 , is_reinitialized(false)
1421 , shapes(other.shapes)
1422 , shapes_faces(other.shapes_faces)
1424 connection_is_reinitialized = mapping_info->connect_is_reinitialized(
1425 [
this]() { this->is_reinitialized =
false; });
1430template <
int n_components_,
int dim,
int spacedim,
typename Number>
1433 : n_q_points(other.n_q_points)
1434 , n_q_points_scalar(other.n_q_points_scalar)
1435 , mapping(other.mapping)
1438 , polynomials_are_hat_functions(other.polynomials_are_hat_functions)
1439 , renumber(other.renumber)
1440 , solution_renumbered(other.solution_renumbered)
1441 , solution_renumbered_vectorized(other.solution_renumbered_vectorized)
1442 , values(other.values)
1443 , unit_gradients(other.unit_gradients)
1444 , gradients(other.gradients)
1445 , dofs_per_component(other.dofs_per_component)
1446 , dofs_per_component_face(other.dofs_per_component_face)
1447 , use_face_path(
false)
1448 , component_in_base_element(other.component_in_base_element)
1449 , nonzero_shape_function_component(other.nonzero_shape_function_component)
1450 , update_flags(other.update_flags)
1451 , fe_values(other.fe_values)
1452 , mapping_info_on_the_fly(std::move(other.mapping_info_on_the_fly))
1453 , mapping_info(other.mapping_info)
1454 , current_cell_index(other.current_cell_index)
1455 , current_face_number(other.current_face_number)
1456 , fast_path(other.fast_path)
1457 , is_reinitialized(
false)
1458 , shapes(other.shapes)
1459 , shapes_faces(other.shapes_faces)
1461 connection_is_reinitialized = mapping_info->connect_is_reinitialized(
1462 [
this]() { this->is_reinitialized =
false; });
1467template <
int n_components_,
int dim,
int spacedim,
typename Number>
1470 connection_is_reinitialized.disconnect();
1475template <
int n_components_,
int dim,
int spacedim,
typename Number>
1478 const unsigned int first_selected_component)
1481 fe->n_components() + 1);
1483 shapes.reserve(100);
1485 bool same_base_element =
true;
1486 unsigned int base_element_number = 0;
1487 component_in_base_element = 0;
1488 unsigned int component = 0;
1489 for (; base_element_number < fe->n_base_elements(); ++base_element_number)
1490 if (component + fe->element_multiplicity(base_element_number) >
1491 first_selected_component)
1493 if (first_selected_component + n_components >
1494 component + fe->element_multiplicity(base_element_number))
1495 same_base_element =
false;
1496 component_in_base_element = first_selected_component - component;
1500 component += fe->element_multiplicity(base_element_number);
1504 *fe, base_element_number) &&
1507 shape_info.reinit(
QMidpoint<1>(), *fe, base_element_number);
1508 renumber = shape_info.lexicographic_numbering;
1509 dofs_per_component = shape_info.dofs_per_component_on_cell;
1510 dofs_per_component_face = shape_info.dofs_per_component_on_face;
1512 fe->base_element(base_element_number));
1514 bool is_lexicographic =
true;
1515 for (
unsigned int i = 0; i < renumber.size(); ++i)
1516 if (i != renumber[i])
1517 is_lexicographic =
false;
1519 if (is_lexicographic)
1522 polynomials_are_hat_functions =
1523 (poly.size() == 2 && poly[0].value(0.) == 1. &&
1524 poly[0].value(1.) == 0. && poly[1].value(0.) == 0. &&
1525 poly[1].value(1.) == 1.);
1527 const unsigned int size_face = 2 * dofs_per_component_face;
1528 const unsigned int size_cell = dofs_per_component;
1529 scratch_data_scalar.resize(size_face + size_cell);
1535 nonzero_shape_function_component.resize(fe->n_dofs_per_cell());
1536 for (
unsigned int d = 0; d < n_components; ++d)
1538 const unsigned int component = first_selected_component + d;
1539 for (
unsigned int i = 0; i < fe->n_dofs_per_cell(); ++i)
1541 const bool is_primitive =
1542 fe->is_primitive() || fe->is_primitive(i);
1544 nonzero_shape_function_component[i][d] =
1545 (component == fe->system_to_component_index(i).first);
1547 nonzero_shape_function_component[i][d] =
1548 (fe->get_nonzero_components(i)[component] ==
true);
1558template <
int n_components_,
int dim,
int spacedim,
typename Number>
1567 mapping_info->reinit(cell, unit_points);
1571 fe_values = std::make_shared<FEValues<dim, spacedim>>(
1575 std::vector<
Point<dim>>(unit_points.begin(), unit_points.end())),
1577 fe_values->reinit(cell);
1585template <
int n_components_,
int dim,
int spacedim,
typename Number>
1597template <
int n_components_,
int dim,
int spacedim,
typename Number>
1610template <
int n_components_,
int dim,
int spacedim,
typename Number>
1614 const unsigned int face_number)
1617 current_face_number = face_number;
1624template <
int n_components_,
int dim,
int spacedim,
typename Number>
1628 const_cast<unsigned int &
>(n_q_points_scalar) =
1629 mapping_info->get_n_q_points_unvectorized(current_cell_index,
1630 current_face_number);
1633 const_cast<unsigned int &
>(n_q_points) =
1634 (n_q_points_scalar + n_lanes_user_interface - 1) / n_lanes_user_interface;
1637 values.resize(n_q_points, numbers::signaling_nan<value_type>());
1639 gradients.resize(n_q_points, numbers::signaling_nan<gradient_type>());
1641 if (n_q_points == 0)
1643 is_reinitialized =
true;
1649 use_face_path = mapping_info->is_face_state() && n_q_points_scalar >= 6;
1652 const unsigned int unit_point_offset =
1653 mapping_info->compute_unit_point_index_offset(current_cell_index,
1654 current_face_number);
1657 unit_point_faces_ptr =
1658 mapping_info->get_unit_point_faces(unit_point_offset);
1660 unit_point_ptr = mapping_info->get_unit_point(unit_point_offset);
1664 mapping_info->get_update_flags_mapping();
1665 const unsigned int data_offset =
1666 mapping_info->compute_data_index_offset(current_cell_index,
1667 current_face_number);
1669 real_point_ptr = mapping_info->get_real_point(data_offset);
1671 jacobian_ptr = mapping_info->get_jacobian(data_offset);
1673 inverse_jacobian_ptr = mapping_info->get_inverse_jacobian(data_offset);
1675 normal_ptr = mapping_info->get_normal_vector(data_offset);
1677 JxW_ptr = mapping_info->get_JxW(data_offset);
1679 if (fast_path && !polynomials_are_hat_functions)
1682 const std::size_t n_batches =
1683 (n_q_points_scalar + n_lanes_internal - 1) / n_lanes_internal;
1684 const std::size_t n_shapes = poly.size();
1686 for (
unsigned int qb = 0; qb < n_batches; ++qb)
1691 shapes_faces.resize_fast(n_batches * n_shapes);
1693 shapes_faces.data() + qb * n_shapes,
1695 unit_point_faces_ptr[qb],
1701 shapes.resize_fast(n_batches * n_shapes);
1703 shapes.data() + qb * n_shapes,
1710 is_reinitialized =
true;
1715template <
int n_components_,
int dim,
int spacedim,
typename Number>
1723 if (solution_renumbered.size() != 2 * dofs_per_component_face)
1724 solution_renumbered.resize(2 * dofs_per_component_face);
1728 if (solution_renumbered.size() != dofs_per_component)
1729 solution_renumbered.resize(dofs_per_component);
1731 for (
unsigned int comp = 0; comp < n_components; ++comp)
1733 const std::size_t offset =
1734 (component_in_base_element + comp) * dofs_per_component;
1739 if (renumber.empty())
1741 for (
unsigned int i = 0; i < dofs_per_component; ++i)
1742 scratch_data_scalar[i] = solution_values[i + offset];
1743 input = scratch_data_scalar.
data();
1747 const unsigned int *renumber_ptr = renumber.data() + offset;
1748 for (
unsigned int i = 0; i < dofs_per_component; ++i)
1749 scratch_data_scalar[i] = solution_values[renumber_ptr[i]];
1750 input = scratch_data_scalar.
data();
1754 scratch_data_scalar.begin() + dofs_per_component;
1757 template interpolate<true, false>(1,
1762 current_face_number);
1764 for (
unsigned int i = 0; i < 2 * dofs_per_component_face; ++i)
1765 ETT::read_value(output[i], comp, solution_renumbered[i]);
1769 if (renumber.empty())
1771 for (
unsigned int i = 0; i < dofs_per_component; ++i)
1772 ETT::read_value(solution_values[i + offset],
1774 solution_renumbered[i]);
1778 const unsigned int *renumber_ptr = renumber.data() + offset;
1779 for (
unsigned int i = 0; i < dofs_per_component; ++i)
1780 ETT::read_value(solution_values[renumber_ptr[i]],
1782 solution_renumbered[i]);
1789 unit_gradients.resize(n_q_points, numbers::signaling_nan<gradient_type>());
1794template <
int n_components_,
int dim,
int spacedim,
typename Number>
1798 const unsigned int n_shapes,
1799 const unsigned int qb,
1807 const std::array<vectorized_value_type, dim + 1> interpolated_value =
1808 polynomials_are_hat_functions ?
1814 solution_renumbered.data(),
1815 unit_point_faces_ptr[qb]) :
1821 false>(shapes_faces.data() + qb * n_shapes,
1823 solution_renumbered.data());
1825 value = interpolated_value[dim - 1];
1828 if (current_face_number / 2 == 0)
1830 gradient[0] = interpolated_value[dim];
1832 gradient[1] = interpolated_value[0];
1834 gradient[2] = interpolated_value[1];
1836 else if (current_face_number / 2 == 1)
1839 gradient[1] = interpolated_value[dim];
1842 gradient[0] = interpolated_value[1];
1843 gradient[2] = interpolated_value[0];
1846 gradient[0] = interpolated_value[0];
1850 else if (current_face_number / 2 == 2)
1854 gradient[0] = interpolated_value[0];
1855 gradient[1] = interpolated_value[1];
1856 gradient[2] = interpolated_value[dim];
1866 value = polynomials_are_hat_functions ?
1871 solution_renumbered.data(),
1872 unit_point_faces_ptr[qb]) :
1877 false>(shapes_faces.data() + qb * n_shapes,
1879 solution_renumbered.data());
1886 const std::array<vectorized_value_type, dim + 1> result =
1887 polynomials_are_hat_functions ?
1889 n_shapes, solution_renumbered.data(), unit_point_ptr[qb]) :
1895 false>(shapes.data() + qb * n_shapes,
1897 solution_renumbered.data());
1898 gradient[0] = result[0];
1900 gradient[1] = result[1];
1902 gradient[2] = result[2];
1903 value = result[dim];
1908 polynomials_are_hat_functions ?
1910 n_shapes, solution_renumbered.data(), unit_point_ptr[qb]) :
1915 false>(shapes.data() + qb * n_shapes,
1917 solution_renumbered.data());
1924template <
int n_components_,
int dim,
int spacedim,
typename Number>
1930 prepare_evaluate_fast(solution_values, evaluation_flags);
1933 const unsigned int n_shapes = poly.size();
1936 for (
unsigned int qb = 0, q = 0; q < n_q_points_scalar;
1937 ++qb, q += n_lanes_internal)
1939 compute_evaluate_fast(evaluation_flags, n_shapes, qb, value, gradient);
1943 for (
unsigned int v = 0;
1944 v < stride && (stride == 1 || q + v < n_q_points_scalar);
1946 ETT::set_value(value, v, values[qb * stride + v]);
1954 for (
unsigned int v = 0;
1955 v < stride && (stride == 1 || q + v < n_q_points_scalar);
1958 const unsigned int offset = qb * stride + v;
1959 ETT::set_gradient(gradient, v, unit_gradients[offset]);
1962 unit_gradients[offset]);
1970template <
int n_components_,
int dim,
int spacedim,
typename Number>
1977 Assert(fe_values.get() !=
nullptr,
1979 "Not initialized. Please call FEPointEvaluation::reinit()!"));
1981 const std::size_t n_points = fe_values->get_quadrature().size();
1985 values.resize(n_q_points);
1986 std::fill(values.begin(), values.end(),
value_type());
1987 for (
unsigned int i = 0; i < fe->n_dofs_per_cell(); ++i)
1990 for (
unsigned int d = 0; d < n_components; ++d)
1991 if (nonzero_shape_function_component[i][d] &&
1992 (fe->is_primitive(i) || fe->is_primitive()))
1993 for (
unsigned int qb = 0, q = 0; q < n_points;
1994 ++qb, q += n_lanes_user_interface)
1995 for (
unsigned int v = 0;
1996 v < n_lanes_user_interface && q + v < n_points;
1998 ETT::access(values[qb],
2001 fe_values->shape_value(i, q + v) * value);
2002 else if (nonzero_shape_function_component[i][d])
2003 for (
unsigned int qb = 0, q = 0; q < n_points;
2004 ++qb, q += n_lanes_user_interface)
2005 for (
unsigned int v = 0;
2006 v < n_lanes_user_interface && q + v < n_points;
2008 ETT::access(values[qb],
2011 fe_values->shape_value_component(i, q + v, d) *
2018 gradients.resize(n_q_points);
2019 std::fill(gradients.begin(), gradients.end(),
gradient_type());
2020 for (
unsigned int i = 0; i < fe->n_dofs_per_cell(); ++i)
2023 for (
unsigned int d = 0; d < n_components; ++d)
2024 if (nonzero_shape_function_component[i][d] &&
2025 (fe->is_primitive(i) || fe->is_primitive()))
2026 for (
unsigned int qb = 0, q = 0; q < n_points;
2027 ++qb, q += n_lanes_user_interface)
2028 for (
unsigned int v = 0;
2029 v < n_lanes_user_interface && q + v < n_points;
2031 ETT::access(gradients[qb],
2034 fe_values->shape_grad(i, q + v) * value);
2035 else if (nonzero_shape_function_component[i][d])
2036 for (
unsigned int qb = 0, q = 0; q < n_points;
2037 ++qb, q += n_lanes_user_interface)
2038 for (
unsigned int v = 0;
2039 v < n_lanes_user_interface && q + v < n_points;
2041 ETT::access(gradients[qb],
2044 fe_values->shape_grad_component(i, q + v, d) *
2052template <
int n_components_,
int dim,
int spacedim,
typename Number>
2058 if (!is_reinitialized)
2061 if (n_q_points == 0)
2072 evaluate_fast(solution_values, evaluation_flags);
2074 evaluate_slow(solution_values, evaluation_flags);
2079template <
int n_components_,
int dim,
int spacedim,
typename Number>
2083 const unsigned int n_shapes,
2084 const unsigned int qb,
2092 std::array<vectorized_value_type, 2> value_face = {};
2095 value_face[0] = value;
2098 if (current_face_number / 2 == 0)
2100 value_face[1] = gradient[0];
2102 gradient_in_face[0] = gradient[1];
2104 gradient_in_face[1] = gradient[2];
2106 else if (current_face_number / 2 == 1)
2109 value_face[1] = gradient[1];
2112 gradient_in_face[0] = gradient[2];
2113 gradient_in_face[1] = gradient[0];
2116 gradient_in_face[0] = gradient[0];
2120 else if (current_face_number / 2 == 2)
2124 value_face[1] = gradient[2];
2125 gradient_in_face[0] = gradient[0];
2126 gradient_in_face[1] = gradient[1];
2138 2>(shapes_faces.data() + qb * n_shapes,
2142 solution_renumbered_vectorized.data(),
2143 unit_point_faces_ptr[qb],
2144 polynomials_are_hat_functions,
2151 shapes_faces.data() + qb * n_shapes,
2154 solution_renumbered_vectorized.data(),
2155 unit_point_faces_ptr[qb],
2156 polynomials_are_hat_functions,
2169 solution_renumbered_vectorized.data(),
2171 polynomials_are_hat_functions,
2177 shapes.data() + qb * n_shapes,
2180 solution_renumbered_vectorized.data(),
2182 polynomials_are_hat_functions,
2189template <
int n_components_,
int dim,
int spacedim,
typename Number>
2196 for (
unsigned int comp = 0; comp < n_components; ++comp)
2198 const std::size_t offset =
2199 (component_in_base_element + comp) * dofs_per_component;
2203 const unsigned int size_input = 2 * dofs_per_component_face;
2207 for (
unsigned int i = 0; i < 2 * dofs_per_component_face; ++i)
2210 ETT::write_value(vectorized_input,
2212 solution_renumbered_vectorized[i]);
2213 input[i] = vectorized_input.sum();
2217 template interpolate<false, false>(1,
2222 current_face_number);
2224 if (renumber.empty())
2225 for (
unsigned int i = 0; i < dofs_per_component; ++i)
2226 solution_values[i + offset] = output[i];
2228 for (
unsigned int i = 0; i < dofs_per_component; ++i)
2229 solution_values[renumber[i + offset]] = output[i];
2233 if (renumber.empty())
2234 for (
unsigned int i = 0; i < dofs_per_component; ++i)
2237 ETT::write_value(result,
2239 solution_renumbered_vectorized[i]);
2240 solution_values[i + offset] = result.sum();
2243 for (
unsigned int i = 0; i < dofs_per_component; ++i)
2246 ETT::write_value(result,
2248 solution_renumbered_vectorized[i]);
2249 solution_values[renumber[i + offset]] = result.sum();
2257template <
int n_components_,
int dim,
int spacedim,
typename Number>
2258template <
bool do_JxW>
2267 if (solution_renumbered_vectorized.size() != 2 * dofs_per_component_face)
2268 solution_renumbered_vectorized.resize(2 * dofs_per_component_face);
2272 if (solution_renumbered_vectorized.size() != dofs_per_component)
2273 solution_renumbered_vectorized.resize(dofs_per_component);
2277 const unsigned int n_shapes = poly.size();
2278 for (
unsigned int qb = 0, q = 0; q < n_q_points_scalar;
2279 ++qb, q += n_lanes_internal)
2281 const bool incomplete_last_batch =
2282 q + n_lanes_user_interface > n_q_points_scalar;
2290 if (incomplete_last_batch)
2292 const unsigned int n_filled_lanes_last_batch =
2293 n_q_points_scalar % n_lanes_internal;
2294 for (
unsigned int v = n_filled_lanes_last_batch;
2295 v < n_lanes_internal;
2297 ETT::set_zero_value(values[qb], v);
2300 for (
unsigned int v = 0;
2301 v < stride && (stride == 1 || q + v < n_q_points_scalar);
2304 const unsigned int offset = qb * stride + v;
2306 values[offset] *= JxW_ptr[offset];
2307 ETT::get_value(value, v, values[offset]);
2313 if (incomplete_last_batch)
2315 const unsigned int n_filled_lanes_last_batch =
2316 n_q_points_scalar % n_lanes_internal;
2317 for (
unsigned int v = n_filled_lanes_last_batch;
2318 v < n_lanes_internal;
2320 ETT::set_zero_gradient(gradients[qb], v);
2323 for (
unsigned int v = 0;
2324 v < stride && (stride == 1 || q + v < n_q_points_scalar);
2327 const unsigned int offset = qb * stride + v;
2329 gradients[offset] *= JxW_ptr[offset];
2334 gradients[offset]));
2338 compute_integrate_fast(integration_flags, n_shapes, qb, value, gradient);
2342 finish_integrate_fast(solution_values, integration_flags);
2347template <
int n_components_,
int dim,
int spacedim,
typename Number>
2348template <
bool do_JxW>
2355 Assert(fe_values.get() !=
nullptr,
2357 "Not initialized. Please call FEPointEvaluation::reinit()!"));
2358 std::fill(solution_values.
begin(), solution_values.
end(), 0.0);
2360 const std::size_t n_points = fe_values->get_quadrature().size();
2365 for (
unsigned int i = 0; i < fe->n_dofs_per_cell(); ++i)
2367 for (
unsigned int d = 0; d < n_components; ++d)
2368 if (nonzero_shape_function_component[i][d] &&
2369 (fe->is_primitive(i) || fe->is_primitive()))
2370 for (
unsigned int qb = 0, q = 0; q < n_points;
2371 ++qb, q += n_lanes_user_interface)
2372 for (
unsigned int v = 0;
2373 v < n_lanes_user_interface && q + v < n_points;
2375 solution_values[i] += fe_values->shape_value(i, q + v) *
2376 ETT::access(values[qb], v, d) *
2377 (do_JxW ? fe_values->JxW(q + v) : 1.);
2378 else if (nonzero_shape_function_component[i][d])
2379 for (
unsigned int qb = 0, q = 0; q < n_points;
2380 ++qb, q += n_lanes_user_interface)
2381 for (
unsigned int v = 0;
2382 v < n_lanes_user_interface && q + v < n_points;
2384 solution_values[i] +=
2385 fe_values->shape_value_component(i, q + v, d) *
2386 ETT::access(values[qb], v, d) *
2387 (do_JxW ? fe_values->JxW(q + v) : 1.);
2394 for (
unsigned int i = 0; i < fe->n_dofs_per_cell(); ++i)
2396 for (
unsigned int d = 0; d < n_components; ++d)
2397 if (nonzero_shape_function_component[i][d] &&
2398 (fe->is_primitive(i) || fe->is_primitive()))
2399 for (
unsigned int qb = 0, q = 0; q < n_points;
2400 ++qb, q += n_lanes_user_interface)
2401 for (
unsigned int v = 0;
2402 v < n_lanes_user_interface && q + v < n_points;
2404 solution_values[i] += fe_values->shape_grad(i, q + v) *
2405 ETT::access(gradients[qb], v, d) *
2406 (do_JxW ? fe_values->JxW(q + v) : 1.);
2407 else if (nonzero_shape_function_component[i][d])
2408 for (
unsigned int qb = 0, q = 0; q < n_points;
2409 ++qb, q += n_lanes_user_interface)
2410 for (
unsigned int v = 0;
2411 v < n_lanes_user_interface && q + v < n_points;
2413 solution_values[i] +=
2414 fe_values->shape_grad_component(i, q + v, d) *
2415 ETT::access(gradients[qb], v, d) *
2416 (do_JxW ? fe_values->JxW(q + v) : 1.);
2423template <
int n_components_,
int dim,
int spacedim,
typename Number>
2424template <
bool do_JxW>
2430 if (!is_reinitialized)
2433 if (n_q_points == 0)
2435 std::fill(solution_values.
begin(), solution_values.
end(), 0.0);
2442 (integration_flags &
2445 std::fill(solution_values.
begin(), solution_values.
end(), 0.0);
2450 !do_JxW || JxW_ptr !=
nullptr,
2452 "JxW pointer is not set! If you do not want to integrate() use test_and_sum()"));
2456 integrate_fast<do_JxW>(solution_values, integration_flags);
2458 integrate_slow<do_JxW>(solution_values, integration_flags);
2463template <
int n_components_,
int dim,
int spacedim,
typename Number>
2469 do_integrate<true>(solution_values, integration_flags);
2474template <
int n_components_,
int dim,
int spacedim,
typename Number>
2480 do_integrate<false>(solution_values, integration_flags);
2485template <
int n_components_,
int dim,
int spacedim,
typename Number>
2489 const unsigned int point_index)
const
2492 return values[point_index];
2497template <
int n_components_,
int dim,
int spacedim,
typename Number>
2501 const unsigned int point_index)
const
2504 return gradients[point_index];
2509template <
int n_components_,
int dim,
int spacedim,
typename Number>
2513 const unsigned int point_index)
const
2516 ExcMessage(
"Unit gradients are currently only implemented for tensor "
2517 "product finite elements combined with MappingQ "
2520 return unit_gradients[point_index];
2525template <
int n_components_,
int dim,
int spacedim,
typename Number>
2529 const unsigned int point_index)
2532 values[point_index] = value;
2537template <
int n_components_,
int dim,
int spacedim,
typename Number>
2541 const unsigned int point_index)
2544 gradients[point_index] = gradient;
2549template <
int n_components_,
int dim,
int spacedim,
typename Number>
2552 const unsigned int point_index)
const
2555 Assert(jacobian_ptr !=
nullptr,
2557 ExcFEPointEvaluationAccessToUninitializedMappingField(
2558 "update_jacobians"));
2559 return jacobian_ptr[point_index];
2564template <
int n_components_,
int dim,
int spacedim,
typename Number>
2567 const unsigned int point_index)
const
2570 Assert(inverse_jacobian_ptr !=
nullptr,
2572 ExcFEPointEvaluationAccessToUninitializedMappingField(
2573 "update_inverse_jacobians"));
2574 return inverse_jacobian_ptr[point_index];
2579template <
int n_components_,
int dim,
int spacedim,
typename Number>
2582 const unsigned int point_index)
const
2585 Assert(JxW_ptr !=
nullptr,
2587 ExcFEPointEvaluationAccessToUninitializedMappingField(
2588 "update_JxW_values"));
2589 return JxW_ptr[point_index];
2594template <
int n_components_,
int dim,
int spacedim,
typename Number>
2597 const unsigned int point_index)
const
2600 Assert(normal_ptr !=
nullptr,
2602 ExcFEPointEvaluationAccessToUninitializedMappingField(
2603 "update_normal_vectors"));
2604 return normal_ptr[point_index];
2609template <
int n_components_,
int dim,
int spacedim,
typename Number>
2612 const unsigned int point_index)
const
2615 Assert(real_point_ptr !=
nullptr,
2617 ExcFEPointEvaluationAccessToUninitializedMappingField(
2618 "update_quadrature_points"));
2619 return real_point_ptr[point_index];
2624template <
int n_components_,
int dim,
int spacedim,
typename Number>
2627 const unsigned int point_index)
const
2630 Assert(unit_point_ptr !=
nullptr,
ExcMessage(
"unit_point_ptr is not set!"));
2632 for (
unsigned int d = 0; d < dim; ++d)
2634 unit_point_ptr[point_index / stride][d], point_index % stride);
2640template <
int n_components_,
int dim,
int spacedim,
typename Number>
2645 return {0U, n_q_points};
value_type * data() const noexcept
static constexpr std::size_t stride
SmartPointer< const FiniteElement< dim > > fe
void integrate(const ArrayView< ScalarNumber > &solution_values, const EvaluationFlags::EvaluationFlags &integration_flags)
AlignedVector< vectorized_value_type > solution_renumbered_vectorized
unsigned int current_cell_index
void submit_gradient(const gradient_type &, const unsigned int point_index)
AlignedVector<::ndarray< VectorizedArrayType, 2, dim - 1 > > shapes_faces
std::vector< gradient_type > gradients
typename ETT::gradient_type gradient_type
std::vector< std::array< bool, n_components > > nonzero_shape_function_component
std::vector< gradient_type > unit_gradients
unsigned int current_face_number
static constexpr unsigned int dimension
const Point< dim - 1, VectorizedArrayType > * unit_point_faces_ptr
typename ETT::value_type value_type
std::unique_ptr< NonMatching::MappingInfo< dim, spacedim, Number > > mapping_info_on_the_fly
void test_and_sum(const ArrayView< ScalarNumber > &solution_values, const EvaluationFlags::EvaluationFlags &integration_flags)
typename ETT::scalar_value_type scalar_value_type
const Point< dim, VectorizedArrayType > * unit_point_ptr
std::vector< Polynomials::Polynomial< double > > poly
std::vector< value_type > values
void integrate_slow(const ArrayView< ScalarNumber > &solution_values, const EvaluationFlags::EvaluationFlags &integration_flags)
AlignedVector<::ndarray< VectorizedArrayType, 2, dim > > shapes
const DerivativeForm< 1, spacedim, dim, Number > * inverse_jacobian_ptr
const value_type & get_value(const unsigned int point_index) const
typename internal::VectorizedArrayTrait< Number >::value_type ScalarNumber
typename ETT::vectorized_value_type vectorized_value_type
typename ::internal::VectorizedArrayTrait< Number >::vectorized_value_type VectorizedArrayType
unsigned int dofs_per_component
std_cxx20::ranges::iota_view< unsigned int, unsigned int > quadrature_point_indices() const
void compute_integrate_fast(const EvaluationFlags::EvaluationFlags &integration_flags, const unsigned int n_shapes, const unsigned int qb, const vectorized_value_type &value, const interface_vectorized_gradient_type &gradient)
DerivativeForm< 1, dim, spacedim, Number > jacobian(const unsigned int point_index) const
unsigned int dofs_per_component_face
void finish_integrate_fast(const ArrayView< ScalarNumber > &solution_values, const EvaluationFlags::EvaluationFlags &integration_flags)
const DerivativeForm< 1, dim, spacedim, Number > * jacobian_ptr
void evaluate_fast(const ArrayView< const ScalarNumber > &solution_values, const EvaluationFlags::EvaluationFlags &evaluation_flags)
const Point< spacedim, Number > * real_point_ptr
DerivativeForm< 1, spacedim, dim, Number > inverse_jacobian(const unsigned int point_index) const
Point< dim, Number > unit_point(const unsigned int point_index) const
const UpdateFlags update_flags
void prepare_evaluate_fast(const ArrayView< const ScalarNumber > &solution_values, const EvaluationFlags::EvaluationFlags &evaluation_flags)
std::vector< unsigned int > renumber
AlignedVector< ScalarNumber > scratch_data_scalar
void evaluate(const ArrayView< const ScalarNumber > &solution_values, const EvaluationFlags::EvaluationFlags &evaluation_flags)
Number JxW(const unsigned int point_index) const
void setup(const unsigned int first_selected_component)
void submit_value(const value_type &value, const unsigned int point_index)
typename ETT::interface_vectorized_gradient_type interface_vectorized_gradient_type
static constexpr std::size_t n_lanes_internal
void evaluate_slow(const ArrayView< const ScalarNumber > &solution_values, const EvaluationFlags::EvaluationFlags &evaluation_flags)
const unsigned int n_q_points
static constexpr unsigned int n_components
internal::MatrixFreeFunctions::ShapeInfo< ScalarNumber > shape_info
void do_integrate(const ArrayView< ScalarNumber > &solution_values, const EvaluationFlags::EvaluationFlags &integration_flags)
const unsigned int n_q_points_scalar
unsigned int component_in_base_element
bool polynomials_are_hat_functions
std::vector< scalar_value_type > solution_renumbered
typename internal::FEPointEvaluation::EvaluatorTypeTraits< dim, n_components, Number > ETT
std::shared_ptr< FEValues< dim, spacedim > > fe_values
static constexpr std::size_t n_lanes_user_interface
const Tensor< 1, spacedim, Number > * normal_ptr
FEPointEvaluation(const Mapping< dim > &mapping, const FiniteElement< dim > &fe, const UpdateFlags update_flags, const unsigned int first_selected_component=0)
boost::signals2::connection connection_is_reinitialized
void compute_evaluate_fast(const EvaluationFlags::EvaluationFlags &evaluation_flags, const unsigned int n_shapes, const unsigned int qb, vectorized_value_type &value, interface_vectorized_gradient_type &gradient)
void integrate_fast(const ArrayView< ScalarNumber > &solution_values, const EvaluationFlags::EvaluationFlags &integration_flags)
Point< spacedim, Number > real_point(const unsigned int point_index) const
const gradient_type & get_unit_gradient(const unsigned int point_index) const
SmartPointer< const Mapping< dim, spacedim > > mapping
SmartPointer< NonMatching::MappingInfo< dim, spacedim, Number > > mapping_info
Tensor< 1, spacedim, Number > normal_vector(const unsigned int point_index) const
const gradient_type & get_gradient(const unsigned int point_index) const
Abstract base class for mapping classes.
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
static ::ExceptionBase & ExcFEPointEvaluationAccessToUninitializedMappingField(std::string arg1)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcNotInitialized()
#define DeclException1(Exception1, type1, outsequence)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
@ update_values
Shape function values.
@ update_normal_vectors
Normal vectors.
@ update_JxW_values
Transformed quadrature weights.
@ update_jacobians
Volume element.
@ update_inverse_jacobians
Volume element.
@ update_gradients
Shape function gradients.
@ update_quadrature_points
Transformed quadrature points.
EvaluationFlags
The EvaluationFlags enum.
std::vector< Polynomials::Polynomial< double > > get_polynomial_space(const FiniteElement< dim, spacedim > &fe)
bool is_fast_path_supported(const FiniteElement< dim, spacedim > &fe, const unsigned int base_element_number)
std::array< typename ProductTypeNoPoint< Number, Number2 >::type, dim+n_values > evaluate_tensor_product_value_and_gradient_linear(const unsigned int n_shapes, const Number *values, const Point< dim, Number2 > &p, const std::vector< unsigned int > &renumber={})
void compute_values_of_array(::ndarray< Number, 2, dim > *shapes, const std::vector< Polynomials::Polynomial< double > > &poly, const Point< dim, Number > &p, const unsigned int derivative=1)
void integrate_tensor_product_value(const ::ndarray< Number, 2, dim > *shapes, const unsigned int n_shapes, const Number2 &value, Number2 *values, const Point< dim, Number > &p, const bool is_linear, const bool do_add)
ProductTypeNoPoint< Number, Number2 >::type evaluate_tensor_product_value_linear(const unsigned int n_shapes, const Number *values, const Point< dim, Number2 > &p, const std::vector< unsigned int > &renumber={})
ProductTypeNoPoint< Number, Number2 >::type evaluate_tensor_product_value_shapes(const ::ndarray< Number2, 2, dim > *shapes, const int n_shapes, const Number *values, const std::vector< unsigned int > &renumber={})
std::array< typename ProductTypeNoPoint< Number, Number2 >::type, dim+n_values > evaluate_tensor_product_value_and_gradient_shapes(const ::ndarray< Number2, 2, dim > *shapes, const int n_shapes, const Number *values, const std::vector< unsigned int > &renumber={})
void integrate_tensor_product_value_and_gradient(const ::ndarray< Number, 2, dim > *shapes, const unsigned int n_shapes, const Number2 *value, const Tensor< 1, dim, Number2 > &gradient, Number2 *values, const Point< dim, Number > &p, const bool is_linear, const bool do_add)
static const unsigned int invalid_unsigned_int
boost::integer_range< IncrementableType > iota_view
typename internal::ndarray::HelperArray< T, Ns... >::type ndarray
typename ::internal::VectorizedArrayTrait< Number >::vectorized_value_type VectorizedArrayType
static void access(gradient_type &value, const unsigned int vector_lane, const unsigned int, const scalar_gradient_type &shape_gradient)
static void get_value(vectorized_value_type &value, const unsigned int, const vectorized_value_type &result)
static scalar_gradient_type access(const gradient_type &value, const unsigned int vector_lane, const unsigned int)
static void get_gradient(vectorized_gradient_type &value, const unsigned int, const vectorized_gradient_type &result)
static void set_gradient(const vectorized_gradient_type &value, const unsigned int vector_lane, scalar_gradient_type &result)
static void set_value(const vectorized_value_type &value, const unsigned int vector_lane, scalar_value_type &result)
typename internal::VectorizedArrayTrait< Number >::value_type ScalarNumber
ScalarNumber scalar_value_type
static void set_value(const vectorized_value_type &value, const unsigned int, vectorized_value_type &result)
static void read_value(const ScalarNumber vector_entry, const unsigned int, scalar_value_type &result)
static void write_value(VectorizedArrayType &vector_entry, const unsigned int, const vectorized_value_type &result)
static void set_gradient(const vectorized_gradient_type &value, const unsigned int, vectorized_gradient_type &result)
static void get_value(vectorized_value_type &value, const unsigned int vector_lane, const scalar_value_type &result)
static void set_zero_value(value_type &value, const unsigned int vector_lane)
static ScalarNumber access(const value_type &value, const unsigned int vector_lane, const unsigned int)
static void set_zero_gradient(gradient_type &value, const unsigned int vector_lane)
VectorizedArrayType vectorized_value_type
static void access(value_type &value, const unsigned int vector_lane, const unsigned int, const ScalarNumber &shape_value)
static void get_gradient(vectorized_gradient_type &value, const unsigned int vector_lane, const scalar_gradient_type &result)
static void set_value(const vectorized_value_type &value, const unsigned int vector_lane, scalar_value_type &result)
VectorizedArrayType vectorized_value_type
ScalarNumber scalar_value_type
static void read_value(const ScalarNumber vector_entry, const unsigned int, scalar_value_type &result)
static void set_gradient(const vectorized_gradient_type &value, const unsigned int, vectorized_gradient_type &result)
static void get_gradient(vectorized_gradient_type &value, const unsigned int vector_lane, const scalar_gradient_type &result)
static scalar_gradient_type access(const gradient_type &value, const unsigned int vector_lane, const unsigned int)
typename ::internal::VectorizedArrayTrait< Number >::vectorized_value_type VectorizedArrayType
static void set_zero_value(value_type &value, const unsigned int vector_lane)
static void get_value(vectorized_value_type &value, const unsigned int, const vectorized_value_type &result)
static void write_value(VectorizedArrayType &vector_entry, const unsigned int, const vectorized_value_type &result)
static void set_value(const vectorized_value_type &value, const unsigned int, vectorized_value_type &result)
static void set_zero_gradient(gradient_type &value, const unsigned int vector_lane)
static void set_gradient(const vectorized_gradient_type &value, const unsigned int vector_lane, scalar_gradient_type &result)
static void access(gradient_type &value, const unsigned int vector_lane, const unsigned int, const scalar_gradient_type &shape_gradient)
static ScalarNumber access(const value_type &value, const unsigned int vector_lane, const unsigned int)
typename internal::VectorizedArrayTrait< Number >::value_type ScalarNumber
static void get_gradient(vectorized_gradient_type &value, const unsigned int, const vectorized_gradient_type &result)
static void get_value(vectorized_value_type &value, const unsigned int vector_lane, const scalar_value_type &result)
static void access(value_type &value, const unsigned int vector_lane, const unsigned int, const ScalarNumber &shape_value)
static ScalarNumber access(const value_type &value, const unsigned int vector_lane, const unsigned int component)
static void get_value(vectorized_value_type &value, const unsigned int vector_lane, const scalar_value_type &result)
static void get_gradient(interface_vectorized_gradient_type &value, const unsigned int vector_lane, const gradient_type &result)
static Tensor< 1, dim, ScalarNumber > access(const gradient_type &value, const unsigned int vector_lane, const unsigned int component)
static void set_zero_gradient(gradient_type &value, const unsigned int vector_lane)
static void write_value(VectorizedArrayType &vector_entry, const unsigned int component, const vectorized_value_type &result)
static void get_value(vectorized_value_type &value, const unsigned int, const vectorized_value_type &result)
static void set_value(const vectorized_value_type &value, const unsigned int, vectorized_value_type &result)
static void set_value(const vectorized_value_type &value, const unsigned int vector_lane, scalar_value_type &result)
static void set_gradient(const interface_vectorized_gradient_type &value, const unsigned int vector_lane, gradient_type &result)
typename internal::VectorizedArrayTrait< Number >::value_type ScalarNumber
static void access(gradient_type &value, const unsigned int vector_lane, const unsigned int component, const Tensor< 1, dim, ScalarNumber > &shape_gradient)
typename ::internal::VectorizedArrayTrait< Number >::vectorized_value_type VectorizedArrayType
static void access(value_type &value, const unsigned int vector_lane, const unsigned int component, const ScalarNumber &shape_value)
static void read_value(const ScalarNumber vector_entry, const unsigned int component, scalar_value_type &result)
static void set_zero_value(value_type &value, const unsigned int vector_lane)
static void write_value(VectorizedArrayType &vector_entry, const unsigned int component, const vectorized_value_type &result)
typename ::internal::VectorizedArrayTrait< Number >::vectorized_value_type VectorizedArrayType
static void set_value(const vectorized_value_type &value, const unsigned int vector_lane, scalar_value_type &result)
typename internal::VectorizedArrayTrait< Number >::value_type ScalarNumber
static void access(value_type &value, const unsigned int vector_lane, const unsigned int component, const ScalarNumber &shape_value)
static void set_zero_value(value_type &value, const unsigned int vector_lane)
Tensor< 1, n_components, VectorizedArrayType > vectorized_value_type
static Tensor< 1, dim, ScalarNumber > access(const gradient_type &value, const unsigned int vector_lane, const unsigned int component)
Tensor< 1, n_components, Tensor< 1, dim, VectorizedArrayType > > vectorized_gradient_type
static void access(gradient_type &value, const unsigned int vector_lane, const unsigned int component, const Tensor< 1, dim, ScalarNumber > &shape_gradient)
static void read_value(const ScalarNumber vector_entry, const unsigned int component, scalar_value_type &result)
Tensor< 1, n_components, Tensor< 1, dim, ScalarNumber > > scalar_gradient_type
static void set_zero_gradient(gradient_type &value, const unsigned int vector_lane)
static ScalarNumber access(const value_type &value, const unsigned int vector_lane, const unsigned int component)
static void get_value(vectorized_value_type &value, const unsigned int, const vectorized_value_type &result)
static void set_value(const vectorized_value_type &value, const unsigned int, vectorized_value_type &result)
static void get_gradient(interface_vectorized_gradient_type &value, const unsigned int vector_lane, const gradient_type &result)
static void set_gradient(const interface_vectorized_gradient_type &value, const unsigned int vector_lane, gradient_type &result)
static void get_value(vectorized_value_type &value, const unsigned int vector_lane, const scalar_value_type &result)
static constexpr std::size_t width()
static constexpr std::size_t stride()
static value_type & get(value_type &value, unsigned int c)