AddComputeTags.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <tuple>
7 #include <utility>
8 
10 #include "ParallelAlgorithms/Initialization/MergeIntoDataBox.hpp"
12 
13 /// \cond
14 namespace Parallel {
15 template <typename Metavariables>
16 class ConstGlobalCache;
17 } // namespace Parallel
18 /// \endcond
19 
20 namespace Initialization {
21 namespace Actions {
22 /*!
23  * \ingroup ActionsGroup
24  *
25  * \brief Initialize the list of compute tags in `ComputeTagsList`
26  *
27  * Uses: nothing
28  *
29  * DataBox changes:
30  * - Adds:
31  * - Each compute tag in the list `ComputeTagsList`
32  * - Removes:
33  * - nothing
34  * - Modifies:
35  * - nothing
36  */
37 template <typename ComputeTagsList>
39  template <typename DbTagsList, typename... InboxTags, typename Metavariables,
40  typename ArrayIndex, typename ActionList,
41  typename ParallelComponent>
42  static auto apply(db::DataBox<DbTagsList>& box,
43  const tuples::TaggedTuple<InboxTags...>& /*inboxes*/,
45  const ArrayIndex& /*array_index*/, ActionList /*meta*/,
46  const ParallelComponent* const /*meta*/) noexcept {
47  return std::make_tuple(
50  std::move(box)));
51  }
52 };
53 } // namespace Actions
54 } // namespace Initialization
Defines class tuples::TaggedTuple.
Definition: ConservativeSystem.hpp:34
Contains functions that forward to Charm++ parallel functions.
Definition: Abort.hpp:13
auto merge_into_databox(db::DataBox< DbTagsList > &&box, Args &&... args) noexcept
Add tags that are not yet in the DataBox.
Definition: MergeIntoDataBox.hpp:132
An associative container that is indexed by structs.
Definition: TaggedTuple.hpp:273
Defines classes and functions used for manipulating DataBox&#39;s.
tmpl::flatten< tmpl::list< Tags... > > AddSimpleTags
List of Tags to add to the DataBox.
Definition: DataBox.hpp:1222
Definition: InterpolationTargetWedgeSectionTorus.hpp:24
A Charm++ chare that caches constant data once per Charm++ node.
Definition: ConstGlobalCache.hpp:135
constexpr auto apply(F &&f, const DataBox< BoxTags > &box, Args &&... args) noexcept
Apply the invokable f with argument Tags TagsList from DataBox box
Definition: DataBox.hpp:1623
Initialize the list of compute tags in ComputeTagsList
Definition: AddComputeTags.hpp:38
Definition: ComputeTimeDerivative.hpp:28
tmpl::flatten< tmpl::list< Tags... > > AddComputeTags
List of Compute Item Tags to add to the DataBox.
Definition: DataBox.hpp:1243