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 :
8 : #include "DataStructures/Tensor/TypeAliases.hpp"
9 : #include "Utilities/Gsl.hpp"
10 :
11 : namespace Xcts {
12 :
13 : /// @{
14 : /*!
15 : * \brief Extrinsic curvature computed from the conformal decomposition used in
16 : * the XCTS system.
17 : *
18 : * The extrinsic curvature decomposition is (see Eq. 3.113 in
19 : * \cite BaumgarteShapiro):
20 : *
21 : * \begin{equation}
22 : * K_{ij} = A_{ij} + \frac{1}{3}\gamma_{ij}K
23 : * = \frac{\psi^4}{2\lapse}\left((\bar{L}\beta)_{ij} - \bar{u}_{ij}\right)
24 : * + \frac{\psi^4}{3} \bar{\gamma}_{ij} K
25 : * \end{equation}
26 : *
27 : * \param result output buffer for the extrinsic curvature
28 : * \param conformal_factor the conformal factor $\psi$
29 : * \param lapse the lapse $\alpha$
30 : * \param conformal_metric the conformal metric $\bar{\gamma}_{ij}$
31 : * \param longitudinal_shift_minus_dt_conformal_metric the term
32 : * $(\bar{L}\beta)^{ij} - \bar{u}^{ij}$. Note that $(\bar{L}\beta)^{ij}$ is the
33 : * _conformal_ longitudinal shift, and $(\bar{L}\beta)^{ij}=\psi^4(L\beta)^{ij}$
34 : * (Eq. 3.98 in \cite BaumgarteShapiro). See also Xcts::longitudinal_operator.
35 : * \param trace_extrinsic_curvature the trace of the extrinsic curvature,
36 : * $K=\gamma^{ij}K_{ij}$. Note that it is a conformal invariant, $K=\bar{K}$ (by
37 : * choice).
38 : */
39 : template <typename DataType>
40 1 : void extrinsic_curvature(
41 : const gsl::not_null<tnsr::ii<DataType, 3>*> result,
42 : const Scalar<DataType>& conformal_factor, const Scalar<DataType>& lapse,
43 : const tnsr::ii<DataType, 3>& conformal_metric,
44 : const tnsr::II<DataType, 3>& longitudinal_shift_minus_dt_conformal_metric,
45 : const Scalar<DataType>& trace_extrinsic_curvature);
46 :
47 : /// Return-by-value overload
48 : template <typename DataType>
49 1 : tnsr::ii<DataType, 3> extrinsic_curvature(
50 : const Scalar<DataType>& conformal_factor, const Scalar<DataType>& lapse,
51 : const tnsr::ii<DataType, 3>& conformal_metric,
52 : const tnsr::II<DataType, 3>& longitudinal_shift_minus_dt_conformal_metric,
53 : const Scalar<DataType>& trace_extrinsic_curvature);
54 : /// @}
55 :
56 : } // namespace Xcts
|