From 677b9b15aa570bda14a21858c4ee1a313c9b0b1e Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Sat, 13 Mar 2010 20:54:14 +0000 Subject: [PATCH] add infinitesimalVariation() for 2d rigid body motions [[Imported from SVN: r5740]] --- src/localgeodesicfestiffness.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/localgeodesicfestiffness.hh b/src/localgeodesicfestiffness.hh index e2b16b7d..9ffddea3 100644 --- a/src/localgeodesicfestiffness.hh +++ b/src/localgeodesicfestiffness.hh @@ -35,6 +35,16 @@ class LocalGeodesicFEStiffness (i==5)*eps)); } + /** \brief For the fd approximations + */ + static void infinitesimalVariation(RigidBodyMotion<2>& c, double eps, int i) + { + if (i<2) + c.r[i] += eps; + else + c.q = c.q.mult(Rotation<2,double>::exp(Dune::FieldVector<double,1>(eps))); + } + static void infinitesimalVariation(Rotation<3,double>& c, double eps, int i) { c = c.mult(Rotation<3,double>::exp((i==0)*eps, -- GitLab