PointInfoTag.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <boost/optional.hpp>
7 #include <vector>
8 
9 #include "DataStructures/DataBox/PrefixHelpers.hpp"
10 #include "DataStructures/IdPair.hpp"
12 #include "Domain/BlockId.hpp"
13 #include "Utilities/TaggedTuple.hpp"
14 
15 namespace intrp {
16 namespace Vars {
17 template <typename InterpolationTargetTag, size_t VolumeDim>
18 struct PointInfoTag {
19  /// This is the type returned from BlockLogicalCoords.
20  /// It encodes the list of all points (in block
21  /// logical coordinates) that need to be interpolated onto for a
22  /// given `InterpolationTarget`. Only a subset of those points
23  /// will be contained in the `Element` that uses this Tag.
24  using type = std::vector<boost::optional<IdPair<
25  domain::BlockId, tnsr::I<double, VolumeDim, typename ::Frame::Logical>>>>;
26 };
27 } // namespace Vars
28 
29 namespace Tags {
30 
31 namespace point_info_detail {
32 template <typename InterpolationTargetTag, typename Metavariables>
33 using WrappedPointInfoTag =
35 } // namespace point_info_detail
36 
37 /// The following tag is for the case in which interpolation
38 /// bypasses the `Interpolator` ParallelComponent. In that case,
39 /// the `Element` must hold interpolation information in its `DataBox`.
40 ///
41 /// A particular `Vars::PointInfo` can be retrieved from this
42 /// `TaggedTuple` via a `Vars::PointInfoTag`.
43 template <typename Metavariables>
45  using type = tuples::tagged_tuple_from_typelist<db::wrap_tags_in<
47  typename Metavariables::interpolation_target_tags, Metavariables>>;
48 };
49 
50 } // namespace Tags
51 } // namespace intrp
intrp::Tags::InterpPointInfo
The following tag is for the case in which interpolation bypasses the Interpolator ParallelComponent....
Definition: PointInfoTag.hpp:44
vector
db::SimpleTag
Tags for the DataBox inherit from this type.
Definition: Tag.hpp:23
intrp::Vars::PointInfoTag
Definition: PointInfoTag.hpp:18
IdPair
A data structure that contains an ID and data associated with that ID.
Definition: IdPair.hpp:16
TypeAliases.hpp
domain::BlockId
Index a block of the computational domain.
Definition: BlockId.hpp:21
db::wrap_tags_in
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: PrefixHelpers.hpp:30