cherab.imas.math.tetrahedralize.calculate_tetra_volumeΒΆ
- cherab.imas.math.tetrahedralize.calculate_tetra_volume(vertices, tets)ΒΆ
Calculate the volume of tetrahedra.
- Parameters:
- Returns:
Volume of tetrahedra.
- Return type:
Examples
>>> vertices = np.array([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]) >>> tetras = np.array([[0, 1, 2, 3]], dtype=np.int32) >>> calculate_tetra_volume(vertices, tetras) 0.16666666666666666