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

Instability when Filling Guard Cells with Inverse FFTs #2035

Closed
EZoni opened this issue Jun 25, 2021 · 3 comments · Fixed by #2045
Closed

Instability when Filling Guard Cells with Inverse FFTs #2035

EZoni opened this issue Jun 25, 2021 · 3 comments · Fixed by #2045
Labels
bug: affects latest release Bug also exists in latest release version bug Something isn't working component: spectral Spectral solvers (PSATD, IGF)

Comments

@EZoni
Copy link
Member

EZoni commented Jun 25, 2021

The issue was originally reported by @NeilZaim.

There seem to be problems when we fill the guard cells with inverse FFTs in simulations using the PSATD solver. Here's a 2D input script that reproduces the issue: inputs_2d.txt.

By replacing, on the current development branch (4e8eba6), mf_box with mfi.validbox() in

ParallelFor(mf_box, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept

one can see that the instability is fixed by not filling the guard cells with inverse FFTs (see figures below, standard diags and raw data with guard cells).

Additional observations: (i) the issue occurs also without PMLs and (ii) the issue does not occur with periodic boundary conditions.

A possible workaround for now is to make the feature of filling the guard cells with inverse FFTs (i) optional and (ii) OFF by default, unless with moving window and field damping.

@EZoni EZoni added the component: spectral Spectral solvers (PSATD, IGF) label Jun 25, 2021
@EZoni
Copy link
Member Author

EZoni commented Jun 26, 2021

As commented on Slack:
I wonder if we should simply damp the fields in all directions with non-periodic PSATD, instead of only in the moving window direction (aka no direction in this particular test)?
Otherwise the FFTs "wrap around" if there are non-zero values in the last cells...which I think is why we needed damping in the non-periodic direction of the moving window, indeed.

@ax3l ax3l added bug Something isn't working bug: affects latest release Bug also exists in latest release version labels Jun 28, 2021
@ax3l ax3l mentioned this issue Jul 1, 2021
2 tasks
@ax3l
Copy link
Member

ax3l commented Jul 1, 2021

A draft for a fix is opened in #2045

@ax3l
Copy link
Member

ax3l commented Jul 1, 2021

X-ref: appeared after #1867

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: affects latest release Bug also exists in latest release version bug Something isn't working component: spectral Spectral solvers (PSATD, IGF)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants