, registered_marked_independent_variables(n_independent_variables, false)
, registered_marked_dependent_variables(n_dependent_variables, false)
{
+ // We have enabled the compilation of this class for arithmetic
+ // types (i.e. ADNumberTypeCode == NumberTypes::none), but we
+ // can't actually do anything with them. Lets not advance any further
+ // and seemingly allow any operations that will not give any
+ // sensible results.
+ Assert(ADNumberTypeCode != NumberTypes::none,
+ ExcMessage(
+ "Floating point/arithmetic numbers have no derivatives."));
+ Assert(
+ AD::ADNumberTraits<ad_type>::n_supported_derivative_levels >= 1,
+ ExcMessage(
+ "The AD number type does not support the calculation of any derivatives."));
+
// Tapeless mode must be configured before any active live
// variables are created.
if (AD::is_tapeless_ad_number<ad_type>::value)
/* --- Explicit instantiations --- */
+# include "ad_helpers.inst"
+
# ifdef DEAL_II_WITH_ADOLC
# include "ad_helpers.inst1"
# endif
--- /dev/null
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2019 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+// TODO: Include complex types
+
+for (number : REAL_SCALARS)
+ {
+ namespace Differentiation
+ \{
+ namespace AD
+ \{
+ // -------------------------- HelperBase ----------------------
+
+ template class HelperBase<NumberTypes::none, number>;
+
+ // -------------------------- CellLevelBase ----------------------
+
+ template class CellLevelBase<NumberTypes::none, number>;
+
+ // -------------------------- EnergyFunctional ----------------------
+
+ template class EnergyFunctional<NumberTypes::none, number>;
+
+ // ------------------------ ResidualLinearization --------------------
+
+ template class ResidualLinearization<NumberTypes::none, number>;
+
+ \}
+ \}
+ }
+
+
+for (deal_II_dimension : DIMENSIONS; number : REAL_SCALARS)
+ {
+ namespace Differentiation
+ \{
+ namespace AD
+ \{
+ // ----------------------- PointLevelFunctionsBase -------------------
+
+ template class PointLevelFunctionsBase<deal_II_dimension,
+ NumberTypes::none,
+ number>;
+
+ // -------------------------- ScalarFunction ----------------------
+
+ template class ScalarFunction<deal_II_dimension,
+ NumberTypes::none,
+ number>;
+
+ // -------------------------- VectorFunction ----------------------
+
+ template class VectorFunction<deal_II_dimension,
+ NumberTypes::none,
+ number>;
+
+ \}
+ \}
+ }