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

Carpet: Added PreSync support in regrid #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
20 changes: 20 additions & 0 deletions Carpet/src/Evolve.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,26 @@ void CallRegrid(cGH *const cctkGH) {
ENTER_LEVEL_MODE(cctkGH, rl) {
BeginTimingLevel(cctkGH);

int num_groups = CCTK_NumGroups();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation is all wrong

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has not been applied, and the indentation is still all wrong.

for (int gi=0; gi<num_groups; gi++) {
int gtype = CCTK_GroupTypeI(gi);
// int storage = CCTK_QueryGroupStorageI(cctkGH, gi);
if (gtype == CCTK_GF) {// && storage>0) {
int num_vars = CCTK_NumVarsInGroupI(gi);
int tls = CCTK_ActiveTimeLevelsGI(cctkGH, gi);
int first_var = CCTK_FirstVarIndexI(gi);
for (int vi=0; vi<num_vars; vi++) {
int varindex = vi + first_var;
for (int tl=0; tl<tls; tl++) {
int valid = Driver_GetValidRegion(cctkGH, varindex, tl);
if (!(valid==CCTK_VALID_NOWHERE) ){
Driver_SetValidRegion(cctkGH, varindex, tl, CCTK_VALID_INTERIOR);
}
}
}
}
}

do_early_global_mode = not have_done_early_global_mode;
do_late_global_mode = reflevel == reflevels - 1;
do_early_meta_mode =
Expand Down