std::complex<double>;
std::complex<float> }
-// differentiable Adol-C scalar types
+// differentiable ADOL-C scalar types
DIFFERENTIABLE_ADOLC_REAL_SCALARS := {
@DEAL_II_EXPAND_ADOLC_TYPES@;
}
* returns only whether the scalar values stored by the input values are
* equal.
*
- * @note When Adol-C is compiled with the "advanced branching" feature, then
+ * @note When ADOL-C is compiled with the "advanced branching" feature, then
* this specialization is only intended for use in assertions and
* other code paths that do not affect the end result of a computation.
*/
* returns only whether the scalar values stored by the input values are
* equal.
*
- * @note When Adol-C is compiled with the "advanced branching" feature, then
+ * @note When ADOL-C is compiled with the "advanced branching" feature, then
* this specialization is only intended for use in assertions and
* other code paths that do not affect the end result of a computation.
*/
bool
values_are_equal(const adouble &value_1, const Number &value_2)
{
- // Use the specialized definition for two Adol-C taped types
+ // Use the specialized definition for two ADOL-C taped types
return values_are_equal(value_1,
internal::NumberType<adouble>::value(value_2));
}
* returns only whether the scalar values stored by the input values are
* equal.
*
- * @note When Adol-C is compiled with the "advanced branching" feature, then
+ * @note When ADOL-C is compiled with the "advanced branching" feature, then
* this specialization is only intended for use in assertions and
* other code paths that do not affect the end result of a computation.
*/
* this function returns the result of the comparison of scalar values stored
* by the input arguments.
*
- * @note When Adol-C is compiled with the "advanced branching" feature, then
+ * @note When ADOL-C is compiled with the "advanced branching" feature, then
* this specialization is only intended for use in assertions and
* other code paths that do not affect the end result of a computation.
*/
* this function returns the result of the comparison of scalar values stored
* by the input arguments.
*
- * @note When Adol-C is compiled with the "advanced branching" feature, then
+ * @note When ADOL-C is compiled with the "advanced branching" feature, then
* this specialization is only intended for use in assertions and
* other code paths that do not affect the end result of a computation.
*/
bool
value_is_less_than(const adouble &value_1, const Number &value_2)
{
- // Use the specialized definition for two Adol-C taped types
+ // Use the specialized definition for two ADOL-C taped types
return value_is_less_than(value_1,
internal::NumberType<adouble>::value(value_2));
}
* this function returns the result of the comparison of scalar values stored
* by the input arguments.
*
- * @note When Adol-C is compiled with the "advanced branching" feature, then
+ * @note When ADOL-C is compiled with the "advanced branching" feature, then
* this specialization is only intended for use in assertions and
* other code paths that do not affect the end result of a computation.
*/
bool
value_is_less_than(const Number &value_1, const adouble &value_2)
{
- // Use the specialized definition for two Adol-C taped types
+ // Use the specialized definition for two ADOL-C taped types
return value_is_less_than(internal::NumberType<adouble>::value(value_1),
value_2);
}
double sf = 1.0;
if (Differentiation::AD::is_taped_ad_number<Number>::value)
{
- // Adol-C taped
+ // ADOL-C taped
if (method ==
SymmetricTensorEigenvectorMethod::ql_implicit_shifts)
sf = 2e11;
#ifdef DEAL_II_ADOLC_WITH_ADVANCED_BRANCHING
-// Specializations of the above functions for taped Adol-C numbers
+// Specializations of the above functions for taped ADOL-C numbers
// when the advanced branching feature is activated.
// We could copy-paste all of these functions and add the appropriate
-// conditional assignments (see the Adol-C manual, section 1.8).
+// conditional assignments (see the ADOL-C manual, section 1.8).
// However, some of the conditions are quite complicated (with possibly
// no 1-1 correspondence for the operations along each branch) so this
// needs some careful attention. For the sake of simplicity and until
Assert(!(std::is_same<Number, adouble>::value ||
std::is_same<OtherNumber, adouble>::value),
ExcMessage(
- "The Tensor equality operator for Adol-C taped numbers has not yet "
+ "The Tensor equality operator for ADOL-C taped numbers has not yet "
"been extended to support advanced branching."));
#endif
# ifdef DEAL_II_ADOLC_WITH_ADVANCED_BRANCHING
-// Specialization of functions for Adol-C number types when
+// Specialization of functions for ADOL-C number types when
// the advanced branching feature is used
template <int dim>
inline adouble
/**
* Wrappers for automatic differentiation libraries. Currently there is
* support for the following libraries:
- * - Adol-C
+ * - ADOL-C
* - Sacado (a component of Trilinos)
*
* @ingroup auto_symb_diff
* definition given in @p base/numbers.h , this extension allows the
* conversion of automatic-differentiation numbers to generic floats.
*
- * This is necessary because Adol-C doesn't provide a convenient
+ * This is necessary because ADOL-C doesn't provide a convenient
* way to convert from an @p ADNumberType to floats (@p T) other than
* the real-type equivalent that its associated with. For Sacado, and
* likely other AD number types, the floating point value stored in
* AD numbers.
*
* Sacado nests the directional derivatives within Sacado numbers, while
- * Adol-C does not. So, starting off from a scalar function f(x), the number
+ * ADOL-C does not. So, starting off from a scalar function f(x), the number
* type resulting from the computation of a directional derivative f'(x) of
- * that function is a floating point number for Adol-C number types and
+ * that function is a floating point number for ADOL-C number types and
* Sacado::FAD<double>, but that of a Sacado::FAD<Sacado::FAD<double>> is a
* Sacado::FAD<double>.
*
// If the AD drivers are correctly implemented then we should not get
// here. This is essentially a dummy for when the ADNumberTypeCode for
// the original AD number (from which one is getting a derivative >= 2)
- // is one that specified Adol-C taped and tapeless numbers, or a
+ // is one that specified ADOL-C taped and tapeless numbers, or a
// non-nested Sacado number.
AssertThrow(
false,
/**
* An enumeration to indicate which type of auto-differentiable number
* is to be used for computations. If a type that is selected for use
- * is not available in the library, a compile-time error will be thrown.
+ * is not available in the library, a run-time error will be thrown.
*
* @author Jean-Paul Pelteret, 2017
*/
enum class NumberTypes
{
/**
- * Taped forward and reverse-mode Adol-C number type (n-differentiable).
+ * Taped forward and reverse-mode ADOL-C number type (n-differentiable).
*
* First derivatives will be computed using reverse mode, while the second
* derivatives will be computed using forward mode. Even higher-order
- * derivatives can be computed using Adol-C's own driver functions.
+ * derivatives can be computed using ADOL-C's own driver functions.
*/
adolc_taped,
/**
- * Tapeless dynamic forward-mode Adol-C number type (once differentiable).
+ * Tapeless dynamic forward-mode ADOL-C number type (once differentiable).
*/
adolc_tapeless,
# ifndef DOXYGEN
/**
- * Import Adol-C math operations into standard namespace. This gives us the
+ * Import ADOL-C math operations into standard namespace. This gives us the
* ability to use them within the Tensor class, and it also allows the user
* to write generic code and switch between AD number types.
*
- * The math functions to be exposed come from the Adol-C's taped
+ * The math functions to be exposed come from the ADOL-C's taped
* (anonymous) and tapeless namespaces.
*/
namespace std
{
/**
* A struct to indicate whether a given @p NumberType is an
- * Adol-C number or not. By default, numbers are not considered to
+ * ADOL-C number or not. By default, numbers are not considered to
* have the necessary characteristics to fulfill this condition.
*
* @author Jean-Paul Pelteret, 2017
/**
* A struct to indicate whether a given @p NumberType is a taped
- * Adol-C number or not. By default, numbers are not considered to
+ * ADOL-C number or not. By default, numbers are not considered to
* have the necessary characteristics to fulfill this condition.
*
* @author Jean-Paul Pelteret, 2017
/**
* A struct to indicate whether a given @p NumberType is a tapeless
- * Adol-C number or not. By default, numbers are not considered to
+ * ADOL-C number or not. By default, numbers are not considered to
* have the necessary characteristics to fulfill this condition.
*
* @author Jean-Paul Pelteret, 2017
/**
* An exception which states that a function has been disabled due to the
- * configuration of Adol-C with the advanced branching feature enabled.
+ * configuration of ADOL-C with the advanced branching feature enabled.
*
* @ingroup Exceptions
*/
DeclExceptionMsg(ExcADOLCAdvancedBranching,
- "This function has not yet been implemented for taped Adol-C "
+ "This function has not yet been implemented for taped ADOL-C "
"numbers when the advanced branching feature is activated.");
namespace internal
{
/**
- * A specialization for the information struct for taped Adol-C
+ * A specialization for the information struct for taped ADOL-C
* numbers.
*/
template <typename ScalarType>
/**
- * A specialization for the information struct for tapeless Adol-C
+ * A specialization for the information struct for tapeless ADOL-C
* numbers.
*/
template <typename ScalarType>
// before defining their directional derivative index
out = in;
- // Violating this condition when will result in an Adol-C internal
+ // Violating this condition when will result in an ADOL-C internal
// error. We could rather always throw here in order to provide a
// less cryptic message.
AssertThrow(index < adtl::getNumDir(),
/**
* A struct to help extract certain information associated with
- * taped Adol-C auto-differentiable numbers.
+ * taped ADOL-C auto-differentiable numbers.
*
* @author Jean-Paul Pelteret, 2017
*/
{
AssertThrow(false,
ExcMessage(
- "The derivative values for taped Adol-C numbers must be"
+ "The derivative values for taped ADOL-C numbers must be"
"computed through the ::gradient function."));
return 0.0;
}
/**
* A struct to help extract certain information associated with
- * tapeless Adol-C auto-differentiable numbers.
+ * tapeless ADOL-C auto-differentiable numbers.
*
* @author Jean-Paul Pelteret, 2017
*/
direction < n_directional_derivatives(x),
ExcMessage(
"Requested directional derivative is greater than the number "
- "registered by Adol-C."));
+ "registered by ADOL-C."));
return x.getADValue(direction);
}
};
* Specialization of the general AdolCWrappers::ADNumberTraits class that
* provides relevant information for auto-differentiable numbers.
* This specialization is for the case where @p ADNumberType is an
- * taped Adol-C (real) double.
+ * taped ADOL-C (real) double.
*
* @note In this case the number traits are the same as those for a taped double.
*
* Specialization of the general ADNumberTraits class that
* provides relevant information for auto-differentiable numbers.
* This specialization is for the case where @p ADNumberType is an
- * taped Adol-C complex double.
+ * taped ADOL-C complex double.
*
* @note In this case the number traits are the same as those for a taped complex
* double.
* Specialization of the general ADNumberTraits class that
* provides relevant information for auto-differentiable numbers.
* This specialization is for the case where @p ADNumberType is an
- * tapeless Adol-C (real) double.
+ * tapeless ADOL-C (real) double.
*
* @note In this case the number traits are the same as those for a tapeless double.
*
* Specialization of the general ADNumberTraits class that
* provides relevant information for auto-differentiable numbers.
* This specialization is for the case where @p ADNumberType is an
- * tapeless Adol-C complex double.
+ * tapeless ADOL-C complex double.
*
* @note In this case the number traits are the same as those for a tapeless
* complex double.
/**
* Specialization of the NumberTraits struct for
- * the (otherwise disabled) taped Adol-C number type.
+ * the (otherwise disabled) taped ADOL-C number type.
*/
template <>
struct NumberTraits<adouble, NumberTypes::adolc_taped>
/**
* Specialization of the NumberTraits struct for
- * the (otherwise disabled) taped Adol-C complex number type.
+ * the (otherwise disabled) taped ADOL-C complex number type.
*/
template <>
struct NumberTraits<std::complex<adouble>, NumberTypes::adolc_taped>
/**
* Specialization of the NumberTraits struct for
- * the (otherwise disabled) tapeless Adol-C number type.
+ * the (otherwise disabled) tapeless ADOL-C number type.
*/
template <>
struct NumberTraits<adtl::adouble, NumberTypes::adolc_tapeless>
/**
* Specialization of the NumberTraits struct for
- * the (otherwise disabled) tapeless Adol-C complex number type.
+ * the (otherwise disabled) tapeless ADOL-C complex number type.
*/
template <>
struct NumberTraits<std::complex<adtl::adouble>,
/**
* Specialization of the struct for the case when the input template
- * parameter is a (real or complex) taped Adol-C number.
+ * parameter is a (real or complex) taped ADOL-C number.
*/
template <typename NumberType>
struct is_adolc_taped_number<
/**
* Specialization of the struct for the case when the input template
- * parameter is a (real or complex) tapeless Adol-C number.
+ * parameter is a (real or complex) tapeless ADOL-C number.
*/
template <typename NumberType>
struct is_adolc_tapeless_number<
/**
* Specialization of the struct for the case when the input template
- * parameter is a (real or complex; taped or tapeless) Adol-C number.
+ * parameter is a (real or complex; taped or tapeless) ADOL-C number.
*/
template <typename NumberType>
struct is_adolc_number<NumberType,
DEAL_II_NAMESPACE_OPEN
-/* ------ Adol-C taped (Differentiation::AD::NumberTypes::adolc_taped) ----- */
+/* ------ ADOL-C taped (Differentiation::AD::NumberTypes::adolc_taped) ----- */
namespace internal
};
// Typedefs for "adub"s are all that's necessary to ensure that no temporary
- // Adol-C types "adub" are created when a scalar product is performed. If this
+ // ADOL-C types "adub" are created when a scalar product is performed. If this
// is not done, then intermediate tensors are filled with unconstructable
// types.
template <>
};
-/* -- Adol-C tapeless (Differentiation::AD::NumberTypes::adolc_tapeless) -- */
+/* -- ADOL-C tapeless (Differentiation::AD::NumberTypes::adolc_tapeless) -- */
namespace internal
namespace
{
// Apply some comparator and extract the boolean result of the operation,
- // instead of the "adub" return type tpyically returned by Adol-C for
+ // instead of the "adub" return type tpyically returned by ADOL-C for
// such a comparison. This is implemented as a general function so that
// the list of implemented comparative operations can be easily extended.
bool
// ---------------------------------------------------------------------
-// Test that all of the Adol-C number traits combinations are constructible
+// Test that all of the ADOL-C number traits combinations are constructible
#include <deal.II/differentiation/ad/ad_number_types.h>
#include <deal.II/differentiation/ad/adolc_number_types.h>
// ---------------------------------------------------------------------
-// Test that all of the Adol-C number traits return the correct information
+// Test that all of the ADOL-C number traits return the correct information
// ::adouble (Taped)
#include <deal.II/differentiation/ad/ad_number_types.h>
// ---------------------------------------------------------------------
-// Test that all of the Adol-C number traits return the correct information
+// Test that all of the ADOL-C number traits return the correct information
// adtl::adouble (Tapeless)
#include <deal.II/differentiation/ad/ad_number_types.h>
// ---------------------------------------------------------------------
-// Test that all of the Adol-C number traits return the correct information
+// Test that all of the ADOL-C number traits return the correct information
#include <deal.II/differentiation/ad.h>
// - Tapeless doubles
// - Function and gradient computations
// Adapted from
-// https://github.com/Homebrew/homebrew-science/blob/master/adol-c.rb See Adol-C
+// https://github.com/Homebrew/homebrew-science/blob/master/adol-c.rb See ADOL-C
// manual v2.6 p65 figure 8
#include <adolc/adtl.h>
// - Tapeless doubles
// - Multiple dependent functions and Jacobian computations
// Adapted from
-// https://github.com/Homebrew/homebrew-science/blob/master/adol-c.rb See Adol-C
+// https://github.com/Homebrew/homebrew-science/blob/master/adol-c.rb See ADOL-C
// manual v2.6 p65 figure 8
#include <adolc/adtl.h>
//
// ---------------------------------------------------------------------
-// Test of basic functionality for Adol-C:
+// Test of basic functionality for ADOL-C:
// - Taped doubles
// - Gradient and hessian computations
// Adapted from