Visualization of non-uniform geometry #4389
-
Hi. I have a specific visualization requirement for AMReX that involves non-uniform cell size distribution. Within each AMReX box (where the number of cells is guaranteed to be a multiple of 5), I want to group cells into sets of 5 and apply a fixed non-uniform size pattern to each group. For instance, if the standard cell size is dx, each group would follow a pattern like [dx/4, dx/2, 3*dx/2, dx/2, dx/4]. This pattern would repeat consistently across all groups within the box. It's important to note that this non-uniform grid arrangement is purely for visualization purposes. The actual numerical computations would continue to use logically uniform indices, maintaining the standard AMReX computational framework. However, I've observed that AMReX typically supports only uniform cell sizes within a box. I'm wondering if there's a built-in solution or workaround in AMReX to accommodate such non-uniform cell size distributions while preserving the logical uniformity for computations? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
I wonder if you can interpolate the data to uniform mesh for visualization purposes. |
Beta Was this translation helpful? Give feedback.
Maybe what you are looking for is something like https://github.com/erf-model/ERF/blob/406bf830013e065e7ffe58275462a2d5ebd4c63d/Source/IO/ERF_Plotfile.cpp#L1638. In that ERF function, I think, mf_nd stores the physical locations of nodes. You also need to store some information in the plotfile header. https://github.com/erf-model/ERF/blob/406bf830013e065e7ffe58275462a2d5ebd4c63d/Source/IO/ERF_Plotfile.cpp#L1725. Then you can use Paraview for visualization. https://erf.readthedocs.io/en/latest/Visualization.html#paraview
@asalmgren can tell you more. If you need more help, you could also ask for help on ERF's github.