SpECTRE Documentation Coverage Report
 Current view: top level - Evolution/Systems/Ccz4 - TimeDerivative.hpp Hit Total Coverage Commit: 3528f39684ab2ee5d689cee48331779e729b0a07 Lines: 1 5 20.0 % Date: 2024-02-27 07:22:14 Legend: Lines: hit not hit
  Line data Source code  1 0 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : #pragma once 5 : 6 : #include 7 : 8 : #include "DataStructures/Tensor/TypeAliases.hpp" 9 : #include "Utilities/TMPL.hpp" 10 : 11 : /// \cond 12 : class DataVector; 13 : 14 : namespace gsl { 15 : template 16 : class not_null; 17 : } // namespace gsl 18 : /// \endcond 19 : 20 : namespace Ccz4 { 21 : /*! 22 : * \brief Indicates whether or not to evolve the shift in a system evolved using 23 : * first order CCZ4 \cite Dumbser2017okk 24 : * 25 : * \details In \cite Dumbser2017okk , evolving the shift corresponds to 26 : * \f$s = 1\f$ and not evolving it corresponds to \f$s = 0\f$ 27 : */ 28 0 : enum class EvolveShift : bool { False = false, True = true }; 29 : 30 : /*! 31 : * \brief Indicates which slicing condition to use in a system evolved using 32 : * first order CCZ4 \cite Dumbser2017okk 33 : * 34 : * \details In \cite Dumbser2017okk , harmonic slicing corresponds to 35 : * \f$g(\alpha) = 1\f$ and 1 + log slicing corresponds to 36 : * \f$g(\alpha) = 2 / \alpha\f$ where \f$\alpha\f$ is the lapse. 37 : */ 38 0 : enum class SlicingConditionType : char { Harmonic, Log }; 39 : 40 : /*! 41 : * \brief Compute the RHS of the first order CCZ4 formulation of Einstein's 42 : * equations \cite Dumbser2017okk 43 : * 44 : * \details We define \f$\phi = (\det(\gamma_{ij}))^{-1/6}\f$ as the conformal 45 : * factor, \f$\alpha\f$ as the lapse, \f$\beta^i\f$ as the shift, \f$K_{ij}\f$ 46 : * as the extrinsic curvature, and \f$Z_{a}\f$ as the Z4 constraint. 47 : * 48 : * The evolved variables are the conformal spatial metric 49 : * \f$\tilde{\gamma}_{ij} = \phi^2 \gamma_{ij}\f$, the natural log of the lapse 50 : * \f$\ln \alpha\f$, the shift \f$\beta^i\f$, the natural log of the conformal 51 : * factor \f$\ln \phi\f$, the trace-free part of the extrinsic curvature 52 : * \f$\tilde A_{ij} = \phi^2 \left(K_{ij} - \frac{1}{3} K \gamma_{ij}\right)\f$, 53 : * the trace of the extrinsic curvature \f$K = K_{ij} \gamma^{ij}\f$, the 54 : * projection of the Z4 four-vector along the normal direction 55 : * \f$\Theta = Z^0 \alpha\f$, \f$\hat{\Gamma}^{i}\f$ defined by 56 : * Ccz4::Tags::GammaHat, the free variable \f$b^i\f$ that controls the 57 : * evolution of the shift and its time derivative, the auxiliary variable 58 : * \f$A_i = \partial_i \ln(\alpha) = \frac{\partial_i \alpha}{\alpha}\f$, the 59 : * auxiliary variable \f$B_k{}^{i} = \partial_k \beta^i\f$, the auxiliary 60 : * variable \f$D_{kij} = \frac{1}{2} \partial_k \tilde{\gamma}_{ij}\f$, and the 61 : * auxiliary variable 62 : * \f$P_i = \partial_i \ln(\phi) = \frac{\partial_i \phi}{\phi}\f$. 63 : * 64 : * The evolution equations are equations 12a - 12m of \cite Dumbser2017okk . 65 : * Equations 13 - 27 define identities used in the evolution equations. 66 : * 67 : * This evolution uses two settings that can be toggled: 68 : * - evolve_shift governs whether or not the shift is evolved by setting 69 : * \f$s = 1\f$ or \f$s = 0\f$ 70 : * - slicing_condition_type governs which slicing condition to use by setting 71 : * the value of \f$g(\alpha)\f$) 72 : */ 73 : template 74 1 : struct TimeDerivative { 75 0 : static void apply( 76 : const gsl::not_null*> 77 : dt_conformal_spatial_metric, 78 : const gsl::not_null*> dt_ln_lapse, 79 : const gsl::not_null*> dt_shift, 80 : const gsl::not_null*> dt_ln_conformal_factor, 81 : const gsl::not_null*> dt_a_tilde, 82 : const gsl::not_null*> dt_trace_extrinsic_curvature, 83 : const gsl::not_null*> dt_theta, 84 : const gsl::not_null*> dt_gamma_hat, 85 : const gsl::not_null*> dt_b, 86 : const gsl::not_null*> dt_field_a, 87 : const gsl::not_null*> dt_field_b, 88 : const gsl::not_null*> dt_field_d, 89 : const gsl::not_null*> dt_field_p, 90 : const gsl::not_null*> conformal_factor_squared, 91 : const gsl::not_null*> det_conformal_spatial_metric, 92 : const gsl::not_null*> 93 : inv_conformal_spatial_metric, 94 : const gsl::not_null*> inv_spatial_metric, 95 : const gsl::not_null*> lapse, 96 : const gsl::not_null*> slicing_condition, 97 : const gsl::not_null*> d_slicing_condition, 98 : const gsl::not_null*> inv_a_tilde, 99 : const gsl::not_null*> a_tilde_times_field_b, 100 : const gsl::not_null*> 101 : a_tilde_minus_one_third_conformal_metric_times_trace_a_tilde, 102 : const gsl::not_null*> contracted_field_b, 103 : const gsl::not_null*> symmetrized_d_field_b, 104 : const gsl::not_null*> 105 : contracted_symmetrized_d_field_b, 106 : const gsl::not_null*> field_b_times_field_d, 107 : const gsl::not_null*> field_d_up_times_a_tilde, 108 : const gsl::not_null*> contracted_field_d_up, 109 : const gsl::not_null*> half_conformal_factor_squared, 110 : const gsl::not_null*> 111 : conformal_metric_times_field_b, 112 : const gsl::not_null*> 113 : conformal_metric_times_symmetrized_d_field_b, 114 : const gsl::not_null*> 115 : conformal_metric_times_trace_a_tilde, 116 : const gsl::not_null*> 117 : inv_conformal_metric_times_d_a_tilde, 118 : const gsl::not_null*> 119 : gamma_hat_minus_contracted_conformal_christoffel, 120 : const gsl::not_null*> 121 : d_gamma_hat_minus_contracted_conformal_christoffel, 122 : const gsl::not_null*> 123 : contracted_christoffel_second_kind, 124 : const gsl::not_null*> 125 : contracted_d_conformal_christoffel_difference, 126 : const gsl::not_null*> k_minus_2_theta_c, 127 : const gsl::not_null*> k_minus_k0_minus_2_theta_c, 128 : const gsl::not_null*> lapse_times_a_tilde, 129 : const gsl::not_null*> lapse_times_d_a_tilde, 130 : const gsl::not_null*> lapse_times_field_a, 131 : const gsl::not_null*> 132 : lapse_times_conformal_spatial_metric, 133 : const gsl::not_null*> lapse_times_slicing_condition, 134 : const gsl::not_null*> 135 : lapse_times_ricci_scalar_plus_divergence_z4_constraint, 136 : const gsl::not_null*> 137 : shift_times_deriv_gamma_hat, 138 : const gsl::not_null*> 139 : inv_tau_times_conformal_metric, 140 : const gsl::not_null*> trace_a_tilde, 141 : const gsl::not_null*> field_d_up, 142 : const gsl::not_null*> 143 : conformal_christoffel_second_kind, 144 : const gsl::not_null*> 145 : d_conformal_christoffel_second_kind, 146 : const gsl::not_null*> christoffel_second_kind, 147 : const gsl::not_null*> spatial_ricci_tensor, 148 : const gsl::not_null*> grad_grad_lapse, 149 : const gsl::not_null*> divergence_lapse, 150 : const gsl::not_null*> 151 : contracted_conformal_christoffel_second_kind, 152 : const gsl::not_null*> 153 : d_contracted_conformal_christoffel_second_kind, 154 : const gsl::not_null*> spatial_z4_constraint, 155 : const gsl::not_null*> 156 : upper_spatial_z4_constraint, 157 : const gsl::not_null*> 158 : grad_spatial_z4_constraint, 159 : const gsl::not_null*> 160 : ricci_scalar_plus_divergence_z4_constraint, 161 : const double c, const double cleaning_speed, 162 : const Scalar& eta, const double f, 163 : const Scalar& k_0, const tnsr::i& d_k_0, 164 : const double kappa_1, const double kappa_2, const double kappa_3, 165 : const double mu, const double one_over_relaxation_time, 166 : const EvolveShift evolve_shift, 167 : const SlicingConditionType slicing_condition_type, 168 : const tnsr::ii& conformal_spatial_metric, 169 : const Scalar& ln_lapse, const tnsr::I& shift, 170 : const Scalar& ln_conformal_factor, 171 : const tnsr::ii& a_tilde, 172 : const Scalar& trace_extrinsic_curvature, 173 : const Scalar& theta, 174 : const tnsr::I& gamma_hat, 175 : const tnsr::I& b, 176 : const tnsr::i& field_a, 177 : const tnsr::iJ& field_b, 178 : const tnsr::ijj& field_d, 179 : const tnsr::i& field_p, 180 : const tnsr::ijj& d_a_tilde, 181 : const tnsr::i& d_trace_extrinsic_curvature, 182 : const tnsr::i& d_theta, 183 : const tnsr::iJ& d_gamma_hat, 184 : const tnsr::iJ& d_b, 185 : const tnsr::ij& d_field_a, 186 : const tnsr::ijK& d_field_b, 187 : const tnsr::ijkk& d_field_d, 188 : const tnsr::ij& d_field_p); 189 : }; 190 : } // namespace Ccz4 

 Generated by: LCOV version 1.14