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

damped update for more than a single coupling

[[Imported from SVN: r7065]]
parent 9b2a0448
No related branches found
No related tags found
No related merge requests found
......@@ -574,17 +574,26 @@ iterate(std::map<std::pair<std::string,std::string>, RigidBodyMotion<3> >& lambd
// Compute new damped interface value
//////////////////////////////////////////////////////////////
std::pair<std::string,std::string> interfaceName = std::make_pair("rod","continuum");
const RigidBodyMotion<dim>& referenceInterface = complex_.coupling(interfaceName).referenceInterface_;
typename std::map<std::pair<std::string,std::string>,RigidBodyMotion<3> >::iterator it = lambda.begin();
typename std::map<std::pair<std::string,std::string>, RigidBodyMotion<3> >::const_iterator aIIt = averageInterface.begin();
for (; it!=lambda.end(); ++it, ++aIIt) {
for (int j=0; j<dim; j++)
lambda[interfaceName].r[j] = (1-damping_) * lambda[interfaceName].r[j]
+ damping_ * (referenceInterface.r[j] + averageInterface[interfaceName].r[j]);
assert(it->first == aIIt->first);
const std::pair<std::string,std::string>& interfaceName = it->first;
const RigidBodyMotion<dim>& referenceInterface = complex_.coupling(interfaceName).referenceInterface_;
for (int j=0; j<dim; j++)
it->second.r[j] = (1-damping_) * it->second.r[j]
+ damping_ * (referenceInterface.r[j] + averageInterface[interfaceName].r[j]);
lambda[interfaceName].q = Rotation<3,double>::interpolate(lambda[interfaceName].q,
referenceInterface.q.mult(averageInterface[interfaceName].q),
damping_);
}
}
......
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