warp.fem.Nanogrid#

class warp.fem.Nanogrid(grid, temporary_store=None)[source]#

Sparse grid geometry

Parameters:
__init__(grid, temporary_store=None)[source]#

Constructs 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 grid is 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

Methods

__init__(grid[, temporary_store])

Constructs a sparse grid geometry from an in-memory NanoVDB volume.

boundary_side_count()

build_bvh([device])

Rebuilds the geometry's Bounding Volume Hierarchy (BVH) for device from scratch.

bvh_id(device)

cell_arg_value(device)

cell_count()

edge_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_index_arg_value(device)

supports_cell_lookup(device)

update_bvh([device])

Refits the geometry's BVH if it exists on device, or builds it from scratch otherwise.

vertex_count()

Attributes

CellArg

Structure containing arguments to be passed to device functions evaluating cell-related quantities

FACE_AXIS_MASK

FACE_INNER_OFFSET_BIT

FACE_OUTER_OFFSET_BIT

GRID_AXIS_FLAG

SideArg

Structure containing arguments to be passed to device functions evaluating side-related quantities

SideIndexArg

Structure containing arguments to be passed to device functions for indexing sides

base

Returns the base geometry from which this geometry derives its topology.

boundary_side_index

cell_closest_point

cell_coordinates

cell_deformation_gradient

cell_dimension

Manifold dimension of the geometry cells

cell_grid

cell_inverse_deformation_gradient

cell_lookup

cell_measure

cell_measure_ratio

cell_normal

cell_position

dimension

edge_grid

face_grid

name

side_closest_point

side_coordinates

side_deformation_gradient

side_from_cell_coords

side_inner_cell_coords

side_inner_cell_index

side_inner_inverse_deformation_gradient

side_measure

side_measure_ratio

side_normal

side_outer_cell_coords

side_outer_cell_index

side_outer_inverse_deformation_gradient

side_position

side_to_cell_arg

transform

vertex_grid

property edge_grid: Volume[source]#
edge_count()[source]#
CellArg: Struct = <warp._src.codegen.Struct object>#

Structure containing arguments to be passed to device functions evaluating cell-related quantities

fill_cell_arg(arg, device)[source]#
cell_position = <Function Nanogrid__cell_position(args: warp._src.fem.geometry.nanogrid.NanogridCellArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (NanogridCellArg)

  • s (Sample)

cell_deformation_gradient = <Function Nanogrid__cell_deformation_gradient(args: warp._src.fem.geometry.nanogrid.NanogridCellArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (NanogridCellArg)

  • s (Sample)

cell_inverse_deformation_gradient = <Function Nanogrid__cell_inverse_deformation_gradient(args: warp._src.fem.geometry.nanogrid.NanogridCellArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (NanogridCellArg)

  • s (Sample)

supports_cell_lookup(device)[source]#
cell_coordinates = <Function Nanogrid__cell_coordinates(args: warp._src.fem.geometry.nanogrid.NanogridCellArg, cell_index: int, pos: vec3f)>#
Parameters:
  • args (NanogridCellArg)

  • cell_index (int)

  • pos (vec3f)

cell_closest_point = <Function Nanogrid__cell_closest_point(args: warp._src.fem.geometry.nanogrid.NanogridCellArg, cell_index: int, pos: vec3f)>#
Parameters:
  • args (NanogridCellArg)

  • cell_index (int)

  • pos (vec3f)

cell_measure = <Function Nanogrid__cell_measure(args: warp._src.fem.geometry.nanogrid.NanogridCellArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (NanogridCellArg)

  • s (Sample)

cell_normal = <Function Nanogrid__cell_normal(args: warp._src.fem.geometry.nanogrid.NanogridCellArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (NanogridCellArg)

  • s (Sample)

SideArg: Struct = <warp._src.codegen.Struct object>#

Structure containing arguments to be passed to device functions evaluating side-related quantities

fill_side_arg(arg, device)[source]#
Parameters:

arg (NanogridSideArg)

side_position = <Function Nanogrid__side_position(args: warp._src.fem.geometry.nanogrid.NanogridSideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (NanogridSideArg)

  • s (Sample)

side_deformation_gradient = <Function Nanogrid__side_deformation_gradient(args: warp._src.fem.geometry.nanogrid.NanogridSideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (NanogridSideArg)

  • s (Sample)

side_inner_inverse_deformation_gradient = <Function Nanogrid__side_inner_inverse_deformation_gradient(args: warp._src.fem.geometry.nanogrid.NanogridSideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (NanogridSideArg)

  • s (Sample)

side_outer_inverse_deformation_gradient = <Function Nanogrid__side_outer_inverse_deformation_gradient(args: warp._src.fem.geometry.nanogrid.NanogridSideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (NanogridSideArg)

  • s (Sample)

side_measure = <Function Nanogrid__side_measure(args: warp._src.fem.geometry.nanogrid.NanogridSideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (NanogridSideArg)

  • s (Sample)

side_measure_ratio = <Function Nanogrid__side_measure_ratio(args: warp._src.fem.geometry.nanogrid.NanogridSideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (NanogridSideArg)

  • s (Sample)

side_normal = <Function Nanogrid__side_normal(args: warp._src.fem.geometry.nanogrid.NanogridSideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (NanogridSideArg)

  • s (Sample)

side_inner_cell_index = <Function Nanogrid__side_inner_cell_index(args: warp._src.fem.geometry.nanogrid.NanogridSideArg, side_index: int)>#
Parameters:
  • args (NanogridSideArg)

  • side_index (int)

side_outer_cell_index = <Function Nanogrid__side_outer_cell_index(args: warp._src.fem.geometry.nanogrid.NanogridSideArg, side_index: int)>#
Parameters:
  • args (NanogridSideArg)

  • side_index (int)

side_inner_cell_coords = <Function Nanogrid__side_inner_cell_coords(args: warp._src.fem.geometry.nanogrid.NanogridSideArg, side_index: int, side_coords: vec3f)>#
Parameters:
  • args (NanogridSideArg)

  • side_index (int)

  • side_coords (vec3f)

side_outer_cell_coords = <Function Nanogrid__side_outer_cell_coords(args: warp._src.fem.geometry.nanogrid.NanogridSideArg, side_index: int, side_coords: vec3f)>#
Parameters:
  • args (NanogridSideArg)

  • side_index (int)

  • side_coords (vec3f)

side_from_cell_coords = <Function Nanogrid__side_from_cell_coords(args: warp._src.fem.geometry.nanogrid.NanogridSideArg, side_index: int, element_index: int, element_coords: vec3f)>#
Parameters:
  • args (NanogridSideArg)

  • side_index (int)

  • element_index (int)

  • element_coords (vec3f)

side_to_cell_arg = <Function Nanogrid__side_to_cell_arg(side_arg: warp._src.fem.geometry.nanogrid.NanogridSideArg)>#
Parameters:

side_arg (NanogridSideArg)

side_coordinates = <Function Nanogrid__side_coordinates(args: warp._src.fem.geometry.nanogrid.NanogridSideArg, side_index: int, pos: vec3f)>#
Parameters:
  • args (NanogridSideArg)

  • side_index (int)

  • pos (vec3f)

side_closest_point = <Function Nanogrid__side_closest_point(args: warp._src.fem.geometry.nanogrid.NanogridSideArg, side_index: int, pos: vec3f)>#
Parameters:
  • args (NanogridSideArg)

  • side_index (int)

  • pos (vec3f)