From a8e996f68c96168e02226c1f9d29f0ef5c95f9d8 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Fri, 10 May 2019 22:33:16 +0200 Subject: [PATCH] Instantiate ADDrivers classes with AD::NumberTypes::none. --- source/differentiation/ad/CMakeLists.txt | 1 + source/differentiation/ad/ad_drivers.cc | 1 + source/differentiation/ad/ad_drivers.inst.in | 65 ++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 source/differentiation/ad/ad_drivers.inst.in diff --git a/source/differentiation/ad/CMakeLists.txt b/source/differentiation/ad/CMakeLists.txt index 9a2f31e4dc..532ce9d291 100644 --- a/source/differentiation/ad/CMakeLists.txt +++ b/source/differentiation/ad/CMakeLists.txt @@ -23,6 +23,7 @@ SET(_src ) SET(_inst + ad_drivers.inst.in ad_drivers.inst1.in ad_drivers.inst2.in ad_helpers.inst1.in diff --git a/source/differentiation/ad/ad_drivers.cc b/source/differentiation/ad/ad_drivers.cc index a7882568d3..af6a49f008 100644 --- a/source/differentiation/ad/ad_drivers.cc +++ b/source/differentiation/ad/ad_drivers.cc @@ -2244,6 +2244,7 @@ namespace Differentiation /* --- Explicit instantiations --- */ +# include "ad_drivers.inst" # ifdef DEAL_II_WITH_ADOLC # include "ad_drivers.inst1" # endif diff --git a/source/differentiation/ad/ad_drivers.inst.in b/source/differentiation/ad/ad_drivers.inst.in new file mode 100644 index 0000000000..677bd500a0 --- /dev/null +++ b/source/differentiation/ad/ad_drivers.inst.in @@ -0,0 +1,65 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2018 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 + \{ + + // -------------------------- TapedDrivers ---------------------- + + template struct TapedDrivers::ad_type, + number>; + + // -------------------------- TapelessDrivers ---------------------- + + template struct TapelessDrivers< + typename Differentiation::AD:: + NumberTraits::ad_type, + number>; + + \} + \} + } + +// Instantiations for ADHelpers for which the underlying number type is fixed +for () + { + namespace Differentiation + \{ + namespace AD + \{ + + // -------------------------- Types ---------------------- + + template struct Types::ad_type>; + + // -------------------------- Numbers ---------------------- + + template struct Numbers::ad_type>; + + \} + \} + } -- 2.39.5