[Paraview] [EXTERNAL] python calculator confusion

Scott, W Alan wascott at sandia.gov
Fri Jun 17 16:26:32 EDT 2016


Wow, you’re an animal.  Good job.

I'm working back from a amr cth problem.  Basically, my user is trying to do data analysis on a volume of hot gas.  He ran the simulation, and the simulation and ParaView are telling him different things.  So, I took the Dave's Small CTH dataset, which starts as a smashed sphere.  I can guess the diameter, thus can guess the radius, thus can guess the volume.  And, when I used the python calculator on that, once again, I got bad results.  From there, I backed up to Wavelet, hoping for some sanity.  

I will rerun my test, remembering to set Cell Data.   Good point, I bet I messed up.

Seems to me that even more than supporting all or at least most cell types, we need to never provide wrong data.  We can coordinate off line to get this fixed.

Alan

-----Original Message-----
From: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com] 
Sent: Thursday, June 16, 2016 9:59 PM
To: Scott, W Alan <wascott at sandia.gov>
Cc: paraview at paraview.org
Subject: Re: [Paraview] [EXTERNAL] python calculator confusion

Here's what I found:

1. Make sure you set "Array Association" on "Python Calculator" to "Cell Data".
2. The volume() code internally uses vtkCellQuality filter. Now, when I debugged into it, I see that is doesn;t support voxel cell types -- the cells produced by vtkImageData. Now is there are reason for that, I don't know. I will have to dig deeper, but just stating things I see here. For cases where it doesn't know support the cell type, the filter just puts out -1. And the "result" I am getting is indeed just
-1 for all cells.
3. If I instead apply the Tetrahedralize filter before apply Python Calculator, I get the right cell volume since the filter seems to support tets, triangle, triangle strip, quad, and hexahedron. Why only these -- I'll need to check with original developers as I don't know.

So the question is what is type of dataset you're originally trying to use. Is it unstructured grid with the above listed cell types? If yes, the Python Calculator should work. If not, we need another solution.
As far as I can tell there's no filter that computes volume for any kind of cell.

Utkarsh


More information about the ParaView mailing list