ikarus-project / ikarus

Ikarus is a C++-based library that uses DUNE modules to solve partial differential equations with the finite element method and more.
https://ikarus-project.github.io/
Other
6 stars 3 forks source link

concept AutodiffScalar has to be used wherever applicable #328

Closed tarun-mitruka closed 1 month ago

tarun-mitruka commented 2 months ago

See #327 for details

template<typename T>
struct is_dual : std::false_type {};

// Specialization for Dual<T, U>: this will be true for Dual types
template<typename T, typename U>
struct is_dual<autodiff::detail::Dual<T, U>> : std::true_type {};

template<typename T>
concept AutodiffNumber =is_dual<T>::value;