From 870a255e6e0d2a4c64f558568da0283f9a36229c Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Fri, 14 Jan 2011 14:54:45 +0000 Subject: [PATCH] improved handling of rod Dirichlet data [[Imported from SVN: r6755]] --- dirneucoupling.cc | 8 ++++++++ dune/gfe/coupling/rodcontinuumsteklovpoincarestep.hh | 10 +++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/dirneucoupling.cc b/dirneucoupling.cc index bc535e91..d672df29 100644 --- a/dirneucoupling.cc +++ b/dirneucoupling.cc @@ -165,6 +165,14 @@ int main (int argc, char *argv[]) try double angle = parameterSet.get("dirichletAngle", double(0)); rodX.back().q = Rotation<3,double>(axis, M_PI*angle/180); + + rodFactory.create(complex.rodDirichletValues_["rod"], + RigidBodyMotion<3>(FieldVector<double,3>(0), Rotation<3,double>::identity())); + complex.rodDirichletValues_["rod"].back() = RigidBodyMotion<3>(parameterSet.get("dirichletValue", rodRestEndPoint[1]), + Rotation<3,double>(axis, M_PI*angle/180)); + BitSetVector<1> rodDNodes(complex.rodDirichletValues_["rod"].size(), false); + rodDNodes.back() = true; + complex.rodDirichletBoundaries_["rod"].setup(*complex.rodGrids_["rod"],rodDNodes); // Backup initial rod iterate for later reference RodSolutionType initialIterateRod = rodX; diff --git a/dune/gfe/coupling/rodcontinuumsteklovpoincarestep.hh b/dune/gfe/coupling/rodcontinuumsteklovpoincarestep.hh index 4b5c6ec2..b4043c38 100644 --- a/dune/gfe/coupling/rodcontinuumsteklovpoincarestep.hh +++ b/dune/gfe/coupling/rodcontinuumsteklovpoincarestep.hh @@ -367,17 +367,17 @@ void RodContinuumSteklovPoincareStep<RodGridType,ContinuumGridType>::iterate(Rig /////////////////////////////////////////////////////////////////// // solve a Dirichlet problem for the rod - RodSolutionType rodX; /** \todo Using that the coupling boundary is the one with the lower coordinate */ -#warning Dirichlet boundary not properly set - RigidBodyMotion<3> rodDirichletValue; - rodDirichletValue.r = 0; - rodDirichletValue.q = Rotation<3,double>::identity(); + RigidBodyMotion<3> rodDirichletValue = complex_.rodDirichletValues_["rod"].back(); + // Set initial iterate + RodSolutionType rodX; RodFactory<typename RodGridType::LeafGridView> rodFactory(complex_.rodGrids_["rod"]->leafView()); rodFactory.create(rodX,lambda,rodDirichletValue); rodSolver_->setInitialSolution(rodX); + + // Solve the Dirichlet problem rodSolver_->solve(); rodX = rodSolver_->getSol(); -- GitLab