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

Periodicity with multiple layers of ghost nodes #4045

Open
bsrunnels opened this issue Jul 23, 2024 · 2 comments
Open

Periodicity with multiple layers of ghost nodes #4045

bsrunnels opened this issue Jul 23, 2024 · 2 comments
Assignees
Labels

Comments

@bsrunnels
Copy link
Contributor

Right now periodicity is not possible if there are two or more ghost nodes (i.e. if FabArrayBase::m_multi_ghost is true) - per

AMREX_ASSERT(m_multi_ghost ? !m_period.isAnyPeriodic() : true); // this only works for non-periodic

Is it possible to update FabArrayBase to allow for periodicity with multiple layers of ghost nodes?

@WeiqunZhang
Copy link
Member

Sorry for taking me so long to reply. The issue is this line

https://github.com/AMReX-Codes/amrex/blame/b6ed5237987e1d5babda45a606baa6074e426272/Src/Base/AMReX_FabArrayBase.cpp#L705

complementIn is used to remove all the valid points from B ox dst_bx_ng. But the function does not take periodic boundaries into account. It's possible to do that. So let's keep this issue open. I will try to implement it. Meanwhile, you could achieve it by calling FillBoundary twice. First with multi_ghost=true and no periodic boundaries, and then with multi_ghost=false and periodic boundaries.

@bsrunnels
Copy link
Contributor Author

Thanks @WeiqunZhang. I'll keep an eye on the issue, but will implement your temporary fix when/if we need periodicity working quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants