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

Decrease number of guard cells allocated as a function of interpolation order #2336

Open
wants to merge 19 commits into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7d3a175
Decrease number of guard cells allocated as a function of interpolati…
NeilZaim Sep 24, 2021
cd37520
Update by how much we grow the guard cells in PEC BC
NeilZaim Sep 24, 2021
7a746a1
Update average galilean test benchmark
NeilZaim Sep 24, 2021
58221b2
Update LaserAccelerationBoost and PEC_particle benchmarks
NeilZaim Sep 28, 2021
d42bcfa
Merge remote-tracking branch 'upstream/development' into AllocateFewe…
NeilZaim Sep 28, 2021
0a93c54
Revert "Update LaserAccelerationBoost and PEC_particle benchmarks"
NeilZaim Jun 20, 2022
3eca4af
Revert "Update average galilean test benchmark"
NeilZaim Jun 20, 2022
40a523e
Revert "Update by how much we grow the guard cells in PEC BC"
NeilZaim Jun 20, 2022
2903322
Merge remote-tracking branch 'upstream/development' into AllocateFewe…
NeilZaim Jun 20, 2022
3d136cb
Merge remote-tracking branch 'upstream/development' into AllocateFewe…
NeilZaim Jun 23, 2022
fb4a6be
Update benchmarks
NeilZaim Jun 23, 2022
63519aa
Fix typo in benchmark
NeilZaim Jun 23, 2022
1953392
Fix other typo in tests
NeilZaim Jun 23, 2022
eb23f1e
Merge remote-tracking branch 'upstream/development' into AllocateFewe…
NeilZaim Aug 5, 2022
93f2d04
Merge remote-tracking branch 'upstream/development' into AllocateFewe…
NeilZaim Aug 9, 2022
fb73a0f
Update NCI benchmarks
NeilZaim Aug 9, 2022
8acd6b0
Merge branch 'development' of https://github.com/ECP-WarpX/WarpX into…
EZoni Sep 16, 2024
76c4e33
Fix merge
EZoni Sep 16, 2024
6961a1e
Cleanup
EZoni Sep 16, 2024
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
15 changes: 8 additions & 7 deletions Source/Parallelization/GuardCellManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ guardCellManager::Init (
const bool use_filter,
const amrex::IntVect& bilinear_filter_stencil_length)
{
constexpr int FGcell[4] = {0,1,1,2}; // Index is nox

// When using subcycling, the particles on the fine level perform two pushes
// before being redistributed ; therefore, we need one extra guard cell
// (the particles may move by 2*c*dt)
int ngx_tmp = (max_level > 0 && do_subcycling) ? nox+1 : nox;
int ngy_tmp = (max_level > 0 && do_subcycling) ? nox+1 : nox;
int ngz_tmp = (max_level > 0 && do_subcycling) ? nox+1 : nox;
int ngx_tmp = (max_level > 0 && do_subcycling) ? FGcell[nox]+1 : FGcell[nox];
int ngy_tmp = (max_level > 0 && do_subcycling) ? FGcell[nox]+1 : FGcell[nox];
int ngz_tmp = (max_level > 0 && do_subcycling) ? FGcell[nox]+1 : FGcell[nox];

const bool galilean = (v_galilean[0] != 0. || v_galilean[1] != 0. || v_galilean[2] != 0.);
const bool comoving = (v_comoving[0] != 0. || v_comoving[1] != 0. || v_comoving[2] != 0.);
Expand Down Expand Up @@ -307,12 +309,11 @@ guardCellManager::Init (
ng_MovingWindow = ng_alloc_EB;
}
} else {
// Compute number of cells required for Field Gather:
// When increasing the shape by order by one, support of the shape
// Compute number of guard cells required for field gather:
// when increasing the shape order by one, the support of the shape
// factor grows symmetrically by half a cell on each side. So every
// +2 orders, one touches one more cell point.
int const FGcell = (nox + 1) / 2; // integer division
auto ng_FieldGather_noNCI = IntVect(AMREX_D_DECL(FGcell,FGcell,FGcell));
auto ng_FieldGather_noNCI = amrex::IntVect(AMREX_D_DECL(FGcell[nox], FGcell[nox], FGcell[nox]));
ng_FieldGather_noNCI = ng_FieldGather_noNCI.min(ng_alloc_EB);

// If NCI filter, add guard cells in the z direction
Expand Down
Loading