#include <tuple>
#include <utility>
#include "DataStructures/DataBox/DataBox.hpp"
#include "Utilities/ForceInline.hpp"
#include "Utilities/Gsl.hpp"
#include "Utilities/TMPL.hpp"
#include "Utilities/TaggedTuple.hpp"
#include "Utilities/TupleSlice.hpp"
Go to the source code of this file.
Namespaces | |
elliptic | |
Functionality related to solving elliptic partial differential equations. | |
Functions | |
template<typename ArgumentTags , typename PassthroughArgumentTags , typename... MapKeys, typename F , typename TaggedContainer , typename... Args> | |
decltype(auto) | elliptic::util::apply_at (F &&f, const TaggedContainer &box, const std::tuple< MapKeys... > &map_keys, Args &&... args) noexcept |
Apply the invokable f with arguments from maps in the DataBox. More... | |
template<typename ArgumentTags , typename PassthroughArgumentTags , typename MapKey , typename F , typename TaggedContainer , typename... Args> | |
decltype(auto) | elliptic::util::apply_at (F &&f, const TaggedContainer &box, const MapKey &map_key, Args &&... args) noexcept |
template<typename MutateTags , typename ArgumentTags , typename PassthroughTags , typename F , typename TaggedContainer , typename... MapKeys, typename... Args> | |
void | elliptic::util::mutate_apply_at (F &&f, const gsl::not_null< TaggedContainer * > box, const std::tuple< MapKeys... > &map_keys, Args &&... args) noexcept |
Apply the invokable f to mutate items in maps in the DataBox. More... | |
template<typename MutateTags , typename ArgumentTags , typename PassthroughTags , typename F , typename TaggedContainer , typename MapKey , typename... Args> | |
void | elliptic::util::mutate_apply_at (F &&f, const gsl::not_null< TaggedContainer * > box, const MapKey &map_key, Args &&... args) noexcept |
Utilities to retrieve values from maps in tagged containers
|
noexcept |
Apply the invokable f
with arguments from maps in the DataBox.
Retrieves the ArgumentTags
from the DataBox, evaluates them at the map_key(s)
(by calling their at
member function for every map key in turn) and calls the invokable f
with the unmapped arguments. The tags in PassthroughArgumentTags
are passed directly to f
without unmapping them.
For example, a DataBox may have these tags of which two are maps:
You can use apply_at
to evaluate a function at a particular key for these maps:
|
noexcept |
Apply the invokable f
to mutate items in maps in the DataBox.
Retrieves the MutateTags
and ArgumentTags
from the DataBox, evaluates them at the map_key(s)
(by calling their at
member function for every map key in turn) and calls the invokable f
with the unmapped arguments. The tags in PassthroughTags
are passed directly to f
without unmapping them.
For example, a DataBox may have these tags of which two are maps:
You can use mutate_apply_at
to mutate items at a particular key for these maps: