Diagonal slice of contour plot is jagged #19687
-
The setupI have 3D, zone-centered, density data scaled from 0 at the top of the domain to 1 at the bottom of the domain. This data represents a stable stratification with small deviations, so there are no overturns or turbulent regions -- the data is smooth. I want to take a cross-section, 45 degrees in the xy-plane through the diagonal and then look at the contour corresponding to a density of 0.5. The problemWhen I do this using a Contour plot and a Slice operator, the resulting contour is jagged even though the data is smooth. Interestingly, this only happens when my slice is diagonal and not parallel to the coordinate lines. Here is an image of the problem. And here is an image of my pipeline and how I sliced the domain. I've tried slicing a pseudocolor plot with an isosurface operator, as suggested in #10173. The results are identical. I also tried resampling as suggested in several post. Resampling flattens the lines far from the density perturbation, but completely ruins the perturbation itself. which should be a smooth wave of depression. My data uses AMR, which is why there are multiple contours near the density perturbation. We can ignore that for now. The main problem is that far from the density feature, the contour should be dead flat. Does anyone have an idea of why this is happening? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
I think you want to recenter the data from zones to nodes. Use just a pseudocolor plot at first and no other operators but in the pseudocolor plot attributes, you will see a Centering options with I believe the issue is that zone-centered data is by its very nature "jagged". It is a piecewise constant function over each zone. Within a zone is it very smooth. Its actually perfectly flat and unvarying. However, as you cross between zones, the underlying "field" (or "function") being numerically represented has a step (or jaggy) in it. This is unavoidable due to the basis functions zone-centered data implies. I imagine the problem is even more pronounced on oblique slices too. By re-centering to the nodes, you are basically changing it to a node-centered field which then has no "steps" between zones and so looks smoother. |
Beta Was this translation helpful? Give feedback.
-
Thanks, Mark. There is no contour operator that I can apply to a pseudocolor plot. So, to give your suggestion a try, I followed your recommendation with an isosurface operator applied to the sliced pseudocolor plot. Unfortunately, I get the exact same jagged results. For the record, when I make the pseudocolor plot nodal and apply a resampling operator before the isosurface, here is what I get. Ed |
Beta Was this translation helpful? Give feedback.
-
Hmmm...ok, forget the Centering option in the Pseudocolor plot attributes. Just add Pseudocolor plot and then add Iso-surface operator (found under Operators->Slicing->Isosurface. I think the Iso-surface operator is smart enough to recent zone-centered data to nodes automatically. |
Beta Was this translation helpful? Give feedback.
Ok, thanks for data and pictures of results. I believe my assessement is correct. But, the approaches I have suggested to correct I guess were not appropriate for this dataset.
Time to take out the sledge hammer 🔨.
Use VisIt's expression system to create a new, node-centered version of
density
using the expressionrecenter(<density>,"nodal")
calleddensity_nodal
. Use that variable instead ofdensity
. That will force a recentering to the nodes and give you smooth contours as you sand see below