Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FillPatch before tagging cells for regridding #2086

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Source/ERF_Tagging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,25 @@ ERF::ErrorEst (int levc, TagBoxArray& tags, Real time, int /*ngrow*/)
const int clearval = TagBox::CLEAR;
const int tagval = TagBox::SET;

//
// Make sure the ghost cells of the level we are tagging at are filled
// in case we take differences that require them
// NOTE: We are Fillpatching only the cell-centered variables here
//
MultiFab& S_new = vars_new[levc][Vars::cons];
MultiFab& U_new = vars_new[levc][Vars::xvel];
MultiFab& V_new = vars_new[levc][Vars::yvel];
MultiFab& W_new = vars_new[levc][Vars::zvel];
//
if (levc == 0) {
FillPatch(levc, time, {&S_new, &U_new, &V_new, &W_new});
} else {
FillPatch(levc, time, {&S_new, &U_new, &V_new, &W_new},
{&S_new, &rU_new[levc], &rV_new[levc], &rW_new[levc]},
base_state[levc], base_state[levc],
false, true);
}

for (int j=0; j < ref_tags.size(); ++j)
{
//
Expand Down
2 changes: 1 addition & 1 deletion Source/SourceTerms/ERF_MakeSources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ void make_sources (int level,
{
const Real t_blank = t_blank_arr(i, j, k);
cell_src(i, j, k, RhoTheta_comp) -= t_blank * CdT * U_s * (cell_data(i,j,k,RhoTheta_comp) - dptr_t_plane(k));
cell_src(i, j, k, Rho_comp) -= t_blank * CdT * U_s * (cell_data(i,j,k,Rho_comp) - dptr_r_plane(k));
cell_src(i, j, k, Rho_comp) -= t_blank * CdT * U_s * (cell_data(i,j,k,Rho_comp) - dptr_r_plane(k));
});
}

Expand Down
Loading