warp.fem.Grid3D#
- class warp.fem.Grid3D(res, bounds_lo=None, bounds_hi=None, scalar_type=warp.float32)[source]#
Three-dimensional regular grid geometry.
- __init__(
- res,
- bounds_lo=None,
- bounds_hi=None,
- scalar_type=warp.float32,
Construct a dense 3D grid.
- Parameters:
res (vec3i) – Resolution of the grid along each dimension
bounds_lo (vec3f | None) – Position of the lower bound of the axis-aligned grid
bounds_hi (vec3f | None) – Position of the upper bound of the axis-aligned grid
scalar_type (type) – Scalar type for grid coordinates (
warp.float32orwarp.float64)
Methods
__init__(res[, bounds_lo, bounds_hi, ...])Construct a dense 3D grid.
build_bvh([device])Rebuild the geometry's Bounding Volume Hierarchy (BVH) for
devicefrom scratch.bvh_id(device)Return the BVH identifier for the given device, or
0if unavailable.cell_arg_value(device)fill_cell_arg(args, device)fill_side_arg(args, device)Fill the arguments to be passed to side-related device functions
fill_side_index_arg(args, device)Fill the arguments to be passed to side-related device functions
make_filtered_cell_lookup([filter_func])Create a filtered cell lookup function.
side_arg_value(device)side_index_arg_value(device)supports_cell_lookup(device)update_bvh([device])Refit the geometry's BVH if it exists on
device, or build it from scratch otherwise.Attributes
baseReturn the base geometry from which this geometry derives its topology.
cell_dimensionManifold dimension of the geometry cells
cell_lookupDevice function for looking up the closest cell to a position.
cell_measure_ratiocoords_typeWarp vector type for element coordinates matching this geometry's scalar precision.
Dimension of the embedding space.
nameName of the geometry, including scalar type suffix for non-default precision.
sample_typeWarp struct type for samples matching this geometry's scalar precision.
CellArgStructure containing arguments to be passed to device functions evaluating cell-related quantities.
SideArgStructure containing arguments to be passed to device functions evaluating side-related quantities.
SideIndexArgStructure containing arguments to be passed to device functions for indexing sides.
- property extents#
- property cell_size#
- property strides#
- cell_index = <Function Grid3D__cell_index(res: vec3i, cell: vec3i)>#
- get_cell = <Function Grid3D__get_cell(res: vec3i, cell_index: int)>#
- Side = <warp._src.codegen.Struct object>#
- boundary_side_index = <Function Grid3D__boundary_side_index(args: Any, boundary_side_index: int)>#
- cell_deformation_gradient = <Function Grid3D__cell_deformation_gradient(args: Any, s: Any)>#
- cell_inverse_deformation_gradient = <Function Grid3D__cell_inverse_deformation_gradient(args: Any, s: Any)>#
- cell_coordinates = <Function Grid3D__cell_coordinates(args: Any, cell_index: int, pos: Any)>#
- cell_closest_point = <Function Grid3D__cell_closest_point(args: Any, cell_index: int, pos: Any)>#
- side_deformation_gradient = <Function Grid3D__side_deformation_gradient(args: Any, s: Any)>#
- side_inner_inverse_deformation_gradient = <Function Grid3D__side_inner_inverse_deformation_gradient(args: Any, s: Any)>#
- side_outer_inverse_deformation_gradient = <Function Grid3D__side_outer_inverse_deformation_gradient(args: Any, s: Any)>#
- side_measure_ratio = <Function Grid3D__side_measure_ratio(args: Any, s: Any)>#
- side_inner_cell_index = <Function Grid3D__side_inner_cell_index(arg: Any, side_index: int)>#
- side_outer_cell_index = <Function Grid3D__side_outer_cell_index(arg: Any, side_index: int)>#
- side_inner_cell_coords = <Function Grid3D__side_inner_cell_coords(args: Any, side_index: int, side_coords: Any)>#
- side_outer_cell_coords = <Function Grid3D__side_outer_cell_coords(args: Any, side_index: int, side_coords: Any)>#
- side_from_cell_coords = <Function Grid3D__side_from_cell_coords(args: Any, side_index: int, element_index: int, element_coords: Any)>#
- side_coordinates = <Function Grid3D__side_coordinates(args: Any, side_index: int, pos: Any)>#
- side_closest_point = <Function Grid3D__side_closest_point(args: Any, side_index: int, pos: Any)>#