-New: A new class Differentiation::AD::ADHelperEnergyFunctional has been
+New: A new class Differentiation::AD::EnergyFunctional has been
added to help implement (incremental) variational formulations using automatic
differentiation. In particular, this class is designed to compute the finite
element residuals and their linearizations.
-New: A new class Differentiation::AD::ADHelperResidualLinearization has been
+New: A new class Differentiation::AD::ResidualLinearization has been
added to help compute the linearization of a residual vector defined on the
level of a cell (a finite element residual), or for local nonlinear equations.
<br>
-New: A new class Differentiation::AD::ADHelperScalarFunction has been
+New: A new class Differentiation::AD::ScalarFunction has been
added to help implement point-wise scalar functions using automatic
differentiation. In particular, this class is designed to compute the
gradient and Hessian of a scalar function that is parameterized in
-New: A new class Differentiation::AD::ADHelperVectorFunction has been
+New: A new class Differentiation::AD::VectorFunction has been
added to help implement point-wise vector functions using automatic
differentiation. In particular, this class is designed to compute the
Jacobian of a vector function that is parameterized in
*/
template <enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType = double>
- class ADHelperBase
+ class HelperBase
{
public:
/**
* be the number of outputs $\mathbf{f}$, i.e., the dimension of the
* image space.
*/
- ADHelperBase(const unsigned int n_independent_variables,
- const unsigned int n_dependent_variables);
+ HelperBase(const unsigned int n_independent_variables,
+ const unsigned int n_dependent_variables);
/**
* Destructor
*/
- virtual ~ADHelperBase() = default;
+ virtual ~HelperBase() = default;
//@}
* Pre-specify the number of @p independent_variables to be used in
* tapeless mode.
*
- * Although this function is called internally in the ADHelperBase
+ * Although this function is called internally in the HelperBase
* constructor, there may be occasions when ADOL-C tapeless numbers
* (<tt>adtl::adoubles</tt>) are created before an instance of this class
* is created. This function therefore allows one to declare at the
/**
* Reset the state of the helper class.
*
- * When an instance of an ADHelperBase is stored as a class member object
+ * When an instance of an HelperBase is stored as a class member object
* with the intention to reuse its instance, it may be necessary to reset
* the state of the object before use. This is because, internally, there
* is error checking performed to ensure that the correct
//@}
- }; // class ADHelperBase
+ }; // class HelperBase
* @endcode
* Note that the quotation marks are mandatory.
* An alternative approach that allows for run-time decision making is to
- * use the ADHelperBase::set_tape_buffer_sizes() function before starting
- * taping (as done via the ADHelperBase::start_recording_operations()
+ * use the HelperBase::set_tape_buffer_sizes() function before starting
+ * taping (as done via the HelperBase::start_recording_operations()
* function).
*
* @warning ADOL-C does not support the standard threading models used by
*/
template <enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType = double>
- class ADHelperCellLevelBase
- : public ADHelperBase<ADNumberTypeCode, ScalarType>
+ class CellLevelBase : public HelperBase<ADNumberTypeCode, ScalarType>
{
public:
/**
* and results from, all computations.
*/
using scalar_type =
- typename ADHelperBase<ADNumberTypeCode, ScalarType>::scalar_type;
+ typename HelperBase<ADNumberTypeCode, ScalarType>::scalar_type;
/**
* Type definition for the auto-differentiation number type that is used
* in all computations.
*/
using ad_type =
- typename ADHelperBase<ADNumberTypeCode, ScalarType>::ad_type;
+ typename HelperBase<ADNumberTypeCode, ScalarType>::ad_type;
/**
* @name Constructor / destructor
* be the number of outputs $\mathbf{f}$, i.e., the dimension of the
* image space.
*/
- ADHelperCellLevelBase(const unsigned int n_independent_variables,
- const unsigned int n_dependent_variables);
+ CellLevelBase(const unsigned int n_independent_variables,
+ const unsigned int n_dependent_variables);
/**
* Destructor
*/
- virtual ~ADHelperCellLevelBase() = default;
+ virtual ~CellLevelBase() = default;
//@}
* correspond with the @p ScalarType prescribed as a template argument.
*
* @note If the @p keep_independent_values flag has been set when
- * ADHelperBase::start_recording_operations() is called then the tape is
+ * HelperBase::start_recording_operations() is called then the tape is
* immediately usable after creation, and the values of the independent
* variables set by register_dof_values() are those at which the function
* is to be evaluated. In this case, a separate call to this function is
* typically obtained by calling <code>cell->get_dof_indices()</code>.
*
* @note If the @p keep_independent_values flag has been set when
- * ADHelperBase::start_recording_operations() is called then the tape is
+ * HelperBase::start_recording_operations() is called then the tape is
* immediately usable after creation, and the values of the independent
* variables set by register_dof_values() are those at which the function
* is to be evaluated. In this case, a separate call to this function is
//@}
- }; // class ADHelperCellLevelBase
+ }; // class CellLevelBase
* // Create some aliases for the AD helper.
* // In the example, the AD_typecode used for the template argument can
* // be refer to either a taped or tapeless type.
- * using ADHelper = AD::ADHelperEnergyFunctional<...>;
+ * using ADHelper = AD::EnergyFunctional<...>;
* using ADNumberType = typename ADHelper::ad_type;
*
* // Create and initialize an instance of the helper class.
*/
template <enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType = double>
- class ADHelperEnergyFunctional
- : public ADHelperCellLevelBase<ADNumberTypeCode, ScalarType>
+ class EnergyFunctional : public CellLevelBase<ADNumberTypeCode, ScalarType>
{
public:
/**
* and results from, all computations.
*/
using scalar_type =
- typename ADHelperBase<ADNumberTypeCode, ScalarType>::scalar_type;
+ typename HelperBase<ADNumberTypeCode, ScalarType>::scalar_type;
/**
* Type definition for the auto-differentiation number type that is used
* in all computations.
*/
using ad_type =
- typename ADHelperBase<ADNumberTypeCode, ScalarType>::ad_type;
+ typename HelperBase<ADNumberTypeCode, ScalarType>::ad_type;
/**
* @name Constructor / destructor
* is computed from the first and second derivatives of a scalar
* function $\Psi(\mathbf{X})$.
*/
- ADHelperEnergyFunctional(const unsigned int n_independent_variables);
+ EnergyFunctional(const unsigned int n_independent_variables);
/**
* Destructor
*/
- virtual ~ADHelperEnergyFunctional() = default;
+ virtual ~EnergyFunctional() = default;
//@}
* @f]
*
* The values at the evaluation point $\mathbf{X}$ are obtained by calling
- * ADHelperCellLevelBase::set_dof_values().
+ * CellLevelBase::set_dof_values().
*
* @return The value of the energy functional at the evaluation point
* corresponding to a chosen set of local degree of freedom values.
* @f]
*
* The values at the evaluation point $\mathbf{X}$ are obtained by calling
- * ADHelperCellLevelBase::set_dof_values().
+ * CellLevelBase::set_dof_values().
*
* @param[out] residual A Vector object, for which the value for each
* entry represents the residual value for the corresponding local
* @f]
*
* The values at the evaluation point $\mathbf{X}$ are obtained by calling
- * ADHelperCellLevelBase::set_dof_values().
+ * CellLevelBase::set_dof_values().
*
* @param[out] linearization A FullMatrix representing the linearization
* of the residual vector. The output @p linearization matrix has
//@}
- }; // class ADHelperEnergyFunctional
+ }; // class EnergyFunctional
* // In this example, we strictly assume that we're using tapeless
* // AD types, and so the AD_typecode used in the template argument
* // must refer to one of these types. See the example for the
- * // ADHelperEnergyFunctional for details on how to extend
+ * // EnergyFunctional for details on how to extend
* // support to taped AD numbers.
- * using ADHelper = AD::ADHelperResidualLinearization<...>;
+ * using ADHelper = AD::ResidualLinearization<...>;
* using ADNumberType = typename ADHelper::ad_type;
*
* // Create and initialize an instance of the helper class.
*/
template <enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType = double>
- class ADHelperResidualLinearization
- : public ADHelperCellLevelBase<ADNumberTypeCode, ScalarType>
+ class ResidualLinearization
+ : public CellLevelBase<ADNumberTypeCode, ScalarType>
{
public:
/**
* and results from, all computations.
*/
using scalar_type =
- typename ADHelperBase<ADNumberTypeCode, ScalarType>::scalar_type;
+ typename HelperBase<ADNumberTypeCode, ScalarType>::scalar_type;
/**
* Type definition for the auto-differentiation number type that is used
* in all computations.
*/
using ad_type =
- typename ADHelperBase<ADNumberTypeCode, ScalarType>::ad_type;
+ typename HelperBase<ADNumberTypeCode, ScalarType>::ad_type;
/**
* @name Constructor / destructor
* be the number of outputs $\mathbf{r}$, i.e., the dimension of the
* image space.
*/
- ADHelperResidualLinearization(const unsigned int n_independent_variables,
- const unsigned int n_dependent_variables);
+ ResidualLinearization(const unsigned int n_independent_variables,
+ const unsigned int n_dependent_variables);
/**
* Destructor
*/
- virtual ~ADHelperResidualLinearization() = default;
+ virtual ~ResidualLinearization() = default;
//@}
* @f]
*
* The values at the evaluation point $\mathbf{X}$ are obtained by calling
- * ADHelperCellLevelBase::set_dof_values().
+ * CellLevelBase::set_dof_values().
*
* @param[out] residual A Vector object, for which the value for each
* entry represents the residual value for the corresponding local
* @f]
*
* The values at the evaluation point $\mathbf{X}$ are obtained by calling
- * ADHelperCellLevelBase::set_dof_values().
+ * CellLevelBase::set_dof_values().
*
* @param[out] linearization A FullMatrix representing the linearization
* of the residual vector. The output @p linearization matrix has
//@}
- }; // class ADHelperResidualLinearization
+ }; // class ResidualLinearization
/**
* A base helper class that facilitates the evaluation of point-wise defined
* functions. This is the point-wise counterpart of the
- * ADHelperCellLevelBase class, and was conceived for computations at a
+ * CellLevelBase class, and was conceived for computations at a
* continuum point, or quadrature point, rather than for finite-element
* level calculations. That being said, the interface to this and the
* derived classes are sufficiently generic that the dependent function(s)
template <int dim,
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType = double>
- class ADHelperPointLevelFunctionsBase
- : public ADHelperBase<ADNumberTypeCode, ScalarType>
+ class PointLevelFunctionsBase
+ : public HelperBase<ADNumberTypeCode, ScalarType>
{
public:
/**
* and results from, all computations.
*/
using scalar_type =
- typename ADHelperBase<ADNumberTypeCode, ScalarType>::scalar_type;
+ typename HelperBase<ADNumberTypeCode, ScalarType>::scalar_type;
/**
* Type definition for the auto-differentiation number type that is used
* in all computations.
*/
using ad_type =
- typename ADHelperBase<ADNumberTypeCode, ScalarType>::ad_type;
+ typename HelperBase<ADNumberTypeCode, ScalarType>::ad_type;
/**
* @name Constructor / destructor
* be the number of outputs $\mathbf{f}$, i.e., the dimension of the
* image space.
*/
- ADHelperPointLevelFunctionsBase(
- const unsigned int n_independent_variables,
- const unsigned int n_dependent_variables);
+ PointLevelFunctionsBase(const unsigned int n_independent_variables,
+ const unsigned int n_dependent_variables);
/**
* Destructor
*/
- virtual ~ADHelperPointLevelFunctionsBase() = default;
+ virtual ~PointLevelFunctionsBase() = default;
//@}
//@{
/**
- * @copydoc ADHelperBase::reset()
+ * @copydoc HelperBase::reset()
*/
virtual void
reset(const unsigned int n_independent_variables =
* correspond with the @p ScalarType prescribed as a template argument.
*
* @note If the @p keep_independent_values flag has been set when
- * ADHelperBase::start_recording_operations() is called then the tape is
+ * HelperBase::start_recording_operations() is called then the tape is
* immediately usable after creation, and the values of the independent
* variables set by register_independent_variables() are those at which
* the function is to be evaluated. In this case, a separate call to this
* be an FEValuesExtractors::Vector or FEValuesExtractors::Tensor<1>.
*
* @note If the @p keep_independent_values flag has been set when
- * ADHelperBase::start_recording_operations() is called then the tape is
+ * HelperBase::start_recording_operations() is called then the tape is
* immediately usable after creation, and the values of the independent
* variables set by register_independent_variable() are those at which the
* function is to be evaluated. In this case, a separate call to this
//@}
- }; // class ADHelperPointLevelFunctionsBase
+ }; // class PointLevelFunctionsBase
* // Define the helper that we will use in the AD computations for our
* // scalar energy function. Note that we expect it to return values of
* // type double.
- * ADHelperScalarFunction<dim,...> ad_helper (n_independent_variables);
+ * ScalarFunction<dim,...> ad_helper (n_independent_variables);
* using ADNumberType = typename ADHelper::ad_type;
*
* // Compute the fields that provide the independent values.
template <int dim,
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType = double>
- class ADHelperScalarFunction
- : public ADHelperPointLevelFunctionsBase<dim,
- ADNumberTypeCode,
- ScalarType>
+ class ScalarFunction
+ : public PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>
{
public:
/**
* and results from, all computations.
*/
using scalar_type =
- typename ADHelperBase<ADNumberTypeCode, ScalarType>::scalar_type;
+ typename HelperBase<ADNumberTypeCode, ScalarType>::scalar_type;
/**
* Type definition for the auto-differentiation number type that is used
* in all computations.
*/
using ad_type =
- typename ADHelperBase<ADNumberTypeCode, ScalarType>::ad_type;
+ typename HelperBase<ADNumberTypeCode, ScalarType>::ad_type;
/**
* @name Constructor / destructor
* $\mathbf{f}(\mathbf{X})$, this will be the number of inputs
* $\mathbf{X}$, i.e., the dimension of the domain space.
*/
- ADHelperScalarFunction(const unsigned int n_independent_variables);
+ ScalarFunction(const unsigned int n_independent_variables);
/**
* Destructor.
*/
- virtual ~ADHelperScalarFunction() = default;
+ virtual ~ScalarFunction() = default;
//@}
//@}
- }; // class ADHelperScalarFunction
+ }; // class ScalarFunction
* // Define the helper that we will use in the AD computations for our
* // scalar energy function. Note that we expect it to return values of
* // type double.
- * ADHelperVectorFunction<dim,double> ad_helper (n_independent_variables,
+ * VectorFunction<dim,double> ad_helper (n_independent_variables,
* n_dependent_variables);
* using ADNumberType = typename ADHelper::ad_type;
*
template <int dim,
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType = double>
- class ADHelperVectorFunction
- : public ADHelperPointLevelFunctionsBase<dim,
- ADNumberTypeCode,
- ScalarType>
+ class VectorFunction
+ : public PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>
{
public:
/**
* and results from, all computations.
*/
using scalar_type =
- typename ADHelperBase<ADNumberTypeCode, ScalarType>::scalar_type;
+ typename HelperBase<ADNumberTypeCode, ScalarType>::scalar_type;
/**
* Type definition for the auto-differentiation number type that is used
* in all computations.
*/
using ad_type =
- typename ADHelperBase<ADNumberTypeCode, ScalarType>::ad_type;
+ typename HelperBase<ADNumberTypeCode, ScalarType>::ad_type;
/**
* @name Constructor / destructor
* be the number of outputs $\mathbf{f}$, i.e., the dimension of the
* image space.
*/
- ADHelperVectorFunction(const unsigned int n_independent_variables,
- const unsigned int n_dependent_variables);
+ VectorFunction(const unsigned int n_independent_variables,
+ const unsigned int n_dependent_variables);
/**
* Destructor.
*/
- virtual ~ADHelperVectorFunction() = default;
+ virtual ~VectorFunction() = default;
//@}
//@}
- }; // class ADHelperVectorFunction
+ }; // class VectorFunction
} // namespace AD
{
namespace AD
{
- /* ----------------- ADHelperCellLevelBase ----------------- */
+ /* ----------------- CellLevelBase ----------------- */
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
template <typename VectorType>
void
- ADHelperCellLevelBase<ADNumberTypeCode, ScalarType>::register_dof_values(
+ CellLevelBase<ADNumberTypeCode, ScalarType>::register_dof_values(
const VectorType & values,
const std::vector<dealii::types::global_dof_index> &local_dof_indices)
{
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
template <typename VectorType>
void
- ADHelperCellLevelBase<ADNumberTypeCode, ScalarType>::set_dof_values(
+ CellLevelBase<ADNumberTypeCode, ScalarType>::set_dof_values(
const VectorType & values,
const std::vector<dealii::types::global_dof_index> &local_dof_indices)
{
ExcMessage(
"Vector size does not match number of independent variables"));
for (unsigned int i = 0; i < this->n_independent_variables(); ++i)
- ADHelperBase<ADNumberTypeCode, ScalarType>::set_sensitivity_value(
+ HelperBase<ADNumberTypeCode, ScalarType>::set_sensitivity_value(
i, values[local_dof_indices[i]]);
}
- /* ----------------- ADHelperPointLevelFunctionsBase ----------------- */
+ /* ----------------- PointLevelFunctionsBase ----------------- */
typename ScalarType>
template <typename ValueType, typename ExtractorType>
void
- ADHelperPointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
+ PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
register_independent_variable(const ValueType & value,
const ExtractorType &extractor)
{
typename ScalarType>
template <typename ValueType, typename ExtractorType>
void
- ADHelperPointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
+ PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
set_independent_variable(const ValueType & value,
const ExtractorType &extractor)
{
typename ScalarType>
template <typename ExtractorType>
typename internal::Extractor<dim, ExtractorType>::template tensor_type<
- typename ADHelperBase<ADNumberTypeCode, ScalarType>::ad_type>
- ADHelperPointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
+ typename HelperBase<ADNumberTypeCode, ScalarType>::ad_type>
+ PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
get_sensitive_variables(const ExtractorType &extractor) const
{
if (ADNumberTraits<ad_type>::is_taped == true)
- /* ----------------- ADHelperScalarFunction ----------------- */
+ /* ----------------- ScalarFunction ----------------- */
template <typename ExtractorType_Row>
typename internal::ScalarFieldGradient<
dim,
- typename ADHelperScalarFunction<dim, ADNumberTypeCode, ScalarType>::
- scalar_type,
+ typename ScalarFunction<dim, ADNumberTypeCode, ScalarType>::scalar_type,
ExtractorType_Row>::type
- ADHelperScalarFunction<dim, ADNumberTypeCode, ScalarType>::
+ ScalarFunction<dim, ADNumberTypeCode, ScalarType>::
extract_gradient_component(const Vector<scalar_type> &gradient,
const ExtractorType_Row & extractor_row)
{
template <typename ExtractorType_Row, typename ExtractorType_Col>
typename internal::ScalarFieldHessian<
dim,
- typename ADHelperScalarFunction<dim, ADNumberTypeCode, ScalarType>::
- scalar_type,
+ typename ScalarFunction<dim, ADNumberTypeCode, ScalarType>::scalar_type,
ExtractorType_Row,
ExtractorType_Col>::type
- ADHelperScalarFunction<dim, ADNumberTypeCode, ScalarType>::
+ ScalarFunction<dim, ADNumberTypeCode, ScalarType>::
extract_hessian_component(const FullMatrix<scalar_type> &hessian,
const ExtractorType_Row & extractor_row,
const ExtractorType_Col & extractor_col)
- /* ----------------- ADHelperVectorFunction ----------------- */
+ /* ----------------- VectorFunction ----------------- */
typename ScalarType>
template <typename ValueType, typename ExtractorType>
void
- ADHelperVectorFunction<dim, ADNumberTypeCode, ScalarType>::
+ VectorFunction<dim, ADNumberTypeCode, ScalarType>::
register_dependent_variable(const ValueType & funcs,
const ExtractorType &extractor)
{
Assert(this->registered_marked_dependent_variables[index_set[i]] ==
false,
ExcMessage("Overlapping indices for dependent variables."));
- ADHelperBase<ADNumberTypeCode, ScalarType>::
- register_dependent_variable(index_set[i],
- internal::get_tensor_entry(funcs, i));
+ HelperBase<ADNumberTypeCode, ScalarType>::register_dependent_variable(
+ index_set[i], internal::get_tensor_entry(funcs, i));
}
}
template <typename ExtractorType_Row>
typename internal::VectorFieldValue<
dim,
- typename ADHelperVectorFunction<dim, ADNumberTypeCode, ScalarType>::
- scalar_type,
+ typename VectorFunction<dim, ADNumberTypeCode, ScalarType>::scalar_type,
ExtractorType_Row>::type
- ADHelperVectorFunction<dim, ADNumberTypeCode, ScalarType>::
- extract_value_component(const Vector<scalar_type> &values,
- const ExtractorType_Row & extractor_row)
+ VectorFunction<dim, ADNumberTypeCode, ScalarType>::extract_value_component(
+ const Vector<scalar_type> &values,
+ const ExtractorType_Row & extractor_row)
{
// NOTE: The order of components must be consistently defined throughout
// this class.
template <typename ExtractorType_Row, typename ExtractorType_Col>
typename internal::VectorFieldJacobian<
dim,
- typename ADHelperVectorFunction<dim, ADNumberTypeCode, ScalarType>::
- scalar_type,
+ typename VectorFunction<dim, ADNumberTypeCode, ScalarType>::scalar_type,
ExtractorType_Row,
ExtractorType_Col>::type
- ADHelperVectorFunction<dim, ADNumberTypeCode, ScalarType>::
+ VectorFunction<dim, ADNumberTypeCode, ScalarType>::
extract_jacobian_component(const FullMatrix<scalar_type> &jacobian,
const ExtractorType_Row & extractor_row,
const ExtractorType_Col & extractor_col)
{
namespace AD
{
- /* -------------------------- ADHelperBase -------------------------- */
+ /* -------------------------- HelperBase -------------------------- */
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
- ADHelperBase<ADNumberTypeCode, ScalarType>::ADHelperBase(
+ HelperBase<ADNumberTypeCode, ScalarType>::HelperBase(
const unsigned int n_independent_variables,
const unsigned int n_dependent_variables)
: independent_variable_values(
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode,
- ScalarType>::reset_registered_independent_variables()
+ HelperBase<ADNumberTypeCode,
+ ScalarType>::reset_registered_independent_variables()
{
for (typename std::vector<bool>::iterator it =
registered_independent_variable_values.begin();
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode, ScalarType>::
+ HelperBase<ADNumberTypeCode, ScalarType>::
reset_registered_dependent_variables(const bool flag)
{
for (typename std::vector<bool>::iterator it =
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode, ScalarType>::set_sensitivity_value(
+ HelperBase<ADNumberTypeCode, ScalarType>::set_sensitivity_value(
const unsigned int index,
const scalar_type &value)
{
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode, ScalarType>::mark_independent_variable(
+ HelperBase<ADNumberTypeCode, ScalarType>::mark_independent_variable(
const unsigned int index,
ad_type & out) const
{
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode,
- ScalarType>::finalize_sensitive_independent_variables() const
+ HelperBase<ADNumberTypeCode,
+ ScalarType>::finalize_sensitive_independent_variables() const
{
// Double check that we've actually registered all DoFs
Assert(n_registered_independent_variables() == n_independent_variables(),
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode, ScalarType>::
+ HelperBase<ADNumberTypeCode, ScalarType>::
initialize_non_sensitive_independent_variable(const unsigned int index,
ad_type &out) const
{
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
unsigned int
- ADHelperBase<ADNumberTypeCode,
- ScalarType>::n_registered_independent_variables() const
+ HelperBase<ADNumberTypeCode,
+ ScalarType>::n_registered_independent_variables() const
{
return std::count(registered_independent_variable_values.begin(),
registered_independent_variable_values.end(),
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
std::size_t
- ADHelperBase<ADNumberTypeCode, ScalarType>::n_independent_variables() const
+ HelperBase<ADNumberTypeCode, ScalarType>::n_independent_variables() const
{
return independent_variable_values.size();
}
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
unsigned int
- ADHelperBase<ADNumberTypeCode,
- ScalarType>::n_registered_dependent_variables() const
+ HelperBase<ADNumberTypeCode, ScalarType>::n_registered_dependent_variables()
+ const
{
return std::count(registered_marked_dependent_variables.begin(),
registered_marked_dependent_variables.end(),
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
std::size_t
- ADHelperBase<ADNumberTypeCode, ScalarType>::n_dependent_variables() const
+ HelperBase<ADNumberTypeCode, ScalarType>::n_dependent_variables() const
{
return dependent_variables.size();
}
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
bool
- ADHelperBase<ADNumberTypeCode, ScalarType>::is_recording() const
+ HelperBase<ADNumberTypeCode, ScalarType>::is_recording() const
{
if (AD::is_taped_ad_number<ad_type>::value)
return taped_driver.is_recording();
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
typename Types<
- typename ADHelperBase<ADNumberTypeCode, ScalarType>::ad_type>::tape_index
- ADHelperBase<ADNumberTypeCode, ScalarType>::active_tape_index() const
+ typename HelperBase<ADNumberTypeCode, ScalarType>::ad_type>::tape_index
+ HelperBase<ADNumberTypeCode, ScalarType>::active_tape_index() const
{
if (AD::is_taped_ad_number<ad_type>::value)
return taped_driver.active_tape_index();
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
bool
- ADHelperBase<ADNumberTypeCode, ScalarType>::is_registered_tape(
+ HelperBase<ADNumberTypeCode, ScalarType>::is_registered_tape(
const typename Types<ad_type>::tape_index tape_index) const
{
if (AD::is_taped_ad_number<ad_type>::value)
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode, ScalarType>::print(
- std::ostream &stream) const
+ HelperBase<ADNumberTypeCode, ScalarType>::print(std::ostream &stream) const
{
// Store stream flags
const std::ios_base::fmtflags stream_flags(stream.flags());
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode, ScalarType>::print_values(
+ HelperBase<ADNumberTypeCode, ScalarType>::print_values(
std::ostream &stream) const
{
for (unsigned int i = 0; i < n_independent_variables(); i++)
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode, ScalarType>::print_tape_stats(
+ HelperBase<ADNumberTypeCode, ScalarType>::print_tape_stats(
const typename Types<ad_type>::tape_index tape_index,
std::ostream & stream) const
{
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode, ScalarType>::reset(
+ HelperBase<ADNumberTypeCode, ScalarType>::reset(
const unsigned int n_independent_variables,
const unsigned int n_dependent_variables,
const bool clear_registered_tapes)
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode, ScalarType>::configure_tapeless_mode(
+ HelperBase<ADNumberTypeCode, ScalarType>::configure_tapeless_mode(
const unsigned int n_independent_variables,
const bool ensure_persistent_setting)
{
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode, ScalarType>::activate_recorded_tape(
+ HelperBase<ADNumberTypeCode, ScalarType>::activate_recorded_tape(
const typename Types<ad_type>::tape_index tape_index)
{
activate_tape(tape_index, true /*read_mode*/);
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
bool
- ADHelperBase<ADNumberTypeCode, ScalarType>::recorded_tape_requires_retaping(
+ HelperBase<ADNumberTypeCode, ScalarType>::recorded_tape_requires_retaping(
const typename Types<ad_type>::tape_index tape_index) const
{
if (ADNumberTraits<ad_type>::is_tapeless == true)
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
bool
- ADHelperBase<ADNumberTypeCode, ScalarType>::active_tape_requires_retaping()
+ HelperBase<ADNumberTypeCode, ScalarType>::active_tape_requires_retaping()
const
{
if (ADNumberTraits<ad_type>::is_tapeless == true)
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode, ScalarType>::clear_active_tape()
+ HelperBase<ADNumberTypeCode, ScalarType>::clear_active_tape()
{
if (ADNumberTraits<ad_type>::is_tapeless == true)
return;
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode, ScalarType>::activate_tape(
+ HelperBase<ADNumberTypeCode, ScalarType>::activate_tape(
const typename Types<ad_type>::tape_index tape_index,
const bool read_mode)
{
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode, ScalarType>::set_tape_buffer_sizes(
+ HelperBase<ADNumberTypeCode, ScalarType>::set_tape_buffer_sizes(
const typename Types<ad_type>::tape_buffer_sizes obufsize,
const typename Types<ad_type>::tape_buffer_sizes lbufsize,
const typename Types<ad_type>::tape_buffer_sizes vbufsize,
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
bool
- ADHelperBase<ADNumberTypeCode, ScalarType>::start_recording_operations(
+ HelperBase<ADNumberTypeCode, ScalarType>::start_recording_operations(
const typename Types<ad_type>::tape_index tape_index,
const bool overwrite_tape,
const bool keep_independent_values)
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode, ScalarType>::stop_recording_operations(
+ HelperBase<ADNumberTypeCode, ScalarType>::stop_recording_operations(
const bool write_tapes_to_file)
{
Assert(is_recording() == true, ExcMessage("Not currently recording..."));
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperBase<ADNumberTypeCode, ScalarType>::register_dependent_variable(
+ HelperBase<ADNumberTypeCode, ScalarType>::register_dependent_variable(
const unsigned int index,
const ad_type & func)
{
- /* -------------------- ADHelperCellLevelBase -------------------- */
+ /* -------------------- CellLevelBase -------------------- */
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
- ADHelperCellLevelBase<ADNumberTypeCode, ScalarType>::ADHelperCellLevelBase(
+ CellLevelBase<ADNumberTypeCode, ScalarType>::CellLevelBase(
const unsigned int n_independent_variables,
const unsigned int n_dependent_variables)
- : ADHelperBase<ADNumberTypeCode, ScalarType>(n_independent_variables,
- n_dependent_variables)
+ : HelperBase<ADNumberTypeCode, ScalarType>(n_independent_variables,
+ n_dependent_variables)
{}
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperCellLevelBase<ADNumberTypeCode, ScalarType>::register_dof_values(
+ CellLevelBase<ADNumberTypeCode, ScalarType>::register_dof_values(
const std::vector<scalar_type> &dof_values)
{
// This is actually the same thing the set_independent_variable function,
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
const std::vector<
- typename ADHelperCellLevelBase<ADNumberTypeCode, ScalarType>::ad_type> &
- ADHelperCellLevelBase<ADNumberTypeCode,
- ScalarType>::get_sensitive_dof_values() const
+ typename CellLevelBase<ADNumberTypeCode, ScalarType>::ad_type> &
+ CellLevelBase<ADNumberTypeCode, ScalarType>::get_sensitive_dof_values()
+ const
{
if (ADNumberTraits<ad_type>::is_taped == true)
{
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperCellLevelBase<ADNumberTypeCode, ScalarType>::set_dof_values(
+ CellLevelBase<ADNumberTypeCode, ScalarType>::set_dof_values(
const std::vector<scalar_type> &values)
{
if (ADNumberTraits<ad_type>::is_taped == true)
ExcMessage(
"Vector size does not match number of independent variables"));
for (unsigned int i = 0; i < this->n_independent_variables(); ++i)
- ADHelperBase<ADNumberTypeCode, ScalarType>::set_sensitivity_value(
+ HelperBase<ADNumberTypeCode, ScalarType>::set_sensitivity_value(
i, values[i]);
}
- /* ------------------ ADHelperEnergyFunctional ------------------ */
+ /* ------------------ EnergyFunctional ------------------ */
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
- ADHelperEnergyFunctional<ADNumberTypeCode, ScalarType>::
- ADHelperEnergyFunctional(const unsigned int n_independent_variables)
- : ADHelperCellLevelBase<ADNumberTypeCode, ScalarType>(
- n_independent_variables,
- 1)
+ EnergyFunctional<ADNumberTypeCode, ScalarType>::EnergyFunctional(
+ const unsigned int n_independent_variables)
+ : CellLevelBase<ADNumberTypeCode, ScalarType>(n_independent_variables, 1)
{}
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperEnergyFunctional<ADNumberTypeCode, ScalarType>::
- register_energy_functional(const ad_type &energy)
+ EnergyFunctional<ADNumberTypeCode, ScalarType>::register_energy_functional(
+ const ad_type &energy)
{
Assert(this->n_dependent_variables() == 1, ExcInternalError());
- ADHelperBase<ADNumberTypeCode, ScalarType>::register_dependent_variable(
+ HelperBase<ADNumberTypeCode, ScalarType>::register_dependent_variable(
0, energy);
}
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
- typename ADHelperEnergyFunctional<ADNumberTypeCode, ScalarType>::scalar_type
- ADHelperEnergyFunctional<ADNumberTypeCode, ScalarType>::compute_energy()
- const
+ typename EnergyFunctional<ADNumberTypeCode, ScalarType>::scalar_type
+ EnergyFunctional<ADNumberTypeCode, ScalarType>::compute_energy() const
{
if ((ADNumberTraits<ad_type>::is_taped == true &&
this->taped_driver.keep_independent_values() == false) ||
Assert(
this->n_dependent_variables() == 1,
ExcMessage(
- "The ADHelperEnergyFunctional class expects there to be only one dependent variable."));
+ "The EnergyFunctional class expects there to be only one dependent variable."));
if (ADNumberTraits<ad_type>::is_taped == true)
{
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperEnergyFunctional<ADNumberTypeCode, ScalarType>::compute_residual(
+ EnergyFunctional<ADNumberTypeCode, ScalarType>::compute_residual(
Vector<scalar_type> &gradient) const
{
if ((ADNumberTraits<ad_type>::is_taped == true &&
Assert(
this->n_dependent_variables() == 1,
ExcMessage(
- "The ADHelperEnergyFunctional class expects there to be only one dependent variable."));
+ "The EnergyFunctional class expects there to be only one dependent variable."));
// We can neglect correctly initializing the entries as
// we'll be overwriting them immediately in the succeeding call to
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperEnergyFunctional<ADNumberTypeCode, ScalarType>::
- compute_linearization(FullMatrix<scalar_type> &hessian) const
+ EnergyFunctional<ADNumberTypeCode, ScalarType>::compute_linearization(
+ FullMatrix<scalar_type> &hessian) const
{
Assert(AD::ADNumberTraits<ad_type>::n_supported_derivative_levels >= 2,
ExcMessage(
Assert(
this->n_dependent_variables() == 1,
ExcMessage(
- "The ADHelperEnergyFunctional class expects there to be only one dependent variable."));
+ "The EnergyFunctional class expects there to be only one dependent variable."));
// We can neglect correctly initializing the entries as
// we'll be overwriting them immediately in the succeeding call to
}
- /* ------------------- ADHelperResidualLinearization ------------------- */
+ /* ------------------- ResidualLinearization ------------------- */
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
- ADHelperResidualLinearization<ADNumberTypeCode, ScalarType>::
- ADHelperResidualLinearization(const unsigned int n_independent_variables,
- const unsigned int n_dependent_variables)
- : ADHelperCellLevelBase<ADNumberTypeCode, ScalarType>(
- n_independent_variables,
- n_dependent_variables)
+ ResidualLinearization<ADNumberTypeCode, ScalarType>::ResidualLinearization(
+ const unsigned int n_independent_variables,
+ const unsigned int n_dependent_variables)
+ : CellLevelBase<ADNumberTypeCode, ScalarType>(n_independent_variables,
+ n_dependent_variables)
{}
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperResidualLinearization<ADNumberTypeCode, ScalarType>::
+ ResidualLinearization<ADNumberTypeCode, ScalarType>::
register_residual_vector(const std::vector<ad_type> &residual)
{
Assert(residual.size() == this->n_dependent_variables(),
ExcMessage(
"Vector size does not match number of dependent variables"));
for (unsigned int i = 0; i < this->n_dependent_variables(); ++i)
- ADHelperBase<ADNumberTypeCode, ScalarType>::register_dependent_variable(
+ HelperBase<ADNumberTypeCode, ScalarType>::register_dependent_variable(
i, residual[i]);
}
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperResidualLinearization<ADNumberTypeCode, ScalarType>::
- compute_residual(Vector<scalar_type> &values) const
+ ResidualLinearization<ADNumberTypeCode, ScalarType>::compute_residual(
+ Vector<scalar_type> &values) const
{
if ((ADNumberTraits<ad_type>::is_taped == true &&
this->taped_driver.keep_independent_values() == false) ||
template <enum AD::NumberTypes ADNumberTypeCode, typename ScalarType>
void
- ADHelperResidualLinearization<ADNumberTypeCode, ScalarType>::
- compute_linearization(FullMatrix<scalar_type> &jacobian) const
+ ResidualLinearization<ADNumberTypeCode, ScalarType>::compute_linearization(
+ FullMatrix<scalar_type> &jacobian) const
{
if ((ADNumberTraits<ad_type>::is_taped == true &&
this->taped_driver.keep_independent_values() == false) ||
- /* ----------------- ADHelperPointLevelFunctionsBase ----------------- */
+ /* ----------------- PointLevelFunctionsBase ----------------- */
template <int dim,
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
- ADHelperPointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
- ADHelperPointLevelFunctionsBase(
- const unsigned int n_independent_variables,
- const unsigned int n_dependent_variables)
- : ADHelperBase<ADNumberTypeCode, ScalarType>(n_independent_variables,
- n_dependent_variables)
+ PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
+ PointLevelFunctionsBase(const unsigned int n_independent_variables,
+ const unsigned int n_dependent_variables)
+ : HelperBase<ADNumberTypeCode, ScalarType>(n_independent_variables,
+ n_dependent_variables)
, symmetric_independent_variables(n_independent_variables, false)
{}
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
void
- ADHelperPointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::reset(
+ PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::reset(
const unsigned int n_independent_variables,
const unsigned int n_dependent_variables,
const bool clear_registered_tapes)
{
- ADHelperBase<ADNumberTypeCode, ScalarType>::reset(n_independent_variables,
- n_dependent_variables,
- clear_registered_tapes);
+ HelperBase<ADNumberTypeCode, ScalarType>::reset(n_independent_variables,
+ n_dependent_variables,
+ clear_registered_tapes);
const unsigned int new_n_independent_variables =
(n_independent_variables != dealii::numbers::invalid_unsigned_int ?
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
bool
- ADHelperPointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
+ PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
is_symmetric_independent_variable(const unsigned int index) const
{
Assert(index < symmetric_independent_variables.size(),
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
unsigned int
- ADHelperPointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
+ PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
n_symmetric_independent_variables() const
{
return std::count(symmetric_independent_variables.begin(),
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
void
- ADHelperPointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
+ PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
register_independent_variables(const std::vector<scalar_type> &values)
{
// This is actually the same thing the set_independent_variable function,
template <int dim,
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
- const std::vector<
- typename ADHelperPointLevelFunctionsBase<dim,
- ADNumberTypeCode,
- ScalarType>::ad_type> &
- ADHelperPointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
+ const std::vector<typename PointLevelFunctionsBase<dim,
+ ADNumberTypeCode,
+ ScalarType>::ad_type> &
+ PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
get_sensitive_variables() const
{
if (ADNumberTraits<ad_type>::is_taped == true)
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
void
- ADHelperPointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
+ PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
set_sensitivity_value(const unsigned int index,
const bool symmetric_component,
const scalar_type &value)
{
- ADHelperBase<ADNumberTypeCode, ScalarType>::set_sensitivity_value(index,
- value);
+ HelperBase<ADNumberTypeCode, ScalarType>::set_sensitivity_value(index,
+ value);
Assert(
index < this->n_independent_variables(),
ExcMessage(
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
void
- ADHelperPointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
+ PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>::
set_independent_variables(const std::vector<scalar_type> &values)
{
if (ADNumberTraits<ad_type>::is_taped == true)
ExcMessage(
"Vector size does not match number of independent variables"));
for (unsigned int i = 0; i < this->n_independent_variables(); ++i)
- ADHelperBase<ADNumberTypeCode, ScalarType>::set_sensitivity_value(
+ HelperBase<ADNumberTypeCode, ScalarType>::set_sensitivity_value(
i, values[i]);
}
- /* -------------------- ADHelperScalarFunction -------------------- */
+ /* -------------------- ScalarFunction -------------------- */
template <int dim,
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
- ADHelperScalarFunction<dim, ADNumberTypeCode, ScalarType>::
- ADHelperScalarFunction(const unsigned int n_independent_variables)
- : ADHelperPointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>(
+ ScalarFunction<dim, ADNumberTypeCode, ScalarType>::ScalarFunction(
+ const unsigned int n_independent_variables)
+ : PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>(
n_independent_variables,
1)
{}
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
void
- ADHelperScalarFunction<dim, ADNumberTypeCode, ScalarType>::
+ ScalarFunction<dim, ADNumberTypeCode, ScalarType>::
register_dependent_variable(const ad_type &func)
{
Assert(this->n_dependent_variables() == 1, ExcInternalError());
- ADHelperBase<ADNumberTypeCode, ScalarType>::register_dependent_variable(
+ HelperBase<ADNumberTypeCode, ScalarType>::register_dependent_variable(
0, func);
}
template <int dim,
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
- typename ADHelperScalarFunction<dim, ADNumberTypeCode, ScalarType>::
- scalar_type
- ADHelperScalarFunction<dim, ADNumberTypeCode, ScalarType>::compute_value()
- const
+ typename ScalarFunction<dim, ADNumberTypeCode, ScalarType>::scalar_type
+ ScalarFunction<dim, ADNumberTypeCode, ScalarType>::compute_value() const
{
if ((ADNumberTraits<ad_type>::is_taped == true &&
this->taped_driver.keep_independent_values() == false) ||
Assert(
this->n_dependent_variables() == 1,
ExcMessage(
- "The ADHelperScalarFunction class expects there to be only one dependent variable."));
+ "The ScalarFunction class expects there to be only one dependent variable."));
if (ADNumberTraits<ad_type>::is_taped == true)
{
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
void
- ADHelperScalarFunction<dim, ADNumberTypeCode, ScalarType>::compute_gradient(
+ ScalarFunction<dim, ADNumberTypeCode, ScalarType>::compute_gradient(
Vector<scalar_type> &gradient) const
{
if ((ADNumberTraits<ad_type>::is_taped == true &&
Assert(
this->n_dependent_variables() == 1,
ExcMessage(
- "The ADHelperScalarFunction class expects there to be only one dependent variable."));
+ "The ScalarFunction class expects there to be only one dependent variable."));
// We can neglect correctly initializing the entries as
// we'll be overwriting them immediately in the succeeding call to
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
void
- ADHelperScalarFunction<dim, ADNumberTypeCode, ScalarType>::compute_hessian(
+ ScalarFunction<dim, ADNumberTypeCode, ScalarType>::compute_hessian(
FullMatrix<scalar_type> &hessian) const
{
Assert(AD::ADNumberTraits<ad_type>::n_supported_derivative_levels >= 2,
Assert(
this->n_dependent_variables() == 1,
ExcMessage(
- "The ADHelperScalarFunction class expects there to be only one dependent variable."));
+ "The ScalarFunction class expects there to be only one dependent variable."));
// We can neglect correctly initializing the entries as
// we'll be overwriting them immediately in the succeeding call to
template <int dim,
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
- Tensor<0,
- dim,
- typename ADHelperScalarFunction<dim, ADNumberTypeCode, ScalarType>::
- scalar_type>
- ADHelperScalarFunction<dim, ADNumberTypeCode, ScalarType>::
+ Tensor<
+ 0,
+ dim,
+ typename ScalarFunction<dim, ADNumberTypeCode, ScalarType>::scalar_type>
+ ScalarFunction<dim, ADNumberTypeCode, ScalarType>::
extract_hessian_component(const FullMatrix<scalar_type> & hessian,
const FEValuesExtractors::Scalar &extractor_row,
const FEValuesExtractors::Scalar &extractor_col)
template <int dim,
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
- SymmetricTensor<4,
- dim,
- typename ADHelperScalarFunction<dim,
- ADNumberTypeCode,
- ScalarType>::scalar_type>
- ADHelperScalarFunction<dim, ADNumberTypeCode, ScalarType>::
+ SymmetricTensor<
+ 4,
+ dim,
+ typename ScalarFunction<dim, ADNumberTypeCode, ScalarType>::scalar_type>
+ ScalarFunction<dim, ADNumberTypeCode, ScalarType>::
extract_hessian_component(
const FullMatrix<scalar_type> & hessian,
const FEValuesExtractors::SymmetricTensor<2> &extractor_row,
- /* -------------------- ADHelperVectorFunction -------------------- */
+ /* -------------------- VectorFunction -------------------- */
template <int dim,
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
- ADHelperVectorFunction<dim, ADNumberTypeCode, ScalarType>::
- ADHelperVectorFunction(const unsigned int n_independent_variables,
- const unsigned int n_dependent_variables)
- : ADHelperPointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>(
+ VectorFunction<dim, ADNumberTypeCode, ScalarType>::VectorFunction(
+ const unsigned int n_independent_variables,
+ const unsigned int n_dependent_variables)
+ : PointLevelFunctionsBase<dim, ADNumberTypeCode, ScalarType>(
n_independent_variables,
n_dependent_variables)
{}
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
void
- ADHelperVectorFunction<dim, ADNumberTypeCode, ScalarType>::
+ VectorFunction<dim, ADNumberTypeCode, ScalarType>::
register_dependent_variables(const std::vector<ad_type> &funcs)
{
Assert(funcs.size() == this->n_dependent_variables(),
ExcMessage(
"Vector size does not match number of dependent variables"));
for (unsigned int i = 0; i < this->n_dependent_variables(); ++i)
- ADHelperBase<ADNumberTypeCode, ScalarType>::register_dependent_variable(
+ HelperBase<ADNumberTypeCode, ScalarType>::register_dependent_variable(
i, funcs[i]);
}
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
void
- ADHelperVectorFunction<dim, ADNumberTypeCode, ScalarType>::compute_values(
+ VectorFunction<dim, ADNumberTypeCode, ScalarType>::compute_values(
Vector<scalar_type> &values) const
{
if ((ADNumberTraits<ad_type>::is_taped == true &&
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
void
- ADHelperVectorFunction<dim, ADNumberTypeCode, ScalarType>::compute_jacobian(
+ VectorFunction<dim, ADNumberTypeCode, ScalarType>::compute_jacobian(
FullMatrix<scalar_type> &jacobian) const
{
if ((ADNumberTraits<ad_type>::is_taped == true &&
template <int dim,
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
- Tensor<0,
- dim,
- typename ADHelperVectorFunction<dim, ADNumberTypeCode, ScalarType>::
- scalar_type>
- ADHelperVectorFunction<dim, ADNumberTypeCode, ScalarType>::
+ Tensor<
+ 0,
+ dim,
+ typename VectorFunction<dim, ADNumberTypeCode, ScalarType>::scalar_type>
+ VectorFunction<dim, ADNumberTypeCode, ScalarType>::
extract_jacobian_component(
const FullMatrix<scalar_type> & jacobian,
const FEValuesExtractors::Scalar &extractor_row,
template <int dim,
enum AD::NumberTypes ADNumberTypeCode,
typename ScalarType>
- SymmetricTensor<4,
- dim,
- typename ADHelperVectorFunction<dim,
- ADNumberTypeCode,
- ScalarType>::scalar_type>
- ADHelperVectorFunction<dim, ADNumberTypeCode, ScalarType>::
+ SymmetricTensor<
+ 4,
+ dim,
+ typename VectorFunction<dim, ADNumberTypeCode, ScalarType>::scalar_type>
+ VectorFunction<dim, ADNumberTypeCode, ScalarType>::
extract_jacobian_component(
const FullMatrix<scalar_type> & jacobian,
const FEValuesExtractors::SymmetricTensor<2> &extractor_row,
\{
namespace AD
\{
- // -------------------------- ADHelperBase ----------------------
+ // -------------------------- HelperBase ----------------------
template
- class ADHelperBase<NumberTypes::adolc_taped,number>;
+ class HelperBase<NumberTypes::adolc_taped,number>;
template
- class ADHelperBase<NumberTypes::adolc_tapeless,number>;
+ class HelperBase<NumberTypes::adolc_tapeless,number>;
- // -------------------------- ADHelperCellLevelBase ----------------------
+ // -------------------------- CellLevelBase ----------------------
template
- class ADHelperCellLevelBase<NumberTypes::adolc_taped,number>;
+ class CellLevelBase<NumberTypes::adolc_taped,number>;
template
- class ADHelperCellLevelBase<NumberTypes::adolc_tapeless,number>;
+ class CellLevelBase<NumberTypes::adolc_tapeless,number>;
- // -------------------------- ADHelperEnergyFunctional ----------------------
+ // -------------------------- EnergyFunctional ----------------------
template
- class ADHelperEnergyFunctional<NumberTypes::adolc_taped,number>;
+ class EnergyFunctional<NumberTypes::adolc_taped,number>;
template
- class ADHelperEnergyFunctional<NumberTypes::adolc_tapeless,number>;
+ class EnergyFunctional<NumberTypes::adolc_tapeless,number>;
- // -------------------------- ADHelperResidualLinearization ----------------------
+ // -------------------------- ResidualLinearization ----------------------
template
- class ADHelperResidualLinearization<NumberTypes::adolc_taped,number>;
+ class ResidualLinearization<NumberTypes::adolc_taped,number>;
template
- class ADHelperResidualLinearization<NumberTypes::adolc_tapeless,number>;
+ class ResidualLinearization<NumberTypes::adolc_tapeless,number>;
\}
\}
namespace AD
\{
- // -------------------------- ADHelperBase ----------------------
+ // -------------------------- HelperBase ----------------------
template
- class ADHelperBase<NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;
+ class HelperBase<NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;
template
- class ADHelperBase<NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;
+ class HelperBase<NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;
- // -------------------------- ADHelperCellLevelBase ----------------------
+ // -------------------------- CellLevelBase ----------------------
template
- class ADHelperCellLevelBase<NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;
+ class CellLevelBase<NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;
template
- class ADHelperCellLevelBase<NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;
+ class CellLevelBase<NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;
- // -------------------------- ADHelperEnergyFunctional ----------------------
+ // -------------------------- EnergyFunctional ----------------------
template
- class ADHelperEnergyFunctional<NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;
+ class EnergyFunctional<NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;
template
- class ADHelperEnergyFunctional<NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;
+ class EnergyFunctional<NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;
- // -------------------------- ADHelperResidualLinearization ----------------------
+ // -------------------------- ResidualLinearization ----------------------
template
- class ADHelperResidualLinearization<NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;
+ class ResidualLinearization<NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;
template
- class ADHelperResidualLinearization<NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;
+ class ResidualLinearization<NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;
\}
\{
namespace AD
\{
- // -------------------------- ADHelperPointLevelFunctionsBase ----------------------
+ // -------------------------- PointLevelFunctionsBase ----------------------
template
- class ADHelperPointLevelFunctionsBase<deal_II_dimension,NumberTypes::adolc_taped,number>;
+ class PointLevelFunctionsBase<deal_II_dimension,NumberTypes::adolc_taped,number>;
template
- class ADHelperPointLevelFunctionsBase<deal_II_dimension,NumberTypes::adolc_tapeless,number>;
+ class PointLevelFunctionsBase<deal_II_dimension,NumberTypes::adolc_tapeless,number>;
- // -------------------------- ADHelperScalarFunction ----------------------
+ // -------------------------- ScalarFunction ----------------------
template
- class ADHelperScalarFunction<deal_II_dimension,NumberTypes::adolc_taped,number>;
+ class ScalarFunction<deal_II_dimension,NumberTypes::adolc_taped,number>;
template
- class ADHelperScalarFunction<deal_II_dimension,NumberTypes::adolc_tapeless,number>;
+ class ScalarFunction<deal_II_dimension,NumberTypes::adolc_tapeless,number>;
- // -------------------------- ADHelperVectorFunction ----------------------
+ // -------------------------- VectorFunction ----------------------
template
- class ADHelperVectorFunction<deal_II_dimension,NumberTypes::adolc_taped,number>;
+ class VectorFunction<deal_II_dimension,NumberTypes::adolc_taped,number>;
template
- class ADHelperVectorFunction<deal_II_dimension,NumberTypes::adolc_tapeless,number>;
+ class VectorFunction<deal_II_dimension,NumberTypes::adolc_tapeless,number>;
\}
\}
namespace AD
\{
- // -------------------------- ADHelperPointLevelFunctionsBase ----------------------
+ // -------------------------- PointLevelFunctionsBase ----------------------
template
- class ADHelperPointLevelFunctionsBase<deal_II_dimension,NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;
+ class PointLevelFunctionsBase<deal_II_dimension,NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;
template
- class ADHelperPointLevelFunctionsBase<deal_II_dimension,NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;
+ class PointLevelFunctionsBase<deal_II_dimension,NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;
- // -------------------------- ADHelperScalarFunction ----------------------
+ // -------------------------- ScalarFunction ----------------------
template
- class ADHelperScalarFunction<deal_II_dimension,NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;
+ class ScalarFunction<deal_II_dimension,NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;
template
- class ADHelperScalarFunction<deal_II_dimension,NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;
+ class ScalarFunction<deal_II_dimension,NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;
- // -------------------------- ADHelperVectorFunction ----------------------
+ // -------------------------- VectorFunction ----------------------
template
- class ADHelperVectorFunction<deal_II_dimension,NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;
+ class VectorFunction<deal_II_dimension,NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;
template
- class ADHelperVectorFunction<deal_II_dimension,NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;
+ class VectorFunction<deal_II_dimension,NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;
\}
\}
\{
namespace AD
\{
- // -------------------------- ADHelperBase ----------------------
+ // -------------------------- HelperBase ----------------------
template
- class ADHelperBase<NumberTypes::sacado_dfad_dfad,number>;
+ class HelperBase<NumberTypes::sacado_dfad_dfad,number>;
template
- class ADHelperBase<NumberTypes::sacado_dfad,number>;
+ class HelperBase<NumberTypes::sacado_dfad,number>;
template
- class ADHelperBase<NumberTypes::sacado_rad,number>;
+ class HelperBase<NumberTypes::sacado_rad,number>;
template
- class ADHelperBase<NumberTypes::sacado_rad_dfad,number>;
+ class HelperBase<NumberTypes::sacado_rad_dfad,number>;
- // -------------------------- ADHelperCellLevelBase ----------------------
+ // -------------------------- CellLevelBase ----------------------
template
- class ADHelperCellLevelBase<NumberTypes::sacado_dfad_dfad,number>;
+ class CellLevelBase<NumberTypes::sacado_dfad_dfad,number>;
template
- class ADHelperCellLevelBase<NumberTypes::sacado_dfad,number>;
+ class CellLevelBase<NumberTypes::sacado_dfad,number>;
template
- class ADHelperCellLevelBase<NumberTypes::sacado_rad,number>;
+ class CellLevelBase<NumberTypes::sacado_rad,number>;
template
- class ADHelperCellLevelBase<NumberTypes::sacado_rad_dfad,number>;
+ class CellLevelBase<NumberTypes::sacado_rad_dfad,number>;
- // -------------------------- ADHelperEnergyFunctional ----------------------
+ // -------------------------- EnergyFunctional ----------------------
template
- class ADHelperEnergyFunctional<NumberTypes::sacado_dfad_dfad,number>;
+ class EnergyFunctional<NumberTypes::sacado_dfad_dfad,number>;
template
- class ADHelperEnergyFunctional<NumberTypes::sacado_dfad,number>;
+ class EnergyFunctional<NumberTypes::sacado_dfad,number>;
template
- class ADHelperEnergyFunctional<NumberTypes::sacado_rad,number>;
+ class EnergyFunctional<NumberTypes::sacado_rad,number>;
template
- class ADHelperEnergyFunctional<NumberTypes::sacado_rad_dfad,number>;
+ class EnergyFunctional<NumberTypes::sacado_rad_dfad,number>;
- // -------------------------- ADHelperResidualLinearization ----------------------
+ // -------------------------- ResidualLinearization ----------------------
template
- class ADHelperResidualLinearization<NumberTypes::sacado_dfad_dfad,number>;
+ class ResidualLinearization<NumberTypes::sacado_dfad_dfad,number>;
template
- class ADHelperResidualLinearization<NumberTypes::sacado_dfad,number>;
+ class ResidualLinearization<NumberTypes::sacado_dfad,number>;
template
- class ADHelperResidualLinearization<NumberTypes::sacado_rad,number>;
+ class ResidualLinearization<NumberTypes::sacado_rad,number>;
template
- class ADHelperResidualLinearization<NumberTypes::sacado_rad_dfad,number>;
+ class ResidualLinearization<NumberTypes::sacado_rad_dfad,number>;
\}
\}
namespace AD
\{
- // -------------------------- ADHelperBase ----------------------
+ // -------------------------- HelperBase ----------------------
template
- class ADHelperBase<NumberTypes::sacado_dfad_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad_dfad>::ad_type>;
+ class HelperBase<NumberTypes::sacado_dfad_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad_dfad>::ad_type>;
template
- class ADHelperBase<NumberTypes::sacado_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad>::ad_type>;
+ class HelperBase<NumberTypes::sacado_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad>::ad_type>;
template
- class ADHelperBase<NumberTypes::sacado_rad,typename NumberTraits<double,NumberTypes::sacado_rad>::ad_type>;
+ class HelperBase<NumberTypes::sacado_rad,typename NumberTraits<double,NumberTypes::sacado_rad>::ad_type>;
template
- class ADHelperBase<NumberTypes::sacado_rad_dfad,typename NumberTraits<double,NumberTypes::sacado_rad_dfad>::ad_type>;
+ class HelperBase<NumberTypes::sacado_rad_dfad,typename NumberTraits<double,NumberTypes::sacado_rad_dfad>::ad_type>;
- // -------------------------- ADHelperCellLevelBase ----------------------
+ // -------------------------- CellLevelBase ----------------------
template
- class ADHelperCellLevelBase<NumberTypes::sacado_dfad_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad_dfad>::ad_type>;
+ class CellLevelBase<NumberTypes::sacado_dfad_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad_dfad>::ad_type>;
template
- class ADHelperCellLevelBase<NumberTypes::sacado_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad>::ad_type>;
+ class CellLevelBase<NumberTypes::sacado_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad>::ad_type>;
template
- class ADHelperCellLevelBase<NumberTypes::sacado_rad,typename NumberTraits<double,NumberTypes::sacado_rad>::ad_type>;
+ class CellLevelBase<NumberTypes::sacado_rad,typename NumberTraits<double,NumberTypes::sacado_rad>::ad_type>;
template
- class ADHelperCellLevelBase<NumberTypes::sacado_rad_dfad,typename NumberTraits<double,NumberTypes::sacado_rad_dfad>::ad_type>;
+ class CellLevelBase<NumberTypes::sacado_rad_dfad,typename NumberTraits<double,NumberTypes::sacado_rad_dfad>::ad_type>;
- // -------------------------- ADHelperEnergyFunctional ----------------------
+ // -------------------------- EnergyFunctional ----------------------
template
- class ADHelperEnergyFunctional<NumberTypes::sacado_dfad_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad_dfad>::ad_type>;
+ class EnergyFunctional<NumberTypes::sacado_dfad_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad_dfad>::ad_type>;
template
- class ADHelperEnergyFunctional<NumberTypes::sacado_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad>::ad_type>;
+ class EnergyFunctional<NumberTypes::sacado_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad>::ad_type>;
template
- class ADHelperEnergyFunctional<NumberTypes::sacado_rad,typename NumberTraits<double,NumberTypes::sacado_rad>::ad_type>;
+ class EnergyFunctional<NumberTypes::sacado_rad,typename NumberTraits<double,NumberTypes::sacado_rad>::ad_type>;
template
- class ADHelperEnergyFunctional<NumberTypes::sacado_rad_dfad,typename NumberTraits<double,NumberTypes::sacado_rad_dfad>::ad_type>;
+ class EnergyFunctional<NumberTypes::sacado_rad_dfad,typename NumberTraits<double,NumberTypes::sacado_rad_dfad>::ad_type>;
- // -------------------------- ADHelperResidualLinearization ----------------------
+ // -------------------------- ResidualLinearization ----------------------
template
- class ADHelperResidualLinearization<NumberTypes::sacado_dfad_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad_dfad>::ad_type>;
+ class ResidualLinearization<NumberTypes::sacado_dfad_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad_dfad>::ad_type>;
template
- class ADHelperResidualLinearization<NumberTypes::sacado_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad>::ad_type>;
+ class ResidualLinearization<NumberTypes::sacado_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad>::ad_type>;
template
- class ADHelperResidualLinearization<NumberTypes::sacado_rad,typename NumberTraits<double,NumberTypes::sacado_rad>::ad_type>;
+ class ResidualLinearization<NumberTypes::sacado_rad,typename NumberTraits<double,NumberTypes::sacado_rad>::ad_type>;
template
- class ADHelperResidualLinearization<NumberTypes::sacado_rad_dfad,typename NumberTraits<double,NumberTypes::sacado_rad_dfad>::ad_type>;
+ class ResidualLinearization<NumberTypes::sacado_rad_dfad,typename NumberTraits<double,NumberTypes::sacado_rad_dfad>::ad_type>;
\}
namespace AD
\{
- // -------------------------- ADHelperPointLevelFunctionsBase ----------------------
+ // -------------------------- PointLevelFunctionsBase ----------------------
template
- class ADHelperPointLevelFunctionsBase<deal_II_dimension,NumberTypes::sacado_dfad_dfad,number>;
+ class PointLevelFunctionsBase<deal_II_dimension,NumberTypes::sacado_dfad_dfad,number>;
template
- class ADHelperPointLevelFunctionsBase<deal_II_dimension,NumberTypes::sacado_dfad,number>;
+ class PointLevelFunctionsBase<deal_II_dimension,NumberTypes::sacado_dfad,number>;
template
- class ADHelperPointLevelFunctionsBase<deal_II_dimension,NumberTypes::sacado_rad,number>;
+ class PointLevelFunctionsBase<deal_II_dimension,NumberTypes::sacado_rad,number>;
template
- class ADHelperPointLevelFunctionsBase<deal_II_dimension,NumberTypes::sacado_rad_dfad,number>;
+ class PointLevelFunctionsBase<deal_II_dimension,NumberTypes::sacado_rad_dfad,number>;
- // -------------------------- ADHelperScalarFunction ----------------------
+ // -------------------------- ScalarFunction ----------------------
template
- class ADHelperScalarFunction<deal_II_dimension,NumberTypes::sacado_dfad_dfad,number>;
+ class ScalarFunction<deal_II_dimension,NumberTypes::sacado_dfad_dfad,number>;
template
- class ADHelperScalarFunction<deal_II_dimension,NumberTypes::sacado_dfad,number>;
+ class ScalarFunction<deal_II_dimension,NumberTypes::sacado_dfad,number>;
template
- class ADHelperScalarFunction<deal_II_dimension,NumberTypes::sacado_rad,number>;
+ class ScalarFunction<deal_II_dimension,NumberTypes::sacado_rad,number>;
template
- class ADHelperScalarFunction<deal_II_dimension,NumberTypes::sacado_rad_dfad,number>;
+ class ScalarFunction<deal_II_dimension,NumberTypes::sacado_rad_dfad,number>;
- // -------------------------- ADHelperVectorFunction ----------------------
+ // -------------------------- VectorFunction ----------------------
template
- class ADHelperVectorFunction<deal_II_dimension,NumberTypes::sacado_dfad_dfad,number>;
+ class VectorFunction<deal_II_dimension,NumberTypes::sacado_dfad_dfad,number>;
template
- class ADHelperVectorFunction<deal_II_dimension,NumberTypes::sacado_dfad,number>;
+ class VectorFunction<deal_II_dimension,NumberTypes::sacado_dfad,number>;
template
- class ADHelperVectorFunction<deal_II_dimension,NumberTypes::sacado_rad,number>;
+ class VectorFunction<deal_II_dimension,NumberTypes::sacado_rad,number>;
template
- class ADHelperVectorFunction<deal_II_dimension,NumberTypes::sacado_rad_dfad,number>;
+ class VectorFunction<deal_II_dimension,NumberTypes::sacado_rad_dfad,number>;
\}
\}
namespace AD
\{
- // -------------------------- ADHelperPointLevelFunctionsBase ----------------------
+ // -------------------------- PointLevelFunctionsBase ----------------------
template
- class ADHelperPointLevelFunctionsBase<deal_II_dimension,NumberTypes::sacado_dfad_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad_dfad>::ad_type>;
+ class PointLevelFunctionsBase<deal_II_dimension,NumberTypes::sacado_dfad_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad_dfad>::ad_type>;
template
- class ADHelperPointLevelFunctionsBase<deal_II_dimension,NumberTypes::sacado_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad>::ad_type>;
+ class PointLevelFunctionsBase<deal_II_dimension,NumberTypes::sacado_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad>::ad_type>;
template
- class ADHelperPointLevelFunctionsBase<deal_II_dimension,NumberTypes::sacado_rad,typename NumberTraits<double,NumberTypes::sacado_rad>::ad_type>;
+ class PointLevelFunctionsBase<deal_II_dimension,NumberTypes::sacado_rad,typename NumberTraits<double,NumberTypes::sacado_rad>::ad_type>;
template
- class ADHelperPointLevelFunctionsBase<deal_II_dimension,NumberTypes::sacado_rad_dfad,typename NumberTraits<double,NumberTypes::sacado_rad_dfad>::ad_type>;
+ class PointLevelFunctionsBase<deal_II_dimension,NumberTypes::sacado_rad_dfad,typename NumberTraits<double,NumberTypes::sacado_rad_dfad>::ad_type>;
- // -------------------------- ADHelperScalarFunction ----------------------
+ // -------------------------- ScalarFunction ----------------------
template
- class ADHelperScalarFunction<deal_II_dimension,NumberTypes::sacado_dfad_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad_dfad>::ad_type>;
+ class ScalarFunction<deal_II_dimension,NumberTypes::sacado_dfad_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad_dfad>::ad_type>;
template
- class ADHelperScalarFunction<deal_II_dimension,NumberTypes::sacado_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad>::ad_type>;
+ class ScalarFunction<deal_II_dimension,NumberTypes::sacado_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad>::ad_type>;
template
- class ADHelperScalarFunction<deal_II_dimension,NumberTypes::sacado_rad,typename NumberTraits<double,NumberTypes::sacado_rad>::ad_type>;
+ class ScalarFunction<deal_II_dimension,NumberTypes::sacado_rad,typename NumberTraits<double,NumberTypes::sacado_rad>::ad_type>;
template
- class ADHelperScalarFunction<deal_II_dimension,NumberTypes::sacado_rad_dfad,typename NumberTraits<double,NumberTypes::sacado_rad_dfad>::ad_type>;
+ class ScalarFunction<deal_II_dimension,NumberTypes::sacado_rad_dfad,typename NumberTraits<double,NumberTypes::sacado_rad_dfad>::ad_type>;
- // -------------------------- ADHelperVectorFunction ----------------------
+ // -------------------------- VectorFunction ----------------------
template
- class ADHelperVectorFunction<deal_II_dimension,NumberTypes::sacado_dfad_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad_dfad>::ad_type>;
+ class VectorFunction<deal_II_dimension,NumberTypes::sacado_dfad_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad_dfad>::ad_type>;
template
- class ADHelperVectorFunction<deal_II_dimension,NumberTypes::sacado_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad>::ad_type>;
+ class VectorFunction<deal_II_dimension,NumberTypes::sacado_dfad,typename NumberTraits<double,NumberTypes::sacado_dfad>::ad_type>;
template
- class ADHelperVectorFunction<deal_II_dimension,NumberTypes::sacado_rad,typename NumberTraits<double,NumberTypes::sacado_rad>::ad_type>;
+ class VectorFunction<deal_II_dimension,NumberTypes::sacado_rad,typename NumberTraits<double,NumberTypes::sacado_rad>::ad_type>;
template
- class ADHelperVectorFunction<deal_II_dimension,NumberTypes::sacado_rad_dfad,typename NumberTraits<double,NumberTypes::sacado_rad_dfad>::ad_type>;
+ class VectorFunction<deal_II_dimension,NumberTypes::sacado_rad_dfad,typename NumberTraits<double,NumberTypes::sacado_rad_dfad>::ad_type>;
\}
\}
Assert(n_dependent_variables == n_independent_variables,
ExcMessage("Expect square system."));
- typedef AD::ADHelperResidualLinearization<ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
+ typedef AD::ResidualLinearization<ad_type_code, number_t> ADHelper;
+ typedef typename ADHelper::ad_type ADNumberType;
ADHelper ad_helper(n_independent_variables, n_dependent_variables);
ad_helper.set_tape_buffer_sizes(); // Increase the buffer size from the
// default values
const unsigned int n_independent_variables = data.local_dof_indices.size();
- typedef AD::ADHelperEnergyFunctional<ad_type_code, number_t> ADHelper;
- typedef typename ADHelper::ad_type ADNumberType;
+ typedef AD::EnergyFunctional<ad_type_code, number_t> ADHelper;
+ typedef typename ADHelper::ad_type ADNumberType;
ADHelper ad_helper(n_independent_variables);
ad_helper.set_tape_buffer_sizes(); // Increase the buffer size from the
// default values