Line data Source code
1 0 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : #pragma once 5 : 6 : #include <cstddef> 7 : #include <optional> 8 : #include <tuple> 9 : 10 : #include "DataStructures/DataBox/DataBox.hpp" 11 : #include "DataStructures/DataBox/PrefixHelpers.hpp" 12 : #include "Parallel/AlgorithmExecution.hpp" 13 : #include "ParallelAlgorithms/Interpolation/PointInfoTag.hpp" 14 : #include "Utilities/Requires.hpp" 15 : #include "Utilities/TMPL.hpp" 16 : #include "Utilities/TaggedTuple.hpp" 17 : 18 : /// \cond 19 : namespace Parallel { 20 : template <typename Metavariables> 21 : class GlobalCache; 22 : } // namespace Parallel 23 : /// \endcond 24 : 25 : namespace intrp { 26 : namespace Actions { 27 : 28 : /// \ingroup ActionsGroup 29 : /// \brief Adds interpolation point holders to the Element's DataBox. 30 : /// 31 : /// This action is for the case in which the points are time-independent. 32 : /// 33 : /// This action should be placed in the Initialization PDAL for DgElementArray. 34 : /// 35 : /// Uses: nothing 36 : /// 37 : /// DataBox changes: 38 : /// - Adds: 39 : /// - `intrp::Tags::InterpPointInfo<Metavariables>` 40 : /// - Removes: nothing 41 : /// - Modifies: nothing 42 : template <typename InterpPointInfoTag> 43 1 : struct ElementInitInterpPoints { 44 0 : using simple_tags = tmpl::list<InterpPointInfoTag>; 45 : template <typename DbTags, typename... InboxTags, typename Metavariables, 46 : typename ArrayIndex, typename ActionList, 47 : typename ParallelComponent> 48 0 : static Parallel::iterable_action_return_t apply( 49 : db::DataBox<DbTags>& /*box*/, 50 : const tuples::TaggedTuple<InboxTags...>& /*inboxes*/, 51 : const Parallel::GlobalCache<Metavariables>& /*cache*/, 52 : const ArrayIndex& /*array_index*/, const ActionList /*meta*/, 53 : const ParallelComponent* const /*meta*/) { 54 : // Here we only want the `InterpPointInfoTag` default constructed 55 : return {Parallel::AlgorithmExecution::Continue, std::nullopt}; 56 : } 57 : }; 58 : } // namespace Actions 59 : } // namespace intrp