16 #ifndef dealii_differentiation_ad_ad_helpers_h
17 #define dealii_differentiation_ad_ad_helpers_h
21 #if defined(DEAL_II_WITH_ADOLC) || defined(DEAL_II_TRILINOS_WITH_SACADO)
168 typename ScalarType =
double>
243 print(std::ostream &stream)
const;
266 std::ostream & stream)
const;
295 const bool ensure_persistent_setting =
true);
344 const bool clear_registered_tapes =
true);
452 const bool overwrite_tape =
false,
453 const bool keep_independent_values =
true);
619 const bool read_mode);
834 typename ScalarType =
double>
924 template <
typename VectorType>
927 const VectorType &
values,
928 const std::vector<::types::global_dof_index> &local_dof_indices);
950 const std::vector<ad_type> &
999 template <
typename VectorType>
1002 const VectorType &
values,
1003 const std::vector<::types::global_dof_index> &local_dof_indices);
1216 typename ScalarType =
double>
1527 typename ScalarType =
double>
1648 template <
int dim,
typename ExtractorType>
1663 static const unsigned int n_components = 1;
1668 static const unsigned int rank = 0;
1673 template <
typename NumberType>
1678 "The number of components doesn't match that of the corresponding tensor type.");
1681 "The rank doesn't match that of the corresponding tensor type.");
1690 template <
typename NumberType>
1696 template <
typename NumberType>
1702 static inline unsigned int
1718 (void)unrolled_index;
1729 template <
typename IndexType =
unsigned int,
int rank_in>
1732 const unsigned int column_offset)
1735 (void)table_indices;
1736 (void)column_offset;
1753 static const unsigned int n_components = dim;
1758 static const unsigned int rank = 1;
1763 template <
typename NumberType>
1768 "The number of components doesn't match that of the corresponding tensor type.");
1771 "The rank doesn't match that of the corresponding tensor type.");
1776 template <
typename NumberType>
1782 template <
typename NumberType>
1788 static inline unsigned int
1805 (void)unrolled_index;
1813 template <
int rank_in>
1816 const unsigned int column_offset)
1837 template <
typename IndexType =
unsigned int,
int rank_in>
1840 const unsigned int column_offset)
1844 "Cannot extract more table indices than the input table has!");
1846 return TensorType::component_to_unrolled_index(
1847 table_index_view(table_indices, column_offset));
1863 static const unsigned int n_components =
1869 static const unsigned int rank = 1;
1874 template <
typename NumberType>
1880 template <
typename NumberType>
1886 template <
typename NumberType>
1892 static inline unsigned int
1908 (void)unrolled_index;
1916 template <
int rank_in>
1919 const unsigned int column_offset)
1940 template <
typename IndexType =
unsigned int,
int rank_in>
1943 const unsigned int column_offset)
1947 "Cannot extract more table indices than the input table has!");
1949 return TensorType::component_to_unrolled_index(
1950 table_index_view(table_indices, column_offset));
1966 static const unsigned int n_components =
1977 template <
typename NumberType>
1983 template <
typename NumberType>
1989 template <
typename NumberType>
1995 static inline unsigned int
2011 (void)unrolled_index;
2019 template <
int rank_in>
2022 const unsigned int column_offset)
2027 table_indices[column_offset + 1]);
2045 template <
typename IndexType =
unsigned int,
int rank_in>
2048 const unsigned int column_offset)
2052 "Cannot extract more table indices than the input table has!");
2054 return TensorType::component_to_unrolled_index(
2055 table_index_view(table_indices, column_offset));
2071 static const unsigned int n_components =
2082 template <
typename NumberType>
2088 template <
typename NumberType>
2094 template <
typename NumberType>
2100 static inline unsigned int
2119 return table_indices[0] != table_indices[1];
2126 template <
int rank_in>
2129 const unsigned int column_offset)
2134 table_indices[column_offset + 1]);
2152 template <
typename IndexType =
unsigned int,
int rank_in>
2155 const unsigned int column_offset)
2159 "Cannot extract more table indices than the input table has!");
2161 return TensorType::component_to_unrolled_index(
2162 table_index_view(table_indices, column_offset));
2172 template <
int dim,
typename NumberType,
typename ExtractorType>
2181 ExtractorType>::template tensor_type<NumberType>;
2194 template <
typename ExtractorType_Row,
typename ExtractorType_Col>
2208 template <
int rank,
int dim,
typename NumberType>
2232 template <
int ,
int dim,
typename NumberType>
2257 template <
int ,
int dim,
typename NumberType>
2281 template <
int ,
int dim,
typename NumberType>
2297 typename ExtractorType_Row,
2298 typename ExtractorType_Col>
2323 template <
int dim,
typename NumberType,
typename ExtractorType_Field>
2339 typename ExtractorType_Field,
2340 typename ExtractorType_Derivative>
2343 ExtractorType_Field,
2344 ExtractorType_Derivative>;
2353 typename IndexType =
unsigned int,
2354 typename ExtractorType>
2355 std::vector<IndexType>
2357 const bool ignore_symmetries =
true)
2359 (void)ignore_symmetries;
2360 const IndexType n_components =
2362 const IndexType comp_first =
2364 std::vector<IndexType> indices(n_components);
2365 std::iota(indices.begin(), indices.end(), comp_first);
2378 template <
int dim,
typename IndexType =
unsigned int>
2379 std::vector<IndexType>
2382 const bool ignore_symmetries =
true)
2385 const IndexType n_components =
2387 const IndexType comp_first =
2389 extractor_symm_tensor);
2391 if (ignore_symmetries ==
true)
2393 std::vector<IndexType> indices(n_components);
2394 std::iota(indices.begin(), indices.end(), comp_first);
2402 std::vector<IndexType> indices =
2403 extract_field_component_indices<dim>(extractor_tensor,
true);
2407 for (
unsigned int i = 0; i < indices.size(); ++i)
2412 const IndexType local_index_i = indices[i] - comp_first;
2413 if (local_index_i >= n_components)
2418 const IndexType sti_new_index =
2421 indices[i] = comp_first + sti_new_index;
2434 template <
typename TensorType,
typename NumberType>
2437 const unsigned int unrolled_index,
2442 t[TensorType::unrolled_to_component_indices(unrolled_index)] = value;
2450 template <
int dim,
typename NumberType>
2453 const unsigned int unrolled_index,
2457 (void)unrolled_index;
2467 template <
typename NumberType>
2470 const unsigned int unrolled_index,
2474 (void)unrolled_index;
2484 template <
int dim,
typename NumberType>
2487 const unsigned int unrolled_index_row,
2488 const unsigned int unrolled_index_col,
2495 SubTensorType::n_independent_components);
2497 SubTensorType::n_independent_components);
2499 SubTensorType::unrolled_to_component_indices(unrolled_index_row);
2501 SubTensorType::unrolled_to_component_indices(unrolled_index_col);
2502 t[indices_row[0]][indices_row[1]][indices_col[0]][indices_col[1]] =
2513 typename NumberType,
2514 template <
int,
int,
typename>
2518 const unsigned int unrolled_index)
2522 return t[TensorType<rank, dim, NumberType>::
2523 unrolled_to_component_indices(unrolled_index)];
2532 typename NumberType,
2533 template <
int,
int,
typename>
2537 const unsigned int unrolled_index)
2540 (void)unrolled_index;
2550 template <
typename NumberType>
2551 inline const NumberType &
2555 (void)unrolled_index;
2566 typename NumberType,
2567 template <
int,
int,
typename>
2571 const unsigned int unrolled_index)
2575 return t[TensorType<rank, dim, NumberType>::
2576 unrolled_to_component_indices(unrolled_index)];
2585 typename NumberType,
2586 template <
int,
int,
typename>
2590 const unsigned int index)
2603 template <
typename NumberType>
2639 typename ScalarType =
double>
2641 :
public HelperBase<ADNumberTypeCode, ScalarType>
2738 const bool clear_registered_tapes =
true)
override;
2786 template <
typename ValueType,
typename ExtractorType>
2789 const ExtractorType &extractor);
2811 const std::vector<ad_type> &
2839 template <
typename ExtractorType>
2841 ExtractorType>::template tensor_type<ad_type>
2897 template <
typename ValueType,
typename ExtractorType>
2900 const ExtractorType &extractor);
2922 const bool symmetric_component,
3116 typename ScalarType =
double>
3253 template <
typename ExtractorType_Row>
3257 const ExtractorType_Row & extractor_row);
3297 template <
typename ExtractorType_Row,
typename ExtractorType_Col>
3301 ExtractorType_Col>::type
3303 const ExtractorType_Row & extractor_row,
3304 const ExtractorType_Col & extractor_col);
3507 typename ScalarType =
double>
3593 template <
typename ValueType,
typename ExtractorType>
3596 const ExtractorType &extractor);
3639 template <
typename ExtractorType_Row>
3643 const ExtractorType_Row & extractor_row);
3692 template <
typename ExtractorType_Row,
typename ExtractorType_Col>
3696 ExtractorType_Col>::type
3698 const ExtractorType_Row & extractor_row,
3699 const ExtractorType_Col & extractor_col);
3763 template <enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
3764 template <
typename VectorType>
3767 const VectorType &
values,
3768 const std::vector<::types::global_dof_index> &local_dof_indices)
3775 local_dof_indices.size() == this->n_independent_variables(),
3777 "Degree of freedom index vector size does not match number of independent variables"));
3778 for (
unsigned int i = 0; i < this->n_independent_variables(); ++i)
3780 Assert(this->registered_independent_variable_values[i] ==
false,
3781 ExcMessage(
"Independent variables already registered."));
3788 template <enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
3789 template <
typename VectorType>
3792 const VectorType &
values,
3793 const std::vector<::types::global_dof_index> &local_dof_indices)
3795 Assert(local_dof_indices.size() == this->n_independent_variables(),
3797 "Vector size does not match number of independent variables"));
3798 for (
unsigned int i = 0; i < this->n_independent_variables(); ++i)
3800 i,
values[local_dof_indices[i]]);
3811 typename ScalarType>
3812 template <
typename ValueType,
typename ExtractorType>
3816 const ExtractorType &extractor)
3823 const std::vector<unsigned int> index_set(
3824 internal::extract_field_component_indices<dim>(extractor));
3825 for (
const unsigned int index : index_set)
3828 this->registered_independent_variable_values[index] ==
false,
3830 "Overlapping indices for independent variables. "
3831 "One or more indices associated with the field that "
3832 "is being registered as an independent variable have "
3833 "already been associated with another field. This suggests "
3834 "that the component offsets used to construct their counterpart "
3835 "extractors are incompatible with one another. Make sure that "
3836 "the first component for each extractor properly takes into "
3837 "account the dimensionality of the preceding fields."));
3840 set_independent_variable(value, extractor);
3847 typename ScalarType>
3848 template <
typename ValueType,
typename ExtractorType>
3852 const ExtractorType &extractor)
3854 const std::vector<unsigned int> index_set(
3855 internal::extract_field_component_indices<dim>(extractor));
3856 for (
unsigned int i = 0; i < index_set.size(); ++i)
3858 set_sensitivity_value(
3860 internal::Extractor<dim, ExtractorType>::symmetric_component(i),
3869 typename ScalarType>
3870 template <
typename ExtractorType>
3871 typename internal::Extractor<dim, ExtractorType>::template tensor_type<
3872 typename PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
3877 if (ADNumberTraits<ad_type>::is_taped ==
true)
3879 Assert(this->active_tape_index() !=
3886 this->finalize_sensitive_independent_variables();
3887 Assert(this->independent_variables.size() ==
3888 this->n_independent_variables(),
3890 this->n_independent_variables()));
3892 const std::vector<unsigned int> index_set(
3893 internal::extract_field_component_indices<dim>(extractor));
3894 typename internal::Extractor<dim,
3895 ExtractorType>::template tensor_type<ad_type>
3898 for (
unsigned int i = 0; i < index_set.size(); ++i)
3900 const unsigned int index = index_set[i];
3902 Assert(this->registered_independent_variable_values[index] ==
true,
3905 this->independent_variables[
index];
3919 typename ScalarType>
3920 template <
typename ExtractorType_Row>
3921 typename internal::ScalarFieldGradient<
3924 ExtractorType_Row>::type
3927 const ExtractorType_Row & extractor_row)
3936 const std::vector<unsigned int> row_index_set(
3937 internal::extract_field_component_indices<dim>(extractor_row));
3938 Assert(out.n_independent_components == row_index_set.size(),
3939 ExcMessage(
"Not all tensor components have been extracted!"));
3940 for (
unsigned int r = 0; r < row_index_set.size(); ++r)
3950 typename ScalarType>
3951 template <
typename ExtractorType_Row,
typename ExtractorType_Col>
3952 typename internal::ScalarFieldHessian<
3956 ExtractorType_Col>::type
3959 const ExtractorType_Row & extractor_row,
3960 const ExtractorType_Col & extractor_col)
3962 using InternalHessian = internal::ScalarFieldHessian<dim,
3966 using InternalExtractorRow = internal::Extractor<dim, ExtractorType_Row>;
3967 using InternalExtractorCol = internal::Extractor<dim, ExtractorType_Col>;
3968 using HessianType =
typename InternalHessian::type;
3984 const std::vector<unsigned int> row_index_set(
3985 internal::extract_field_component_indices<dim>(
3986 extractor_row,
false ));
3987 const std::vector<unsigned int> col_index_set(
3988 internal::extract_field_component_indices<dim>(
3989 extractor_col,
false ));
3991 for (
unsigned int index = 0;
3992 index < HessianType::n_independent_components;
3996 HessianType::unrolled_to_component_indices(index);
3997 const unsigned int r =
3998 InternalExtractorRow::local_component(ti_out, 0);
3999 const unsigned int c =
4000 InternalExtractorCol::local_component(ti_out,
4001 InternalExtractorRow::rank);
4004 out, index, hessian[row_index_set[r]][col_index_set[c]]);
4018 typename ScalarType>
4019 template <
typename ValueType,
typename ExtractorType>
4023 const ExtractorType &extractor)
4025 const std::vector<unsigned int> index_set(
4026 internal::extract_field_component_indices<dim>(extractor));
4027 for (
unsigned int i = 0; i < index_set.size(); ++i)
4029 Assert(this->registered_marked_dependent_variables[index_set[i]] ==
4031 ExcMessage(
"Overlapping indices for dependent variables."));
4041 typename ScalarType>
4042 template <
typename ExtractorType_Row>
4046 ExtractorType_Row>::type
4049 const ExtractorType_Row & extractor_row)
4053 typename internal::VectorFieldValue<dim, scalar_type, ExtractorType_Row>::
4058 const std::vector<unsigned int> row_index_set(
4059 internal::extract_field_component_indices<dim>(extractor_row));
4060 Assert(out.n_independent_components == row_index_set.size(),
4061 ExcMessage(
"Not all tensor components have been extracted!"));
4062 for (
unsigned int r = 0; r < row_index_set.size(); ++r)
4072 typename ScalarType>
4073 template <
typename ExtractorType_Row,
typename ExtractorType_Col>
4078 ExtractorType_Col>::type
4081 const ExtractorType_Row & extractor_row,
4082 const ExtractorType_Col & extractor_col)
4088 using InternalExtractorRow = internal::Extractor<dim, ExtractorType_Row>;
4089 using InternalExtractorCol = internal::Extractor<dim, ExtractorType_Col>;
4090 using JacobianType =
typename InternalJacobian::type;
4106 const std::vector<unsigned int> row_index_set(
4107 internal::extract_field_component_indices<dim>(
4108 extractor_row,
false ));
4109 const std::vector<unsigned int> col_index_set(
4110 internal::extract_field_component_indices<dim>(
4111 extractor_col,
false ));
4113 for (
unsigned int index = 0;
4114 index < JacobianType::n_independent_components;
4118 JacobianType::unrolled_to_component_indices(index);
4119 const unsigned int r =
4120 InternalExtractorRow::local_component(ti_out, 0);
4121 const unsigned int c =
4122 InternalExtractorCol::local_component(ti_out,
4123 InternalExtractorRow::rank);
4126 out, index, jacobian[row_index_set[r]][col_index_set[c]]);
void register_dof_values(const VectorType &values, const std::vector<::types::global_dof_index > &local_dof_indices)
virtual ~CellLevelBase()=default
const std::vector< ad_type > & get_sensitive_dof_values() const
typename HelperBase< ADNumberTypeCode, ScalarType >::ad_type ad_type
void set_dof_values(const std::vector< scalar_type > &dof_values)
virtual void compute_residual(Vector< scalar_type > &residual) const =0
void register_dof_values(const std::vector< scalar_type > &dof_values)
virtual void compute_linearization(FullMatrix< scalar_type > &linearization) const =0
CellLevelBase(const unsigned int n_independent_variables, const unsigned int n_dependent_variables)
void set_dof_values(const VectorType &values, const std::vector<::types::global_dof_index > &local_dof_indices)
typename HelperBase< ADNumberTypeCode, ScalarType >::scalar_type scalar_type
void register_energy_functional(const ad_type &energy)
EnergyFunctional(const unsigned int n_independent_variables)
typename HelperBase< ADNumberTypeCode, ScalarType >::ad_type ad_type
void compute_residual(Vector< scalar_type > &residual) const override
virtual void compute_linearization(FullMatrix< scalar_type > &linearization) const override
virtual ~EnergyFunctional()=default
scalar_type compute_energy() const
typename HelperBase< ADNumberTypeCode, ScalarType >::scalar_type scalar_type
unsigned int n_registered_dependent_variables() const
TapedDrivers< ad_type, scalar_type > taped_driver
void stop_recording_operations(const bool write_tapes_to_file=false)
std::vector< bool > registered_marked_independent_variables
typename AD::NumberTraits< ScalarType, ADNumberTypeCode >::scalar_type scalar_type
std::vector< bool > registered_independent_variable_values
void print_tape_stats(const typename Types< ad_type >::tape_index tape_index, std::ostream &stream) const
std::size_t n_independent_variables() const
bool start_recording_operations(const typename Types< ad_type >::tape_index tape_index, const bool overwrite_tape=false, const bool keep_independent_values=true)
std::vector< scalar_type > independent_variable_values
void reset_registered_independent_variables()
void mark_independent_variable(const unsigned int index, ad_type &out) const
bool is_registered_tape(const typename Types< ad_type >::tape_index tape_index) const
std::vector< bool > registered_marked_dependent_variables
void reset_registered_dependent_variables(const bool flag=false)
void activate_tape(const typename Types< ad_type >::tape_index tape_index, const bool read_mode)
void set_tape_buffer_sizes(const typename Types< ad_type >::tape_buffer_sizes obufsize=64 *1024 *1024, const typename Types< ad_type >::tape_buffer_sizes lbufsize=64 *1024 *1024, const typename Types< ad_type >::tape_buffer_sizes vbufsize=64 *1024 *1024, const typename Types< ad_type >::tape_buffer_sizes tbufsize=64 *1024 *1024)
unsigned int n_registered_independent_variables() const
void print(std::ostream &stream) const
void set_sensitivity_value(const unsigned int index, const scalar_type &value)
bool active_tape_requires_retaping() const
std::vector< ad_type > independent_variables
Types< ad_type >::tape_index active_tape_index() const
virtual ~HelperBase()=default
HelperBase(const unsigned int n_independent_variables, const unsigned int n_dependent_variables)
virtual void reset(const unsigned int n_independent_variables=::numbers::invalid_unsigned_int, const unsigned int n_dependent_variables=::numbers::invalid_unsigned_int, const bool clear_registered_tapes=true)
TapelessDrivers< ad_type, scalar_type > tapeless_driver
bool recorded_tape_requires_retaping(const typename Types< ad_type >::tape_index tape_index) const
std::vector< ad_type > dependent_variables
bool is_recording() const
std::size_t n_dependent_variables() const
void print_values(std::ostream &stream) const
void register_dependent_variable(const unsigned int index, const ad_type &func)
void finalize_sensitive_independent_variables() const
static void configure_tapeless_mode(const unsigned int n_independent_variables, const bool ensure_persistent_setting=true)
void initialize_non_sensitive_independent_variable(const unsigned int index, ad_type &out) const
typename AD::NumberTraits< ScalarType, ADNumberTypeCode >::ad_type ad_type
void activate_recorded_tape(const typename Types< ad_type >::tape_index tape_index)
void set_independent_variable(const ValueType &value, const ExtractorType &extractor)
bool is_symmetric_independent_variable(const unsigned int index) const
virtual ~PointLevelFunctionsBase()=default
typename HelperBase< ADNumberTypeCode, ScalarType >::ad_type ad_type
PointLevelFunctionsBase(const unsigned int n_independent_variables, const unsigned int n_dependent_variables)
static constexpr unsigned int dimension
void set_independent_variables(const std::vector< scalar_type > &values)
typename HelperBase< ADNumberTypeCode, ScalarType >::scalar_type scalar_type
std::vector< bool > symmetric_independent_variables
unsigned int n_symmetric_independent_variables() const
void register_independent_variables(const std::vector< scalar_type > &values)
void set_sensitivity_value(const unsigned int index, const bool symmetric_component, const scalar_type &value)
void register_independent_variable(const ValueType &value, const ExtractorType &extractor)
const std::vector< ad_type > & get_sensitive_variables() const
virtual void reset(const unsigned int n_independent_variables=::numbers::invalid_unsigned_int, const unsigned int n_dependent_variables=::numbers::invalid_unsigned_int, const bool clear_registered_tapes=true) override
internal::Extractor< dim, ExtractorType >::template tensor_type< ad_type > get_sensitive_variables(const ExtractorType &extractor) const
ResidualLinearization(const unsigned int n_independent_variables, const unsigned int n_dependent_variables)
virtual ~ResidualLinearization()=default
typename HelperBase< ADNumberTypeCode, ScalarType >::scalar_type scalar_type
virtual void compute_residual(Vector< scalar_type > &residual) const override
virtual void compute_linearization(FullMatrix< scalar_type > &linearization) const override
typename HelperBase< ADNumberTypeCode, ScalarType >::ad_type ad_type
void register_residual_vector(const std::vector< ad_type > &residual)
typename HelperBase< ADNumberTypeCode, ScalarType >::ad_type ad_type
void register_dependent_variable(const ad_type &func)
static internal::ScalarFieldGradient< dim, scalar_type, ExtractorType_Row >::type extract_gradient_component(const Vector< scalar_type > &gradient, const ExtractorType_Row &extractor_row)
ScalarFunction(const unsigned int n_independent_variables)
static internal::ScalarFieldHessian< dim, scalar_type, ExtractorType_Row, ExtractorType_Col >::type extract_hessian_component(const FullMatrix< scalar_type > &hessian, const ExtractorType_Row &extractor_row, const ExtractorType_Col &extractor_col)
void compute_gradient(Vector< scalar_type > &gradient) const
scalar_type compute_value() const
void compute_hessian(FullMatrix< scalar_type > &hessian) const
typename HelperBase< ADNumberTypeCode, ScalarType >::scalar_type scalar_type
virtual ~ScalarFunction()=default
virtual ~VectorFunction()=default
typename HelperBase< ADNumberTypeCode, ScalarType >::ad_type ad_type
void compute_values(Vector< scalar_type > &values) const
void register_dependent_variables(const std::vector< ad_type > &funcs)
static internal::VectorFieldValue< dim, scalar_type, ExtractorType_Row >::type extract_value_component(const Vector< scalar_type > &values, const ExtractorType_Row &extractor_row)
static internal::VectorFieldJacobian< dim, scalar_type, ExtractorType_Row, ExtractorType_Col >::type extract_jacobian_component(const FullMatrix< scalar_type > &jacobian, const ExtractorType_Row &extractor_row, const ExtractorType_Col &extractor_col)
void compute_jacobian(FullMatrix< scalar_type > &jacobian) const
typename HelperBase< ADNumberTypeCode, ScalarType >::scalar_type scalar_type
void register_dependent_variable(const ValueType &funcs, const ExtractorType &extractor)
VectorFunction(const unsigned int n_independent_variables, const unsigned int n_dependent_variables)
static constexpr unsigned int component_to_unrolled_index(const TableIndices< rank_ > &indices)
static constexpr TableIndices< rank_ > unrolled_to_component_indices(const unsigned int i)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
#define Assert(cond, exc)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcMessage(std::string arg1)
std::vector< IndexType > extract_field_component_indices(const ExtractorType &extractor, const bool ignore_symmetries=true)
ScalarFieldHessian< dim, NumberType, ExtractorType_Field, ExtractorType_Derivative > VectorFieldJacobian
NumberType get_tensor_entry(const TensorType< rank, dim, NumberType > &t, const unsigned int unrolled_index)
void set_tensor_entry(TensorType &t, const unsigned int unrolled_index, const NumberType &value)
ScalarFieldGradient< dim, NumberType, ExtractorType_Field > VectorFieldValue
void set_dof_values(const DoFCellAccessor< dim, spacedim, lda > &cell, const Vector< number > &local_values, OutputVector &values, const bool perform_check)
static const unsigned int invalid_unsigned_int
static const Types< ADNumberType >::tape_index invalid_tape_index
unsigned int tape_buffer_sizes
typename Extractor< dim, ExtractorType >::template tensor_type< NumberType > type
typename HessianType< ExtractorType_Row, ExtractorType_Col >::template type< rank, dim, NumberType > type