[Paraview] volume vs volume

Scott, W Alan wascott at sandia.gov
Tue Feb 14 18:39:17 EST 2017


Hi all,
I was trying to find volume for a user, and started wondering if the user wanted volume of the dataset, or volume of each cell.  Turns out that there is incorrect information on the list.  I believe the following is true:




Volume of the dataset:

  Python Calculator.  Expression: volume(inputs[0]).  Array Name: totalVolume.  Apply.




Volume of each cell:
  Programmable Filter.  Script, then Apply:

from vtk.numpy_interface import algorithms as algs

volume = algs.volume(inputs[0])
output.CellData.append(volume, 'volumeOfEachCell')




Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170214/1f8a8326/attachment.html>


More information about the ParaView mailing list