diff --git a/dirneucoupling.cc b/dirneucoupling.cc index bc535e9128cf6da4cf1ecb0ca1cc187cc2551d0e..d672df29f2acdf444312b596d4e5eb95fded9645 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 4b5c6ec22605ce0deb5ed8b5baf23f9d30f33b3e..b4043c383f09b3dd5ad402c8d2d002eb832f5609 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();