1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
4 #pragma once
6 #include <tuple>
11 #include "Utilities/Gsl.hpp"
12 #include "Utilities/Requires.hpp"
13 #include "Utilities/TMPL.hpp"
16 /// \cond
17 namespace Parallel {
18 template <typename Metavariables>
19 class ConstGlobalCache;
20 } // namespace Parallel
21 // IWYU pragma: no_forward_declare db::DataBox
22 /// \endcond
24 namespace Actions {
25 /// \ingroup ActionsGroup
26 /// \brief Compute the volume sources of the evolved variables
27 ///
28 /// Uses:
29 /// - DataBox: Items in system::volume_sources::argument_tags
30 ///
31 /// DataBox changes:
32 /// - Adds: nothing
33 /// - Removes: nothing
34 /// - Modifies: db::wrap_tags_in<Tags::Source, sourced_variables>
36  template <typename DbTagsList, typename... InboxTags, typename Metavariables,
37  typename ArrayIndex, typename ActionList,
38  typename ParallelComponent,
42  const tuples::TaggedTuple<InboxTags...>& /*inboxes*/,
44  const ArrayIndex& /*array_index*/, const ActionList /*meta*/,
45  const ParallelComponent* const /*meta*/) noexcept {
46  using system = typename Metavariables::system;
49  typename system::volume_sources::argument_tags>(
50  typename system::volume_sources{}, make_not_null(&box));
51  return std::forward_as_tuple(std::move(box));
52  }
53 };
54 } // namespace Actions
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::transform< TagList, tmpl::bind< Wrapper, tmpl::_1, tmpl::pin< Args >... > > wrap_tags_in
Create a new list of Tags by wrapping each tag in TagList using the Wrapper.
Definition: DataBoxTag.hpp:418
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
An associative container that is indexed by structs.
Definition: TaggedTuple.hpp:272
Defines classes and functions used for manipulating DataBox&#39;s.
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
Compute the volume sources of the evolved variables.
Definition: ComputeVolumeSources.hpp:35
Definition: SolvePoissonProblem.hpp:38
Defines classes SimpleTag, PrefixTag, ComputeTag and several functions for retrieving tag info...
Definition: ComputeTimeDerivative.hpp:28