Skip to content

Commit

Permalink
fixup: specify if integrands need to be integrated with conformal/fla…
Browse files Browse the repository at this point in the history
…t elements.
  • Loading branch information
iago-mendes committed Sep 19, 2024
1 parent f11255c commit 738d505
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 7 deletions.
12 changes: 7 additions & 5 deletions src/Elliptic/Systems/Xcts/Events/ObserveAdmIntegrals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ void local_adm_integrals(
const auto& face_mesh = mesh.slice_away(boundary_direction.dimension());
const auto& conformal_face_normal =
conformal_face_normals.at(boundary_direction);
const auto face_normal_magnitude = magnitude(conformal_face_normal);
const auto flat_face_normal = tenex::evaluate<ti::i>(
conformal_face_normal(ti::i) / face_normal_magnitude());

// Compute curved and flat area elements
const auto face_sqrt_det_conformal_metric =
Expand Down Expand Up @@ -131,17 +134,16 @@ void local_adm_integrals(
const auto contracted_mass_integrand =
tenex::evaluate(mass_integrand(ti::I) * conformal_face_normal(ti::i));
const auto contracted_linear_momentum_integrand = tenex::evaluate<ti::I>(
linear_momentum_integrand(ti::I, ti::J) * conformal_face_normal(ti::j));
linear_momentum_integrand(ti::I, ti::J) * flat_face_normal(ti::j));

// Take integrals
adm_mass->get() += definite_integral(
get(contracted_mass_integrand) * get(conformal_area_element),
face_mesh);
for (int I = 0; I < 3; I++) {
adm_linear_momentum->get(I) +=
definite_integral(contracted_linear_momentum_integrand.get(I) *
get(conformal_area_element),
face_mesh);
adm_linear_momentum->get(I) += definite_integral(
contracted_linear_momentum_integrand.get(I) * get(flat_area_element),
face_mesh);
center_of_mass->get(I) += definite_integral(
center_of_mass_integrand.get(I) * get(flat_area_element), face_mesh);
}
Expand Down
7 changes: 7 additions & 0 deletions src/PointwiseFunctions/Xcts/AdmLinearMomentum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ namespace Xcts {
* \Big) \, dS_j.
* \end{equation}
*
* \note For consistency with `adm_linear_momentum_volume_integrand`, this
* integrand needs to be contracted with the Euclidean face normal and
* integrated with the Euclidean area element.
*
* \param result output pointer
* \param conformal_factor the conformal factor $\psi$
* \param inv_spatial_metric the inverse spatial metric $\gamma^{ij}$
Expand Down Expand Up @@ -62,6 +66,9 @@ tnsr::II<DataVector, 3> adm_linear_momentum_surface_integrand(
* where $1/(8\pi) P^{jk}$ is the result from
* `adm_linear_momentum_surface_integrand`.
*
* \note For consistency with `adm_linear_momentum_surface_integrand`, this
* integrand needs to be integrated with the Euclidean volume element.
*
* \param result output pointer
* \param surface_integrand the quantity $1/(8\pi) P^{ij}$ (result of
* `adm_linear_momentum_surface_integrand`)
Expand Down
11 changes: 9 additions & 2 deletions src/PointwiseFunctions/Xcts/AdmMass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ namespace Xcts {
* \bar\gamma^{jk} \bar\Gamma^i_{jk}
* - \bar\gamma^{ij} \bar\Gamma_{j}
* - 8 \bar\gamma^{ij} \partial_j \psi
* \Big) dS_i.
* \Big) d\bar{S}_i.
* \end{equation}
*
* \note We don't use the other versions presented in \cite BaumgarteShapiro of
* this integral because they make assumptions like $\bar\gamma = 1$,
* $\bar\Gamma^i_{ij} = 0$ and faster fall-off of the conformal metric.
*
* \note For consistency with `adm_mass_volume_integrand`, this integrand needs
* to be contracted with the conformal face normal and integrated with the
* conformal area element.
*
* \param result output pointer
* \param deriv_conformal_factor the gradient of the conformal factor
* $\partial_i \psi$
Expand Down Expand Up @@ -69,7 +73,7 @@ tnsr::I<DataVector, 3> adm_mass_surface_integrand(
* - \bar\gamma^{ij} \partial_i \bar\Gamma_j
* - \bar\Gamma_l \bar\gamma^{lj} \bar\Gamma_j
* - 8 \bar D^2 \psi
* \Big) dV,
* \Big) d\bar{V},
* \end{equation}
*
* where we can use the Hamiltonian constraint (Eq. 3.37 in
Expand All @@ -86,6 +90,9 @@ tnsr::I<DataVector, 3> adm_mass_surface_integrand(
* \note This is similar to Eq. 3.149 in \cite BaumgarteShapiro, except that
* here we don't assume $\bar\gamma = 1$.
*
* \note For consistency with `adm_mass_surface_integrand`, this integrand needs
* to be integrated with the conformal volume element.
*
* \param result output pointer
* \param conformal_factor the conformal factor
* \param conformal_ricci_scalar the conformal Ricci scalar $\bar R$
Expand Down
6 changes: 6 additions & 0 deletions src/PointwiseFunctions/Xcts/CenterOfMass.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ namespace Xcts {
* \note We don't include the ADM mass $M_{ADM}$ in this integrand. After
* integrating the result of this function, you have to divide by $M_{ADM}$.
*
* \note For consistency with `center_of_mass_volume_integrand`, this
* integrand needs to be integrated with the Euclidean area element.
*
* \see `Xcts::adm_mass_surface_integrand`
*
* \warning This integral assumes that the conformal metric falls off to
Expand Down Expand Up @@ -71,6 +74,9 @@ tnsr::I<DataVector, 3> center_of_mass_surface_integrand(
*
* where $n^i = x^i / r$ and $r = \sqrt{x^2 + y^2 + z^2}$.
*
* \note For consistency with `center_of_mass_surface_integrand`, this
* integrand needs to be integrated with the Euclidean volume element.
*
* \see `center_of_mass_surface_integrand`
*
* \param result output pointer
Expand Down

0 comments on commit 738d505

Please sign in to comment.