AMReX output contour plot

Hi,

I have a question using the AMReX type output in ParaView. This format has meta data and real data stored in multiple files. The slices works well, but not the contour filter.

For example, if I use one variable Bz=0 as the criterion for the isosurface, I get

Clearly one can see gaps on the isosurface. Previously I have tried the same contour with the VTU output format, and it works perfectly fine. What is the issue with the AMReX format with the contour filter?

Do you have a sample dataset to share? The issue could be related to AMR, but would be easier to confirm with a sample dataset.

Here is the sample data:
AMReX output

For what I can tell, looks like the data does not have ghost cells that’s what’s causing the contouring to have artifacts across boundaries.

@berkgeveci, is that expected? I can’t find a filter that generates ghost cells for AMR datasets. Do we have such a filter?

Is this specific to my output, or AMReX type grid data in general?

For my understanding, this is an issue with the type of dataset this reader genereates i.e vtkOverlappingAMR. There are no ghost cells between levels or datasets in this file and hence cell-to-point has errors at boundaries which then become apparent when the contour is applied. The fix would be to generate ghost cells. From what I can tell, there’s no way currently in ParaView to generate such ghost cells for AMR datasets.

I’ve reported an issue here.

As a side note, VisIt can successfully produce the surface contour for our purpose, so this should be achievable.

Are you using CellDataToPointData ?

Can you precise the filters in user or share a statefile ?

Are you asking about the filter I used to generate the first plot? I think there I only applied the contour filter.

Yes, this is my question.

Your dataset contains only CellData, on which the vanilla Contour filter can’t work on directly.

Now I remember what I did. Since there is no PointData directly for the contour filter, I turned on the Auto Convert Properties settings in the Data Processing Options. Then I can select Bz and draw a isosurface of Bz=0, and you can see the glitches.

Right, AutoConvertProperties does rely on CellDataToPointData internally.

IMO this issue is caused by the CellDataToPointData not supporting AMR correctly.

1 Like

I see. It’s good to know the cause! Do you know if there is a quick fix for this issue?

Im afraid not. I’m looking into the complex fix now.

One thing I forgot to point out about the sample data: even though it is stored in AMReX format which in principle supports AMR, this specific dataset does not have mesh refinement included. It was an output from multiple MPI processes. I guess to solve this issue, the CellDataToPointData has to reimplemented somehow to support general AMR dataset.

1 Like

So i’ve been looking into this more deeply. There is just no way to have PointData on a AMR dataset while ensuring continuity of interpolation between rafinement levels, the CellDataToPointData filter is already taking GhostCells into account but can’t do magic.

There is two ways to fix this:

  • Add a AMRToUnstructuredGrid filter that would connect the refinement level together. Nice to have but of course out of the question with big AMR datasets
  • Stop trying to use PointData for the contour and extend the AMR contour filter so that it works with OverlappingAMR, not only with Non-Overlapping AMR.

Reading your last post, this may be a case of missing ghost cells since you do not have any rafinement level.

1 Like

Thanks for looking more into this! I am not very familiar with AMReX data structure, so I don’t know if there is any ghost cell stored. Do you consider it easier to solve it by modifying AMReX output, or by implementing the proposed filters in ParaView? If it is quicker to take advantage of what’s already available in ParaView, I can try to contact AMReX developers to see if they can help.

That’s a @olearypatrick question I think.