pyvista.examples.cells.QuadraticTetrahedron

pyvista.examples.cells.QuadraticTetrahedron#

QuadraticTetrahedron() UnstructuredGrid[source]#

Create a pyvista.UnstructuredGrid containing a single quadratic tetrahedron.

This cell corresponds to the pyvista.CellType.QUADRATIC_TETRA cell type.

Returns:
pyvista.UnstructuredGrid

UnstructuredGrid containing a single quadratic tetrahedron.

Examples

Create and plot a single quadratic tetrahedron.

>>> from pyvista import examples
>>> grid = examples.cells.QuadraticTetrahedron()
>>> examples.plot_cell(grid)

List the grid’s cells.

>>> grid.cells
array([10,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9])

List the grid’s points.

>>> grid.points
pyvista_ndarray([[0. , 0. , 0. ],
                 [1. , 0. , 0. ],
                 [0. , 1. , 0. ],
                 [0. , 0. , 1. ],
                 [0.5, 0. , 0. ],
                 [0.5, 0.5, 0. ],
                 [0. , 0.5, 0. ],
                 [0. , 0. , 0.5],
                 [0.5, 0. , 0.5],
                 [0. , 0.5, 0.5]])
>>> grid.celltypes  # same as pyvista.CellType.QUADRATIC_TETRA
array([24], dtype=uint8)
../../../_images/pyvista-examples-cells-QuadraticTetrahedron-1_00_00.png