IPC Integrator¶
- class warp_ipc.ipc_integrator.IPCIntegrator(device: str = 'cuda:0', raise_error: bool = False)¶
Bases:
Integrator
The ABD-IPC integrator.
- ENERGY_NAMES = ['inertia', 'kinematic_constraint', 'body_force', 'rigidity', 'cloth_elastic', 'vol_elastic', 'barrier', 'friction', 'damping']¶
- class ProfileStatistics¶
Bases:
object
- property current_newton_iter_data¶
- property current_timestep_data¶
- property full_json¶
- new_newton_iter()¶
- new_timestep()¶
- record_iter_timer(timer: Profiler)¶
- record_timestep_timer(timer: Profiler)¶
- advance_func(model: ASRModel, dt: float = 0.01, control: Control | None = None, enable_debug_check: bool = False) Tuple[int, array, array] ¶
- check_grad(info: str, grad: array, check_num: int = 8, check_start_index: int = 0) None ¶
- diff_test(model: ASRModel, dt: float, x, y, cdw, cdw_n, direction_x: array, sys_dir: array, sm_damping: BsrMatrix | None, energy_name: str, eps: float = 1e-07)¶
- property dx_div_dv_scale¶
- grad_IP(model: ASRModel, dt: float, x: array, y: array, cdw: CollisionData, cdw_n: CollisionData, affine_gradient_y: array, soft_gradient_x: array, sm_damping: BsrMatrix | None = None, enable_inertia_energy: bool = True, enable_kinematic_constraint_energy: bool = True, enable_body_force_energy: bool = True, enable_rigidity_energy: bool = True, enable_cloth_elastic_energy: bool = True, enable_vol_elastic_energy: bool = True, enable_barrier_energy: bool = True, enable_friction_energy: bool = True, enable_damping_energy: bool = True) None ¶
- hess_IP(model: ASRModel, dt: float, x: array, y: array, cdw: CollisionData, cdw_n: CollisionData, sm: BsrMatrix, sm_damping: BsrMatrix | None = None, project_pd: bool = True, enable_inertia_energy: bool = True, enable_kinematic_constraint_energy: bool = True, enable_body_force_energy: bool = True, enable_rigidity_energy: bool = True, enable_cloth_elastic_energy: bool = True, enable_vol_elastic_energy: bool = True, enable_barrier_energy: bool = True, enable_friction_energy: bool = True, enable_damping_energy: bool = True) None ¶
- property last_step_time: float¶
- simulate(model: ASRModel, dt: float | None = None, control: Control | None = None)¶
Simulate the model for a given time step using the given control input.
- Parameters:
model (Model) – The model to simulate.
state_in (State) – The input state.
state_out (State) – The output state.
dt (float) – The time step (typically in seconds).
control (Control) – The control input. Defaults to None which means the control values from the
Model
are used.
- step_forward_with_consistent_alpha(model: ASRModel, x0: array, y0: array, x: array, y: array) None ¶
- val_IP(model, dt: float, x: array, y: array, cdw: CollisionData, cdw_n: CollisionData, sm_damping: BsrMatrix | None = None, enforce_reduce_each: bool = True, enable_inertia_energy: bool = True, enable_kinematic_constraint_energy: bool = True, enable_body_force_energy: bool = True, enable_rigidity_energy: bool = True, enable_cloth_elastic_energy: bool = True, enable_vol_elastic_energy: bool = True, enable_barrier_energy: bool = True, enable_friction_energy: bool = True, enable_damping_energy: bool = True) None ¶