ECP-WarpX / WarpX

WarpX is an advanced electromagnetic & electrostatic Particle-In-Cell code.
https://ecp-warpx.github.io
Other
301 stars 191 forks source link

Prevent situations where the number of guard cells is larger than the number of cells of an individual box #1220

Open RemiLehe opened 4 years ago

RemiLehe commented 4 years ago

When spectral solvers, the number of guard cells can be quite large. When using domain decomposition, we can sometimes end up in a situation for which the number of physical cells in individual boxes is lower than the number of guard cells.

In this case, my understanding is that the code is incorrect, because it only considers guard cells communications with nearest-neighbors boxes, while in the above-mentioned situation the guard cells can also overlap with next-nearest-neighbors.

@atmyers @WeiqunZhang Is that also your understanding? If yes, is there an easy way to add a safe-guard against this, within amrex? One way that I can think of is to impose that the bocking_factor should always be larger than the number of guard cells? Does that seem reasonable?

WeiqunZhang commented 4 years ago

The guard cell communication should work even if the number of guard cells is larger then the length of valid boxes.

Yes, one could use blocking_factor to make sure the boxes are bigger than a certain size.