Line data Source code
1 0 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : #pragma once 5 : 6 : #include <array> 7 : #include <cstddef> 8 : #include <optional> 9 : #include <tuple> 10 : #include <utility> // IWYU pragma: keep 11 : #include <vector> 12 : 13 : #include "DataStructures/DataBox/DataBox.hpp" 14 : #include "DataStructures/Tensor/EagerMath/DotProduct.hpp" 15 : #include "DataStructures/Tensor/EagerMath/Norms.hpp" 16 : #include "DataStructures/Tensor/Tensor.hpp" 17 : #include "Domain/Tags.hpp" 18 : #include "Evolution/Systems/GeneralizedHarmonic/ConstraintDamping/Tags.hpp" 19 : #include "Evolution/Systems/GeneralizedHarmonic/Constraints.hpp" 20 : #include "Evolution/Systems/GeneralizedHarmonic/System.hpp" 21 : #include "Evolution/Systems/GeneralizedHarmonic/Tags.hpp" 22 : #include "NumericalAlgorithms/Spectral/Mesh.hpp" 23 : #include "Parallel/AlgorithmExecution.hpp" 24 : #include "Parallel/GlobalCache.hpp" 25 : #include "PointwiseFunctions/AnalyticData/Tags.hpp" 26 : #include "PointwiseFunctions/AnalyticSolutions/Tags.hpp" 27 : #include "PointwiseFunctions/GeneralRelativity/Christoffel.hpp" 28 : #include "PointwiseFunctions/GeneralRelativity/DerivativesOfSpacetimeMetric.hpp" 29 : #include "PointwiseFunctions/GeneralRelativity/DetAndInverseSpatialMetric.hpp" 30 : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/ConstraintGammas.hpp" 31 : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/DerivSpatialMetric.hpp" 32 : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/ExtrinsicCurvature.hpp" 33 : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/SpatialDerivOfLapse.hpp" 34 : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/SpatialDerivOfShift.hpp" 35 : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/TimeDerivOfLapse.hpp" 36 : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/TimeDerivOfShift.hpp" 37 : #include "PointwiseFunctions/GeneralRelativity/GeneralizedHarmonic/TimeDerivOfSpatialMetric.hpp" 38 : #include "PointwiseFunctions/GeneralRelativity/InverseSpacetimeMetric.hpp" 39 : #include "PointwiseFunctions/GeneralRelativity/Lapse.hpp" 40 : #include "PointwiseFunctions/GeneralRelativity/Shift.hpp" 41 : #include "PointwiseFunctions/GeneralRelativity/SpacetimeMetric.hpp" 42 : #include "PointwiseFunctions/GeneralRelativity/SpacetimeNormalOneForm.hpp" 43 : #include "PointwiseFunctions/GeneralRelativity/SpacetimeNormalVector.hpp" 44 : #include "PointwiseFunctions/GeneralRelativity/SpatialMetric.hpp" 45 : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp" 46 : #include "Utilities/ErrorHandling/Assert.hpp" 47 : #include "Utilities/Gsl.hpp" 48 : #include "Utilities/TMPL.hpp" 49 : 50 : /// \cond 51 : namespace Parallel { 52 : template <typename Metavariables> 53 : class GlobalCache; 54 : } // namespace Parallel 55 : /// \endcond 56 : 57 : namespace gh::Actions { 58 : template <size_t Dim> 59 0 : struct InitializeGhAnd3Plus1Variables { 60 0 : using frame = Frame::Inertial; 61 0 : using compute_tags = db::AddComputeTags< 62 : // Needed to compute the characteristic speeds for the AH finder 63 : gr::Tags::SpatialMetricCompute<DataVector, Dim, frame>, 64 : gr::Tags::DetAndInverseSpatialMetricCompute<DataVector, Dim, frame>, 65 : gr::Tags::ShiftCompute<DataVector, Dim, frame>, 66 : gr::Tags::LapseCompute<DataVector, Dim, frame>, 67 : 68 : // Compute constraint damping parameters. 69 : ConstraintDamping::Tags::ConstraintGamma0Compute<Dim, Frame::Grid>, 70 : ConstraintDamping::Tags::ConstraintGamma1Compute<Dim, Frame::Grid>, 71 : ConstraintDamping::Tags::ConstraintGamma2Compute<Dim, Frame::Grid>>; 72 : 73 0 : using const_global_cache_tags = tmpl::list< 74 : gh::ConstraintDamping::Tags::DampingFunctionGamma0<Dim, Frame::Grid>, 75 : gh::ConstraintDamping::Tags::DampingFunctionGamma1<Dim, Frame::Grid>, 76 : gh::ConstraintDamping::Tags::DampingFunctionGamma2<Dim, Frame::Grid>>; 77 : 78 : template <typename DbTagsList, typename... InboxTags, typename Metavariables, 79 : typename ArrayIndex, typename ActionList, 80 : typename ParallelComponent> 81 0 : static Parallel::iterable_action_return_t apply( 82 : db::DataBox<DbTagsList>& /*box*/, 83 : const tuples::TaggedTuple<InboxTags...>& /*inboxes*/, 84 : const Parallel::GlobalCache<Metavariables>& /*cache*/, 85 : const ArrayIndex& /*array_index*/, const ActionList /*meta*/, 86 : const ParallelComponent* const /*meta*/) { 87 : return {Parallel::AlgorithmExecution::Continue, std::nullopt}; 88 : } 89 : }; 90 : } // namespace gh::Actions