Skip to content
Snippets Groups Projects
Commit 51d8206e authored by Kilian Weishaupt's avatar Kilian Weishaupt Committed by Timo Koch
Browse files

[staggeredGrid] Implement velocity output

parent 01f2fbd2
No related branches found
No related tags found
2 merge requests!617[WIP] Next,!370Feature/staggered grid
......@@ -80,10 +80,6 @@ public:
{
// check, if velocity output can be used (works only for cubes so far)
velocityOutput_ = GET_PARAM_FROM_GROUP(TypeTag, bool, Vtk, AddVelocity);
// if (velocityOutput_)
// {
// DUNE_THROW(Dune::NotImplemented, "StaggeredFreeFlowVelocityOutput not implemented! Do it yourself!");
// }
}
bool enableOutput()
......@@ -101,7 +97,17 @@ public:
const Element& element,
int phaseIdx)
{
DUNE_THROW(Dune::NotImplemented, "calculateVelocity not implemented! Do it yourself!");
for (auto&& scv : scvs(fvGeometry))
{
auto dofIdxGlobal = scv.dofIndex();
for (auto&& scvf : scvfs(fvGeometry))
{
auto& origFaceVars = problem_.model().curGlobalFaceVars().faceVars(scvf.dofIndexSelf());
auto dirIdx = scvf.directionIndex();
velocity[dofIdxGlobal][dirIdx] += 0.5*origFaceVars.velocity();
}
}
}
......
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