// ---------------------------------------------------------------------
//
// Copyright (C) 2016 - 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::adolc_taped,number>;

    template
    class HelperBase<NumberTypes::adolc_tapeless,number>;

    // -------------------------- CellLevelBase ----------------------

    template
    class CellLevelBase<NumberTypes::adolc_taped,number>;

    template
    class CellLevelBase<NumberTypes::adolc_tapeless,number>;

    // -------------------------- EnergyFunctional ----------------------

    template
    class EnergyFunctional<NumberTypes::adolc_taped,number>;

    template
    class EnergyFunctional<NumberTypes::adolc_tapeless,number>;

    // -------------------------- ResidualLinearization ----------------------

    template
    class ResidualLinearization<NumberTypes::adolc_taped,number>;

    template
    class ResidualLinearization<NumberTypes::adolc_tapeless,number>;

    \}
    \}
}

// Instantiations for ADHelpers for which the underlying number type is fixed
for ()
{
    namespace Differentiation
    \{
    namespace AD
    \{

    // -------------------------- HelperBase ----------------------

    template
    class HelperBase<NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;

    template
    class HelperBase<NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;

    // -------------------------- CellLevelBase ----------------------

    template
    class CellLevelBase<NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;

    template
    class CellLevelBase<NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;

    // -------------------------- EnergyFunctional ----------------------

    template
    class EnergyFunctional<NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;

    template
    class EnergyFunctional<NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;

    // -------------------------- ResidualLinearization ----------------------

    template
    class ResidualLinearization<NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;

    template
    class ResidualLinearization<NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;


    \}
    \}
}


for (deal_II_dimension : DIMENSIONS ; number : REAL_SCALARS)
{
  namespace Differentiation
  \{
  namespace AD
  \{
    // -------------------------- PointLevelFunctionsBase ----------------------

    template
    class PointLevelFunctionsBase<deal_II_dimension,NumberTypes::adolc_taped,number>;

    template
    class PointLevelFunctionsBase<deal_II_dimension,NumberTypes::adolc_tapeless,number>;

    // -------------------------- ScalarFunction ----------------------

    template
    class ScalarFunction<deal_II_dimension,NumberTypes::adolc_taped,number>;

    template
    class ScalarFunction<deal_II_dimension,NumberTypes::adolc_tapeless,number>;

    // -------------------------- VectorFunction ----------------------

    template
    class VectorFunction<deal_II_dimension,NumberTypes::adolc_taped,number>;

    template
    class VectorFunction<deal_II_dimension,NumberTypes::adolc_tapeless,number>;

    \}
    \}
}

// Instantiations for ADHelpers for which the underlying number type is fixed
for (deal_II_dimension : DIMENSIONS)
{
    namespace Differentiation
    \{
    namespace AD
    \{

    // -------------------------- PointLevelFunctionsBase ----------------------

    template
    class PointLevelFunctionsBase<deal_II_dimension,NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;

    template
    class PointLevelFunctionsBase<deal_II_dimension,NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;

    // -------------------------- ScalarFunction ----------------------

    template
    class ScalarFunction<deal_II_dimension,NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;

    template
    class ScalarFunction<deal_II_dimension,NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;

    // -------------------------- VectorFunction ----------------------

    template
    class VectorFunction<deal_II_dimension,NumberTypes::adolc_taped,typename NumberTraits<double,NumberTypes::adolc_taped>::ad_type>;

    template
    class VectorFunction<deal_II_dimension,NumberTypes::adolc_tapeless,typename NumberTraits<double,NumberTypes::adolc_tapeless>::ad_type>;

    \}
    \}
}
