Skip to content
Snippets Groups Projects
Commit 93610e6e authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

bugfix: set proper Dirichlet nodes for the continuum problem

[[Imported from SVN: r6815]]
parent 29563f96
No related branches found
No related tags found
No related merge requests found
...@@ -303,7 +303,22 @@ public: ...@@ -303,7 +303,22 @@ public:
dirichletValues_(dirichletValues), dirichletValues_(dirichletValues),
solver_(solver), solver_(solver),
localAssembler_(localAssembler) 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: ...@@ -359,6 +374,8 @@ private:
const Dune::shared_ptr< ::LoopSolver<VectorType> > solver_; const Dune::shared_ptr< ::LoopSolver<VectorType> > solver_;
Dune::BitSetVector<dim> dirichletAndCouplingNodes_;
/** \todo Hack: /** \todo Hack:
* - we actually need a base class * - we actually need a base class
* - we don't need the global ContinuumFEBasis * - we don't need the global ContinuumFEBasis
...@@ -436,6 +453,9 @@ continuumDirichletToNeumannMap(const RigidBodyMotion<3>& lambda) const ...@@ -436,6 +453,9 @@ continuumDirichletToNeumannMap(const RigidBodyMotion<3>& lambda) const
const LeafBoundaryPatch<ContinuumGridType>& foo = complex_.coupling(couplingName).continuumInterfaceBoundary_; const LeafBoundaryPatch<ContinuumGridType>& foo = complex_.coupling(couplingName).continuumInterfaceBoundary_;
setRotation(foo, x3d, relativeMovement); 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 // Right hand side vector: currently without Neumann and volume terms
VectorType rhs3d(x3d.size()); VectorType rhs3d(x3d.size());
rhs3d = 0; rhs3d = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment