Skip to content

Add Differentiable Physics: Mass-Spring System example#1359

Merged
msaroufim merged 13 commits into
pytorch:mainfrom
abhitorch81:add-mass-spring-example
Jun 25, 2025
Merged

Add Differentiable Physics: Mass-Spring System example#1359
msaroufim merged 13 commits into
pytorch:mainfrom
abhitorch81:add-mass-spring-example

Conversation

@abhitorch81
Copy link
Copy Markdown
Contributor

Re-submitting PR #1332 from my corporate GitHub account (abhitorch81).

This PR includes:

  • A simple differentiable mass-spring system using PyTorch
  • Clarified explanation of initial and target particle positions
  • Simulation defined in 2D with gravity vector [0, -9.8]
  • High-resolution PNG output showing final vs. target positions
  • Formal reference to Learning to Simulate Complex Physics with Graph Networks

Reviewer feedback from @dvrogozh on the previous PR has been fully addressed.

@abhitorch81 abhitorch81 requested a review from msaroufim as a code owner June 25, 2025 07:53
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 25, 2025

Deploy Preview for pytorch-examples-preview canceled.

Name Link
🔨 Latest commit 42dacb5
🔍 Latest deploy log https://app.netlify.com/projects/pytorch-examples-preview/deploys/685bb16a5e26a50008ed5372

@abhitorch81
Copy link
Copy Markdown
Contributor Author

abhitorch81 commented Jun 25, 2025

@dvrogozh Can you review the PR converted from personal id to corporate id ,continuing from #1332

@msaroufim msaroufim merged commit 7c35995 into pytorch:main Jun 25, 2025
8 checks passed
msaroufim added a commit that referenced this pull request Jun 25, 2025
msaroufim added a commit that referenced this pull request Jun 25, 2025
Revert "Add Differentiable Physics: Mass-Spring System example (#1359)"

This reverts commit 7c35995.
gera-aldama pushed a commit to jafraustro/examples_xpu that referenced this pull request Jul 11, 2025
* Add Differentiable Physics: Mass-Spring System example

* Add differentiable_physics to run_all() in test script

* Add visualization and update training code in mass_spring.py

* Finalize differentiable_physics with visualization and CI integration

* Finalize differentiable_physics with visualization and CI integration

* Finalize differentiable_physics with the updates

* Update requirements.txt for differentiable_physics

* Update run_python_examples.sh to test differentiable_physics in CI

* Add mass spring example and update requirements

* Add mass spring example and update requirements

* Updated README and visualization from corporate ID (abhitorch81)

* Update readme.md

---------

Co-authored-by: Abhishek Nandy <abhishek.nandy81@gmail.com>
gera-aldama pushed a commit to jafraustro/examples_xpu that referenced this pull request Jul 11, 2025
…rch#1360)

Revert "Add Differentiable Physics: Mass-Spring System example (pytorch#1359)"

This reverts commit 7c35995.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants