diffneusim 1.0.0__py3-none-any.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.
- diffneusim/__init__.py +1 -0
- diffneusim/_cache.py +42 -0
- diffneusim/_paths.py +5 -0
- diffneusim/bindings/rew14_ext.cu +115 -0
- diffneusim/bindings/soft14_capi.cpp +443 -0
- diffneusim/bindings/soft14_engine_ext.cu +596 -0
- diffneusim/bindings/soft_capi.cpp +782 -0
- diffneusim/bindings/soft_engine_ext.cu +495 -0
- diffneusim/core/cpu_engine/build.sh +40 -0
- diffneusim/core/cpu_engine/fiber/cuda_runtime.h +445 -0
- diffneusim/core/cpu_engine/x14_cpu.cpp +283 -0
- diffneusim/core/diff/dual.h +126 -0
- diffneusim/core/include/diffneusim/macros.h +35 -0
- diffneusim/core/kin/kinematic_tree.h +273 -0
- diffneusim/core/math/so3.h +182 -0
- diffneusim/core/soft/adj/out_adj.h +102 -0
- diffneusim/core/soft/adj/rnea_adj.h +425 -0
- diffneusim/core/soft/adj/rows_adj.h +439 -0
- diffneusim/core/soft/adj/rows_functor.h +89 -0
- diffneusim/core/soft/adj/rows_lanes.h +443 -0
- diffneusim/core/soft/adj/shell_adj.h +243 -0
- diffneusim/core/soft/adj/tree_adj.h +356 -0
- diffneusim/core/soft/collide.h +183 -0
- diffneusim/core/soft/gpu/adj14.cuh +233 -0
- diffneusim/core/soft/gpu/adj14_mus.cuh +98 -0
- diffneusim/core/soft/gpu/adj_shell.cuh +50 -0
- diffneusim/core/soft/gpu/adj_tab.cuh +49 -0
- diffneusim/core/soft/gpu/body14.cuh +47 -0
- diffneusim/core/soft/gpu/chol_rn.cuh +458 -0
- diffneusim/core/soft/gpu/chol_small.cuh +123 -0
- diffneusim/core/soft/gpu/chol_split.cuh +193 -0
- diffneusim/core/soft/gpu/engine_launch.cuh +263 -0
- diffneusim/core/soft/gpu/fk_rn.cuh +109 -0
- diffneusim/core/soft/gpu/generated/body_019e20820f86_mmfloor.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_62f77a4bb16b_mmfloor.cuh +52 -0
- diffneusim/core/soft/gpu/generated/body_77dbb7213f26_mmfloor_rampsb3l_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_8989b60e4486_mmfloor_rampsb3l_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_8989b60e4486_mmfloor_rhlsd05_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_8989b60e4486_mmfloor_rhlsdef_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_8989b60e4486_mmfloor_rhlsmjd_n6t12.cuh +28 -0
- diffneusim/core/soft/gpu/generated/body_a1e8b196b2cd_mmfloor_rampsb3l_n6t12.cuh +52 -0
- diffneusim/core/soft/gpu/generated/body_a944653edd64_mmfloor.cuh +25 -0
- diffneusim/core/soft/gpu/generated/body_a944653edd64_mmfloor_rampsb3l_n6t12.cuh +25 -0
- diffneusim/core/soft/gpu/generated/g1_soft_5db44fd45286.cuh +74 -0
- diffneusim/core/soft/gpu/generated/split_62f77a4bb16b_mmfloor.cuh +18 -0
- diffneusim/core/soft/gpu/generated/split_a1e8b196b2cd_mmfloor_rampsb3l_n6t12.cuh +18 -0
- diffneusim/core/soft/gpu/generated/x14_soft_019e20820f86_mmfloor.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_62f77a4bb16b_mmfloor.cuh +129 -0
- diffneusim/core/soft/gpu/generated/x14_soft_77dbb7213f26_mmfloor_rampsb3l_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_8989b60e4486_mmfloor_rampsb3l_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_8989b60e4486_mmfloor_rhlsd05_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_8989b60e4486_mmfloor_rhlsdef_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_8989b60e4486_mmfloor_rhlsmjd_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_a1e8b196b2cd_mmfloor_rampsb3l_n6t12.cuh +129 -0
- diffneusim/core/soft/gpu/generated/x14_soft_a944653edd64_mmfloor.cuh +123 -0
- diffneusim/core/soft/gpu/generated/x14_soft_a944653edd64_mmfloor_rampsb3l_n6t12.cuh +123 -0
- diffneusim/core/soft/gpu/k_mus.cuh +1038 -0
- diffneusim/core/soft/gpu/k_mus_host.cuh +377 -0
- diffneusim/core/soft/gpu/k_pre.cuh +52 -0
- diffneusim/core/soft/gpu/kernel_p.cuh +490 -0
- diffneusim/core/soft/gpu/kp14.cuh +465 -0
- diffneusim/core/soft/gpu/l2v2.cuh +367 -0
- diffneusim/core/soft/gpu/l2x14.cuh +319 -0
- diffneusim/core/soft/gpu/l3.cuh +1483 -0
- diffneusim/core/soft/gpu/model_view.cuh +48 -0
- diffneusim/core/soft/gpu/mus_case_fits.h +15 -0
- diffneusim/core/soft/gpu/mus_classes.h +182 -0
- diffneusim/core/soft/gpu/mus_row_cf.h +44 -0
- diffneusim/core/soft/gpu/rew14.cuh +177 -0
- diffneusim/core/soft/gpu/rows_ctab.cuh +44 -0
- diffneusim/core/soft/gpu/tree_m.cuh +247 -0
- diffneusim/core/soft/gpu/x14_engine_kernels.cuh +260 -0
- diffneusim/core/soft/gpu/x14_rowcf.h +14 -0
- diffneusim/core/soft/hand.h +124 -0
- diffneusim/core/soft/impedance.h +115 -0
- diffneusim/core/soft/jvp.h +202 -0
- diffneusim/core/soft/kin.h +250 -0
- diffneusim/core/soft/muscle.h +1208 -0
- diffneusim/core/soft/newton.h +371 -0
- diffneusim/core/soft/rows.h +176 -0
- diffneusim/core/soft/step.h +188 -0
- diffneusim/core/soft/tape.h +313 -0
- diffneusim/core/soft/x14/collide14.h +69 -0
- diffneusim/core/soft/x14/jvp14.h +182 -0
- diffneusim/core/soft/x14/law14.h +453 -0
- diffneusim/core/soft/x14adj/collide14_adj.h +134 -0
- diffneusim/core/soft/x14adj/passive14_adj.h +162 -0
- diffneusim/core/soft/x14adj/reward14.h +484 -0
- diffneusim/core/soft/x14adj/rows14_adj.h +400 -0
- diffneusim/core/soft/x14adj/scan14.h +349 -0
- diffneusim/core/soft/x14adj/shell14_adj.h +122 -0
- diffneusim/core/soft/x14adj/sweep14.h +255 -0
- diffneusim/core/soft/x14adj/tree14_adj.h +500 -0
- diffneusim/core/soft/x14adj/x14adj_common.h +96 -0
- diffneusim/data/mirror/H1622v2k_geyer_hfdeq.npz +0 -0
- diffneusim/data/mirror/H1622v2k_hfd.npz +0 -0
- diffneusim/data/mirror/H1622v2k_millard_hfdeq.npz +0 -0
- diffneusim/data/mirror/fullbody_contact.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_p2str.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_p2str_rigid.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_calf2_pe.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_axfix.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_axfixlegs01.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_jd01.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_jd01legs.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_jd01lumbar.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_lumbfix.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_lumbfixlegs01.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1a.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n2.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_rom23.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_hinge.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1a.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n2.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_rom23.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_fusedhand_lspine_girdle_osimeq.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_lspine_girdle_millard.npz +0 -0
- diffneusim/data/mirror/fullbody_contact_spinecoupled_lspine_girdle_osimeq.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_compound_g14eq.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin_ank30.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin_ank30_hip30.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin_ank30_hip30_luispe.npz +0 -0
- diffneusim/data/mirror/myoleg26_3d_kneeexp_g14eq_trunkpose_spin_ank30_hip30_trunk0701.npz +0 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_axfix.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_axfixlegs01.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_jd01.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_jd01legs.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_jd01lumbar.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_lumbfix.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_lumbfixlegs01.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_n1.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_n1a.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_n2.json +91 -0
- diffneusim/data/muscle_fit/wang_mass_volume_14t_rom23.json +91 -0
- diffneusim/data/reference/musclemimic/myofullbody_mimic_sites.json +261 -0
- diffneusim/data/reference/pose3/pose3_scone.json +305 -0
- diffneusim/data/reference/pose3/pose3_scone.txt +3 -0
- diffneusim/data/reference/pose3/pose3_scone_gait.npz +0 -0
- diffneusim/data/reference/pose3/pose3_scone_mirror.npz +0 -0
- diffneusim/data/reference/pose3/pose3_scone_stand.npz +0 -0
- diffneusim/data/reference/x016run/MD5SUMS +241 -0
- diffneusim/data/reference/x016run/x016run_states.txt +240 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s0_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s1_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s2_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s3_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s4_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s5_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s6_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p00_s7_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s0_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s1_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s2_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s3_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s4_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s5_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s6_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p25_s7_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s0_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s1_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s2_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s3_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s5_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s6_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p50_s7_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s0_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s1_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s2_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s3_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s5_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s6_r3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_l0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_l1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_l2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_l3.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_r0.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_r1.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_r2.npz +0 -0
- diffneusim/data/reference/x016run/x016run_v3p75_s7_r3.npz +0 -0
- diffneusim/data/state_prior/lumbar_poly_fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc.npz +0 -0
- diffneusim/engine/__init__.py +0 -0
- diffneusim/engine/build_tag.py +52 -0
- diffneusim/engine/case_tables.py +46 -0
- diffneusim/engine/d16_body.py +80 -0
- diffneusim/engine/engine14.py +367 -0
- diffneusim/engine/gen_split.py +159 -0
- diffneusim/engine/hand_format.py +69 -0
- diffneusim/engine/live14.py +149 -0
- diffneusim/engine/phase_b_tree.py +137 -0
- diffneusim/engine/soft14.py +130 -0
- diffneusim/engine/soft_capi.py +373 -0
- diffneusim/engine/soft_engine.py +165 -0
- diffneusim/engine/step14.py +132 -0
- diffneusim/engine/tape_format.py +89 -0
- diffneusim/engine/x14cpu.py +163 -0
- diffneusim/env/__init__.py +0 -0
- diffneusim/env/absent.py +20 -0
- diffneusim/env/cpu14.py +105 -0
- diffneusim/env/e0loop14.py +224 -0
- diffneusim/env/env14.py +568 -0
- diffneusim/env/kin_contact14.py +193 -0
- diffneusim/env/mimic_sites_x14.json +366 -0
- diffneusim/env/old_count.py +78 -0
- diffneusim/env/rew14.py +114 -0
- diffneusim/env/rew14_hook.py +105 -0
- diffneusim/g1/__init__.py +1 -0
- diffneusim/g1/arm_a2.py +165 -0
- diffneusim/g1/arm_a3.py +576 -0
- diffneusim/g1/read_a3.py +79 -0
- diffneusim/g1/rg1_read.py +89 -0
- diffneusim/model/__init__.py +66 -0
- diffneusim/model/case.py +17 -0
- diffneusim/model/dnmodel.py +79 -0
- diffneusim/model/fuse_fixed.py +281 -0
- diffneusim/model/monitor.py +834 -0
- diffneusim/models/BODIES.toml +48 -0
- diffneusim/models/MANIFEST.toml +979 -0
- diffneusim/models/cases/G290/case.bin +0 -0
- diffneusim/models/cases/G290/case.json +1 -0
- diffneusim/models/cases/G356-SRC/case.bin +0 -0
- diffneusim/models/cases/G356-SRC/case.json +1 -0
- diffneusim/models/cases/G416/case.bin +0 -0
- diffneusim/models/cases/G416/case.json +1 -0
- diffneusim/models/cases/M290C-SRC/case.bin +0 -0
- diffneusim/models/cases/M290C-SRC/case.json +1 -0
- diffneusim/models/cases/M290R-SRC/case.bin +0 -0
- diffneusim/models/cases/M290R-SRC/case.json +1 -0
- diffneusim/models/cases/M356C-SRC/case.bin +0 -0
- diffneusim/models/cases/M356C-SRC/case.json +1 -0
- diffneusim/models/cases/M356R-SRC/case.bin +0 -0
- diffneusim/models/cases/M356R-SRC/case.json +1 -0
- diffneusim/models/cases/M416C-SRC/case.bin +0 -0
- diffneusim/models/cases/M416C-SRC/case.json +1 -0
- diffneusim/models/derived/d16_expanded_62f77a4bb16b1e67_mmfloor.xml +673 -0
- diffneusim/models/derived/d16_expanded_a1e8b196b2cd7b3c_mmfloor.xml +673 -0
- diffneusim/models/derived/d16_soft_law_019e20820f8633b9_mmfloor.json +7844 -0
- diffneusim/models/derived/d16_soft_law_62f77a4bb16b1e67_mmfloor.json +16855 -0
- diffneusim/models/derived/d16_soft_law_77dbb7213f26e821_mmfloor_rampsb3l_n6t12.json +7883 -0
- diffneusim/models/derived/d16_soft_law_8989b60e44860c5b_mmfloor_rampsb3l_n6t12.json +7883 -0
- diffneusim/models/derived/d16_soft_law_8989b60e44860c5b_mmfloor_rhlsd05_n6t12.json +7868 -0
- diffneusim/models/derived/d16_soft_law_8989b60e44860c5b_mmfloor_rhlsdef_n6t12.json +7868 -0
- diffneusim/models/derived/d16_soft_law_8989b60e44860c5b_mmfloor_rhlsmjd_n6t12.json +7868 -0
- diffneusim/models/derived/d16_soft_law_a1e8b196b2cd7b3c_mmfloor_rampsb3l_n6t12.json +16894 -0
- diffneusim/models/derived/d16_soft_law_a944653edd642082_mmfloor.json +12655 -0
- diffneusim/models/derived/d16_soft_law_a944653edd642082_mmfloor_rampsb3l_n6t12.json +12700 -0
- diffneusim/models/derived/unitree_g1_soft_law.json +15580 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src.dnmodel +28913 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid.dnmodel +29202 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_axfixlegs01.dnmodel +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.dnmodel +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_armless_ball_lspine_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src.dnmodel +46970 -0
- diffneusim/models/fullbody_contact_spinecoupled_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.dnmodel +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src.dnmodel +38570 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid.dnmodel +38923 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_millard_stickspin_wrapvia_mtp60k25_trunkfix_toepair_n1_src_rigid_qk.txt +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1.dnmodel +1 -0
- diffneusim/models/fullbody_contact_spinecoupled_fusedhand_ball_lspine_girdle_osimeq_stickspin_wrapvia_mtp60k25_trunkfix_calf2_pe_toepair_flsrc_n1_qk.txt +1 -0
- diffneusim/models/fullbody_meshes/1mc.stl +0 -0
- diffneusim/models/fullbody_meshes/2distph.stl +0 -0
- diffneusim/models/fullbody_meshes/2mc.stl +0 -0
- diffneusim/models/fullbody_meshes/2midph.stl +0 -0
- diffneusim/models/fullbody_meshes/2proxph.stl +0 -0
- diffneusim/models/fullbody_meshes/3distph.stl +0 -0
- diffneusim/models/fullbody_meshes/3mc.stl +0 -0
- diffneusim/models/fullbody_meshes/3midph.stl +0 -0
- diffneusim/models/fullbody_meshes/3proxph.stl +0 -0
- diffneusim/models/fullbody_meshes/4distph.stl +0 -0
- diffneusim/models/fullbody_meshes/4mc.stl +0 -0
- diffneusim/models/fullbody_meshes/4midph.stl +0 -0
- diffneusim/models/fullbody_meshes/4proxph.stl +0 -0
- diffneusim/models/fullbody_meshes/5distph.stl +0 -0
- diffneusim/models/fullbody_meshes/5mc.stl +0 -0
- diffneusim/models/fullbody_meshes/5midph.stl +0 -0
- diffneusim/models/fullbody_meshes/5proxph.stl +0 -0
- diffneusim/models/fullbody_meshes/NOTICE +2 -0
- diffneusim/models/fullbody_meshes/capitate.stl +0 -0
- diffneusim/models/fullbody_meshes/clavicle.stl +0 -0
- diffneusim/models/fullbody_meshes/hamate.stl +0 -0
- diffneusim/models/fullbody_meshes/hat_cervical.stl +0 -0
- diffneusim/models/fullbody_meshes/hat_jaw.stl +0 -0
- diffneusim/models/fullbody_meshes/hat_skull.stl +0 -0
- diffneusim/models/fullbody_meshes/humerus.stl +0 -0
- diffneusim/models/fullbody_meshes/l_bofoot.stl +0 -0
- diffneusim/models/fullbody_meshes/l_femur.stl +0 -0
- diffneusim/models/fullbody_meshes/l_fibula.stl +0 -0
- diffneusim/models/fullbody_meshes/l_foot.stl +0 -0
- diffneusim/models/fullbody_meshes/l_patella.stl +0 -0
- diffneusim/models/fullbody_meshes/l_pelvis.stl +0 -0
- diffneusim/models/fullbody_meshes/l_talus.stl +0 -0
- diffneusim/models/fullbody_meshes/l_tibia.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar1.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar2.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar3.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar4.stl +0 -0
- diffneusim/models/fullbody_meshes/lumbar5.stl +0 -0
- diffneusim/models/fullbody_meshes/lunate.stl +0 -0
- diffneusim/models/fullbody_meshes/pisiform.stl +0 -0
- diffneusim/models/fullbody_meshes/r_bofoot.stl +0 -0
- diffneusim/models/fullbody_meshes/r_femur.stl +0 -0
- diffneusim/models/fullbody_meshes/r_fibula.stl +0 -0
- diffneusim/models/fullbody_meshes/r_foot.stl +0 -0
- diffneusim/models/fullbody_meshes/r_patella.stl +0 -0
- diffneusim/models/fullbody_meshes/r_pelvis.stl +0 -0
- diffneusim/models/fullbody_meshes/r_talus.stl +0 -0
- diffneusim/models/fullbody_meshes/r_tibia.stl +0 -0
- diffneusim/models/fullbody_meshes/radius.stl +0 -0
- diffneusim/models/fullbody_meshes/sacrum.stl +0 -0
- diffneusim/models/fullbody_meshes/scaphoid.stl +0 -0
- diffneusim/models/fullbody_meshes/scapula.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic10_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic11_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic12_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic1_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic2_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic3_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic4_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic5_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic6_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic7_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic8_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thoracic9_s.stl +0 -0
- diffneusim/models/fullbody_meshes/thorax.stl +0 -0
- diffneusim/models/fullbody_meshes/thumbdist.stl +0 -0
- diffneusim/models/fullbody_meshes/thumbprox.stl +0 -0
- diffneusim/models/fullbody_meshes/trapezium.stl +0 -0
- diffneusim/models/fullbody_meshes/trapezoid.stl +0 -0
- diffneusim/models/fullbody_meshes/triquetrum.stl +0 -0
- diffneusim/models/fullbody_meshes/ulna.stl +0 -0
- diffneusim/models/source/myo_fullbody/UPSTREAM.md +91 -0
- diffneusim/models/source/myoleg/UPSTREAM.md +52 -0
- diffneusim/models/source/unitree_g1/LICENSE.mjlab +202 -0
- diffneusim/models/source/unitree_g1/UPSTREAM.md +38 -0
- diffneusim/models/source/unitree_g1/assets/head_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_ankle_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_ankle_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_elbow_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_hip_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_hip_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_hip_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_knee_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_rubber_hand.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_shoulder_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_shoulder_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_shoulder_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_wrist_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_wrist_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/left_wrist_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/logo_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/pelvis.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/pelvis_contour_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_ankle_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_ankle_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_elbow_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_hip_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_hip_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_hip_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_knee_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_rubber_hand.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_shoulder_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_shoulder_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_shoulder_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_wrist_pitch_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_wrist_roll_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/right_wrist_yaw_link.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/torso_link_rev_1_0.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/waist_roll_link_rev_1_0.STL +0 -0
- diffneusim/models/source/unitree_g1/assets/waist_yaw_link_rev_1_0.STL +0 -0
- diffneusim/models/source/unitree_g1/dump_mjlab_reference.py +30 -0
- diffneusim/models/source/unitree_g1/g1.xml +308 -0
- diffneusim/models/source/unitree_g1/g1_constants.py +298 -0
- diffneusim/models/source/unitree_g1/mjlab_compiled_reference.json +857 -0
- diffneusim/models/unitree_g1.dnmodel +4393 -0
- diffneusim/models/unitree_g1_selfcol.dnmodel +20824 -0
- diffneusim/rl/__init__.py +2 -0
- diffneusim/rl/dynsyn_layer.py +146 -0
- diffneusim/rl/footstep_plan.py +337 -0
- diffneusim/rl/g1_bm_env.py +572 -0
- diffneusim/rl/g1_bm_eval.py +168 -0
- diffneusim/rl/g1_bm_fused.py +275 -0
- diffneusim/rl/g1_bm_ppo.py +622 -0
- diffneusim/rl/g1_bm_sapo.py +551 -0
- diffneusim/rl/g1_ppo.py +395 -0
- diffneusim/rl/g1_sapo_soft.py +240 -0
- diffneusim/rl/g1_soft_env.py +452 -0
- diffneusim/rl/g1_soft_grad.py +145 -0
- diffneusim/rl/geyer_curves_torch.py +108 -0
- diffneusim/rl/gpu_fullbody_vec_env.py +1241 -0
- diffneusim/rl/imitation.py +2027 -0
- diffneusim/rl/imitation_reward_v2.py +248 -0
- diffneusim/rl/imitation_reward_v3.py +349 -0
- diffneusim/rl/latent_task.py +175 -0
- diffneusim/rl/llc_reward.py +316 -0
- diffneusim/rl/millard_curves_torch.py +154 -0
- diffneusim/rl/mirror_symmetry.py +212 -0
- diffneusim/rl/model_path.py +35 -0
- diffneusim/rl/mvae_recon.py +123 -0
- diffneusim/rl/nets_shac.py +599 -0
- diffneusim/rl/reset_pool.py +154 -0
- diffneusim/rl/sapo_capture.py +873 -0
- diffneusim/rl/sapo_vec.py +1051 -0
- diffneusim/rl/shac_vec.py +346 -0
- diffneusim/rl/state_prior.py +151 -0
- diffneusim/rl/step_library.py +105 -0
- diffneusim/rl/task_walk_env.py +1793 -0
- diffneusim/rl/task_walk_reward.py +3300 -0
- diffneusim/run.py +23 -0
- diffneusim/run_env.py +46 -0
- diffneusim/tasks/__init__.py +147 -0
- diffneusim/tasks/legacy_names.py +63 -0
- diffneusim/tasks/paths.py +79 -0
- diffneusim/tasks/settings.py +202 -0
- diffneusim/third_party/instantmimic_947430ee/LICENSE +202 -0
- diffneusim/third_party/instantmimic_947430ee/NOTICE +19 -0
- diffneusim/third_party/instantmimic_947430ee/README.md +31 -0
- diffneusim/third_party/instantmimic_947430ee/instantmimic/envs/unitree_g1/tasks/beyondmimic_tracking/benchmark_protocol.py +106 -0
- diffneusim/third_party/instantmimic_947430ee/instantmimic/envs/unitree_g1/tasks/beyondmimic_tracking/metrics.py +214 -0
- diffneusim/third_party/instantmimic_947430ee/instantmimic/envs/unitree_g1/tasks/beyondmimic_tracking/reference.py +513 -0
- diffneusim/third_party/instantmimic_947430ee/instantmimic/motion/quaternion.py +193 -0
- diffneusim/train/__init__.py +0 -0
- diffneusim/train/eval_ckpt.py +239 -0
- diffneusim/train/eval_mimic.py +133 -0
- diffneusim/train/gait_report.py +203 -0
- diffneusim/train/gcot_chain.py +51 -0
- diffneusim/train/levers.py +135 -0
- diffneusim/train/masked_reset.py +314 -0
- diffneusim/train/rl_algorithm_suite.py +917 -0
- diffneusim/train/train14.py +240 -0
- diffneusim/train/train_tw14.py +674 -0
- diffneusim/viz/__init__.py +5 -0
- diffneusim/viz/__main__.py +41 -0
- diffneusim/viz/camera.py +115 -0
- diffneusim/viz/dnrec.py +118 -0
- diffneusim/viz/dnrec_io.py +686 -0
- diffneusim/viz/hud.py +565 -0
- diffneusim/viz/meshes.py +458 -0
- diffneusim/viz/play.py +237 -0
- diffneusim/viz/record.py +74 -0
- diffneusim/viz/render.py +1402 -0
- diffneusim/viz/renderer.py +268 -0
- diffneusim/viz/rl_env_render.py +635 -0
- diffneusim/viz/snapshot.py +54 -0
- diffneusim/viz/strobe.py +124 -0
- diffneusim/viz/to_mp4.py +58 -0
- diffneusim/viz/ui.py +481 -0
- diffneusim/viz/viewer.py +2086 -0
- diffneusim-1.0.0.dist-info/METADATA +226 -0
- diffneusim-1.0.0.dist-info/RECORD +682 -0
- diffneusim-1.0.0.dist-info/WHEEL +5 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSE +201 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/BSD-3-Clause-NC-ARMS-hand-wrist-4.3.txt +20 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/BSD-3-Clause-NC-MoBL-ARMS.txt +25 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/CC-BY-3.0-OpenSim-geometry.txt +25 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Christophy2012-lumbarspine.txt +10 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Lai2017-model-high-flex.txt +10 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Lee2015-hand_muscle.txt +11 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Rajagopal2016-full_body.txt +11 -0
- diffneusim-1.0.0.dist-info/licenses/LICENSES/MIT-Uhlrich2022-fbmodpassivecal.txt +10 -0
- diffneusim-1.0.0.dist-info/licenses/NOTICE +274 -0
- diffneusim-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// D16 14x adjoint, the constraint rows (engine C, 2026-11-03; tools/d16_x14adj/PLAN.md "rows14"): the cotangent of
|
|
3
|
+
// F_rows(q, v) = sum over the QUADRATIC rows r of D_r (J_r lam) (J_r a - aref_r)
|
|
4
|
+
// for held lam, a, the contact list (pair, slot) and the zones (the solve's decisions, from the tape).
|
|
5
|
+
// The rows are recomputed from the tree's poses (tree14's DOWN), exactly as the L2 forms them (core/soft/gpu/l2x14.cuh):
|
|
6
|
+
// - limits in limit order, lower then upper, with the TRUE slope J = +-c on the master (the hand's unit form only encodes the
|
|
7
|
+
// solve);
|
|
8
|
+
// - then the contacts in contact order, each by collide14 at its (pair, slot), make_frame, condim 1 (one row) or 3 (four pyramid
|
|
9
|
+
// rows d = F0 +- mu Fk).
|
|
10
|
+
// Law: impedance -> R (pyramid: c R0, c = 2 mu^2 / impratio) -> D = 1 / R, aref = -B vel - K imp (dist - margin).
|
|
11
|
+
// A contact row's J x = d . (P_x(b2) - P_x(b1)), P_x(b) = vo_x + w_x x (p - x_b): the point velocity of body b under the twist of
|
|
12
|
+
// x taken as joint velocities (x = lam: tree14's (lw, lo); x = a: (wa, voa); x = v: (w, vo)), the signed support lists of L2.
|
|
13
|
+
// Reverse:
|
|
14
|
+
// per row the scalar cotangents; per contact the three channels' point cotangents, deposited into tree14's accumulators of its
|
|
15
|
+
// two bodies (the twist words and the pose wrench about O: the contact point and the body origin as points, the geoms' pose
|
|
16
|
+
// cotangents through the collider's reverse: B's collide_reverse for plane / capsule pairs, passive's sibling
|
|
17
|
+
// collide14_adj.h for the plane-ellipsoid); limits straight into q_bar / v_bar of their master dof.
|
|
18
|
+
// ADDS into the cotangents: the caller's convention is F_rows itself (the shell negates through lam).
|
|
19
|
+
#include "x14adj_common.h"
|
|
20
|
+
#include "tree14_adj.h"
|
|
21
|
+
#include "collide14_adj.h"
|
|
22
|
+
#include "../collide.h"
|
|
23
|
+
#include "../impedance.h"
|
|
24
|
+
#include "../x14/collide14.h"
|
|
25
|
+
#include "../adj/rows_adj.h" // B's impedance_dpos, make_frame_reverse, collide_reverse (sphere / capsule / plane)
|
|
26
|
+
|
|
27
|
+
namespace d16::x14adj {
|
|
28
|
+
|
|
29
|
+
#if defined(D16_NV_GT64) // a body with more limits than the 14x (tools/d16_bodies/PHASE_B.md section 6.2): every limit has a slot, so `nl < kMaxLim14` drops none
|
|
30
|
+
constexpr int kMaxCon14 = 64, kMaxLim14 = MD::NLIM, kConBatch14 = 8;
|
|
31
|
+
static_assert(kMaxLim14 >= MD::NLIM, "one limit row slot per limit (one side at most: gen14 asserts range > 2 margin)");
|
|
32
|
+
#else
|
|
33
|
+
constexpr int kMaxCon14 = 64, kMaxLim14 = 64, kConBatch14 = 8; // contacts reversed 8 at a time (lane = contact)
|
|
34
|
+
#endif
|
|
35
|
+
|
|
36
|
+
template <class T> struct Rows14 {
|
|
37
|
+
#if defined(D16_X14_ADJ5) // (11-08; up/PREREG_X14ADJ5.md) the 14x's k_adj14 at 5 per SM: the row indices in 16 bits; every read widens to int
|
|
38
|
+
int ncon, nlim;
|
|
39
|
+
short crow0[kMaxCon14];
|
|
40
|
+
short lim_l[kMaxLim14], lim_side[kMaxLim14];
|
|
41
|
+
#else
|
|
42
|
+
int ncon, nlim, crow0[kMaxCon14];
|
|
43
|
+
int lim_l[kMaxLim14], lim_side[kMaxLim14];
|
|
44
|
+
#endif
|
|
45
|
+
T lq[kMaxLim14], lv[kMaxLim14]; // the limit rows' q / v cotangents (on their master dof)
|
|
46
|
+
int cb[kConBatch14][2]; // the batch's contacts' bodies (b2, b1; 0: the world)
|
|
47
|
+
T dep[kConBatch14][2][kMsg]; // their deposits into tree14's accumulators (the same word layout)
|
|
48
|
+
int flags; // 1: a contact did not reproduce at its (pair, slot)
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
template <class T> DN_HOST_DEVICE inline bool zone_on(const unsigned* zone, int r) { return (zone[r >> 5] >> (r & 31)) & 1u; }
|
|
52
|
+
|
|
53
|
+
// the geom's world pose from its body's (L2's GEOM phase)
|
|
54
|
+
template <class T> DN_HOST_DEVICE inline void r14_geom_pose(const Tree14<T>& s, const T* V, int g, js::soft::GeomPose<T>& G) {
|
|
55
|
+
const int b = X14T(GBody)[g];
|
|
56
|
+
const T* gv = V + MD::O_GEOM + 15 * g;
|
|
57
|
+
T R[9];
|
|
58
|
+
qmat(s.xquat[b], R);
|
|
59
|
+
const T gpos[3] = {gv[3], gv[4], gv[5]};
|
|
60
|
+
T t[3];
|
|
61
|
+
mv(R, gpos, t);
|
|
62
|
+
G.p = js::soft::V3<T>{s.xpos[b][0] + t[0], s.xpos[b][1] + t[1], s.xpos[b][2] + t[2]};
|
|
63
|
+
for (int i = 0; i < 3; ++i)
|
|
64
|
+
for (int j = 0; j < 3; ++j) G.R[3 * i + j] = R[3 * i] * gv[6 + j] + R[3 * i + 1] * gv[9 + j] + R[3 * i + 2] * gv[12 + j];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// one limit row (row r of the hand's order) of limit l, side -1 (lower) / +1 (upper): its q / v cotangents of D s e
|
|
68
|
+
template <class T> DN_HOST_DEVICE inline void r14_limit(const Tree14<T>& s, const T* V, int l, int side, T* qb, T* vb) {
|
|
69
|
+
using namespace js::soft;
|
|
70
|
+
const T* lv = V + MD::O_LIM + 12 * l;
|
|
71
|
+
const int dof = X14T(LimDof)[l];
|
|
72
|
+
const T c = lv[0], q = c * s.q[X14T(LimQadr)[l]], margin = lv[3], diagA = lv[4];
|
|
73
|
+
const T dist = side < 0 ? q - lv[1] : lv[2] - q;
|
|
74
|
+
const KBT<T> kb{lv[5], lv[6]};
|
|
75
|
+
const T imp5[5] = {lv[7], lv[8], lv[9], lv[10], lv[11]};
|
|
76
|
+
const T Jd = side < 0 ? c : -c;
|
|
77
|
+
const T Jq = X14ADJ_PLANT == 31 ? (side < 0 ? T(1) : T(-1)) : Jd; // (planted: the hand's unit slope in the q path)
|
|
78
|
+
const T imp = impedance<T, T>(imp5, dist, margin);
|
|
79
|
+
const T R = regularizer<T, T>(imp, diagA), D = T(1) / R;
|
|
80
|
+
const T vel = Jd * s.v[dof];
|
|
81
|
+
const T aref = reference_accel<T, T>(kb, imp, vel, dist, margin);
|
|
82
|
+
const T sl = Jd * s.lam[dof], t = Jd * s.a[dof], e = t - aref;
|
|
83
|
+
// F = D sl e: Dbar = sl e, arefbar = -D sl
|
|
84
|
+
const T Db = sl * e, arb = -D * sl;
|
|
85
|
+
const T velb = -kb.B * arb;
|
|
86
|
+
T impb = -kb.K * (dist - margin) * arb, distb = -kb.K * imp * arb;
|
|
87
|
+
const T Rb = -D * D * Db;
|
|
88
|
+
JS_DEVICE_ASSERT((T(1) - imp) * diagA / imp > T(kMinVal) && "r14_limit: the regularizer at mjMINVAL");
|
|
89
|
+
impb = impb + Rb * (-diagA / (imp * imp));
|
|
90
|
+
distb = distb + impb * adj::impedance_dpos<T, T>(imp5, dist, margin);
|
|
91
|
+
*qb = distb * Jq;
|
|
92
|
+
*vb = velb * Jd;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// one contact (index ci, its rows from row0): the deposits into its two bodies' accumulators
|
|
96
|
+
template <class T>
|
|
97
|
+
DN_HOST_DEVICE inline bool r14_contact(const Tree14<T>& s, const T* V, int pr, int slot, int row0, const unsigned* zone,
|
|
98
|
+
int* bodies, T (*dep)[kMsg]) {
|
|
99
|
+
using namespace js::soft;
|
|
100
|
+
using V3T = V3<T>;
|
|
101
|
+
const int g1 = X14T(PG1)[pr], g2 = X14T(PG2)[pr], t1 = X14T(GType)[g1], t2 = X14T(GType)[g2];
|
|
102
|
+
const int b1 = X14T(GBody)[g1], b2 = X14T(GBody)[g2];
|
|
103
|
+
bodies[0] = b2; bodies[1] = b1;
|
|
104
|
+
for (int sd = 0; sd < 2; ++sd)
|
|
105
|
+
for (int k = 0; k < kMsg; ++k) dep[sd][k] = T(0);
|
|
106
|
+
GeomPose<T> G1, G2;
|
|
107
|
+
r14_geom_pose(s, V, g1, G1);
|
|
108
|
+
r14_geom_pose(s, V, g2, G2);
|
|
109
|
+
const T* pv = V + MD::O_PAIR + 10 * pr;
|
|
110
|
+
const T mu0 = pv[0], mu = mu0 < T(1e-5) ? T(1e-5) : mu0, margin = pv[1], gap = pv[2];
|
|
111
|
+
const T sz1[3] = {V[MD::O_GEOM + 15 * g1], V[MD::O_GEOM + 15 * g1 + 1], V[MD::O_GEOM + 15 * g1 + 2]};
|
|
112
|
+
const T sz2[3] = {V[MD::O_GEOM + 15 * g2], V[MD::O_GEOM + 15 * g2 + 1], V[MD::O_GEOM + 15 * g2 + 2]};
|
|
113
|
+
PreContact<T> all[4];
|
|
114
|
+
const int n = js::soft::x14::collide14<T, T>(all, margin + gap, t1, G1, sz1, t2, G2, sz2);
|
|
115
|
+
int k0 = -1;
|
|
116
|
+
for (int k = 0; k < n; ++k) // the forward's decision is held: the contact by its slot (its dist < margin test was the forward's)
|
|
117
|
+
if (all[k].slot == slot) k0 = k;
|
|
118
|
+
if (k0 < 0) return false; // the collider no longer produces the slot (flagged by the caller)
|
|
119
|
+
const PreContact<T>& pc = all[k0];
|
|
120
|
+
V3T F3[3];
|
|
121
|
+
make_frame(pc.normal, pc.tangent, F3);
|
|
122
|
+
const T dist = pc.dist;
|
|
123
|
+
const T pp[3] = {pc.pos.x, pc.pos.y, pc.pos.z};
|
|
124
|
+
// the three channels' point velocities of both bodies: x = 0 lam (lw, lo), 1 a (wa, voa), 2 v (w, vo)
|
|
125
|
+
T P[3][2][3];
|
|
126
|
+
for (int sd = 0; sd < 2; ++sd) {
|
|
127
|
+
const int b = bodies[sd];
|
|
128
|
+
for (int x = 0; x < 3; ++x) {
|
|
129
|
+
if (b == 0) { for (int i = 0; i < 3; ++i) P[x][sd][i] = T(0); continue; }
|
|
130
|
+
const T* wx = x == 0 ? s.lw[b] : (x == 1 ? s.wa[b] : s.w[b]);
|
|
131
|
+
const T* vx = x == 0 ? s.lo[b] : (x == 1 ? s.voa[b] : s.vo[b]);
|
|
132
|
+
const T d[3] = {pp[0] - s.xpos[b][0], pp[1] - s.xpos[b][1], pp[2] - s.xpos[b][2]};
|
|
133
|
+
T wd[3];
|
|
134
|
+
crs(wx, d, wd);
|
|
135
|
+
for (int i = 0; i < 3; ++i) P[x][sd][i] = vx[i] + wd[i];
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
T dP[3][3];
|
|
139
|
+
for (int x = 0; x < 3; ++x)
|
|
140
|
+
for (int i = 0; i < 3; ++i) dP[x][i] = P[x][0][i] - P[x][1][i];
|
|
141
|
+
const int condim = X14T(PCondim)[pr], nr = condim == 1 ? 1 : 4;
|
|
142
|
+
const T Fm[3][3] = {{F3[0].x, F3[0].y, F3[0].z}, {F3[1].x, F3[1].y, F3[1].z}, {F3[2].x, F3[2].y, F3[2].z}};
|
|
143
|
+
T dr[4][3];
|
|
144
|
+
for (int j = 0; j < nr; ++j) {
|
|
145
|
+
if (condim == 1) { for (int i = 0; i < 3; ++i) dr[j][i] = Fm[0][i]; continue; }
|
|
146
|
+
const int kk = 1 + j / 2;
|
|
147
|
+
const T sg = j % 2 == 0 ? mu : -mu;
|
|
148
|
+
for (int i = 0; i < 3; ++i) dr[j][i] = Fm[0][i] + sg * Fm[kk][i];
|
|
149
|
+
}
|
|
150
|
+
// the law (L2's): imp, R, D, aref per row
|
|
151
|
+
const KBT<T> kb{pv[3], pv[4]};
|
|
152
|
+
const T imp5[5] = {pv[5], pv[6], pv[7], pv[8], pv[9]};
|
|
153
|
+
const T tran = V[MD::O_BIW + 2 * b1] + V[MD::O_BIW + 2 * b2];
|
|
154
|
+
const T imp = impedance<T, T>(imp5, dist, margin);
|
|
155
|
+
T D, cR, dA;
|
|
156
|
+
if (condim == 1) { dA = tran; cR = T(1); D = T(1) / regularizer<T, T>(imp, dA); }
|
|
157
|
+
else {
|
|
158
|
+
dA = tran + mu * mu * tran;
|
|
159
|
+
const T R0 = regularizer<T, T>(imp, dA);
|
|
160
|
+
const T Rpy = pyramid_regularizer<T, T>(R0, mu, T(MD::IMPRATIO));
|
|
161
|
+
cR = Rpy / R0; // 2 mu^2 / impratio
|
|
162
|
+
D = T(1) / Rpy;
|
|
163
|
+
}
|
|
164
|
+
JS_DEVICE_ASSERT((T(1) - imp) * dA / imp > T(kMinVal) && "r14_contact: the regularizer at mjMINVAL");
|
|
165
|
+
// the rows' scalar cotangents
|
|
166
|
+
T co[4][3]; // per row: sbar (lam), tbar (a), velbar (v)
|
|
167
|
+
T Db = T(0), impb = T(0), distb = T(0);
|
|
168
|
+
for (int j = 0; j < nr; ++j) {
|
|
169
|
+
co[j][0] = co[j][1] = co[j][2] = T(0);
|
|
170
|
+
if (!zone_on<T>(zone, row0 + j)) continue;
|
|
171
|
+
const T sl = dot3(dr[j], dP[0]), t = dot3(dr[j], dP[1]), vel = dot3(dr[j], dP[2]);
|
|
172
|
+
const T aref = reference_accel<T, T>(kb, imp, vel, dist, margin);
|
|
173
|
+
const T e = t - aref;
|
|
174
|
+
Db = Db + sl * e;
|
|
175
|
+
co[j][0] = D * e; co[j][1] = D * sl;
|
|
176
|
+
const T arb = -D * sl;
|
|
177
|
+
co[j][2] = -kb.B * arb;
|
|
178
|
+
impb = impb - kb.K * (dist - margin) * arb;
|
|
179
|
+
distb = distb - kb.K * imp * arb;
|
|
180
|
+
}
|
|
181
|
+
const T Rb = -D * D * Db;
|
|
182
|
+
impb = impb + Rb * cR * (-dA / (imp * imp));
|
|
183
|
+
distb = distb + impb * (X14ADJ_PLANT == 33 ? T(0) : adj::impedance_dpos<T, T>(imp5, dist, margin)); // (33: planted)
|
|
184
|
+
// the channels' direction-weighted cotangent vectors W[x] = sum_j co_j[x] d_j, and the frame's cotangent
|
|
185
|
+
T Wv[3][3];
|
|
186
|
+
V3T fbar[3] = {V3T{T(0), T(0), T(0)}, V3T{T(0), T(0), T(0)}, V3T{T(0), T(0), T(0)}};
|
|
187
|
+
for (int x = 0; x < 3; ++x) for (int i = 0; i < 3; ++i) Wv[x][i] = T(0);
|
|
188
|
+
for (int j = 0; j < nr; ++j) {
|
|
189
|
+
for (int x = 0; x < 3; ++x)
|
|
190
|
+
for (int i = 0; i < 3; ++i) Wv[x][i] = Wv[x][i] + co[j][x] * dr[j][i];
|
|
191
|
+
// d_j . dP_x per channel: frame0 gets sum_x co_j[x] dP_x; the pyramid's tangent k gets +-mu of it
|
|
192
|
+
T g3[3] = {T(0), T(0), T(0)};
|
|
193
|
+
for (int x = 0; x < 3; ++x) for (int i = 0; i < 3; ++i) g3[i] = g3[i] + co[j][x] * dP[x][i];
|
|
194
|
+
fbar[0] = V3T{fbar[0].x + g3[0], fbar[0].y + g3[1], fbar[0].z + g3[2]};
|
|
195
|
+
if (condim != 1) {
|
|
196
|
+
const int kk = 1 + j / 2;
|
|
197
|
+
const T sg = j % 2 == 0 ? mu : -mu;
|
|
198
|
+
fbar[kk] = V3T{fbar[kk].x + sg * g3[0], fbar[kk].y + sg * g3[1], fbar[kk].z + sg * g3[2]};
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
// the bodies' twist words and the points' cotangents (the contact point p, the body origins)
|
|
202
|
+
T pbar[3] = {T(0), T(0), T(0)};
|
|
203
|
+
for (int sd = 0; sd < 2; ++sd) {
|
|
204
|
+
const int b = bodies[sd];
|
|
205
|
+
if (b == 0) continue;
|
|
206
|
+
const T sgn = sd == 0 ? T(1) : T(-1);
|
|
207
|
+
const T d[3] = {pp[0] - s.xpos[b][0], pp[1] - s.xpos[b][1], pp[2] - s.xpos[b][2]};
|
|
208
|
+
T* o = dep[sd];
|
|
209
|
+
const int wo[3] = {kMLW, kMWA, kMW}, vo[3] = {kMLO, kMVOA, kMVO};
|
|
210
|
+
T xbb[3] = {T(0), T(0), T(0)};
|
|
211
|
+
for (int x = 0; x < 3; ++x) {
|
|
212
|
+
const T Wx[3] = {sgn * Wv[x][0], sgn * Wv[x][1], sgn * Wv[x][2]};
|
|
213
|
+
const T* wx = x == 0 ? s.lw[b] : (x == 1 ? s.wa[b] : s.w[b]);
|
|
214
|
+
add3(o + vo[x], Wx); // vobar += W
|
|
215
|
+
add_crs(o + wo[x], d, Wx); // wbar += (p - x_b) x W
|
|
216
|
+
T t3[3];
|
|
217
|
+
crs(Wx, wx, t3); // d/dp [W . (w x (p - x_b))] = W x w
|
|
218
|
+
add3(pbar, t3);
|
|
219
|
+
for (int i = 0; i < 3; ++i) xbb[i] = xbb[i] - t3[i];
|
|
220
|
+
}
|
|
221
|
+
// the body origin as a point: force xbb at x_b, torque about O (x_b - O) x xbb
|
|
222
|
+
add3(o + kMF, xbb);
|
|
223
|
+
const T xo[3] = {s.xpos[b][0] - s.xpos[1][0], s.xpos[b][1] - s.xpos[1][1], s.xpos[b][2] - s.xpos[1][2]};
|
|
224
|
+
add_crs(o + kMT, xo, xbb);
|
|
225
|
+
}
|
|
226
|
+
// the contact's outputs -> the geoms' poses -> the bodies' wrenches about O
|
|
227
|
+
V3T nb, tb;
|
|
228
|
+
bool tused;
|
|
229
|
+
if (X14ADJ_PLANT == 32) for (int k = 0; k < 3; ++k) fbar[k] = V3T{T(0), T(0), T(0)}; // (planted: no frame cotangent)
|
|
230
|
+
adj::make_frame_reverse<T>(pc.normal, pc.tangent, fbar, nb, tb, tused);
|
|
231
|
+
if (!tused) tb = V3T{T(0), T(0), T(0)}; // (B's rule: the hint's cotangent only when the frame used it)
|
|
232
|
+
const V3T posb{pbar[0], pbar[1], pbar[2]};
|
|
233
|
+
T xgb[2][3] = {{T(0), T(0), T(0)}, {T(0), T(0), T(0)}}, rgb[2][3] = {{T(0), T(0), T(0)}, {T(0), T(0), T(0)}}; // g2, g1
|
|
234
|
+
if (t1 == 0 && t2 == 4) { // plane-ellipsoid: the frame is the plane's (no pose dependence: nb, tb unused)
|
|
235
|
+
T Rg[9];
|
|
236
|
+
for (int k = 0; k < 9; ++k) Rg[k] = G2.R[k];
|
|
237
|
+
collide14_plane_ellipsoid_vjp<T>(V, pr, Rg, distb, pbar, xgb[0], rgb[0]);
|
|
238
|
+
} else {
|
|
239
|
+
struct G14 { int type; T size[3]; } ga{t1, {sz1[0], sz1[1], sz1[2]}}, gb{t2, {sz2[0], sz2[1], sz2[2]}};
|
|
240
|
+
adj::GeomBar<T> ba{V3T{T(0), T(0), T(0)}, V3T{T(0), T(0), T(0)}}, bb{V3T{T(0), T(0), T(0)}, V3T{T(0), T(0), T(0)}};
|
|
241
|
+
adj::collide_reverse<T>(b1 == 0, ga, G1, gb, G2, slot, distb, posb, nb, tb, ba, bb);
|
|
242
|
+
const V3T z1 = zaxis(G1.R), z2 = zaxis(G2.R);
|
|
243
|
+
xgb[0][0] = bb.p.x; xgb[0][1] = bb.p.y; xgb[0][2] = bb.p.z;
|
|
244
|
+
xgb[1][0] = ba.p.x; xgb[1][1] = ba.p.y; xgb[1][2] = ba.p.z;
|
|
245
|
+
const V3T r2 = js::so3::cross(z2, bb.z), r1 = js::so3::cross(z1, ba.z); // z_bar . (dphi x z) = dphi . (z x z_bar)
|
|
246
|
+
rgb[0][0] = r2.x; rgb[0][1] = r2.y; rgb[0][2] = r2.z;
|
|
247
|
+
rgb[1][0] = r1.x; rgb[1][1] = r1.y; rgb[1][2] = r1.z;
|
|
248
|
+
}
|
|
249
|
+
const GeomPose<T>* GP[2] = {&G2, &G1};
|
|
250
|
+
for (int sd = 0; sd < 2; ++sd) {
|
|
251
|
+
if (bodies[sd] == 0) continue;
|
|
252
|
+
T* o = dep[sd];
|
|
253
|
+
add3(o + kMF, xgb[sd]);
|
|
254
|
+
const T xo[3] = {GP[sd]->p.x - s.xpos[1][0], GP[sd]->p.y - s.xpos[1][1], GP[sd]->p.z - s.xpos[1][2]};
|
|
255
|
+
add_crs(o + kMT, xo, xgb[sd]);
|
|
256
|
+
add3(o + kMT, rgb[sd]);
|
|
257
|
+
}
|
|
258
|
+
return true;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// the rows' VALUE F_rows from the tree's state (the same recomputation as the reverse; the self-check differentiates it in Dual)
|
|
262
|
+
template <class T>
|
|
263
|
+
DN_HOST_DEVICE inline T rows14_value(const Tree14<T>& s, const T* V, int ncon, const int* con_pair, const int* con_slot,
|
|
264
|
+
const unsigned* zone, int* ok) {
|
|
265
|
+
using namespace js::soft;
|
|
266
|
+
T F = T(0);
|
|
267
|
+
int r = 0;
|
|
268
|
+
for (int l = 0; l < MD::NLIM; ++l) {
|
|
269
|
+
const T* lv = V + MD::O_LIM + 12 * l;
|
|
270
|
+
const int dof = X14T(LimDof)[l];
|
|
271
|
+
const T c = lv[0], q = c * s.q[X14T(LimQadr)[l]], margin = lv[3], diagA = lv[4];
|
|
272
|
+
for (int side = -1; side <= 1; side += 2) {
|
|
273
|
+
const T dist = side < 0 ? q - lv[1] : lv[2] - q;
|
|
274
|
+
if (!(dist < margin)) continue;
|
|
275
|
+
if (zone_on<T>(zone, r)) {
|
|
276
|
+
const KBT<T> kb{lv[5], lv[6]};
|
|
277
|
+
const T imp5[5] = {lv[7], lv[8], lv[9], lv[10], lv[11]};
|
|
278
|
+
const T Jd = side < 0 ? c : -c;
|
|
279
|
+
const T imp = impedance<T, T>(imp5, dist, margin), D = T(1) / regularizer<T, T>(imp, diagA);
|
|
280
|
+
const T aref = reference_accel<T, T>(kb, imp, Jd * s.v[dof], dist, margin);
|
|
281
|
+
F = F + D * (Jd * s.lam[dof]) * (Jd * s.a[dof] - aref);
|
|
282
|
+
}
|
|
283
|
+
++r;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
for (int c = 0; c < ncon; ++c) {
|
|
287
|
+
const int pr = con_pair[c], slot = con_slot[c];
|
|
288
|
+
const int g1 = X14T(PG1)[pr], g2 = X14T(PG2)[pr], t1 = X14T(GType)[g1], t2 = X14T(GType)[g2];
|
|
289
|
+
const int bod[2] = {X14T(GBody)[g2], X14T(GBody)[g1]};
|
|
290
|
+
GeomPose<T> G1, G2;
|
|
291
|
+
r14_geom_pose(s, V, g1, G1);
|
|
292
|
+
r14_geom_pose(s, V, g2, G2);
|
|
293
|
+
const T* pv = V + MD::O_PAIR + 10 * pr;
|
|
294
|
+
const T mu0 = pv[0], mu = mu0 < T(1e-5) ? T(1e-5) : mu0, margin = pv[1], gap = pv[2];
|
|
295
|
+
const T sz1[3] = {V[MD::O_GEOM + 15 * g1], V[MD::O_GEOM + 15 * g1 + 1], V[MD::O_GEOM + 15 * g1 + 2]};
|
|
296
|
+
const T sz2[3] = {V[MD::O_GEOM + 15 * g2], V[MD::O_GEOM + 15 * g2 + 1], V[MD::O_GEOM + 15 * g2 + 2]};
|
|
297
|
+
PreContact<T> all[4];
|
|
298
|
+
const int n = js::soft::x14::collide14<T, T>(all, margin + gap, t1, G1, sz1, t2, G2, sz2);
|
|
299
|
+
int k0 = -1;
|
|
300
|
+
for (int k = 0; k < n; ++k)
|
|
301
|
+
if (all[k].slot == slot) k0 = k;
|
|
302
|
+
if (k0 < 0) { *ok = 0; return F; }
|
|
303
|
+
V3<T> F3[3];
|
|
304
|
+
make_frame(all[k0].normal, all[k0].tangent, F3);
|
|
305
|
+
const T pp[3] = {all[k0].pos.x, all[k0].pos.y, all[k0].pos.z}, dist = all[k0].dist;
|
|
306
|
+
T dP[3][3];
|
|
307
|
+
for (int x = 0; x < 3; ++x) {
|
|
308
|
+
T P2[2][3];
|
|
309
|
+
for (int sd = 0; sd < 2; ++sd) {
|
|
310
|
+
const int b = bod[sd];
|
|
311
|
+
if (b == 0) { for (int i = 0; i < 3; ++i) P2[sd][i] = T(0); continue; }
|
|
312
|
+
const T* wx = x == 0 ? s.lw[b] : (x == 1 ? s.wa[b] : s.w[b]);
|
|
313
|
+
const T* vx = x == 0 ? s.lo[b] : (x == 1 ? s.voa[b] : s.vo[b]);
|
|
314
|
+
const T d[3] = {pp[0] - s.xpos[b][0], pp[1] - s.xpos[b][1], pp[2] - s.xpos[b][2]};
|
|
315
|
+
T wd[3];
|
|
316
|
+
crs(wx, d, wd);
|
|
317
|
+
for (int i = 0; i < 3; ++i) P2[sd][i] = vx[i] + wd[i];
|
|
318
|
+
}
|
|
319
|
+
for (int i = 0; i < 3; ++i) dP[x][i] = P2[0][i] - P2[1][i];
|
|
320
|
+
}
|
|
321
|
+
const int condim = X14T(PCondim)[pr], nr = condim == 1 ? 1 : 4;
|
|
322
|
+
const KBT<T> kb{pv[3], pv[4]};
|
|
323
|
+
const T imp5[5] = {pv[5], pv[6], pv[7], pv[8], pv[9]};
|
|
324
|
+
const T tran = V[MD::O_BIW + 2 * bod[1]] + V[MD::O_BIW + 2 * bod[0]];
|
|
325
|
+
const T imp = impedance<T, T>(imp5, dist, margin);
|
|
326
|
+
T D;
|
|
327
|
+
if (condim == 1) D = T(1) / regularizer<T, T>(imp, tran);
|
|
328
|
+
else D = T(1) / pyramid_regularizer<T, T>(regularizer<T, T>(imp, tran + mu * mu * tran), mu, T(MD::IMPRATIO));
|
|
329
|
+
for (int j = 0; j < nr; ++j, ++r) {
|
|
330
|
+
if (!zone_on<T>(zone, r)) continue;
|
|
331
|
+
T d[3];
|
|
332
|
+
for (int i = 0; i < 3; ++i) {
|
|
333
|
+
const T f0 = i == 0 ? F3[0].x : (i == 1 ? F3[0].y : F3[0].z);
|
|
334
|
+
if (condim == 1) { d[i] = f0; continue; }
|
|
335
|
+
const int kk = 1 + j / 2;
|
|
336
|
+
const T fk = i == 0 ? F3[kk].x : (i == 1 ? F3[kk].y : F3[kk].z);
|
|
337
|
+
d[i] = f0 + (j % 2 == 0 ? mu : -mu) * fk;
|
|
338
|
+
}
|
|
339
|
+
const T sl = dot3(d, dP[0]), t = dot3(d, dP[1]), vel = dot3(d, dP[2]);
|
|
340
|
+
F = F + D * sl * (t - reference_accel<T, T>(kb, imp, vel, dist, margin));
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
return F;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// the rows' reverse for one world: limits into qbar / vbar (by master dof, row order), contacts into s.acc (by body, contact
|
|
347
|
+
// order). con_pair / con_slot [ncon]: the tape's contacts; zone: the tape's zone words. Call between tree14's LOCAL and UP.
|
|
348
|
+
template <class T>
|
|
349
|
+
DN_HOST_DEVICE inline void rows14_vjp(Tree14<T>& s, Rows14<T>& w, const T* V, int ncon, const D16_IDX_T* con_pair,
|
|
350
|
+
const D16_IDX_T* con_slot, int nlim_tape, const unsigned* zone, T* qbar, T* vbar, int lane,
|
|
351
|
+
const unsigned* limmask = nullptr) {
|
|
352
|
+
(void)lane;
|
|
353
|
+
// the limit rows in L2's order (lane 0: a short serial scan; <= 60 limits). limmask (the record's, the k_pre14): the forward's
|
|
354
|
+
// decision held, limit l active iff its bit, on its nearer side (one side at most: range > 2 margin, gen14); null: L2's test
|
|
355
|
+
if (lane == 0) {
|
|
356
|
+
int nl = 0;
|
|
357
|
+
for (int l = 0; l < MD::NLIM; ++l) {
|
|
358
|
+
const T* lv = V + MD::O_LIM + 12 * l;
|
|
359
|
+
const T c = lv[0], q = c * s.q[X14T(LimQadr)[l]], margin = lv[3];
|
|
360
|
+
if (limmask) {
|
|
361
|
+
if (((limmask[l >> 5] >> (l & 31)) & 1u) && nl < kMaxLim14) { w.lim_l[nl] = l; w.lim_side[nl++] = q - lv[1] < lv[2] - q ? -1 : 1; }
|
|
362
|
+
continue;
|
|
363
|
+
}
|
|
364
|
+
if (q - lv[1] < margin && nl < kMaxLim14) { w.lim_l[nl] = l; w.lim_side[nl++] = -1; }
|
|
365
|
+
if (lv[2] - q < margin && nl < kMaxLim14) { w.lim_l[nl] = l; w.lim_side[nl++] = 1; }
|
|
366
|
+
}
|
|
367
|
+
w.nlim = nl;
|
|
368
|
+
w.ncon = ncon;
|
|
369
|
+
int r = nl;
|
|
370
|
+
for (int c = 0; c < ncon; ++c) { w.crow0[c] = r; r += X14T(PCondim)[con_pair[c]] == 1 ? 1 : 4; }
|
|
371
|
+
w.flags = nl == nlim_tape ? 0 : 2; // 2: the limit rows differ from the tape's count
|
|
372
|
+
}
|
|
373
|
+
X14_SYNC();
|
|
374
|
+
X14_FOR(i, w.nlim) {
|
|
375
|
+
w.lq[i] = T(0); w.lv[i] = T(0);
|
|
376
|
+
if (zone_on<T>(zone, i)) r14_limit(s, V, w.lim_l[i], w.lim_side[i], &w.lq[i], &w.lv[i]);
|
|
377
|
+
}
|
|
378
|
+
X14_SYNC();
|
|
379
|
+
X14_FOR(d, NV) { // the limit rows by master dof, in row order
|
|
380
|
+
T sq = T(0), sv = T(0);
|
|
381
|
+
for (int i = 0; i < w.nlim; ++i)
|
|
382
|
+
if (X14T(LimDof)[w.lim_l[i]] == d) { sq = sq + w.lq[i]; sv = sv + w.lv[i]; }
|
|
383
|
+
qbar[d] = qbar[d] + sq;
|
|
384
|
+
vbar[d] = vbar[d] + sv;
|
|
385
|
+
}
|
|
386
|
+
for (int c0 = 0; c0 < ncon; c0 += kConBatch14) { // the contacts by batch; each batch's deposits added in contact order
|
|
387
|
+
const int nb = ncon - c0 < kConBatch14 ? ncon - c0 : kConBatch14;
|
|
388
|
+
X14_FOR(i, nb) {
|
|
389
|
+
if (!r14_contact(s, V, con_pair[c0 + i], con_slot[c0 + i], w.crow0[c0 + i], zone, w.cb[i], w.dep[i])) w.flags |= 1;
|
|
390
|
+
}
|
|
391
|
+
X14_SYNC();
|
|
392
|
+
X14_FOR(k, kMsg)
|
|
393
|
+
for (int i = 0; i < nb; ++i)
|
|
394
|
+
for (int sd = 0; sd < 2; ++sd)
|
|
395
|
+
if (w.cb[i][sd] != 0) s.acc[w.cb[i][sd]][k] = s.acc[w.cb[i][sd]][k] + w.dep[i][sd][k];
|
|
396
|
+
X14_SYNC();
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
} // namespace d16::x14adj
|