Periodic boundaries with edge variables in the SStruct interface
I'm working on a solver using the SStruct interface for edge aligned fields on an AMR grid. I am running into an issue when setting the grid periodicity, but have parts that don't have a cell at the periodic extent. It looks like this code in [sstruct_grid.c](https://github.com/hypre-space/hypre/blob/master/src/sstruct_mv/sstruct_grid.c#L398) truncates based on `cell_imax` rather than `periodic`, which is what I would have expected.
Here is a cartoon that I think expresses the case. I have 2 parts at different AMR levels, where the grid is periodic in the horizontal direction. In part 0 I have two boxes with a max x-extent of 4, but I want it to be periodic with 8, but there are no boxes on the right side, being occupied by the 8 boxes on part 1. It seems the z-edges at index 4 (red x) are being truncated by the above linked code (`cell_imax` is 4 for part 0).
<img width="583" height="933" alt="Image" src="https://github.com/user-attachments/assets/cce33ea3-453f-4ccf-9b62-987200acc355" />
Is this the intended behavior, and are there any suggestions for how to handle this?
Thanks in advance!
4 条评论