SpacetimeDerivOfDetSpatialMetric.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 
9 #include "DataStructures/DataBox/Tag.hpp"
10 #include "DataStructures/DataVector.hpp"
12 #include "Evolution/Systems/GeneralizedHarmonic/Tags.hpp"
14 #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
15 #include "Utilities/ContainerHelpers.hpp"
16 #include "Utilities/Gsl.hpp"
17 #include "Utilities/TMPL.hpp"
18 
19 // IWYU pragma: no_forward_declare Tags::deriv
20 
21 /// \cond
22 namespace domain {
23 namespace Tags {
24 template <size_t Dim, typename Frame>
25 struct Coordinates;
26 } // namespace Tags
27 } // namespace domain
28 class DataVector;
29 template <typename X, typename Symm, typename IndexList>
30 class Tensor;
31 /// \endcond
32 
33 namespace GeneralizedHarmonic {
34 // @{
35 /*!
36  * \ingroup GeneralRelativityGroup
37  * \brief Computes spacetime derivatives of the determinant of spatial metric,
38  * using the generalized harmonic variables, spatial metric, and its
39  * time derivative.
40  *
41  * \details Using the relation \f$ \partial_a g = g g^{jk} \partial_a g_{jk} \f$
42  */
43 template <size_t SpatialDim, typename Frame, typename DataType>
45  gsl::not_null<tnsr::a<DataType, SpatialDim, Frame>*> d4_det_spatial_metric,
46  const Scalar<DataType>& sqrt_det_spatial_metric,
47  const tnsr::II<DataType, SpatialDim, Frame>& inverse_spatial_metric,
48  const tnsr::ii<DataType, SpatialDim, Frame>& dt_spatial_metric,
49  const tnsr::iaa<DataType, SpatialDim, Frame>& phi) noexcept;
50 
51 template <size_t SpatialDim, typename Frame, typename DataType>
52 tnsr::a<DataType, SpatialDim, Frame> spacetime_deriv_of_det_spatial_metric(
53  const Scalar<DataType>& sqrt_det_spatial_metric,
54  const tnsr::II<DataType, SpatialDim, Frame>& inverse_spatial_metric,
55  const tnsr::ii<DataType, SpatialDim, Frame>& dt_spatial_metric,
56  const tnsr::iaa<DataType, SpatialDim, Frame>& phi) noexcept;
57 // @}
58 } // namespace GeneralizedHarmonic
GeneralizedHarmonic
Items related to evolving the first-order generalized harmonic system.
Definition: Characteristics.cpp:21
cstddef
DataVector
Stores a collection of function values.
Definition: DataVector.hpp:42
GeneralizedHarmonic::phi
void phi(gsl::not_null< tnsr::iaa< DataType, SpatialDim, Frame > * > phi, const Scalar< DataType > &lapse, const tnsr::i< DataType, SpatialDim, Frame > &deriv_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::iJ< DataType, SpatialDim, Frame > &deriv_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::ijj< DataType, SpatialDim, Frame > &deriv_spatial_metric) noexcept
Computes the auxiliary variable used by the generalized harmonic formulation of Einstein's equations...
Scalar
Tensor< T, Symmetry<>, index_list<> > Scalar
Definition: TypeAliases.hpp:21
Gsl.hpp
GeneralizedHarmonic::spacetime_deriv_of_det_spatial_metric
void spacetime_deriv_of_det_spatial_metric(gsl::not_null< tnsr::a< DataType, SpatialDim, Frame > * > d4_det_spatial_metric, const Scalar< DataType > &sqrt_det_spatial_metric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::ii< DataType, SpatialDim, Frame > &dt_spatial_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) noexcept
Computes spacetime derivatives of the determinant of spatial metric, using the generalized harmonic v...
Tensor.hpp
PartialDerivatives.hpp
Prefixes.hpp
TMPL.hpp
gsl::not_null
Require a pointer to not be a nullptr
Definition: Gsl.hpp:183