[petsc-users] PETSc / AMRex

Jed Brown jed at jedbrown.org
Fri Jul 15 14:40:20 CDT 2022


Matthew Knepley <knepley at gmail.com> writes:

>> I currently set up a 3D DMDA using a box stencil and a stencil width of 2.
>> The i,j,k coordinates refer both to the cell (where there is a physical
>> value assigned) and to the 3 edges of the cell at the top SW corner.
>> For local computations, I need to be able to access the values up to +/- 2
>> grid points away.
>>
>> I don’t really refer to the faces since that is implicitly included in the
>> curl-curl formulation I am solving.
>>
>> Is this what you are asking for?
>>
>
> Yes. Unfortunately, this is hard. The topological definitions are all
> local, so even 1 layer of cells is awkward, but 2 layers
> would be harder. With adaptivity, it gets harder still.
>
> My approach, with Abhishek and Dave Salac, has been to preprocess all
> stencils and store them. Since p4est assumes
> a Cartesian topology, it might be easier to directly use the p4est
> traversal. Toby might be better at explaining that.

Randall, do you want a single globally structured block or could you have a classical structured discretization inside each hex "element" (one or more per process) with interface conditions?


More information about the petsc-users mailing list