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

store the reference interface orientations in the RodContinuumComplex, where they should be

[[Imported from SVN: r6830]]
parent 8ff14bb4
No related branches found
No related tags found
Loading
......@@ -344,6 +344,7 @@ int main (int argc, char *argv[]) try
// Init interface value
RigidBodyMotion<3> referenceInterface = rodX[0];
complex.couplings_[std::make_pair("rod","continuum")].referenceInterface_ = referenceInterface;
RigidBodyMotion<3> lambda = referenceInterface;
FieldVector<double,3> lambdaForce(0);
FieldVector<double,3> lambdaTorque(0);
......@@ -451,7 +452,6 @@ int main (int argc, char *argv[]) try
preconditioner,
alpha,
damping,
referenceInterface,
&rodAssembler,
&rodLocalStiffness,
&rodSolver,
......
......@@ -16,6 +16,8 @@ template <class RodGrid, class ContinuumGrid>
class RodContinuumComplex
{
dune_static_assert(RodGrid::dimension==1, "The RodGrid has to be one-dimensional!");
static const int dim = ContinuumGrid::dimension;
typedef std::vector<RigidBodyMotion<3> > RodConfiguration;
......@@ -25,8 +27,11 @@ class RodContinuumComplex
struct Coupling
{
LeafBoundaryPatch<RodGrid> rodInterfaceBoundary_;
LeafBoundaryPatch<ContinuumGrid> continuumInterfaceBoundary_;
/** \brief The orientation of the interface in the reference configuration */
RigidBodyMotion<dim> referenceInterface_;
};
/** \brief Holds all data for a rod subproblem */
......
......@@ -279,7 +279,6 @@ public:
const std::string& preconditioner,
const Dune::array<double,2>& alpha,
double richardsonDamping,
const RigidBodyMotion<3>& referenceInterface,
RodAssembler<typename RodGridType::LeafGridView,3>* rodAssembler,
RodLocalStiffness<typename RodGridType::LeafGridView,double>* rodLocalStiffness,
RiemannianTrustRegionSolver<RodGridType,RigidBodyMotion<3> >* rodSolver,
......@@ -293,8 +292,7 @@ public:
: complex_(complex),
preconditioner_(preconditioner),
alpha_(alpha),
richardsonDamping_(richardsonDamping),
referenceInterface_(referenceInterface)
richardsonDamping_(richardsonDamping)
{
rods_["rod"].assembler_ = rodAssembler;
rods_["rod"].localStiffness_ = rodLocalStiffness;
......@@ -343,7 +341,6 @@ private:
//////////////////////////////////////////////////////////////////
// Data members related to the rod problems
//////////////////////////////////////////////////////////////////
RigidBodyMotion<dim> referenceInterface_;
struct RodData
{
......@@ -536,9 +533,10 @@ continuumDirichletToNeumannMap(const std::string& continuumName,
const std::pair<std::string,std::string>& couplingName = it->first;
// Turn \lambda \in TSE(3) into a Dirichlet value for the continuum
const LeafBoundaryPatch<ContinuumGridType>& foo = complex_.coupling(couplingName).continuumInterfaceBoundary_;
#warning ReferenceInterface not properly set
setRotation(foo, x3d, referenceInterface_, it->second);
const LeafBoundaryPatch<ContinuumGridType>& interfaceBoundary = complex_.coupling(couplingName).continuumInterfaceBoundary_;
const RigidBodyMotion<dim>& referenceInterface = complex_.coupling(couplingName).referenceInterface_;
setRotation(interfaceBoundary, x3d, referenceInterface, it->second);
}
......@@ -579,9 +577,11 @@ continuumDirichletToNeumannMap(const std::string& continuumName,
const std::pair<std::string,std::string>& couplingName = it->first;
/** \todo Is referenceInterface.r the correct center of rotation? */
const RigidBodyMotion<dim>& referenceInterface = complex_.coupling(couplingName).referenceInterface_;
computeTotalForceAndTorque(complex_.coupling(couplingName).continuumInterfaceBoundary_,
residual,
referenceInterface_.r,
referenceInterface.r,
continuumForce, continuumTorque);
result[couplingName][0] = continuumForce[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