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

implement the rotation part of 'setRotation'

[[Imported from SVN: r6809]]
parent 371c3ef5
No related branches found
No related tags found
No related merge requests found
......@@ -821,6 +821,7 @@ void setRotation(const BoundaryPatchBase<GridView>& dirichletBoundary,
{
const typename GridView::IndexSet& indexSet = dirichletBoundary.gridView().indexSet();
const int dim = GridView::dimension;
const int dimworld = GridView::dimensionworld;
// ///////////////////////////////////////////
// Loop over all vertices
......@@ -837,8 +838,23 @@ void setRotation(const BoundaryPatchBase<GridView>& dirichletBoundary,
for (int i=0; i<nCorners; i++) {
int cornerIdx = Dune::GenericReferenceElements<double,dim>::general(it->inside()->type()).subEntity(it->indexInInside(), 1, i, dim);
int globalIdx = indexSet.subIndex(*it->inside(), cornerIdx, dim);
deformation[globalIdx] = relativeMovement.r;
#warning Rotations-Anteil fehlt noch!
// Get vertex position
Dune::FieldVector<double,dimworld> pos = it->inside()->geometry().corner(cornerIdx);
// Action of the rigid body motion
Dune::FieldMatrix<double,3,3> rotation;
relativeMovement.q.matrix(rotation);
Dune::FieldVector<double,dimworld> rpos;
rotation.mv(pos, rpos);
rpos += relativeMovement.r;
// We compute _displacements_, not positions
rpos -= pos;
deformation[globalIdx] = rpos;
}
}
......
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