warp.fem.Tetmesh#
- class warp.fem.Tetmesh(
- tet_vertex_indices,
- positions,
- build_bvh=False,
- temporary_store=None,
Tetrahedral mesh geometry
- Parameters:
tet_vertex_indices (array)
positions (array)
build_bvh (bool)
temporary_store (TemporaryStore | None)
- __init__(
- tet_vertex_indices,
- positions,
- build_bvh=False,
- temporary_store=None,
Constructs a tetrahedral mesh.
- Parameters:
tet_vertex_indices (array) – warp array of shape (num_tets, 4) containing vertex indices for each tet
positions (array) – warp array of shape (num_vertices, 3) containing 3d position for each vertex
build_bvh (bool) – Whether to also build the tet BVH, which is necessary for the global fem.lookup operator to function without initial guess
temporary_store (TemporaryStore | None) – shared pool from which to allocate temporary arrays
Methods
__init__(tet_vertex_indices, positions[, ...])Constructs a tetrahedral mesh.
build_bvh([device])Rebuilds the geometry's Bounding Volume Hierarchy (BVH) for device from scratch.
bvh_id(device)cell_arg_value(device)cell_measure(args, s)Device function returning the measure determinant (e.g. volume, area) at a given point.
cell_normal(args, s)Device function returning the element normal at a sample point.
fill_cell_arg(args, device)fill_side_arg(args, device)fill_side_index_arg(args, device)make_filtered_cell_lookup([filter_func])side_arg_value(device)side_index_arg_value(device)side_inner_inverse_deformation_gradient(...)Device function returning the matrix right-transforming a gradient w.r.t.
side_measure(args, s)Device function returning the measure determinant (e.g. volume, area) at a given point.
side_measure_ratio(args, s)Device function returning the ratio of the measure of a side to that of its neighbour cells
side_normal(args, s)Device function returning the element normal at a sample point
side_outer_inverse_deformation_gradient(...)Device function returning the matrix right-transforming a gradient w.r.t.
supports_cell_lookup(device)update_bvh([device])Refits the geometry's BVH if it exists on device, or builds it from scratch otherwise.
Attributes
Structure containing arguments to be passed to device functions evaluating cell-related quantities
Structure containing arguments to be passed to device functions evaluating side-related quantities
Structure containing arguments to be passed to device functions for indexing sides
baseReturns the base geometry from which this geometry derives its topology.
cell_dimensionManifold dimension of the geometry cells
cell_lookupcell_measure_rationame- CellArg: Struct = <warp._src.codegen.Struct object>#
Structure containing arguments to be passed to device functions evaluating cell-related quantities
- SideArg: Struct = <warp._src.codegen.Struct object>#
Structure containing arguments to be passed to device functions evaluating side-related quantities
- SideIndexArg: Struct = <warp._src.codegen.Struct object>#
Structure containing arguments to be passed to device functions for indexing sides
- cell_position = <Function Tetmesh__cell_position(args: warp._src.fem.geometry.tetmesh.TetmeshCellArg, s: warp._src.fem.types.Sample)>#
- Parameters:
args (TetmeshCellArg)
s (Sample)
- cell_deformation_gradient = <Function Tetmesh__cell_deformation_gradient(args: warp._src.fem.geometry.tetmesh.TetmeshCellArg, s: warp._src.fem.types.Sample)>#
- Parameters:
args (TetmeshCellArg)
s (Sample)
- cell_inverse_deformation_gradient = <Function Tetmesh__cell_inverse_deformation_gradient(args: warp._src.fem.geometry.tetmesh.TetmeshCellArg, s: warp._src.fem.types.Sample)>#
- Parameters:
args (TetmeshCellArg)
s (Sample)
- cell_closest_point = <Function Tetmesh__cell_closest_point(args: warp._src.fem.geometry.tetmesh.TetmeshCellArg, tet_index: int, pos: vec3f)>#
- boundary_side_index = <Function Tetmesh__boundary_side_index(args: warp._src.fem.geometry.tetmesh.Tetmesh.SideIndexArg, boundary_side_index: int)>#
- Parameters:
args (SideIndexArg)
boundary_side_index (int)
- side_position = <Function Tetmesh__side_position(args: warp._src.fem.geometry.tetmesh.TetmeshSideArg, s: warp._src.fem.types.Sample)>#
- Parameters:
args (TetmeshSideArg)
s (Sample)
- side_closest_point = <Function Tetmesh__side_closest_point(args: warp._src.fem.geometry.tetmesh.TetmeshSideArg, tri_index: int, pos: vec3f)>#
- side_deformation_gradient = <Function Tetmesh__side_deformation_gradient(args: warp._src.fem.geometry.tetmesh.TetmeshSideArg, s: warp._src.fem.types.Sample)>#
- Parameters:
args (TetmeshSideArg)
s (Sample)
- side_inner_cell_index = <Function Tetmesh__side_inner_cell_index(arg: warp._src.fem.geometry.tetmesh.TetmeshSideArg, side_index: int)>#
- Parameters:
arg (TetmeshSideArg)
side_index (int)
- side_outer_cell_index = <Function Tetmesh__side_outer_cell_index(arg: warp._src.fem.geometry.tetmesh.TetmeshSideArg, side_index: int)>#
- Parameters:
arg (TetmeshSideArg)
side_index (int)
- face_to_tet_coords = <Function Tetmesh__face_to_tet_coords(args: warp._src.fem.geometry.tetmesh.TetmeshSideArg, side_index: int, tet_index: int, side_coords: vec3f)>#
- side_inner_cell_coords = <Function Tetmesh__side_inner_cell_coords(args: warp._src.fem.geometry.tetmesh.TetmeshSideArg, side_index: int, side_coords: vec3f)>#
- side_outer_cell_coords = <Function Tetmesh__side_outer_cell_coords(args: warp._src.fem.geometry.tetmesh.TetmeshSideArg, side_index: int, side_coords: vec3f)>#
- side_from_cell_coords = <Function Tetmesh__side_from_cell_coords(args: warp._src.fem.geometry.tetmesh.TetmeshSideArg, side_index: int, tet_index: int, tet_coords: vec3f)>#
- side_to_cell_arg = <Function Tetmesh__side_to_cell_arg(side_arg: warp._src.fem.geometry.tetmesh.TetmeshSideArg)>#
- Parameters:
side_arg (TetmeshSideArg)
- cell_bvh_id = <Function Tetmesh__cell_bvh_id(cell_arg: warp._src.fem.geometry.tetmesh.TetmeshCellArg)>#
- Parameters:
cell_arg (TetmeshCellArg)