Skip to content

Commit

Permalink
another fix to diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
llibert94 committed Mar 19, 2024
1 parent 0d6a2ab commit 9d005cf
Showing 1 changed file with 17 additions and 23 deletions.
40 changes: 17 additions & 23 deletions Examples/UnequalMassBinaryBH4dST/UnequalMassBinaryBH4dSTLevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,31 +168,9 @@ void UnequalMassBinaryBH4dSTLevel::specificPostTimeStep()
// called during setup at t=0 from Main
// bool first_step = (m_time == m_dt); // if not called in Main

int min_level = 0;
bool calculate_quantities = at_level_timestep_multiple(min_level);
if (m_level == min_level && calculate_quantities)
{
fillAllGhosts();
CouplingAndPotential coupling_and_potential(
m_p.coupling_and_potential_params);
FourDerivScalarTensorWithCouplingAndPotential fdst(
coupling_and_potential, m_p.G_Newton);
ModifiedPunctureGauge modified_puncture_gauge(m_p.modified_ccz4_params);
RhoDiagnostics<FourDerivScalarTensorWithCouplingAndPotential>
rho_diagnostics(fdst, m_dx, m_p.center);
RHSDiagnostics<FourDerivScalarTensorWithCouplingAndPotential,
ModifiedPunctureGauge, FourthOrderDerivatives>
rhs_diagnostics(fdst, m_p.modified_ccz4_params,
modified_puncture_gauge, m_dx, m_p.sigma,
m_p.center, m_p.G_Newton);
auto compute_pack = make_compute_pack(rho_diagnostics, rhs_diagnostics);
BoxLoops::loop(compute_pack, m_state_new, m_state_diagnostics,
EXCLUDE_GHOST_CELLS);
}

if (m_p.activate_extraction == 1 || m_p.activate_scalar_extraction == 1)
{
min_level = m_p.extraction_params.min_extraction_level();
int min_level = m_p.extraction_params.min_extraction_level();
bool calculate_weyl = at_level_timestep_multiple(min_level);
if (calculate_weyl)
{
Expand Down Expand Up @@ -244,6 +222,22 @@ void UnequalMassBinaryBH4dSTLevel::specificPostTimeStep()
}
}

fillAllGhosts();
CouplingAndPotential coupling_and_potential(
m_p.coupling_and_potential_params);
FourDerivScalarTensorWithCouplingAndPotential fdst(coupling_and_potential,
m_p.G_Newton);
ModifiedPunctureGauge modified_puncture_gauge(m_p.modified_ccz4_params);
RhoDiagnostics<FourDerivScalarTensorWithCouplingAndPotential>
rho_diagnostics(fdst, m_dx, m_p.center);
RHSDiagnostics<FourDerivScalarTensorWithCouplingAndPotential,
ModifiedPunctureGauge, FourthOrderDerivatives>
rhs_diagnostics(fdst, m_p.modified_ccz4_params, modified_puncture_gauge,
m_dx, m_p.sigma, m_p.center, m_p.G_Newton);
auto compute_pack = make_compute_pack(rho_diagnostics, rhs_diagnostics);
BoxLoops::loop(compute_pack, m_state_new, m_state_diagnostics,
EXCLUDE_GHOST_CELLS);

if (m_p.calculate_constraint_norms)
{
CouplingAndPotential coupling_and_potential(
Expand Down

0 comments on commit 9d005cf

Please sign in to comment.