From 4118d490aea6c0bd768dba13ee135de5bb1af521 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Wed, 29 Aug 2007 15:59:52 +0000 Subject: [PATCH] multiply canonical resulting stress/torque by _inward_ unit normal [[Imported from SVN: r1632]] --- src/rodassembler.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/rodassembler.cc b/src/rodassembler.cc index ae8634df..aaeb329d 100644 --- a/src/rodassembler.cc +++ b/src/rodassembler.cc @@ -1572,6 +1572,7 @@ getResultantForce(const BoundaryPatch<GridType>& boundary, // Transform stress given with respect to the basis given by the three directors to // the canonical basis of R^3 + FieldMatrix<double,3,3> orientationMatrix; sol[indexSet.template subIndex<1>(*eIt,nIt.numberInSelf())].q.matrix(orientationMatrix); @@ -1579,9 +1580,14 @@ getResultantForce(const BoundaryPatch<GridType>& boundary, orientationMatrix.umv(localTorque, canonicalTorque); // Reverse transformation to make sure we did the correct thing - // assert( std::abs(localStress[0]-canonicalStress*sol[0].q.director(0)) < 1e-6 ); +// assert( std::abs(localStress[0]-canonicalStress*sol[0].q.director(0)) < 1e-6 ); // assert( std::abs(localStress[1]-canonicalStress*sol[0].q.director(1)) < 1e-6 ); // assert( std::abs(localStress[2]-canonicalStress*sol[0].q.director(2)) < 1e-6 ); + + // Multiply force times boundary normal to get the transmitted force + // I am not quite sure why the -1 is there, but it has to be there. + canonicalStress *= -nIt.unitOuterNormal(FieldVector<double,0>(0))[0]; + canonicalTorque *= -nIt.unitOuterNormal(FieldVector<double,0>(0))[0]; } -- GitLab