warp.fem.AdaptiveNanogrid#

class warp.fem.AdaptiveNanogrid(cell_grid, cell_level, level_count, temporary_store)[source]#

Adaptive sparse grid

Parameters:
__init__(
cell_grid,
cell_level,
level_count,
temporary_store,
)[source]#

Constructs an adaptive sparse grid geometry from an in-memory NanoVDB volume and a list of levels.

It is not recommended to use this constructor directly; see the helper functions warp.fem.adaptive_nanogrid_from_field() and warp.fem.adaptive_nanogrid_from_hierarchy()

Parameters:
  • cell_grid (Volume) – A warp volume (ideally backed by an index grid) whose voxels coordinates correspond to the lowest fine-resolution voxel of each cell. The cell’s extent is then given by the cell_level array. For instance, a voxel at coordinates ijk and level 0 corresponds to a fine cell at the same coordinates, a voxel at coordinates 2*ijk and level 1 corresponds to a cell spanning 2^3 voxels from 2*ijk to 2*ijk + (1,1,1), etc.

  • cell_level (array) – Refinement level for each voxel of the volume. Level 0 is the finest, level level_count-1 is the coarsest.

  • level_count (int) – Number of levels in the grid

  • temporary_store (TemporaryStore)

Methods

__init__(cell_grid, cell_level, level_count, ...)

Constructs an adaptive sparse grid geometry from an in-memory NanoVDB volume and a list of levels.

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()

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)

stacked_edge_count()

stacked_face_count()

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

coarse_ijk

dimension

encode_axis_and_level

face_grid

find_cell

fine_ijk

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

stacked_edge_grid

stacked_face_grid

transform

vertex_grid

dimension: int = 3#
property stacked_face_grid: Volume[source]#
stacked_face_count()[source]#
property stacked_edge_grid: Volume[source]#
stacked_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]#
Parameters:

arg (AdaptiveNanogridCellArg)

cell_position = <Function AdaptiveNanogrid__cell_position(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridCellArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (AdaptiveNanogridCellArg)

  • s (Sample)

cell_deformation_gradient = <Function AdaptiveNanogrid__cell_deformation_gradient(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridCellArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (AdaptiveNanogridCellArg)

  • s (Sample)

cell_inverse_deformation_gradient = <Function AdaptiveNanogrid__cell_inverse_deformation_gradient(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridCellArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (AdaptiveNanogridCellArg)

  • s (Sample)

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

  • cell_index (int)

  • pos (vec3f)

cell_closest_point = <Function AdaptiveNanogrid__cell_closest_point(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridCellArg, cell_index: int, pos: vec3f)>#
Parameters:
  • args (AdaptiveNanogridCellArg)

  • cell_index (int)

  • pos (vec3f)

cell_measure = <Function AdaptiveNanogrid__cell_measure(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridCellArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (AdaptiveNanogridCellArg)

  • s (Sample)

cell_normal = <Function AdaptiveNanogrid__cell_normal(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridCellArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (AdaptiveNanogridCellArg)

  • s (Sample)

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

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

side_to_cell_arg = <Function AdaptiveNanogrid__side_to_cell_arg(side_arg: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridSideArg)>#
Parameters:

side_arg (AdaptiveNanogridSideArg)

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

arg (AdaptiveNanogridSideArg)

side_position = <Function AdaptiveNanogrid__side_position(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridSideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (AdaptiveNanogridSideArg)

  • s (Sample)

side_deformation_gradient = <Function AdaptiveNanogrid__side_deformation_gradient(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridSideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (AdaptiveNanogridSideArg)

  • s (Sample)

side_inner_inverse_deformation_gradient = <Function AdaptiveNanogrid__side_inner_inverse_deformation_gradient(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridSideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (AdaptiveNanogridSideArg)

  • s (Sample)

side_outer_inverse_deformation_gradient = <Function AdaptiveNanogrid__side_outer_inverse_deformation_gradient(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridSideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (AdaptiveNanogridSideArg)

  • s (Sample)

side_measure = <Function AdaptiveNanogrid__side_measure(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridSideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (AdaptiveNanogridSideArg)

  • s (Sample)

side_measure_ratio = <Function AdaptiveNanogrid__side_measure_ratio(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridSideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (AdaptiveNanogridSideArg)

  • s (Sample)

side_normal = <Function AdaptiveNanogrid__side_normal(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridSideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (AdaptiveNanogridSideArg)

  • s (Sample)

side_inner_cell_index = <Function AdaptiveNanogrid__side_inner_cell_index(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridSideArg, side_index: int)>#
Parameters:
  • args (AdaptiveNanogridSideArg)

  • side_index (int)

side_outer_cell_index = <Function AdaptiveNanogrid__side_outer_cell_index(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridSideArg, side_index: int)>#
Parameters:
  • args (AdaptiveNanogridSideArg)

  • side_index (int)

side_inner_cell_coords = <Function AdaptiveNanogrid__side_inner_cell_coords(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridSideArg, side_index: int, side_coords: vec3f)>#
Parameters:
  • args (AdaptiveNanogridSideArg)

  • side_index (int)

  • side_coords (vec3f)

side_outer_cell_coords = <Function AdaptiveNanogrid__side_outer_cell_coords(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridSideArg, side_index: int, side_coords: vec3f)>#
Parameters:
  • args (AdaptiveNanogridSideArg)

  • side_index (int)

  • side_coords (vec3f)

side_from_cell_coords = <Function AdaptiveNanogrid__side_from_cell_coords(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridSideArg, side_index: int, element_index: int, element_coords: vec3f)>#
Parameters:
  • args (AdaptiveNanogridSideArg)

  • side_index (int)

  • element_index (int)

  • element_coords (vec3f)

side_coordinates = <Function AdaptiveNanogrid__side_coordinates(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridSideArg, side_index: int, pos: vec3f)>#
Parameters:
  • args (AdaptiveNanogridSideArg)

  • side_index (int)

  • pos (vec3f)

side_closest_point = <Function AdaptiveNanogrid__side_closest_point(args: warp._src.fem.geometry.adaptive_nanogrid.AdaptiveNanogridSideArg, side_index: int, pos: vec3f)>#
Parameters:
  • args (AdaptiveNanogridSideArg)

  • side_index (int)

  • pos (vec3f)

coarse_ijk = <Function AdaptiveNanogrid__coarse_ijk(ijk: vec3i, level: int)>#
Parameters:
fine_ijk = <Function AdaptiveNanogrid__fine_ijk(ijk: vec3i, level: int)>#
Parameters:
encode_axis_and_level = <Function AdaptiveNanogrid__encode_axis_and_level(ijk: vec3i, axis: int, level: int)>#
Parameters:
find_cell = <Function AdaptiveNanogrid__find_cell(cell_grid: uint64, ijk: vec3i, level_count: int, cell_level: array(ndim=1, dtype=uint8))>#
Parameters: