Skip to content

Commit

Permalink
fix error for divu calc for manifold when its not being used with Nul…
Browse files Browse the repository at this point in the history
…l mech
  • Loading branch information
baperry2 committed Dec 19, 2024
1 parent 652f0ea commit 9372a81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/PeleLMeX_K.H
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,13 @@ compute_divu<pele::physics::eos::Manifold>(

auto eos = pele::physics::PhysicsType::eos(eosparm);
eos.RY2RRinvY(massdens, rho, rhoinv, y);
amrex::Real derivs[NUM_SPECIES - 1] = {0.0};
amrex::Real derivs[MANIFOLD_DIM] = {0.0};
rho /= 1.0e3; // Unit conversion MKS -> CGS
eos.RY2dRdY(rho, y, derivs);

divu(i, j, k) = 0.0;

for (int n = 0; n < NUM_SPECIES - 1; n++) {
for (int n = 0; n < MANIFOLD_DIM; n++) {
derivs[n] *= 1.0e3; // Unit conversion CGS -> MKS
divu(i, j, k) += derivs[n] * specDiff(i, j, k, n);
if (do_react != 0) {
Expand Down

0 comments on commit 9372a81

Please sign in to comment.