From 93610e6e796018e5cda987f15783b51f4a6d105e Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Fri, 21 Jan 2011 15:38:25 +0000 Subject: [PATCH] bugfix: set proper Dirichlet nodes for the continuum problem [[Imported from SVN: r6815]] --- .../rodcontinuumsteklovpoincarestep.hh | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/dune/gfe/coupling/rodcontinuumsteklovpoincarestep.hh b/dune/gfe/coupling/rodcontinuumsteklovpoincarestep.hh index 63f7f888..a7907fd9 100644 --- a/dune/gfe/coupling/rodcontinuumsteklovpoincarestep.hh +++ b/dune/gfe/coupling/rodcontinuumsteklovpoincarestep.hh @@ -303,7 +303,22 @@ public: dirichletValues_(dirichletValues), solver_(solver), localAssembler_(localAssembler) - {} + { + dirichletAndCouplingNodes_.resize(complex.continuumGrid("continuum")->size(dim)); + + const LeafBoundaryPatch<ContinuumGridType>& dirichletBoundary = complex.continuumDirichletBoundary("continuum"); + + for (int i=0; i<dirichletAndCouplingNodes_.size(); i++) + dirichletAndCouplingNodes_[i] = dirichletBoundary.containsVertex(i); + + const LeafBoundaryPatch<ContinuumGridType>& continuumInterfaceBoundary = complex.coupling(std::make_pair("rod","continuum")).continuumInterfaceBoundary_; + + for (int i=0; i<dirichletAndCouplingNodes_.size(); i++) { + bool v = continuumInterfaceBoundary.containsVertex(i); + for (int j=0; j<dim; j++) + dirichletAndCouplingNodes_[i][j] = dirichletAndCouplingNodes_[i][j] or v; + } + } @@ -359,6 +374,8 @@ private: const Dune::shared_ptr< ::LoopSolver<VectorType> > solver_; + Dune::BitSetVector<dim> dirichletAndCouplingNodes_; + /** \todo Hack: * - we actually need a base class * - we don't need the global ContinuumFEBasis @@ -436,6 +453,9 @@ continuumDirichletToNeumannMap(const RigidBodyMotion<3>& lambda) const const LeafBoundaryPatch<ContinuumGridType>& foo = complex_.coupling(couplingName).continuumInterfaceBoundary_; setRotation(foo, x3d, relativeMovement); + // Set the correct Dirichlet nodes + dynamic_cast<IterationStep<VectorType>* >(solver_->iterationStep_)->ignoreNodes_ = &dirichletAndCouplingNodes_; + // Right hand side vector: currently without Neumann and volume terms VectorType rhs3d(x3d.size()); rhs3d = 0; -- GitLab