ComputeFluxes.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
7 #include "Evolution/Systems/GrMhd/ValenciaDivClean/Fluxes.hpp"
8 #include "Utilities/Gsl.hpp"
9 #include "Utilities/TMPL.hpp"
10 
12 namespace detail {
13 template <typename TagsList, typename... ReturnTags, typename... ArgumentTags>
14 void compute_fluxes_impl(const gsl::not_null<Variables<TagsList>*> vars,
15  tmpl::list<ReturnTags...> /*meta*/,
16  tmpl::list<ArgumentTags...> /*meta*/) noexcept {
17  grmhd::ValenciaDivClean::ComputeFluxes::apply(
18  make_not_null(&get<ReturnTags>(*vars))..., get<ArgumentTags>(*vars)...);
19 }
20 } // namespace detail
21 
22 /*!
23  * \brief Helper function that calls `ComputeFluxes` by retrieving the return
24  * and argument tags from `vars`.
25  */
26 template <typename TagsList>
27 void compute_fluxes(const gsl::not_null<Variables<TagsList>*> vars) noexcept {
28  detail::compute_fluxes_impl(
29  vars, typename grmhd::ValenciaDivClean::ComputeFluxes::return_tags{},
30  typename grmhd::ValenciaDivClean::ComputeFluxes::argument_tags{});
31 }
32 } // namespace grmhd::ValenciaDivClean::subcell
grmhd::ValenciaDivClean::subcell::compute_fluxes
void compute_fluxes(const gsl::not_null< Variables< TagsList > * > vars) noexcept
Helper function that calls ComputeFluxes by retrieving the return and argument tags from vars.
Definition: ComputeFluxes.hpp:27
grmhd::ValenciaDivClean::subcell
Code required by the DG-subcell/FD hybrid solver.
Definition: ComputeFluxes.hpp:11
Variables.hpp
Gsl.hpp
make_not_null
gsl::not_null< T * > make_not_null(T *ptr) noexcept
Construct a not_null from a pointer. Often this will be done as an implicit conversion,...
Definition: Gsl.hpp:880
TMPL.hpp
gsl::not_null
Require a pointer to not be a nullptr
Definition: ReadSpecPiecewisePolynomial.hpp:13