warp.fem.Grid3D#

class warp.fem.Grid3D(res, bounds_lo=None, bounds_hi=None)[source]#

Three-dimensional regular grid geometry

Parameters:
__init__(res, bounds_lo=None, bounds_hi=None)[source]#

Constructs 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

Methods

__init__(res[, bounds_lo, bounds_hi])

Constructs a dense 3D grid

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

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

Side

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_index

cell_inverse_deformation_gradient

cell_lookup

cell_measure

cell_measure_ratio

cell_normal

cell_position

cell_size

dimension

extents

get_cell

get_side

name

origin

res

side_closest_point

side_coordinates

side_deformation_gradient

side_from_cell_coords

side_index

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

strides

dimension: int = 3#
property extents: vec3f#
property cell_size: vec3f#
cell_count()[source]#
vertex_count()[source]#
side_count()[source]#
edge_count()[source]#
boundary_side_count()[source]#
reference_cell()[source]#
Return type:

Element

reference_side()[source]#
Return type:

Element

property res[source]#
property origin[source]#
property strides#
CellArg: Struct = <warp._src.codegen.Struct object>#

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

Cell[source]#

alias of vec3i

cell_index = <Function Grid3D__cell_index(res: vec3i, cell: vec3i)>#
Parameters:
get_cell = <Function Grid3D__get_cell(res: vec3i, cell_index: int)>#
Parameters:
Side = <warp._src.codegen.Struct object>#
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

side_index = <Function Grid3D__side_index(arg: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, side: warp._src.fem.geometry.grid_3d.Grid3D.Side)>#
Parameters:
  • arg (SideArg)

  • side (Side)

get_side = <Function Grid3D__get_side(arg: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, side_index: int)>#
Parameters:
  • arg (SideArg)

  • side_index (int)

fill_cell_arg(args, device)[source]#
Parameters:

args (Grid3DCellArg)

cell_position = <Function Grid3D__cell_position(args: warp._src.fem.geometry.grid_3d.Grid3DCellArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (Grid3DCellArg)

  • s (Sample)

cell_deformation_gradient = <Function Grid3D__cell_deformation_gradient(args: warp._src.fem.geometry.grid_3d.Grid3DCellArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (Grid3DCellArg)

  • s (Sample)

cell_inverse_deformation_gradient = <Function Grid3D__cell_inverse_deformation_gradient(args: warp._src.fem.geometry.grid_3d.Grid3DCellArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (Grid3DCellArg)

  • s (Sample)

cell_coordinates = <Function Grid3D__cell_coordinates(args: warp._src.fem.geometry.grid_3d.Grid3DCellArg, cell_index: int, pos: vec3f)>#
Parameters:
  • args (Grid3DCellArg)

  • cell_index (int)

  • pos (vec3f)

cell_closest_point = <Function Grid3D__cell_closest_point(args: warp._src.fem.geometry.grid_3d.Grid3DCellArg, cell_index: int, pos: vec3f)>#
Parameters:
  • args (Grid3DCellArg)

  • cell_index (int)

  • pos (vec3f)

supports_cell_lookup(device)[source]#
make_filtered_cell_lookup(filter_func=None)[source]#
Parameters:

filter_func (Function)

cell_measure = <Function Grid3D__cell_measure(args: warp._src.fem.geometry.grid_3d.Grid3DCellArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (Grid3DCellArg)

  • s (Sample)

cell_normal = <Function Grid3D__cell_normal(args: warp._src.fem.geometry.grid_3d.Grid3DCellArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (Grid3DCellArg)

  • s (Sample)

side_arg_value(device)[source]#
side_index_arg_value(device)[source]#
Return type:

SideArg

boundary_side_index = <Function Grid3D__boundary_side_index(args: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, boundary_side_index: int)>#
Parameters:
  • args (SideArg)

  • boundary_side_index (int)

side_position = <Function Grid3D__side_position(args: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (SideArg)

  • s (Sample)

side_deformation_gradient = <Function Grid3D__side_deformation_gradient(args: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (SideArg)

  • s (Sample)

side_inner_inverse_deformation_gradient = <Function Grid3D__side_inner_inverse_deformation_gradient(args: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (SideArg)

  • s (Sample)

side_outer_inverse_deformation_gradient = <Function Grid3D__side_outer_inverse_deformation_gradient(args: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (SideArg)

  • s (Sample)

side_measure = <Function Grid3D__side_measure(args: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (SideArg)

  • s (Sample)

side_measure_ratio = <Function Grid3D__side_measure_ratio(args: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (SideArg)

  • s (Sample)

side_normal = <Function Grid3D__side_normal(args: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, s: warp._src.fem.types.Sample)>#
Parameters:
  • args (SideArg)

  • s (Sample)

side_inner_cell_index = <Function Grid3D__side_inner_cell_index(arg: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, side_index: int)>#
Parameters:
  • arg (SideArg)

  • side_index (int)

side_outer_cell_index = <Function Grid3D__side_outer_cell_index(arg: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, side_index: int)>#
Parameters:
  • arg (SideArg)

  • side_index (int)

side_inner_cell_coords = <Function Grid3D__side_inner_cell_coords(args: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, side_index: int, side_coords: vec3f)>#
Parameters:
  • args (SideArg)

  • side_index (int)

  • side_coords (vec3f)

side_outer_cell_coords = <Function Grid3D__side_outer_cell_coords(args: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, side_index: int, side_coords: vec3f)>#
Parameters:
  • args (SideArg)

  • side_index (int)

  • side_coords (vec3f)

side_from_cell_coords = <Function Grid3D__side_from_cell_coords(args: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, side_index: int, element_index: int, element_coords: vec3f)>#
Parameters:
  • args (SideArg)

  • side_index (int)

  • element_index (int)

  • element_coords (vec3f)

side_to_cell_arg = <Function Grid3D__side_to_cell_arg(side_arg: warp._src.fem.geometry.grid_3d.Grid3D.SideArg)>#
Parameters:

side_arg (SideArg)

side_coordinates = <Function Grid3D__side_coordinates(args: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, side_index: int, pos: vec3f)>#
Parameters:
  • args (SideArg)

  • side_index (int)

  • pos (vec3f)

side_closest_point = <Function Grid3D__side_closest_point(args: warp._src.fem.geometry.grid_3d.Grid3D.SideArg, side_index: int, pos: vec3f)>#
Parameters:
  • args (SideArg)

  • side_index (int)

  • pos (vec3f)