DataSetFilters.integrate_data#
- DataSetFilters.integrate_data(*, progress_bar: bool = False) UnstructuredGrid[source]#
Integrate point and cell data.
Area or volume is also provided in point data.
This filter uses vtkIntegrateAttributes.
- Parameters:
- Returns:
pyvista.UnstructuredGridMesh with 1 point and 1 vertex cell with integrated data in point and cell data.
Examples#
Download Python source code | Download Jupyter notebook
Integrate data on a sphere mesh.
>>> import pyvista as pv
>>> import numpy as np
>>> sphere = pv.Sphere(theta_resolution=100, phi_resolution=100)
>>> sphere.point_data['data'] = 2 * np.ones(sphere.n_points)
>>> integrated = sphere.integrate_data()
There is only 1 point and cell, so access the only value.
>>> integrated['Area'][0]
np.float64(3.14)
>>> integrated['data'][0]
np.float64(6.28)
Used In#
Gallery Examples