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

Make computeAveragePressure take the centerOfTorque as a FieldVector.

It was a RigidBodyMotion before, but the rotation part of that was
ignored.  Semantically it is just a position, hence a FieldVector
is better.

[[Imported from SVN: r6598]]
parent 17646df0
No related branches found
No related tags found
No related merge requests found
...@@ -392,7 +392,7 @@ int main (int argc, char *argv[]) try ...@@ -392,7 +392,7 @@ int main (int argc, char *argv[]) try
// Using that index 0 is always the left boundary for a uniformly refined OneDGrid // Using that index 0 is always the left boundary for a uniformly refined OneDGrid
computeAveragePressure<GridType::LevelGridView>(resultantForce, resultantTorque, computeAveragePressure<GridType::LevelGridView>(resultantForce, resultantTorque,
interfaceBoundary[grid.maxLevel()], interfaceBoundary[grid.maxLevel()],
rodX[0], rodX[0].r,
neumannValues); neumannValues);
rhs3d = 0; rhs3d = 0;
...@@ -520,7 +520,7 @@ int main (int argc, char *argv[]) try ...@@ -520,7 +520,7 @@ int main (int argc, char *argv[]) try
// Using that index 0 is always the left boundary for a uniformly refined OneDGrid // Using that index 0 is always the left boundary for a uniformly refined OneDGrid
computeAveragePressure<GridType::LevelGridView>(resultantForce, resultantTorque, computeAveragePressure<GridType::LevelGridView>(resultantForce, resultantTorque,
interfaceBoundary[grid.maxLevel()], interfaceBoundary[grid.maxLevel()],
rodX[0], rodX[0].r,
neumannValues); neumannValues);
rhs3d = 0; rhs3d = 0;
......
...@@ -472,7 +472,7 @@ template <class GridView> ...@@ -472,7 +472,7 @@ template <class GridView>
void computeAveragePressure(const Dune::FieldVector<double,GridView::dimension>& resultantForce, void computeAveragePressure(const Dune::FieldVector<double,GridView::dimension>& resultantForce,
const Dune::FieldVector<double,GridView::dimension>& resultantTorque, const Dune::FieldVector<double,GridView::dimension>& resultantTorque,
const BoundaryPatchBase<GridView>& interface, const BoundaryPatchBase<GridView>& interface,
const RigidBodyMotion<3>& crossSection, const Dune::FieldVector<double,GridView::dimension>& centerOfTorque,
Dune::BlockVector<Dune::FieldVector<double, GridView::dimension> >& pressure) Dune::BlockVector<Dune::FieldVector<double, GridView::dimension> >& pressure)
{ {
const GridView& gridView = interface.gridView(); const GridView& gridView = interface.gridView();
...@@ -567,7 +567,7 @@ void computeAveragePressure(const Dune::FieldVector<double,GridView::dimension>& ...@@ -567,7 +567,7 @@ void computeAveragePressure(const Dune::FieldVector<double,GridView::dimension>&
phi_i[j] = shapeFunctionValues[i]; phi_i[j] = shapeFunctionValues[i];
mu_tilde[i][j].axpy(quad[qp].weight() * integrationElement, mu_tilde[i][j].axpy(quad[qp].weight() * integrationElement,
crossProduct(Dune::FieldVector<double,dim>(worldPos-crossSection.r), phi_i)); crossProduct(Dune::FieldVector<double,dim>(worldPos-centerOfTorque), phi_i));
} }
...@@ -653,7 +653,7 @@ void computeAveragePressure(const Dune::FieldVector<double,GridView::dimension>& ...@@ -653,7 +653,7 @@ void computeAveragePressure(const Dune::FieldVector<double,GridView::dimension>&
Dune::FieldVector<double,3> outputForce(0), outputTorque(0); Dune::FieldVector<double,3> outputForce(0), outputTorque(0);
computeTotalForceAndTorque(interface, pressure, crossSection.r, outputForce, outputTorque); computeTotalForceAndTorque(interface, pressure, centerOfTorque, outputForce, outputTorque);
outputForce -= resultantForce; outputForce -= resultantForce;
outputTorque -= resultantTorque; outputTorque -= resultantTorque;
......
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