AMReX-Codes / amrex

AMReX: Software Framework for Block Structured AMR
https://amrex-codes.github.io/amrex
Other
530 stars 343 forks source link

periodicity of face centred data #327

Closed darylbond closed 1 month ago

darylbond commented 5 years ago

I am implementing a face-centred solver and am having some issues with setting periodic domains. Essentially the problem is repeated data at the periodic boundary. An example is given below for a domain with 8 cells and 5 ghost cells initialised with the x-index of each face.

Initial face data: [0 0 0 0 0 0 1 2 3 4 5 6 7 8 0 0 0 0 0]

Periodic face data: [4 5 6 7 8 8 1 2 3 4 5 6 7 8 8 1 2 3 4]

What I actually want: [3 4 5 6 7 0 1 2 3 4 5 6 7 8 1 2 3 4 5]

This is all through the FillPatch routine working on face-centred state data. For reference I am using the EB/CNS tutorial as the basis for my implementation.

Any suggestions?

akashdhruv commented 2 years ago

I am testing this right now, and running into some issues. Need to discuss with @kweide before I can provide more details. Please don't close this issue

akashdhruv commented 1 year ago

I found a bug with amrex_fillpatch_two_faces when running a test in 2D mode. The multifab array, mf for face variables in each dimension returns identical values.

akashdhruv commented 1 year ago

Here is a figure for reference. It looks like the data from JAXIS multifab is copied to IAXIS multifab when remaking a level.

Presentation1

akashdhruv commented 11 months ago

I think this issue can be closed. There are still some issues with divergence free interpolation that I am investigating here:

https://github.com/Lab-Notebooks/AMReX-Divfree

When I have updates I will re-open the issue.