From 0766f80fea25a4060a9f05e23aa330b7f26a497f Mon Sep 17 00:00:00 2001 From: tueboesen Date: Thu, 16 Mar 2023 17:56:22 +0100 Subject: [PATCH] Updated the documentation --- .github/workflows/build.yaml | 2 +- README.md | 9 +++++---- multibodypendulum/__init__.py | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5469cfa..1182ad3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,5 +1,5 @@ # .github/workflows/build.yaml -name: multibodypendulum CI +name: Testing CI on: push: diff --git a/README.md b/README.md index da5fb6a..5936d7d 100644 --- a/README.md +++ b/README.md @@ -24,16 +24,17 @@ and the energy: ## Quick start A quick usecase to simulate a 5 pendulum system could look like this + import multibodypendulum as mbp n = 5 dt = 0.001 g = 9.82 - mbp = MultiBodyPendulum(n, dt,g=g) + model = mbp.MultiBodyPendulum(n, dt,g=g) theta0 = 0.5*math.pi*torch.ones(n) dtheta0 = 0.0*torch.ones(n) nsteps = 100 - times, thetas, dthetas = mbp.simulate(nsteps,theta0,dtheta0) - mbp.plot_energy() - mbp.animate_pendulum() + times, thetas, dthetas = model.simulate(nsteps,theta0,dtheta0) + model.plot_energy() + model.animate_pendulum() ## Limitations The code has some limitations: diff --git a/multibodypendulum/__init__.py b/multibodypendulum/__init__.py index e69de29..b72d6f3 100644 --- a/multibodypendulum/__init__.py +++ b/multibodypendulum/__init__.py @@ -0,0 +1 @@ +from npendul import MultiBodyPendulum \ No newline at end of file