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)
169 typename ScalarType =
double>
244 print(std::ostream &stream)
const;
267 std::ostream & stream)
const;
296 const bool ensure_persistent_setting =
true);
345 const bool clear_registered_tapes =
true);
453 const bool overwrite_tape =
false,
454 const bool keep_independent_values =
true);
620 const bool read_mode);
835 typename ScalarType =
double>
925 template <
typename VectorType>
928 const VectorType &
values,
929 const std::vector<::types::global_dof_index> &local_dof_indices);
951 const std::vector<ad_type> &
1000 template <
typename VectorType>
1003 const VectorType &
values,
1004 const std::vector<::types::global_dof_index> &local_dof_indices);
1217 typename ScalarType =
double>
1528 typename ScalarType =
double>
1649 template <
int dim,
typename ExtractorType>
1664 static const unsigned int n_components = 1;
1669 static const unsigned int rank = 0;
1674 template <
typename NumberType>
1679 "The number of components doesn't match that of the corresponding tensor type.");
1682 "The rank doesn't match that of the corresponding tensor type.");
1691 template <
typename NumberType>
1697 template <
typename NumberType>
1703 static inline unsigned int
1719 (void)unrolled_index;
1730 template <
typename IndexType =
unsigned int,
int rank_in>
1733 const unsigned int column_offset)
1736 (void)table_indices;
1737 (void)column_offset;
1754 static const unsigned int n_components = dim;
1759 static const unsigned int rank = 1;
1764 template <
typename NumberType>
1769 "The number of components doesn't match that of the corresponding tensor type.");
1772 "The rank doesn't match that of the corresponding tensor type.");
1777 template <
typename NumberType>
1783 template <
typename NumberType>
1789 static inline unsigned int
1806 (void)unrolled_index;
1814 template <
int rank_in>
1817 const unsigned int column_offset)
1838 template <
typename IndexType =
unsigned int,
int rank_in>
1841 const unsigned int column_offset)
1845 "Cannot extract more table indices than the input table has!");
1847 return TensorType::component_to_unrolled_index(
1848 table_index_view(table_indices, column_offset));
1864 static const unsigned int n_components =
1870 static const unsigned int rank = 1;
1875 template <
typename NumberType>
1881 template <
typename NumberType>
1887 template <
typename NumberType>
1893 static inline unsigned int
1909 (void)unrolled_index;
1917 template <
int rank_in>
1920 const unsigned int column_offset)
1941 template <
typename IndexType =
unsigned int,
int rank_in>
1944 const unsigned int column_offset)
1948 "Cannot extract more table indices than the input table has!");
1950 return TensorType::component_to_unrolled_index(
1951 table_index_view(table_indices, column_offset));
1967 static const unsigned int n_components =
1978 template <
typename NumberType>
1984 template <
typename NumberType>
1990 template <
typename NumberType>
1996 static inline unsigned int
2012 (void)unrolled_index;
2020 template <
int rank_in>
2023 const unsigned int column_offset)
2028 table_indices[column_offset + 1]);
2046 template <
typename IndexType =
unsigned int,
int rank_in>
2049 const unsigned int column_offset)
2053 "Cannot extract more table indices than the input table has!");
2055 return TensorType::component_to_unrolled_index(
2056 table_index_view(table_indices, column_offset));
2072 static const unsigned int n_components =
2083 template <
typename NumberType>
2089 template <
typename NumberType>
2095 template <
typename NumberType>
2101 static inline unsigned int
2120 return table_indices[0] != table_indices[1];
2127 template <
int rank_in>
2130 const unsigned int column_offset)
2135 table_indices[column_offset + 1]);
2153 template <
typename IndexType =
unsigned int,
int rank_in>
2156 const unsigned int column_offset)
2160 "Cannot extract more table indices than the input table has!");
2162 return TensorType::component_to_unrolled_index(
2163 table_index_view(table_indices, column_offset));
2173 template <
int dim,
typename NumberType,
typename ExtractorType>
2182 ExtractorType>::template tensor_type<NumberType>;
2195 template <
typename ExtractorType_Row,
typename ExtractorType_Col>
2209 template <
int rank,
int dim,
typename NumberType>
2233 template <
int ,
int dim,
typename NumberType>
2258 template <
int ,
int dim,
typename NumberType>
2282 template <
int ,
int dim,
typename NumberType>
2298 typename ExtractorType_Row,
2299 typename ExtractorType_Col>
2324 template <
int dim,
typename NumberType,
typename ExtractorType_Field>
2340 typename ExtractorType_Field,
2341 typename ExtractorType_Derivative>
2344 ExtractorType_Field,
2345 ExtractorType_Derivative>;
2354 typename IndexType =
unsigned int,
2355 typename ExtractorType>
2356 std::vector<IndexType>
2358 const bool ignore_symmetries =
true)
2360 (void)ignore_symmetries;
2361 const IndexType n_components =
2363 const IndexType comp_first =
2365 std::vector<IndexType> indices(n_components);
2366 std::iota(indices.begin(), indices.end(), comp_first);
2379 template <
int dim,
typename IndexType =
unsigned int>
2380 std::vector<IndexType>
2383 const bool ignore_symmetries =
true)
2386 const IndexType n_components =
2388 const IndexType comp_first =
2390 extractor_symm_tensor);
2392 if (ignore_symmetries ==
true)
2394 std::vector<IndexType> indices(n_components);
2395 std::iota(indices.begin(), indices.end(), comp_first);
2403 std::vector<IndexType> indices =
2404 extract_field_component_indices<dim>(extractor_tensor,
true);
2408 for (
unsigned int i = 0; i < indices.size(); ++i)
2413 const IndexType local_index_i = indices[i] - comp_first;
2414 if (local_index_i >= n_components)
2419 const IndexType sti_new_index =
2422 indices[i] = comp_first + sti_new_index;
2435 template <
typename TensorType,
typename NumberType>
2438 const unsigned int unrolled_index,
2443 t[TensorType::unrolled_to_component_indices(unrolled_index)] = value;
2451 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>
2486 const unsigned int unrolled_index_row,
2487 const unsigned int unrolled_index_col,
2494 SubTensorType::n_independent_components);
2496 SubTensorType::n_independent_components);
2498 SubTensorType::unrolled_to_component_indices(unrolled_index_row);
2500 SubTensorType::unrolled_to_component_indices(unrolled_index_col);
2501 t[indices_row[0]][indices_row[1]][indices_col[0]][indices_col[1]] =
2512 typename NumberType,
2513 template <
int,
int,
typename>
class TensorType>
2516 const unsigned int unrolled_index)
2520 return t[TensorType<rank, dim, NumberType>::
2521 unrolled_to_component_indices(unrolled_index)];
2530 typename NumberType,
2531 template <
int,
int,
typename>
class TensorType>
2534 const unsigned int unrolled_index)
2537 (void)unrolled_index;
2547 template <
typename NumberType>
2548 inline const NumberType &
2552 (void)unrolled_index;
2563 typename NumberType,
2564 template <
int,
int,
typename>
class TensorType>
2567 const unsigned int unrolled_index)
2571 return t[TensorType<rank, dim, NumberType>::
2572 unrolled_to_component_indices(unrolled_index)];
2581 typename NumberType,
2582 template <
int,
int,
typename>
class TensorType>
2584 const unsigned int index)
2597 template <
typename NumberType>
2633 typename ScalarType =
double>
2635 :
public HelperBase<ADNumberTypeCode, ScalarType>
2700 const bool clear_registered_tapes =
true)
override;
2748 template <
typename ValueType,
typename ExtractorType>
2751 const ExtractorType &extractor);
2773 const std::vector<ad_type> &
2801 template <
typename ExtractorType>
2803 ExtractorType>::template tensor_type<ad_type>
2859 template <
typename ValueType,
typename ExtractorType>
2862 const ExtractorType &extractor);
2884 const bool symmetric_component,
3078 typename ScalarType =
double>
3215 template <
typename ExtractorType_Row>
3219 const ExtractorType_Row & extractor_row);
3259 template <
typename ExtractorType_Row,
typename ExtractorType_Col>
3263 ExtractorType_Col>::type
3265 const ExtractorType_Row & extractor_row,
3266 const ExtractorType_Col & extractor_col);
3469 typename ScalarType =
double>
3555 template <
typename ValueType,
typename ExtractorType>
3558 const ExtractorType &extractor);
3601 template <
typename ExtractorType_Row>
3605 const ExtractorType_Row & extractor_row);
3654 template <
typename ExtractorType_Row,
typename ExtractorType_Col>
3658 ExtractorType_Col>::type
3660 const ExtractorType_Row & extractor_row,
3661 const ExtractorType_Col & extractor_col);
3725 template <enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
3726 template <
typename VectorType>
3729 const VectorType &
values,
3730 const std::vector<::types::global_dof_index> &local_dof_indices)
3737 local_dof_indices.size() == this->n_independent_variables(),
3739 "Degree of freedom index vector size does not match number of independent variables"));
3740 for (
unsigned int i = 0; i < this->n_independent_variables(); ++i)
3742 Assert(this->registered_independent_variable_values[i] ==
false,
3743 ExcMessage(
"Independent variables already registered."));
3745 set_dof_values(
values, local_dof_indices);
3750 template <enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
3751 template <
typename VectorType>
3754 const VectorType &
values,
3755 const std::vector<::types::global_dof_index> &local_dof_indices)
3757 Assert(local_dof_indices.size() == this->n_independent_variables(),
3759 "Vector size does not match number of independent variables"));
3760 for (
unsigned int i = 0; i < this->n_independent_variables(); ++i)
3762 i,
values[local_dof_indices[i]]);
3773 typename ScalarType>
3774 template <
typename ValueType,
typename ExtractorType>
3778 const ExtractorType &extractor)
3785 const std::vector<unsigned int> index_set(
3786 internal::extract_field_component_indices<dim>(extractor));
3787 for (
const unsigned int index : index_set)
3790 this->registered_independent_variable_values[index] ==
false,
3792 "Overlapping indices for independent variables. "
3793 "One or more indices associated with the field that "
3794 "is being registered as an independent variable have "
3795 "already been associated with another field. This suggests "
3796 "that the component offsets used to construct their counterpart "
3797 "extractors are incompatible with one another. Make sure that "
3798 "the first component for each extractor properly takes into "
3799 "account the dimensionality of the preceding fields."));
3802 set_independent_variable(value, extractor);
3809 typename ScalarType>
3810 template <
typename ValueType,
typename ExtractorType>
3814 const ExtractorType &extractor)
3816 const std::vector<unsigned int> index_set(
3817 internal::extract_field_component_indices<dim>(extractor));
3818 for (
unsigned int i = 0; i < index_set.size(); ++i)
3820 set_sensitivity_value(
3822 internal::Extractor<dim, ExtractorType>::symmetric_component(i),
3831 typename ScalarType>
3832 template <
typename ExtractorType>
3833 typename internal::Extractor<dim, ExtractorType>::template tensor_type<
3834 typename PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
3839 if (ADNumberTraits<ad_type>::is_taped ==
true)
3841 Assert(this->active_tape_index() !=
3848 this->finalize_sensitive_independent_variables();
3849 Assert(this->independent_variables.size() ==
3850 this->n_independent_variables(),
3852 this->n_independent_variables()));
3854 const std::vector<unsigned int> index_set(
3855 internal::extract_field_component_indices<dim>(extractor));
3856 typename internal::Extractor<dim,
3857 ExtractorType>::template tensor_type<ad_type>
3860 for (
unsigned int i = 0; i < index_set.size(); ++i)
3862 const unsigned int index = index_set[i];
3864 Assert(this->registered_independent_variable_values[index] ==
true,
3867 this->independent_variables[index];
3881 typename ScalarType>
3882 template <
typename ExtractorType_Row>
3883 typename internal::ScalarFieldGradient<
3886 ExtractorType_Row>::type
3889 const ExtractorType_Row & extractor_row)
3898 const std::vector<unsigned int> row_index_set(
3899 internal::extract_field_component_indices<dim>(extractor_row));
3900 Assert(out.n_independent_components == row_index_set.size(),
3901 ExcMessage(
"Not all tensor components have been extracted!"));
3902 for (
unsigned int r = 0; r < row_index_set.size(); ++r)
3912 typename ScalarType>
3913 template <
typename ExtractorType_Row,
typename ExtractorType_Col>
3914 typename internal::ScalarFieldHessian<
3918 ExtractorType_Col>::type
3921 const ExtractorType_Row & extractor_row,
3922 const ExtractorType_Col & extractor_col)
3924 using InternalHessian = internal::ScalarFieldHessian<dim,
3928 using InternalExtractorRow = internal::Extractor<dim, ExtractorType_Row>;
3929 using InternalExtractorCol = internal::Extractor<dim, ExtractorType_Col>;
3930 using HessianType =
typename InternalHessian::type;
3946 const std::vector<unsigned int> row_index_set(
3947 internal::extract_field_component_indices<dim>(
3948 extractor_row,
false ));
3949 const std::vector<unsigned int> col_index_set(
3950 internal::extract_field_component_indices<dim>(
3951 extractor_col,
false ));
3953 for (
unsigned int index = 0;
3954 index < HessianType::n_independent_components;
3958 HessianType::unrolled_to_component_indices(index);
3959 const unsigned int r =
3960 InternalExtractorRow::local_component(ti_out, 0);
3961 const unsigned int c =
3962 InternalExtractorCol::local_component(ti_out,
3963 InternalExtractorRow::rank);
3966 out, index, hessian[row_index_set[r]][col_index_set[c]]);
3980 typename ScalarType>
3981 template <
typename ValueType,
typename ExtractorType>
3985 const ExtractorType &extractor)
3987 const std::vector<unsigned int> index_set(
3988 internal::extract_field_component_indices<dim>(extractor));
3989 for (
unsigned int i = 0; i < index_set.size(); ++i)
3991 Assert(this->registered_marked_dependent_variables[index_set[i]] ==
3993 ExcMessage(
"Overlapping indices for dependent variables."));
4003 typename ScalarType>
4004 template <
typename ExtractorType_Row>
4008 ExtractorType_Row>::type
4011 const ExtractorType_Row & extractor_row)
4015 typename internal::VectorFieldValue<dim, scalar_type, ExtractorType_Row>::
4020 const std::vector<unsigned int> row_index_set(
4021 internal::extract_field_component_indices<dim>(extractor_row));
4022 Assert(out.n_independent_components == row_index_set.size(),
4023 ExcMessage(
"Not all tensor components have been extracted!"));
4024 for (
unsigned int r = 0; r < row_index_set.size(); ++r)
4034 typename ScalarType>
4035 template <
typename ExtractorType_Row,
typename ExtractorType_Col>
4040 ExtractorType_Col>::type
4043 const ExtractorType_Row & extractor_row,
4044 const ExtractorType_Col & extractor_col)
4050 using InternalExtractorRow = internal::Extractor<dim, ExtractorType_Row>;
4051 using InternalExtractorCol = internal::Extractor<dim, ExtractorType_Col>;
4052 using JacobianType =
typename InternalJacobian::type;
4068 const std::vector<unsigned int> row_index_set(
4069 internal::extract_field_component_indices<dim>(
4070 extractor_row,
false ));
4071 const std::vector<unsigned int> col_index_set(
4072 internal::extract_field_component_indices<dim>(
4073 extractor_col,
false ));
4075 for (
unsigned int index = 0;
4076 index < JacobianType::n_independent_components;
4080 JacobianType::unrolled_to_component_indices(index);
4081 const unsigned int r =
4082 InternalExtractorRow::local_component(ti_out, 0);
4083 const unsigned int c =
4084 InternalExtractorCol::local_component(ti_out,
4085 InternalExtractorRow::rank);
4088 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
Types< ad_type >::tape_index active_tape_index() const
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
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)
static const unsigned int dimension
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)
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)
internal::Extractor< dim, ExtractorType >::template tensor_type< ad_type > get_sensitive_variables(const ExtractorType &extractor) const
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
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)
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)
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)
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)
void compute_jacobian(FullMatrix< scalar_type > &jacobian) const
typename HelperBase< ADNumberTypeCode, ScalarType >::scalar_type scalar_type
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)
static internal::VectorFieldValue< dim, scalar_type, ExtractorType_Row >::type extract_value_component(const Vector< scalar_type > &values, const ExtractorType_Row &extractor_row)
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
#define Assert(cond, exc)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcMessage(std::string arg1)
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)
std::vector< IndexType > extract_field_component_indices(const ExtractorType &extractor, const bool ignore_symmetries=true)
ScalarFieldGradient< dim, NumberType, ExtractorType_Field > VectorFieldValue
static const unsigned int invalid_unsigned_int
static const Types< ADNumberType >::tape_index invalid_tape_index
typename Extractor< dim, ExtractorType >::template tensor_type< NumberType > type
typename HessianType< ExtractorType_Row, ExtractorType_Col >::template type< rank, dim, NumberType > type