SpECTRE Documentation Coverage Report
Current view: top level - Domain/CoordinateMaps - TimeDependentHelpers.hpp Hit Total Coverage
Commit: 3c072f0ce967e2e56649d3fa12aa2a0e4fe2a42e Lines: 4 5 80.0 %
Date: 2024-04-23 20:50:18
Legend: Lines: hit not hit

          Line data    Source code
       1           0 : // Distributed under the MIT License.
       2             : // See LICENSE.txt for details.
       3             : 
       4             : #pragma once
       5             : 
       6             : #include <array>
       7             : #include <cstddef>
       8             : #include <memory>
       9             : #include <string>
      10             : #include <type_traits>
      11             : #include <unordered_map>
      12             : 
      13             : #include "Domain/FunctionsOfTime/FunctionOfTime.hpp"
      14             : #include "Utilities/TypeTraits/CreateIsCallable.hpp"
      15             : #include "Utilities/TypeTraits/IsCallable.hpp"
      16             : 
      17             : namespace domain {
      18             : /// Check if the calls to the coordinate map and its inverse map are
      19             : /// time-dependent
      20             : template <typename T>
      21           1 : using is_map_time_dependent_t = tt::is_callable_t<
      22             :     T, std::array<std::decay_t<T>, std::decay_t<T>::dim>, double,
      23             :     std::unordered_map<
      24             :         std::string, std::unique_ptr<domain::FunctionsOfTime::FunctionOfTime>>>;
      25             : 
      26             : /// Check if the calls to the coordinate map and its inverse map are
      27             : /// time-dependent
      28             : template <typename T>
      29           1 : constexpr bool is_map_time_dependent_v = is_map_time_dependent_t<T>::value;
      30             : 
      31             : namespace detail {
      32             : CREATE_IS_CALLABLE(jacobian)
      33             : }  // namespace detail
      34             : 
      35             : /// Check if the calls to the Jacobian and inverse Jacobian of the coordinate
      36             : /// map are time-dependent
      37             : template <typename Map, typename T>
      38           1 : using is_jacobian_time_dependent_t = detail::is_jacobian_callable_t<
      39             :     Map, std::array<std::decay_t<T>, std::decay_t<Map>::dim>, double,
      40             :     std::unordered_map<
      41             :         std::string, std::unique_ptr<domain::FunctionsOfTime::FunctionOfTime>>>;
      42             : 
      43             : /// Check if the calls to the Jacobian and inverse Jacobian of the coordinate
      44             : /// map are time-dependent
      45             : template <typename Map, typename T>
      46           1 : constexpr bool is_jacobian_time_dependent_v =
      47             :     is_jacobian_time_dependent_t<Map, T>::value;
      48             : }  // namespace domain

Generated by: LCOV version 1.14