Skip to content

Commit

Permalink
Correctly output integrated quantities
Browse files Browse the repository at this point in the history
  • Loading branch information
ewquon committed Apr 15, 2024
1 parent 7ef6c86 commit d8e0a1f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Source/IO/ERF_WriteScalarProfiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ ERF::sum_integrated_quantities (Real time)
Real scal_ml = 0.0;

#if 1
mass_sl = volWgtSumMF(0,vars_new[0][Vars::cons],Rho_comp,*mapfac_m[0],false,false);
mass_sl = volWgtSumMF(0,vars_new[0][Vars::cons],Rho_comp,*mapfac_m[0],true,false);
for (int lev = 0; lev <= finest_level; lev++) {
mass_ml += volWgtSumMF(lev,vars_new[lev][Vars::cons],Rho_comp,*mapfac_m[lev],false,true);
mass_ml += volWgtSumMF(lev,vars_new[lev][Vars::cons],Rho_comp,*mapfac_m[lev],true,true);
}
#else
for (int lev = 0; lev <= finest_level; lev++) {
Expand All @@ -51,18 +51,18 @@ ERF::sum_integrated_quantities (Real time)
});
}
if (lev == 0) {
mass_sl = volWgtSumMF(0,pert_dens,0,*mapfac_m[0],false,false);
mass_sl = volWgtSumMF(0,pert_dens,0,*mapfac_m[0],true,false);
}
mass_ml += volWgtSumMF(lev,pert_dens,0,*mapfac_m[lev],false,true);
mass_ml += volWgtSumMF(lev,pert_dens,0,*mapfac_m[lev],true,true);
} // lev
#endif

Real rhth_sl = volWgtSumMF(0,vars_new[0][Vars::cons], RhoTheta_comp,*mapfac_m[0],false,false);
Real scal_sl = volWgtSumMF(0,vars_new[0][Vars::cons],RhoScalar_comp,*mapfac_m[0],false,false);
Real rhth_sl = volWgtSumMF(0,vars_new[0][Vars::cons], RhoTheta_comp,*mapfac_m[0],true,false);
Real scal_sl = volWgtSumMF(0,vars_new[0][Vars::cons],RhoScalar_comp,*mapfac_m[0],true,false);

for (int lev = 0; lev <= finest_level; lev++) {
rhth_ml += volWgtSumMF(lev,vars_new[lev][Vars::cons], RhoTheta_comp,*mapfac_m[lev],false,true);
scal_ml += volWgtSumMF(lev,vars_new[lev][Vars::cons],RhoScalar_comp,*mapfac_m[lev],false,true);
rhth_ml += volWgtSumMF(lev,vars_new[lev][Vars::cons], RhoTheta_comp,*mapfac_m[lev],true,true);
scal_ml += volWgtSumMF(lev,vars_new[lev][Vars::cons],RhoScalar_comp,*mapfac_m[lev],true,true);
}

if (verbose > 0) {
Expand Down

0 comments on commit d8e0a1f

Please sign in to comment.