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

move the merging of continuum Dirichlet and coupling boundaries into a separate method

[[Imported from SVN: r6826]]
parent a84ef2e7
No related branches found
No related tags found
No related merge requests found
......@@ -305,46 +305,11 @@ public:
continua_["continuum"].solver_ = solver;
continua_["continuum"].localAssembler_ = localAssembler;
////////////////////////////////////////////////////////////////////////////////////
// For each continuum, merge the Dirichlet boundary with all interface boundaries
////////////////////////////////////////////////////////////////////////////////////
for (ContinuumIterator cIt = continua_.begin(); cIt != continua_.end(); ++cIt) {
// name of the current continuum
const std::string& name = cIt->first;
// short-cut to avoid frequent map look-up
Dune::BitSetVector<dim>& dirichletAndCouplingNodes = continua_[name].dirichletAndCouplingNodes_;
dirichletAndCouplingNodes.resize(complex.continuumGrid(name)->size(dim));
// first copy the true Dirichlet boundary
const LeafBoundaryPatch<ContinuumGridType>& dirichletBoundary = complex.continua_.find(name)->second.dirichletBoundary_;
for (int i=0; i<dirichletAndCouplingNodes.size(); i++)
dirichletAndCouplingNodes[i] = dirichletBoundary.containsVertex(i);
const LeafBoundaryPatch<ContinuumGridType>& continuumInterfaceBoundary
= complex.coupling(std::make_pair("rod",name)).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;
}
}
mergeDirichletAndCouplingBoundaries();
}
void mergeDirichletAndCouplingBoundaries();
/** \brief Do one Steklov-Poincare step
* \param[in,out] lambda The old and new iterate
......@@ -437,6 +402,45 @@ public:
private:
};
template <class RodGridType, class ContinuumGridType>
void RodContinuumSteklovPoincareStep<RodGridType,ContinuumGridType>::
mergeDirichletAndCouplingBoundaries()
{
////////////////////////////////////////////////////////////////////////////////////
// For each continuum, merge the Dirichlet boundary with all interface boundaries
////////////////////////////////////////////////////////////////////////////////////
for (ContinuumIterator cIt = continua_.begin(); cIt != continua_.end(); ++cIt) {
// name of the current continuum
const std::string& name = cIt->first;
// short-cut to avoid frequent map look-up
Dune::BitSetVector<dim>& dirichletAndCouplingNodes = continua_[name].dirichletAndCouplingNodes_;
dirichletAndCouplingNodes.resize(complex_.continuumGrid(name)->size(dim));
// first copy the true Dirichlet boundary
const LeafBoundaryPatch<ContinuumGridType>& dirichletBoundary = complex_.continua_.find(name)->second.dirichletBoundary_;
for (int i=0; i<dirichletAndCouplingNodes.size(); i++)
dirichletAndCouplingNodes[i] = dirichletBoundary.containsVertex(i);
const LeafBoundaryPatch<ContinuumGridType>& continuumInterfaceBoundary
= complex_.coupling(std::make_pair("rod",name)).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;
}
}
}
template <class RodGridType, class ContinuumGridType>
RigidBodyMotion<3>::TangentVector RodContinuumSteklovPoincareStep<RodGridType,ContinuumGridType>::
rodDirichletToNeumannMap(const RigidBodyMotion<3>& lambda) const
......
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