Commit b1a0c24f authored by Kilian Weishaupt's avatar Kilian Weishaupt

[test] Fixup test_kovasznay

parent 90ccf5c5
Pipeline #469 failed with stages
in 1 minute and 2 seconds
......@@ -102,7 +102,7 @@ public:
using CellArray = std::array<unsigned int, dimWorld>;
const auto numCells = getParam<CellArray>("Grid.Cells");
cellSizeX_ = this->fvGridGeometry().bBoxMax()[0] / numCells[0];
cellSizeX_ = (this->fvGridGeometry().bBoxMax()[0] - this->fvGridGeometry().bBoxMin()[0]) / numCells[0];
createAnalyticalSolution_();
}
......@@ -190,8 +190,9 @@ public:
const SubControlVolume& scv,
int pvIdx) const
{
// set a fixed pressure in one cell
return (isLowerLeftCell_(scv.center()) && pvIdx == Indices::pressureIdx);
// set fixed pressure in all cells at the left boundary
auto isAtLeftBoundary = [&](const auto& globalPos) { return globalPos[0] < (this->fvGridGeometry().bBoxMin()[0] + 0.6*cellSizeX_ + eps_); };
return (isAtLeftBoundary(scv.center()) && pvIdx == Indices::pressureIdx);
}
/*!
......@@ -308,11 +309,6 @@ private:
}
}
bool isLowerLeftCell_(const GlobalPosition& globalPos) const
{
return globalPos[0] < (this->fvGridGeometry().bBoxMin()[0] + 0.5*cellSizeX_ + eps_);
}
Scalar eps_;
Scalar cellSizeX_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment