From 76b11a3ff33b23ba372a65d8dafb2795027be597 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Thu, 23 Apr 2009 15:34:27 +0000 Subject: [PATCH] bugfix: local stress must be a std::vector [[Imported from SVN: r4082]] --- src/rodassembler.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/rodassembler.cc b/src/rodassembler.cc index 416266b4..5976108b 100644 --- a/src/rodassembler.cc +++ b/src/rodassembler.cc @@ -299,10 +299,13 @@ getResultantForce(const BoundaryPatch<GridType>& boundary, double pos = nIt->intersectionSelfLocal().corner(0); - Dune::array<RigidBodyMotion<3>,2> localSolution = {sol[indexSet.template subIndex<1>(*eIt,0)], - sol[indexSet.template subIndex<1>(*eIt,1)]}; - Dune::array<RigidBodyMotion<3>,2> localRefConf = {dynamic_cast<RodLocalStiffness<typename GridType::LeafGridView, double>* >(this->localStiffness_)->referenceConfiguration_[indexSet.template subIndex<1>(*eIt,0)], - dynamic_cast<RodLocalStiffness<typename GridType::LeafGridView, double>* >(this->localStiffness_)->referenceConfiguration_[indexSet.template subIndex<1>(*eIt,1)]}; + std::vector<RigidBodyMotion<3> > localSolution(2); + localSolution[0] = sol[indexSet.template subIndex<1>(*eIt,0)]; + localSolution[1] = sol[indexSet.template subIndex<1>(*eIt,1)]; + + std::vector<RigidBodyMotion<3> > localRefConf(2); + localRefConf[0] = dynamic_cast<RodLocalStiffness<typename GridType::LeafGridView, double>* >(this->localStiffness_)->referenceConfiguration_[indexSet.template subIndex<1>(*eIt,0)]; + localRefConf[1] = dynamic_cast<RodLocalStiffness<typename GridType::LeafGridView, double>* >(this->localStiffness_)->referenceConfiguration_[indexSet.template subIndex<1>(*eIt,1)]; FieldVector<double, blocksize> strain = dynamic_cast<RodLocalStiffness<typename GridType::LeafGridView, double>* >(this->localStiffness_)->getStrain(localSolution, *eIt, pos); FieldVector<double, blocksize> referenceStrain = dynamic_cast<RodLocalStiffness<typename GridType::LeafGridView, double>* >(this->localStiffness_)->getStrain(localRefConf, *eIt, pos); -- GitLab