SpECTRE
v2024.12.16
|
Gauge conditions for generalized harmonic evolution systems. More...
Classes | |
class | AnalyticChristoffel |
Imposes the analytic gauge condition, | |
class | DampedHarmonic |
Impose damped harmonic gauge. More... | |
struct | DhGaugeParameters |
A struct holding the parameters for initializing damped harmonic gauge. More... | |
class | GaugeCondition |
Base class for GH gauge conditions. More... | |
class | Harmonic |
Imposes the harmonic gauge condition, | |
struct | SetPiAndPhiFromConstraints |
Set | |
Typedefs | |
using | all_gauges = implementation defined |
List of all gauge conditions. | |
Functions | |
template<size_t SpatialDim, typename Frame > | |
void | damped_harmonic_rollon (gsl::not_null< tnsr::a< DataVector, SpatialDim, Frame > * > gauge_h, gsl::not_null< tnsr::ab< DataVector, SpatialDim, Frame > * > d4_gauge_h, const tnsr::a< DataVector, SpatialDim, Frame > &gauge_h_init, const tnsr::ab< DataVector, SpatialDim, Frame > &dgauge_h_init, const Scalar< DataVector > &lapse, const tnsr::I< DataVector, SpatialDim, Frame > &shift, const Scalar< DataVector > &sqrt_det_spatial_metric, const tnsr::II< DataVector, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::abb< DataVector, SpatialDim, Frame > &d4_spacetime_metric, const Scalar< DataVector > &half_pi_two_normals, const tnsr::i< DataVector, SpatialDim, Frame > &half_phi_two_normals, const tnsr::aa< DataVector, SpatialDim, Frame > &spacetime_metric, const tnsr::iaa< DataVector, SpatialDim, Frame > &phi, double time, const tnsr::I< DataVector, SpatialDim, Frame > &coords, double amp_coef_L1, double amp_coef_L2, double amp_coef_S, int exp_L1, int exp_L2, int exp_S, double rollon_start_time, double rollon_width, double sigma_r) |
Damped harmonic gauge source function and its spacetime derivative. More... | |
template<size_t SpatialDim, typename Frame > | |
void | damped_harmonic (gsl::not_null< tnsr::a< DataVector, SpatialDim, Frame > * > gauge_h, gsl::not_null< tnsr::ab< DataVector, SpatialDim, Frame > * > d4_gauge_h, const Scalar< DataVector > &lapse, const tnsr::I< DataVector, SpatialDim, Frame > &shift, const Scalar< DataVector > &sqrt_det_spatial_metric, const tnsr::II< DataVector, SpatialDim, Frame > &inverse_spatial_metric, const tnsr::abb< DataVector, SpatialDim, Frame > &d4_spacetime_metric, const Scalar< DataVector > &half_pi_two_normals, const tnsr::i< DataVector, SpatialDim, Frame > &half_phi_two_normals, const tnsr::aa< DataVector, SpatialDim, Frame > &spacetime_metric, const tnsr::iaa< DataVector, SpatialDim, Frame > &phi, const tnsr::I< DataVector, SpatialDim, Frame > &coords, double amp_coef_L1, double amp_coef_L2, double amp_coef_S, int exp_L1, int exp_L2, int exp_S, double sigma_r) |
Damped harmonic gauge source function and its spacetime derivative. More... | |
template<size_t Dim> | |
void | dispatch (gsl::not_null< tnsr::a< DataVector, Dim, Frame::Inertial > * > gauge_h, gsl::not_null< tnsr::ab< DataVector, Dim, Frame::Inertial > * > d4_gauge_h, const Scalar< DataVector > &lapse, const tnsr::I< DataVector, Dim, Frame::Inertial > &shift, const Scalar< DataVector > &sqrt_det_spatial_metric, const tnsr::II< DataVector, Dim, Frame::Inertial > &inverse_spatial_metric, const tnsr::abb< DataVector, Dim, Frame::Inertial > &d4_spacetime_metric, const Scalar< DataVector > &half_pi_two_normals, const tnsr::i< DataVector, Dim, Frame::Inertial > &half_phi_two_normals, const tnsr::aa< DataVector, Dim, Frame::Inertial > &spacetime_metric, const tnsr::iaa< DataVector, Dim, Frame::Inertial > &phi, const Mesh< Dim > &mesh, double time, const tnsr::I< DataVector, Dim, Frame::Inertial > &inertial_coords, const InverseJacobian< DataVector, Dim, Frame::ElementLogical, Frame::Inertial > &inverse_jacobian, const GaugeCondition &gauge_condition) |
Dispatch to the derived gauge condition. More... | |
template<size_t Dim, typename Frame > | |
void | half_pi_and_phi_two_normals (gsl::not_null< Scalar< DataVector > * > half_pi_two_normals, gsl::not_null< tnsr::i< DataVector, Dim, Frame > * > half_phi_two_normals, const tnsr::A< DataVector, Dim, Frame > &spacetime_normal_vector, const tnsr::aa< DataVector, Dim, Frame > &pi, const tnsr::iaa< DataVector, Dim, Frame > &phi) |
Compute | |
void | register_derived_with_charm () |
Gauge conditions for generalized harmonic evolution systems.
void gh::gauges::damped_harmonic | ( | gsl::not_null< tnsr::a< DataVector, SpatialDim, Frame > * > | gauge_h, |
gsl::not_null< tnsr::ab< DataVector, SpatialDim, Frame > * > | d4_gauge_h, | ||
const Scalar< DataVector > & | lapse, | ||
const tnsr::I< DataVector, SpatialDim, Frame > & | shift, | ||
const Scalar< DataVector > & | sqrt_det_spatial_metric, | ||
const tnsr::II< DataVector, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::abb< DataVector, SpatialDim, Frame > & | d4_spacetime_metric, | ||
const Scalar< DataVector > & | half_pi_two_normals, | ||
const tnsr::i< DataVector, SpatialDim, Frame > & | half_phi_two_normals, | ||
const tnsr::aa< DataVector, SpatialDim, Frame > & | spacetime_metric, | ||
const tnsr::iaa< DataVector, SpatialDim, Frame > & | phi, | ||
const tnsr::I< DataVector, SpatialDim, Frame > & | coords, | ||
double | amp_coef_L1, | ||
double | amp_coef_L2, | ||
double | amp_coef_S, | ||
int | exp_L1, | ||
int | exp_L2, | ||
int | exp_S, | ||
double | sigma_r | ||
) |
Damped harmonic gauge source function and its spacetime derivative.
The gauge condition has been taken from [185] and [52]. We provide both a "rollon" version (damped_harmonic_rollon
), and a "non-rollon" version (damped_harmonic
). In the non-rollon version the rollon function
The covariant form of the source function
where
temporal roll-on function
and the spatial weight function is:
This weight function can be written with multiple constant factors in the exponent in literature [52], but we absorb them all into
Note that for the last three terms in
amp_coef_X
exp_X
.sigma_r
.Also computes spacetime derivatives, i.e.
where:
Derivation:
where
where
where
void gh::gauges::damped_harmonic_rollon | ( | gsl::not_null< tnsr::a< DataVector, SpatialDim, Frame > * > | gauge_h, |
gsl::not_null< tnsr::ab< DataVector, SpatialDim, Frame > * > | d4_gauge_h, | ||
const tnsr::a< DataVector, SpatialDim, Frame > & | gauge_h_init, | ||
const tnsr::ab< DataVector, SpatialDim, Frame > & | dgauge_h_init, | ||
const Scalar< DataVector > & | lapse, | ||
const tnsr::I< DataVector, SpatialDim, Frame > & | shift, | ||
const Scalar< DataVector > & | sqrt_det_spatial_metric, | ||
const tnsr::II< DataVector, SpatialDim, Frame > & | inverse_spatial_metric, | ||
const tnsr::abb< DataVector, SpatialDim, Frame > & | d4_spacetime_metric, | ||
const Scalar< DataVector > & | half_pi_two_normals, | ||
const tnsr::i< DataVector, SpatialDim, Frame > & | half_phi_two_normals, | ||
const tnsr::aa< DataVector, SpatialDim, Frame > & | spacetime_metric, | ||
const tnsr::iaa< DataVector, SpatialDim, Frame > & | phi, | ||
double | time, | ||
const tnsr::I< DataVector, SpatialDim, Frame > & | coords, | ||
double | amp_coef_L1, | ||
double | amp_coef_L2, | ||
double | amp_coef_S, | ||
int | exp_L1, | ||
int | exp_L2, | ||
int | exp_S, | ||
double | rollon_start_time, | ||
double | rollon_width, | ||
double | sigma_r | ||
) |
Damped harmonic gauge source function and its spacetime derivative.
The gauge condition has been taken from [185] and [52]. We provide both a "rollon" version (damped_harmonic_rollon
), and a "non-rollon" version (damped_harmonic
). In the non-rollon version the rollon function
The covariant form of the source function
where
temporal roll-on function
and the spatial weight function is:
This weight function can be written with multiple constant factors in the exponent in literature [52], but we absorb them all into
Note that for the last three terms in
amp_coef_X
exp_X
.sigma_r
.Also computes spacetime derivatives, i.e.
where:
Derivation:
where
where
where
void gh::gauges::dispatch | ( | gsl::not_null< tnsr::a< DataVector, Dim, Frame::Inertial > * > | gauge_h, |
gsl::not_null< tnsr::ab< DataVector, Dim, Frame::Inertial > * > | d4_gauge_h, | ||
const Scalar< DataVector > & | lapse, | ||
const tnsr::I< DataVector, Dim, Frame::Inertial > & | shift, | ||
const Scalar< DataVector > & | sqrt_det_spatial_metric, | ||
const tnsr::II< DataVector, Dim, Frame::Inertial > & | inverse_spatial_metric, | ||
const tnsr::abb< DataVector, Dim, Frame::Inertial > & | d4_spacetime_metric, | ||
const Scalar< DataVector > & | half_pi_two_normals, | ||
const tnsr::i< DataVector, Dim, Frame::Inertial > & | half_phi_two_normals, | ||
const tnsr::aa< DataVector, Dim, Frame::Inertial > & | spacetime_metric, | ||
const tnsr::iaa< DataVector, Dim, Frame::Inertial > & | phi, | ||
const Mesh< Dim > & | mesh, | ||
double | time, | ||
const tnsr::I< DataVector, Dim, Frame::Inertial > & | inertial_coords, | ||
const InverseJacobian< DataVector, Dim, Frame::ElementLogical, Frame::Inertial > & | inverse_jacobian, | ||
const GaugeCondition & | gauge_condition | ||
) |
Dispatch to the derived gauge condition.
Which of the arguments to this function are used will depend on the gauge condition, but since that is a runtime choice we need support for all gauge conditions.