Skip to content

Commit 72be352

Browse files
authored
For implicit, set ng_fieldgather = ng_alloc_EB (#6435)
1 parent 2fd719c commit 72be352

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

Source/Parallelization/GuardCellManager.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -322,14 +322,6 @@ guardCellManager::Init (
322322
ng_afterPushPSATD = ng_alloc_EB;
323323
}
324324

325-
if (evolve_scheme == EvolveScheme::ThetaImplicitEM ||
326-
evolve_scheme == EvolveScheme::SemiImplicitEM ||
327-
evolve_scheme == EvolveScheme::StrangImplicitSpectralEM) {
328-
// For these implicit schemes, the number of ghost cells
329-
// for EB must be at least as many as those for J.
330-
ng_alloc_EB.max( ng_alloc_J );
331-
}
332-
333325
if (safe_guard_cells){
334326
// Run in safe mode: exchange all allocated guard cells at each
335327
// call of FillBoundary
@@ -379,4 +371,14 @@ guardCellManager::Init (
379371
ng_MovingWindow[moving_window_dir] = 1;
380372
}
381373
}
374+
375+
if (evolve_scheme == EvolveScheme::ThetaImplicitEM ||
376+
evolve_scheme == EvolveScheme::SemiImplicitEM ||
377+
evolve_scheme == EvolveScheme::StrangImplicitSpectralEM) {
378+
// For these implicit schemes, the number of ghost cells
379+
// for EB gather must be consistent with those for J.
380+
ng_alloc_EB.max( ng_alloc_J );
381+
ng_FieldGather.max( ng_alloc_J );
382+
}
383+
382384
}

0 commit comments

Comments
 (0)