Line data Source code
1 0 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : #pragma once 5 : 6 : #include "Evolution/Systems/Cce/PreSwshDerivatives.hpp" 7 : #include "Evolution/Systems/Cce/SwshDerivatives.hpp" 8 : #include "Evolution/Systems/Cce/Tags.hpp" 9 : #include "Parallel/AlgorithmExecution.hpp" 10 : #include "Parallel/GlobalCache.hpp" 11 : 12 : namespace Cce::Actions { 13 : 14 : /*! 15 : * \ingroup ActionsGroup 16 : * \brief Compute the set of inputs to `ComputeKleinGordonSource`. 17 : * 18 : * \details \ref DataBoxGroup changes: 19 : * - Modifies: 20 : * - `Tags::Dy<Tags::KleinGordonPsi>` 21 : * - `Spectral::Swsh::Tags::Derivative<Tags::KleinGordonPsi, 22 : Spectral::Swsh::Tags::Eth>` 23 : * - Adds: nothing 24 : * - Removes: nothing 25 : */ 26 1 : struct PrecomputeKleinGordonSourceVariables { 27 : template <typename DbTags, typename... InboxTags, typename Metavariables, 28 : typename ArrayIndex, typename ActionList, 29 : typename ParallelComponent> 30 0 : static Parallel::iterable_action_return_t apply( 31 : db::DataBox<DbTags>& box, 32 : const tuples::TaggedTuple<InboxTags...>& /*inboxes*/, 33 : const Parallel::GlobalCache<Metavariables>& /*cache*/, 34 : const ArrayIndex& /*array_index*/, const ActionList /*meta*/, 35 : const ParallelComponent* const /*meta*/) { 36 : mutate_all_pre_swsh_derivatives_for_tag< 37 : Tags::KleinGordonSource<Tags::BondiBeta>>(make_not_null(&box)); 38 : mutate_all_swsh_derivatives_for_tag<Tags::KleinGordonSource<Tags::BondiQ>>( 39 : make_not_null(&box)); 40 : return {Parallel::AlgorithmExecution::Continue, std::nullopt}; 41 : } 42 : }; 43 : 44 : } // namespace Cce::Actions