warp-lang 1.0.0b5__py3-none-manylinux2014_x86_64.whl → 1.0.0b6__py3-none-manylinux2014_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- docs/conf.py +3 -4
- examples/env/env_ant.py +1 -1
- examples/env/env_cartpole.py +1 -1
- examples/env/env_humanoid.py +1 -1
- examples/example_dem.py +28 -26
- examples/example_diffray.py +37 -30
- examples/example_fluid.py +7 -3
- examples/example_jacobian_ik.py +1 -1
- examples/example_mesh_intersect.py +10 -7
- examples/example_nvdb.py +3 -3
- examples/example_render_opengl.py +19 -10
- examples/example_sim_cartpole.py +9 -5
- examples/example_sim_cloth.py +29 -25
- examples/example_sim_fk_grad.py +2 -2
- examples/example_sim_fk_grad_torch.py +3 -3
- examples/example_sim_grad_bounce.py +11 -8
- examples/example_sim_grad_cloth.py +12 -9
- examples/example_sim_granular.py +2 -2
- examples/example_sim_granular_collision_sdf.py +13 -13
- examples/example_sim_neo_hookean.py +3 -3
- examples/example_sim_particle_chain.py +2 -2
- examples/example_sim_quadruped.py +8 -5
- examples/example_sim_rigid_chain.py +8 -5
- examples/example_sim_rigid_contact.py +13 -10
- examples/example_sim_rigid_fem.py +2 -2
- examples/example_sim_rigid_gyroscopic.py +2 -2
- examples/example_sim_rigid_kinematics.py +1 -1
- examples/example_sim_trajopt.py +3 -2
- examples/fem/example_apic_fluid.py +5 -7
- examples/fem/example_diffusion_mgpu.py +18 -16
- warp/__init__.py +3 -2
- warp/bin/warp.so +0 -0
- warp/build_dll.py +29 -9
- warp/builtins.py +206 -7
- warp/codegen.py +58 -38
- warp/config.py +3 -1
- warp/context.py +234 -128
- warp/fem/__init__.py +2 -2
- warp/fem/cache.py +2 -1
- warp/fem/field/nodal_field.py +18 -17
- warp/fem/geometry/hexmesh.py +11 -6
- warp/fem/geometry/quadmesh_2d.py +16 -12
- warp/fem/geometry/tetmesh.py +19 -8
- warp/fem/geometry/trimesh_2d.py +18 -7
- warp/fem/integrate.py +341 -196
- warp/fem/quadrature/__init__.py +1 -1
- warp/fem/quadrature/pic_quadrature.py +138 -53
- warp/fem/quadrature/quadrature.py +81 -9
- warp/fem/space/__init__.py +1 -1
- warp/fem/space/basis_space.py +169 -51
- warp/fem/space/grid_2d_function_space.py +2 -2
- warp/fem/space/grid_3d_function_space.py +2 -2
- warp/fem/space/hexmesh_function_space.py +2 -2
- warp/fem/space/partition.py +9 -6
- warp/fem/space/quadmesh_2d_function_space.py +2 -2
- warp/fem/space/shape/cube_shape_function.py +27 -15
- warp/fem/space/shape/square_shape_function.py +29 -18
- warp/fem/space/tetmesh_function_space.py +2 -2
- warp/fem/space/topology.py +10 -0
- warp/fem/space/trimesh_2d_function_space.py +2 -2
- warp/fem/utils.py +10 -5
- warp/native/array.h +49 -8
- warp/native/builtin.h +31 -14
- warp/native/cuda_util.cpp +8 -3
- warp/native/cuda_util.h +1 -0
- warp/native/exports.h +1177 -1108
- warp/native/intersect.h +4 -4
- warp/native/intersect_adj.h +8 -8
- warp/native/mat.h +65 -6
- warp/native/mesh.h +126 -5
- warp/native/quat.h +28 -4
- warp/native/vec.h +76 -14
- warp/native/warp.cu +1 -6
- warp/render/render_opengl.py +261 -109
- warp/sim/import_mjcf.py +13 -7
- warp/sim/import_urdf.py +14 -14
- warp/sim/inertia.py +17 -18
- warp/sim/model.py +67 -67
- warp/sim/render.py +1 -1
- warp/sparse.py +6 -6
- warp/stubs.py +19 -81
- warp/tape.py +1 -1
- warp/tests/__main__.py +3 -6
- warp/tests/{test_class_kernel.py → aux_test_class_kernel.py} +9 -1
- warp/tests/aux_test_conditional_unequal_types_kernels.py +21 -0
- warp/tests/{test_dependent.py → aux_test_dependent.py} +2 -2
- warp/tests/{test_reference.py → aux_test_reference.py} +1 -1
- warp/tests/aux_test_unresolved_func.py +14 -0
- warp/tests/aux_test_unresolved_symbol.py +14 -0
- warp/tests/{test_kinematics.py → disabled_kinematics.py} +10 -12
- warp/tests/run_coverage_serial.py +31 -0
- warp/tests/test_adam.py +102 -106
- warp/tests/test_arithmetic.py +39 -40
- warp/tests/test_array.py +46 -48
- warp/tests/test_array_reduce.py +25 -19
- warp/tests/test_atomic.py +62 -26
- warp/tests/test_bool.py +16 -11
- warp/tests/test_builtins_resolution.py +1292 -0
- warp/tests/test_bvh.py +9 -12
- warp/tests/test_closest_point_edge_edge.py +53 -57
- warp/tests/test_codegen.py +164 -134
- warp/tests/test_compile_consts.py +13 -19
- warp/tests/test_conditional.py +30 -32
- warp/tests/test_copy.py +9 -12
- warp/tests/test_ctypes.py +90 -98
- warp/tests/test_dense.py +20 -14
- warp/tests/test_devices.py +34 -35
- warp/tests/test_dlpack.py +74 -75
- warp/tests/test_examples.py +215 -97
- warp/tests/test_fabricarray.py +15 -21
- warp/tests/test_fast_math.py +14 -11
- warp/tests/test_fem.py +280 -97
- warp/tests/test_fp16.py +19 -15
- warp/tests/test_func.py +177 -194
- warp/tests/test_generics.py +71 -77
- warp/tests/test_grad.py +83 -32
- warp/tests/test_grad_customs.py +7 -9
- warp/tests/test_hash_grid.py +6 -10
- warp/tests/test_import.py +9 -23
- warp/tests/test_indexedarray.py +19 -21
- warp/tests/test_intersect.py +15 -9
- warp/tests/test_large.py +17 -19
- warp/tests/test_launch.py +14 -17
- warp/tests/test_lerp.py +63 -63
- warp/tests/test_lvalue.py +84 -35
- warp/tests/test_marching_cubes.py +9 -13
- warp/tests/test_mat.py +388 -3004
- warp/tests/test_mat_lite.py +9 -12
- warp/tests/test_mat_scalar_ops.py +2889 -0
- warp/tests/test_math.py +10 -11
- warp/tests/test_matmul.py +104 -100
- warp/tests/test_matmul_lite.py +72 -98
- warp/tests/test_mesh.py +35 -32
- warp/tests/test_mesh_query_aabb.py +18 -25
- warp/tests/test_mesh_query_point.py +39 -23
- warp/tests/test_mesh_query_ray.py +9 -21
- warp/tests/test_mlp.py +8 -9
- warp/tests/test_model.py +89 -93
- warp/tests/test_modules_lite.py +15 -25
- warp/tests/test_multigpu.py +87 -114
- warp/tests/test_noise.py +10 -12
- warp/tests/test_operators.py +14 -21
- warp/tests/test_options.py +10 -11
- warp/tests/test_pinned.py +16 -18
- warp/tests/test_print.py +16 -20
- warp/tests/test_quat.py +121 -88
- warp/tests/test_rand.py +12 -13
- warp/tests/test_reload.py +27 -32
- warp/tests/test_rounding.py +7 -10
- warp/tests/test_runlength_encode.py +105 -106
- warp/tests/test_smoothstep.py +8 -9
- warp/tests/test_snippet.py +13 -22
- warp/tests/test_sparse.py +30 -29
- warp/tests/test_spatial.py +179 -174
- warp/tests/test_streams.py +100 -107
- warp/tests/test_struct.py +98 -67
- warp/tests/test_tape.py +11 -17
- warp/tests/test_torch.py +89 -86
- warp/tests/test_transient_module.py +9 -12
- warp/tests/test_types.py +328 -50
- warp/tests/test_utils.py +217 -218
- warp/tests/test_vec.py +133 -2133
- warp/tests/test_vec_lite.py +8 -11
- warp/tests/test_vec_scalar_ops.py +2099 -0
- warp/tests/test_volume.py +391 -382
- warp/tests/test_volume_write.py +122 -135
- warp/tests/unittest_serial.py +35 -0
- warp/tests/unittest_suites.py +291 -0
- warp/tests/{test_base.py → unittest_utils.py} +138 -25
- warp/tests/{test_misc.py → unused_test_misc.py} +13 -5
- warp/tests/{test_debug.py → walkthough_debug.py} +2 -15
- warp/thirdparty/unittest_parallel.py +257 -54
- warp/types.py +119 -98
- warp/utils.py +14 -0
- {warp_lang-1.0.0b5.dist-info → warp_lang-1.0.0b6.dist-info}/METADATA +2 -1
- {warp_lang-1.0.0b5.dist-info → warp_lang-1.0.0b6.dist-info}/RECORD +182 -178
- {warp_lang-1.0.0b5.dist-info → warp_lang-1.0.0b6.dist-info}/WHEEL +1 -1
- warp/tests/test_all.py +0 -239
- warp/tests/test_conditional_unequal_types_kernels.py +0 -14
- warp/tests/test_coverage.py +0 -38
- warp/tests/test_unresolved_func.py +0 -7
- warp/tests/test_unresolved_symbol.py +0 -7
- /warp/tests/{test_compile_consts_dummy.py → aux_test_compile_consts_dummy.py} +0 -0
- /warp/tests/{test_reference_reference.py → aux_test_reference_reference.py} +0 -0
- /warp/tests/{test_square.py → aux_test_square.py} +0 -0
- {warp_lang-1.0.0b5.dist-info → warp_lang-1.0.0b6.dist-info}/LICENSE.md +0 -0
- {warp_lang-1.0.0b5.dist-info → warp_lang-1.0.0b6.dist-info}/top_level.txt +0 -0
warp/fem/geometry/quadmesh_2d.py
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
|
-
import warp as wp
|
|
3
|
-
|
|
4
|
-
from warp.fem.types import ElementIndex, Coords, Sample
|
|
5
|
-
from warp.fem.types import OUTSIDE, make_free_sample
|
|
6
|
-
from warp.fem.cache import cached_arg_value, TemporaryStore, borrow_temporary, borrow_temporary_like
|
|
7
2
|
|
|
3
|
+
import warp as wp
|
|
4
|
+
from warp.fem.cache import (
|
|
5
|
+
TemporaryStore,
|
|
6
|
+
borrow_temporary,
|
|
7
|
+
borrow_temporary_like,
|
|
8
|
+
cached_arg_value,
|
|
9
|
+
)
|
|
10
|
+
from warp.fem.types import OUTSIDE, Coords, ElementIndex, Sample, make_free_sample
|
|
11
|
+
|
|
12
|
+
from .element import LinearEdge, Square
|
|
8
13
|
from .geometry import Geometry
|
|
9
|
-
from .element import Square, LinearEdge
|
|
10
14
|
|
|
11
15
|
# from .closest_point import project_on_tet_at_origin
|
|
12
16
|
|
|
@@ -120,7 +124,7 @@ class Quadmesh2D(Geometry):
|
|
|
120
124
|
)
|
|
121
125
|
|
|
122
126
|
@wp.func
|
|
123
|
-
def cell_deformation_gradient(cell_arg: CellArg, s:Sample):
|
|
127
|
+
def cell_deformation_gradient(cell_arg: CellArg, s: Sample):
|
|
124
128
|
"""Deformation gradient at `coords`"""
|
|
125
129
|
quad_idx = cell_arg.quad_vertex_indices[s.element_index]
|
|
126
130
|
|
|
@@ -135,7 +139,7 @@ class Quadmesh2D(Geometry):
|
|
|
135
139
|
)
|
|
136
140
|
|
|
137
141
|
@wp.func
|
|
138
|
-
def cell_inverse_deformation_gradient(cell_arg: CellArg, s:Sample):
|
|
142
|
+
def cell_inverse_deformation_gradient(cell_arg: CellArg, s: Sample):
|
|
139
143
|
return wp.inverse(Quadmesh2D.cell_deformation_gradient(cell_arg, s))
|
|
140
144
|
|
|
141
145
|
@wp.func
|
|
@@ -178,20 +182,20 @@ class Quadmesh2D(Geometry):
|
|
|
178
182
|
] * args.cell_arg.positions[edge_idx[1]]
|
|
179
183
|
|
|
180
184
|
@wp.func
|
|
181
|
-
def side_deformation_gradient(args: SideArg, s:Sample):
|
|
185
|
+
def side_deformation_gradient(args: SideArg, s: Sample):
|
|
182
186
|
edge_idx = args.edge_vertex_indices[s.element_index]
|
|
183
187
|
v0 = args.cell_arg.positions[edge_idx[0]]
|
|
184
188
|
v1 = args.cell_arg.positions[edge_idx[1]]
|
|
185
189
|
return v1 - v0
|
|
186
190
|
|
|
187
191
|
@wp.func
|
|
188
|
-
def side_inner_inverse_deformation_gradient(args: SideArg, s:Sample):
|
|
192
|
+
def side_inner_inverse_deformation_gradient(args: SideArg, s: Sample):
|
|
189
193
|
cell_index = Quadmesh2D.side_inner_cell_index(args, s.element_index)
|
|
190
194
|
cell_coords = Quadmesh2D.side_inner_cell_coords(args, s.element_index, s.element_coords)
|
|
191
195
|
return Quadmesh2D.cell_inverse_deformation_gradient(args.cell_arg, make_free_sample(cell_index, cell_coords))
|
|
192
196
|
|
|
193
197
|
@wp.func
|
|
194
|
-
def side_outer_inverse_deformation_gradient(args: SideArg, s:Sample):
|
|
198
|
+
def side_outer_inverse_deformation_gradient(args: SideArg, s: Sample):
|
|
195
199
|
cell_index = Quadmesh2D.side_outer_cell_index(args, s.element_index)
|
|
196
200
|
cell_coords = Quadmesh2D.side_outer_cell_coords(args, s.element_index, s.element_coords)
|
|
197
201
|
return Quadmesh2D.cell_inverse_deformation_gradient(args.cell_arg, make_free_sample(cell_index, cell_coords))
|
|
@@ -352,7 +356,7 @@ class Quadmesh2D(Geometry):
|
|
|
352
356
|
wp.copy(
|
|
353
357
|
dest=edge_count.array, src=vertex_unique_edge_offsets.array, src_offset=self.vertex_count() - 1, count=1
|
|
354
358
|
)
|
|
355
|
-
wp.synchronize_stream(wp.get_stream())
|
|
359
|
+
wp.synchronize_stream(wp.get_stream(device))
|
|
356
360
|
edge_count = int(edge_count.array.numpy()[0])
|
|
357
361
|
else:
|
|
358
362
|
edge_count = int(vertex_unique_edge_offsets.array.numpy()[self.vertex_count() - 1])
|
warp/fem/geometry/tetmesh.py
CHANGED
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
|
-
import warp as wp
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
from warp.fem.
|
|
6
|
-
|
|
3
|
+
import warp as wp
|
|
4
|
+
from warp.fem.cache import (
|
|
5
|
+
TemporaryStore,
|
|
6
|
+
borrow_temporary,
|
|
7
|
+
borrow_temporary_like,
|
|
8
|
+
cached_arg_value,
|
|
9
|
+
)
|
|
10
|
+
from warp.fem.types import (
|
|
11
|
+
NULL_ELEMENT_INDEX,
|
|
12
|
+
OUTSIDE,
|
|
13
|
+
Coords,
|
|
14
|
+
ElementIndex,
|
|
15
|
+
Sample,
|
|
16
|
+
make_free_sample,
|
|
17
|
+
)
|
|
7
18
|
|
|
8
|
-
from .geometry import Geometry
|
|
9
|
-
from .element import Triangle, Tetrahedron
|
|
10
19
|
from .closest_point import project_on_tet_at_origin
|
|
20
|
+
from .element import Tetrahedron, Triangle
|
|
21
|
+
from .geometry import Geometry
|
|
11
22
|
|
|
12
23
|
|
|
13
24
|
@wp.struct
|
|
@@ -401,7 +412,7 @@ class Tetmesh(Geometry):
|
|
|
401
412
|
wp.copy(
|
|
402
413
|
dest=face_count.array, src=vertex_unique_face_offsets.array, src_offset=self.vertex_count() - 1, count=1
|
|
403
414
|
)
|
|
404
|
-
wp.synchronize_stream(wp.get_stream())
|
|
415
|
+
wp.synchronize_stream(wp.get_stream(device))
|
|
405
416
|
face_count = int(face_count.array.numpy()[0])
|
|
406
417
|
else:
|
|
407
418
|
face_count = int(vertex_unique_face_offsets.array.numpy()[self.vertex_count() - 1])
|
|
@@ -497,7 +508,7 @@ class Tetmesh(Geometry):
|
|
|
497
508
|
src_offset=self.vertex_count() - 1,
|
|
498
509
|
count=1,
|
|
499
510
|
)
|
|
500
|
-
wp.synchronize_stream(wp.get_stream())
|
|
511
|
+
wp.synchronize_stream(wp.get_stream(device))
|
|
501
512
|
self._edge_count = int(edge_count.array.numpy()[0])
|
|
502
513
|
else:
|
|
503
514
|
self._edge_count = int(vertex_unique_edge_offsets.array.numpy()[self.vertex_count() - 1])
|
warp/fem/geometry/trimesh_2d.py
CHANGED
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
from typing import Optional
|
|
2
|
-
import warp as wp
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
from warp.fem.
|
|
6
|
-
|
|
3
|
+
import warp as wp
|
|
4
|
+
from warp.fem.cache import (
|
|
5
|
+
TemporaryStore,
|
|
6
|
+
borrow_temporary,
|
|
7
|
+
borrow_temporary_like,
|
|
8
|
+
cached_arg_value,
|
|
9
|
+
)
|
|
10
|
+
from warp.fem.types import (
|
|
11
|
+
NULL_ELEMENT_INDEX,
|
|
12
|
+
OUTSIDE,
|
|
13
|
+
Coords,
|
|
14
|
+
ElementIndex,
|
|
15
|
+
Sample,
|
|
16
|
+
make_free_sample,
|
|
17
|
+
)
|
|
7
18
|
|
|
8
|
-
from .geometry import Geometry
|
|
9
|
-
from .element import Triangle, LinearEdge
|
|
10
19
|
from .closest_point import project_on_tri_at_origin
|
|
20
|
+
from .element import LinearEdge, Triangle
|
|
21
|
+
from .geometry import Geometry
|
|
11
22
|
|
|
12
23
|
|
|
13
24
|
@wp.struct
|
|
@@ -365,7 +376,7 @@ class Trimesh2D(Geometry):
|
|
|
365
376
|
wp.copy(
|
|
366
377
|
dest=edge_count.array, src=vertex_unique_edge_offsets.array, src_offset=self.vertex_count() - 1, count=1
|
|
367
378
|
)
|
|
368
|
-
wp.synchronize_stream(wp.get_stream())
|
|
379
|
+
wp.synchronize_stream(wp.get_stream(device))
|
|
369
380
|
edge_count = int(edge_count.array.numpy()[0])
|
|
370
381
|
else:
|
|
371
382
|
edge_count = int(vertex_unique_edge_offsets.array.numpy()[self.vertex_count() - 1])
|