ComputeVolumeFluxes.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <tuple>
7 
11 #include "Utilities/Gsl.hpp"
12 #include "Utilities/Requires.hpp"
13 #include "Utilities/TMPL.hpp"
15 
16 /// \cond
17 namespace Frame {
18 struct Inertial;
19 } // namespace Frame
20 namespace Parallel {
21 template <typename Metavariables>
22 class ConstGlobalCache;
23 } // namespace Parallel
24 // IWYU pragma: no_forward_declare db::DataBox
25 /// \endcond
26 
27 namespace Actions {
28 /// \ingroup ActionsGroup
29 /// \brief Compute the volume fluxes of the evolved variables
30 ///
31 /// Uses:
32 /// - DataBox: Items in system::volume_fluxes::argument_tags
33 ///
34 /// DataBox changes:
35 /// - Adds: nothing
36 /// - Removes: nothing
37 /// - Modifies:
38 /// db::add_tag_prefix<Tags::Flux, variables_tag,
39 /// tmpl::size_t<system::volume_dim>, Frame::Inertial>
41  template <typename DbTagsList, typename... InboxTags, typename Metavariables,
42  typename ArrayIndex, typename ActionList,
43  typename ParallelComponent,
47  const tuples::TaggedTuple<InboxTags...>& /*inboxes*/,
49  const ArrayIndex& /*array_index*/, const ActionList /*meta*/,
50  const ParallelComponent* const /*meta*/) noexcept {
51  using system = typename Metavariables::system;
52  using variables_tag = typename system::variables_tag;
54  Tags::Flux, variables_tag,
55  tmpl::size_t<system::volume_dim>, Frame::Inertial>>,
56  typename system::volume_fluxes::argument_tags>(
57  typename system::volume_fluxes{}, make_not_null(&box));
58  return std::forward_as_tuple(std::move(box));
59  }
60 };
61 } // namespace Actions
Prefix< DataBox_detail::dispatch_add_tag_prefix_impl< Prefix, Tag, Args... >, Args... > add_tag_prefix
Wrap Tag in Prefix<_, Args...>, also wrapping variables tags if Tag is a Tags::Variables.
Definition: DataBoxTag.hpp:533
Defines class tuples::TaggedTuple.
constexpr auto mutate_apply(F f, const gsl::not_null< DataBox< BoxTags > *> box, Args &&... args) noexcept(DataBox_detail::check_mutate_apply_mutate_tags(BoxTags{}, MutateTags{}) and DataBox_detail::check_mutate_apply_argument_tags(BoxTags{}, ArgumentTags{}) and noexcept(DataBox_detail::mutate_apply(f, box, MutateTags{}, ArgumentTags{}, std::forward< Args >(args)...)))
Apply the function f mutating items MutateTags and taking as additional arguments ArgumentTags and ar...
Definition: DataBox.hpp:1773
Define prefixes for DataBox tags.
tmpl::conditional_t< tmpl::size< typename Subitems< TagList, Tag >::type >::value==0, tmpl::list< Tag >, typename Subitems< TagList, Tag >::type > split_tag
Split a tag into its subitems. Tag cannot be a base tag.
Definition: DataBoxTag.hpp:657
Contains functions that forward to Charm++ parallel functions.
Definition: Abort.hpp:13
Defines the type alias Requires.
constexpr auto apply(F &&f, const DataBox< BoxTags > &box, Args &&... args)
Apply the function f with argument Tags TagsList from DataBox box
Definition: DataBox.hpp:1595
Compute the volume fluxes of the evolved variables.
Definition: ComputeVolumeFluxes.hpp:40
An associative container that is indexed by structs.
Definition: TaggedTuple.hpp:272
Defines classes and functions used for manipulating DataBox&#39;s.
Prefix indicating a flux.
Definition: Prefixes.hpp:38
Indicates the Frame that a TensorIndexType is in.
Definition: IndexType.hpp:36
Definition: InterpolationTargetWedgeSectionTorus.hpp:24
A Charm++ chare that caches constant data once per Charm++ node.
Definition: ConstGlobalCache.hpp:76
The Poisson equation formulated as a set of coupled first-order PDEs.
Definition: FirstOrderSystem.hpp:55
Wraps the template metaprogramming library used (brigand)
Defines functions and classes from the GSL.
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, but it may be necessary to perform the conversion explicitly when type deduction is desired.
Definition: Gsl.hpp:863
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
Definition: IndexType.hpp:44
Definition: SolvePoissonProblem.hpp:38
Defines classes SimpleTag, PrefixTag, ComputeTag and several functions for retrieving tag info...
Definition: ComputeTimeDerivative.hpp:28