Skip to content
Snippets Groups Projects
Commit 4ba330aa authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[staggeredGrid][test] Use correct function in Donea test

parent dddcd40c
No related branches found
No related tags found
2 merge requests!617[WIP] Next,!419Feature/improve staggered
...@@ -353,7 +353,7 @@ public: ...@@ -353,7 +353,7 @@ public:
// treat cell-center dofs // treat cell-center dofs
const auto dofIdxCellCenter = scv.dofIndex(); const auto dofIdxCellCenter = scv.dofIndex();
const auto& posCellCenter = scv.dofPosition(); const auto& posCellCenter = scv.dofPosition();
const auto analyticalSolutionCellCenter = dirichletAtPos(posCellCenter)[cellCenterIdx]; const auto analyticalSolutionCellCenter = analyticalSolution(posCellCenter)[cellCenterIdx];
const auto numericalSolutionCellCenter = this->model().curSol()[cellCenterIdx][dofIdxCellCenter]; const auto numericalSolutionCellCenter = this->model().curSol()[cellCenterIdx][dofIdxCellCenter];
sumError[cellCenterIdx] += squaredDiff_(analyticalSolutionCellCenter, numericalSolutionCellCenter) * scv.volume(); sumError[cellCenterIdx] += squaredDiff_(analyticalSolutionCellCenter, numericalSolutionCellCenter) * scv.volume();
sumReference[cellCenterIdx] += analyticalSolutionCellCenter * analyticalSolutionCellCenter * scv.volume(); sumReference[cellCenterIdx] += analyticalSolutionCellCenter * analyticalSolutionCellCenter * scv.volume();
...@@ -364,7 +364,7 @@ public: ...@@ -364,7 +364,7 @@ public:
{ {
const int dofIdxFace = scvf.dofIndex(); const int dofIdxFace = scvf.dofIndex();
const int dirIdx = scvf.directionIndex(); const int dirIdx = scvf.directionIndex();
const auto analyticalSolutionFace = dirichletAtPos(scvf.center())[faceIdx][dirIdx]; const auto analyticalSolutionFace = analyticalSolution(scvf.center())[faceIdx][dirIdx];
const auto numericalSolutionFace = this->model().curSol()[faceIdx][dofIdxFace][momentumBalanceIdx]; const auto numericalSolutionFace = this->model().curSol()[faceIdx][dofIdxFace][momentumBalanceIdx];
directionIndex[dofIdxFace] = dirIdx; directionIndex[dofIdxFace] = dirIdx;
errorVelocity[dofIdxFace] = squaredDiff_(analyticalSolutionFace, numericalSolutionFace); errorVelocity[dofIdxFace] = squaredDiff_(analyticalSolutionFace, numericalSolutionFace);
......
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