Skip to content
Snippets Groups Projects
Commit 79b53f0c authored by Markus Wolff's avatar Markus Wolff
Browse files

corrected velocity output to work correctly for dim=1,2,3


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7594 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 4549d83e
No related branches found
No related tags found
No related merge requests found
...@@ -191,8 +191,11 @@ public: ...@@ -191,8 +191,11 @@ public:
} }
Dune::FieldVector < Scalar, dim > refVelocity(0); Dune::FieldVector < Scalar, dim > refVelocity(0);
refVelocity[0] = 0.5 * (fluxW[1] - fluxW[0]); refVelocity[0] = 0.5 * (fluxW[1] - fluxW[0]);
refVelocity[1] = 0.5 * (fluxW[3] - fluxW[2]); if (dim > 1)
refVelocity[1] = 0.5 * (fluxW[3] - fluxW[2]);
if (dim == 3)
refVelocity[2] = 0.5 * (fluxW[5] - fluxW[4]);
const Dune::FieldVector<Scalar, dim>& localPos = const Dune::FieldVector<Scalar, dim>& localPos =
ReferenceElementContainer::general(eIt->geometry().type()).position(0, 0); ReferenceElementContainer::general(eIt->geometry().type()).position(0, 0);
...@@ -211,7 +214,10 @@ public: ...@@ -211,7 +214,10 @@ public:
refVelocity = 0; refVelocity = 0;
refVelocity[0] = 0.5 * (fluxNW[1] - fluxNW[0]); refVelocity[0] = 0.5 * (fluxNW[1] - fluxNW[0]);
if (dim > 1)
refVelocity[1] = 0.5 * (fluxNW[3] - fluxNW[2]); refVelocity[1] = 0.5 * (fluxNW[3] - fluxNW[2]);
if (dim == 3)
refVelocity[2] = 0.5 * (fluxNW[5] - fluxNW[4]);
// calculate the element velocity by the Piola transformation // calculate the element velocity by the Piola transformation
elementVelocity = 0; elementVelocity = 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