warp.fem.Nanogrid#
- class warp.fem.Nanogrid(grid, temporary_store=None, scalar_type=warp.float32)[source]#
Sparse grid geometry.
- Parameters:
grid (Volume)
temporary_store (TemporaryStore | None)
scalar_type (type)
- __init__(
- grid,
- temporary_store=None,
- scalar_type=warp.float32,
Construct a sparse grid geometry from an in-memory NanoVDB volume.
- Parameters:
grid (Volume) – The NanoVDB volume. Any type is accepted, but for indexing efficiency an index grid is recommended. If
gridis an"on"index grid, cells will be created for active voxels only, otherwise cells will be created for all leaf voxels.temporary_store (TemporaryStore | None) – shared pool from which to allocate temporary arrays
scalar_type (type) – Scalar type for grid coordinates (
warp.float32orwarp.float64)
Methods
__init__(grid[, temporary_store, scalar_type])Construct a sparse grid geometry from an in-memory NanoVDB volume.
boundary_side_count()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)cell_count()fill_cell_arg(arg, device)fill_side_arg(arg, device)fill_side_index_arg(arg, device)make_filtered_cell_lookup([filter_func])reference_cell()reference_side()side_arg_value(device)side_count()side_deformation_gradient(args, s)Device function returning the gradient of world position with respect to reference side
side_index_arg_value(device)side_normal(args, s)Device function returning the element normal at a sample point
supports_cell_lookup(device)update_bvh([device])Refit the geometry's BVH if it exists on
device, or build it from scratch otherwise.vertex_count()Attributes
FACE_AXIS_MASKFACE_INNER_OFFSET_BITFACE_OUTER_OFFSET_BITGRID_AXIS_FLAGSideIndexArgStructure containing arguments to be passed to device functions for indexing sides.
baseReturn the base geometry from which this geometry derives its topology.
boundary_side_indexcell_dimensionManifold dimension of the geometry cells
cell_gridcell_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.
dimensionDimension of the embedding space.
face_gridnameName of the geometry, including scalar type suffix for non-default precision.
sample_typeWarp struct type for samples matching this geometry's scalar precision.
scalar_typetransformTransform matrix mapping index to world space.
vertex_gridCellArgStructure 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.
- cell_position = <Function Nanogrid__cell_position(args: Any, s: Any)>#
- cell_deformation_gradient = <Function Nanogrid__cell_deformation_gradient(args: Any, s: Any)>#
- cell_inverse_deformation_gradient = <Function Nanogrid__cell_inverse_deformation_gradient(args: Any, s: Any)>#
- cell_coordinates = <Function Nanogrid__cell_coordinates(args: Any, cell_index: int, pos: Any)>#
- cell_closest_point = <Function Nanogrid__cell_closest_point(args: Any, cell_index: int, pos: Any)>#
- side_position = <Function Nanogrid__side_position(args: Any, s: Any)>#
- side_inner_inverse_deformation_gradient = <Function Nanogrid__side_inner_inverse_deformation_gradient(args: Any, s: Any)>#
- side_outer_inverse_deformation_gradient = <Function Nanogrid__side_outer_inverse_deformation_gradient(args: Any, s: Any)>#
- side_measure_ratio = <Function Nanogrid__side_measure_ratio(args: Any, s: Any)>#
- side_inner_cell_index = <Function Nanogrid__side_inner_cell_index(args: Any, side_index: int)>#
- side_outer_cell_index = <Function Nanogrid__side_outer_cell_index(args: Any, side_index: int)>#
- side_inner_cell_coords = <Function Nanogrid__side_inner_cell_coords(args: Any, side_index: int, side_coords: Any)>#
- side_outer_cell_coords = <Function Nanogrid__side_outer_cell_coords(args: Any, side_index: int, side_coords: Any)>#
- side_from_cell_coords = <Function Nanogrid__side_from_cell_coords(args: Any, side_index: int, element_index: int, element_coords: Any)>#
- side_coordinates = <Function Nanogrid__side_coordinates(args: Any, side_index: int, pos: Any)>#