From 922b7997fe1a78220d4c6e28b4558f054a49bc37 Mon Sep 17 00:00:00 2001 From: Ryoichi Ando Date: Mon, 6 Jan 2025 22:38:50 +0900 Subject: [PATCH] strain limiting tau -> 0 and eps -> 0.01 --- examples/hang.ipynb | 8 ++------ examples/trampoline.ipynb | 4 ++-- src/args.rs | 2 +- src/cpp/solver/solver.hpp | 3 --- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/examples/hang.ipynb b/examples/hang.ipynb index 67bfec6..df10e09 100644 --- a/examples/hang.ipynb +++ b/examples/hang.ipynb @@ -44,12 +44,8 @@ "param = app.session.param()\n", "gravity = param.get(\"gravity\")\n", "\n", - "# set strain-limiting upper bound 1% (0.5%+0.5%)\n", - "(\n", - " param.set(\"strain-limit-eps\", 0.005)\n", - " .set(\"strain-limit-tau\", 0.005)\n", - " .set(\"friction\", 0.0)\n", - ")\n", + "# set strain-limiting upper bound 1% (1%+0%)\n", + "param.set(\"strain-limit-eps\", 0.01).set(\"strain-limit-tau\", 0.0)\n", "\n", "# set the maximal video frame to 200\n", "param.set(\"frames\", 200)\n", diff --git a/examples/trampoline.ipynb b/examples/trampoline.ipynb index 472776b..a1b7146 100644 --- a/examples/trampoline.ipynb +++ b/examples/trampoline.ipynb @@ -44,8 +44,8 @@ "source": [ "param = (\n", " app.session.param()\n", - " .set(\"strain-limit-eps\", 0.005)\n", - " .set(\"strain-limit-tau\", 0.005)\n", + " .set(\"strain-limit-eps\", 0.01)\n", + " .set(\"strain-limit-tau\", 0.0)\n", " .set(\"area-density\", 1e3)\n", " .set(\"volume-density\", 6e3)\n", " .set(\"area-young-mod\", 10000.0)\n", diff --git a/src/args.rs b/src/args.rs index 05c5a5c..10e8590 100644 --- a/src/args.rs +++ b/src/args.rs @@ -348,7 +348,7 @@ pub struct Args { // This bending stiffness not scaled by the density. // If you change the density, you need to adjust this value accordingly. // This behavior also change by the material thickness. - #[clap(long, default_value_t = 10.0)] + #[clap(long, default_value_t = 1.0)] pub bend: f32, // Name: Bend Stiffness for Rods diff --git a/src/cpp/solver/solver.hpp b/src/cpp/solver/solver.hpp index a4faf9b..cf44acb 100644 --- a/src/cpp/solver/solver.hpp +++ b/src/cpp/solver/solver.hpp @@ -10,9 +10,6 @@ namespace solver { -void apply(const DynCSRMat &A, const FixedCSRMat &B, const Vec &C, - float D, const Vec &x, Vec &result); - bool solve(const DynCSRMat &A, const FixedCSRMat &B, const Vec &C, Vec b, float tol, unsigned max_iter, Vec x, unsigned &iter, float &resid);