34 template <
typename Number,
typename T =
void>
38 value(
const Number &value)
49 template <
typename Number>
52 std::
enable_if_t<Differentiation::AD::is_ad_number<Number>::value>>
55 value(
const Number & )
62 template <
int dim,
int spacedim,
typename Number>
71 const unsigned int dofs_per_cell =
dof_values.size();
72 const unsigned int n_quadrature_points = values.size();
74 std::fill(values.begin(),
81 .is_nonzero_shape_function_component)
87 if (CheckForZero<Number>::value(value) ==
true)
100 template <
int order,
int dim,
int spacedim,
typename Number>
106 &shape_function_data,
111 const unsigned int dofs_per_cell =
dof_values.size();
112 const unsigned int n_quadrature_points =
derivatives.size();
122 .is_nonzero_shape_function_component)
128 if (CheckForZero<Number>::value(value) ==
true)
142 template <
int dim,
int spacedim,
typename Number>
148 &shape_function_data,
152 const unsigned int dofs_per_cell =
dof_values.size();
153 const unsigned int n_quadrature_points =
laplacians.size();
164 .is_nonzero_shape_function_component)
170 if (CheckForZero<Number>::value(value) ==
true)
174 &shape_hessians[shape_function_data[
shape_function].row_index][0];
185 template <
int dim,
int spacedim,
typename Number>
191 &shape_function_data,
196 const unsigned int dofs_per_cell =
dof_values.size();
197 const unsigned int n_quadrature_points = values.size();
218 if (CheckForZero<Number>::value(value) ==
true)
224 .single_nonzero_component_index;
231 for (
unsigned int d = 0; d < spacedim; ++d)
233 .is_nonzero_shape_function_component[d])
246 template <
int order,
int dim,
int spacedim,
typename Number>
252 &shape_function_data,
257 const unsigned int dofs_per_cell =
dof_values.size();
258 const unsigned int n_quadrature_points =
derivatives.size();
280 if (CheckForZero<Number>::value(value) ==
true)
286 .single_nonzero_component_index;
288 &shape_derivatives[
snc][0];
294 for (
unsigned int d = 0; d < spacedim; ++d)
296 .is_nonzero_shape_function_component[d])
311 template <
int dim,
int spacedim,
typename Number>
317 &shape_function_data,
323 const unsigned int dofs_per_cell =
dof_values.size();
346 if (CheckForZero<Number>::value(value) ==
true)
352 .single_nonzero_component_index;
354 &shape_gradients[
snc][0];
358 for (
unsigned int d = 0; d < dim; ++d)
371 for (
unsigned int d = 0; d < spacedim; ++d)
373 .is_nonzero_shape_function_component[d])
385 template <
int dim,
int spacedim,
typename Number>
391 &shape_function_data,
395 const unsigned int dofs_per_cell =
dof_values.size();
396 const unsigned int n_quadrature_points =
divergences.size();
418 if (CheckForZero<Number>::value(value) ==
true)
424 .single_nonzero_component_index;
426 &shape_gradients[
snc][0];
432 for (
unsigned int d = 0; d < spacedim; ++d)
434 .is_nonzero_shape_function_component[d])
448 template <
int dim,
int spacedim,
typename Number>
454 &shape_function_data,
457 typename ::internal::CurlType<spacedim>::type>::type> &
curls)
459 const unsigned int dofs_per_cell =
dof_values.size();
460 const unsigned int n_quadrature_points =
curls.size();
462 std::fill(
curls.begin(),
466 typename ::internal::CurlType<spacedim>::type>::type());
474 "Computing the curl in 1d is not a useful operation"));
485 .single_nonzero_component;
495 if (CheckForZero<Number>::value(value) ==
true)
501 &shape_gradients[
snc][0];
504 .single_nonzero_component >= 0,
508 .single_nonzero_component_index == 0)
528 .is_nonzero_shape_function_component[0])
543 .is_nonzero_shape_function_component[1])
568 .single_nonzero_component;
578 if (CheckForZero<Number>::value(value) ==
true)
584 &shape_gradients[
snc][0];
587 .single_nonzero_component_index)
596 value * (*shape_gradient_ptr)[2];
611 value * (*shape_gradient_ptr)[2];
626 value * (*shape_gradient_ptr)[1];
645 .is_nonzero_shape_function_component[0])
657 value * (*shape_gradient_ptr)[2];
664 .is_nonzero_shape_function_component[1])
676 value * (*shape_gradient_ptr)[2];
683 .is_nonzero_shape_function_component[2])
695 value * (*shape_gradient_ptr)[1];
708 template <
int dim,
int spacedim,
typename Number>
714 &shape_function_data,
718 const unsigned int dofs_per_cell =
dof_values.size();
719 const unsigned int n_quadrature_points =
laplacians.size();
741 if (CheckForZero<Number>::value(value) ==
true)
747 .single_nonzero_component_index;
749 &shape_hessians[
snc][0];
756 for (
unsigned int d = 0; d < spacedim; ++d)
758 .is_nonzero_shape_function_component[d])
775 template <
int dim,
int spacedim,
typename Number>
779 const ::Table<2, double> &shape_values,
782 &shape_function_data,
788 const unsigned int dofs_per_cell =
dof_values.size();
789 const unsigned int n_quadrature_points = values.size();
811 if (CheckForZero<Number>::value(value) ==
true)
819 .single_nonzero_component_index);
826 for (
unsigned int d = 0;
831 .is_nonzero_shape_function_component[d])
847 template <
int dim,
int spacedim,
typename Number>
854 &shape_function_data,
858 const unsigned int dofs_per_cell =
dof_values.size();
859 const unsigned int n_quadrature_points =
divergences.size();
880 if (CheckForZero<Number>::value(value) ==
true)
886 .single_nonzero_component_index;
889 &shape_gradients[
snc][0];
903 value * (*shape_gradient_ptr)[
ii];
908 for (
unsigned int d = 0;
911 spacedim>::n_independent_components;
914 .is_nonzero_shape_function_component[d])
926 const unsigned int comp =
928 .single_nonzero_component_index;
937 for (
unsigned int j = 0;
j < spacedim; ++
j)
954 template <
int dim,
int spacedim,
typename Number>
958 const ::Table<2, double> &shape_values,
960 &shape_function_data,
965 const unsigned int dofs_per_cell =
dof_values.size();
966 const unsigned int n_quadrature_points = values.size();
987 if (CheckForZero<Number>::value(value) ==
true)
993 .single_nonzero_component_index;
1005 for (
unsigned int d = 0; d < dim * dim; ++d)
1007 .is_nonzero_shape_function_component[d])
1024 template <
int dim,
int spacedim,
typename Number>
1030 &shape_function_data,
1034 const unsigned int dofs_per_cell =
dof_values.size();
1035 const unsigned int n_quadrature_points =
divergences.size();
1057 if (CheckForZero<Number>::value(value) ==
true)
1063 .single_nonzero_component_index;
1066 &shape_gradients[
snc][0];
1071 const unsigned int ii = indices[0];
1072 const unsigned int jj = indices[1];
1082 for (
unsigned int d = 0; d < dim * dim; ++d)
1084 .is_nonzero_shape_function_component[d])
1094 template <
int dim,
int spacedim,
typename Number>
1100 &shape_function_data,
1102 template solution_gradient_type<Number>> &gradients)
1104 const unsigned int dofs_per_cell =
dof_values.size();
1105 const unsigned int n_quadrature_points = gradients.size();
1127 if (CheckForZero<Number>::value(value) ==
true)
1133 .single_nonzero_component_index;
1136 &shape_gradients[
snc][0];
1141 const unsigned int ii = indices[0];
1142 const unsigned int jj = indices[1];
1147 gradients[
q_point][
ii][
jj] += value * (*shape_gradient_ptr);
1152 for (
unsigned int d = 0; d < dim * dim; ++d)
1154 .is_nonzero_shape_function_component[d])
1168#include "fe_values_views_internal.inst"
static DEAL_II_HOST constexpr unsigned int component_to_unrolled_index(const TableIndices< rank_ > &indices)
static DEAL_II_HOST constexpr TableIndices< rank_ > unrolled_to_component_indices(const unsigned int i)
static constexpr TableIndices< rank_ > unrolled_to_component_indices(const unsigned int i)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcMessage(std::string arg1)
#define DEAL_II_ASSERT_UNREACHABLE()
#define DEAL_II_NOT_IMPLEMENTED()
void do_function_divergences(const ArrayView< const Number > &dof_values, const Table< 2, ::Tensor< 1, spacedim > > &shape_gradients, const std::vector< typename Vector< dim, spacedim >::ShapeFunctionData > &shape_function_data, std::vector< typename Vector< dim, spacedim >::template solution_divergence_type< Number > > &divergences)
void do_function_symmetric_gradients(const ArrayView< const Number > &dof_values, const Table< 2, ::Tensor< 1, spacedim > > &shape_gradients, const std::vector< typename Vector< dim, spacedim >::ShapeFunctionData > &shape_function_data, std::vector< typename ProductType< Number, ::SymmetricTensor< 2, spacedim > >::type > &symmetric_gradients)
void do_function_derivatives(const ArrayView< const Number > &dof_values, const Table< 2, ::Tensor< order, spacedim > > &shape_derivatives, const std::vector< typename Scalar< dim, spacedim >::ShapeFunctionData > &shape_function_data, std::vector< typename ProductType< Number, ::Tensor< order, spacedim > >::type > &derivatives)
void do_function_curls(const ArrayView< const Number > &dof_values, const Table< 2, ::Tensor< 1, spacedim > > &shape_gradients, const std::vector< typename Vector< dim, spacedim >::ShapeFunctionData > &shape_function_data, std::vector< typename ProductType< Number, typename ::internal::CurlType< spacedim >::type >::type > &curls)
void do_function_gradients(const ArrayView< const Number > &dof_values, const Table< 2, ::Tensor< 1, spacedim > > &shape_gradients, const std::vector< typename Tensor< 2, dim, spacedim >::ShapeFunctionData > &shape_function_data, std::vector< typename Tensor< 2, dim, spacedim >::template solution_gradient_type< Number > > &gradients)
void do_function_values(const ArrayView< const Number > &dof_values, const Table< 2, double > &shape_values, const std::vector< typename Scalar< dim, spacedim >::ShapeFunctionData > &shape_function_data, std::vector< typename ProductType< Number, double >::type > &values)
void do_function_laplacians(const ArrayView< const Number > &dof_values, const Table< 2, ::Tensor< 2, spacedim > > &shape_hessians, const std::vector< typename Scalar< dim, spacedim >::ShapeFunctionData > &shape_function_data, std::vector< typename Scalar< dim, spacedim >::template solution_laplacian_type< Number > > &laplacians)
typename internal::ProductTypeImpl< std::decay_t< T >, std::decay_t< U > >::type type
static constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE const T & value(const T &t)
DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > symmetrize(const Tensor< 2, dim, Number > &t)
DEAL_II_HOST constexpr Number trace(const SymmetricTensor< 2, dim2, Number > &)