InitialData.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <utility>
7 
8 #include "Evolution/TypeTraits.hpp" // IWYU pragma: keep
9 #include "Utilities/Requires.hpp"
10 #include "Utilities/TMPL.hpp"
11 
12 namespace evolution {
13 /// Extract initial data either from analytic data or from an analytic
14 /// solution at a specified time.
15 template <typename SolutionOrData, typename Coordinates, typename... Tags,
17 decltype(auto) initial_data(const SolutionOrData& solution_or_data,
18  Coordinates&& coordinates, const double time,
19  const tmpl::list<Tags...> tags) noexcept {
20  return solution_or_data.variables(std::forward<Coordinates>(coordinates),
21  time, tags);
22 }
23 
24 /// \cond
25 template <typename SolutionOrData, typename Coordinates, typename... Tags,
27 decltype(auto) initial_data(const SolutionOrData& solution_or_data,
28  Coordinates&& coordinates, const double /*time*/,
29  const tmpl::list<Tags...> tags) noexcept {
30  return solution_or_data.variables(std::forward<Coordinates>(coordinates),
31  tags);
32 }
33 /// \endcond
34 } // namespace evolution
Definition: Digraph.hpp:11
Defines the type alias Requires.
Definition: DataBoxTag.hpp:27
decltype(auto) initial_data(const SolutionOrData &solution_or_data, Coordinates &&coordinates, const double time, const tmpl::list< Tags... > tags) noexcept
Extract initial data either from analytic data or from an analytic solution at a specified time...
Definition: InitialData.hpp:17
Wraps the template metaprogramming library used (brigand)
typename Requires_detail::requires_impl< B >::template_error_type_failed_to_meet_requirements_on_template_parameters Requires
Express requirements on the template parameters of a function or class, replaces std::enable_if_t ...
Definition: Requires.hpp:67
Functionality for evolving hyperbolic partial differential equations.
Definition: AddMeshVelocitySourceTerms.hpp:28