Commit 6b292da2 authored by Ned Coltman's avatar Ned Coltman
Browse files

[discretization][walldistance] modify the wall distance scheme's considerFace tool

parent a0e3b576
......@@ -51,6 +51,8 @@ class WallDistance
using GridView = typename GridGeometry::GridView;
using GridIndexType = typename IndexTraits<GridView>::GridIndex;
using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace;
using FVElementGeometry = typename GridGeometry::LocalView;
using Element = typename GridGeometry::GridView::template Codim<0>::Entity;
using Scalar = typename GridView::Grid::ctype;
using GlobalPosition = typename SubControlVolumeFace::GlobalPosition;
......@@ -131,7 +133,7 @@ public:
*/
template<class LocationTag>
WallDistance(std::shared_ptr<const GridGeometry> gridGeometry, LocationTag tag)
: WallDistance(gridGeometry, tag, [](const SubControlVolumeFace& scvf) { return true; }) {}
: WallDistance(gridGeometry, tag, [](const FVElementGeometry& fvGeometry, const SubControlVolumeFace& scvf) { return true; }) {}
//! caller has to make sure the lifetime of grid geometry exceeds the lifetime of wall distance
template<class LocationTag, class ScvfSelectionFunctor>
......@@ -194,7 +196,7 @@ private:
for (const auto& scvf : scvfs(fvGeometry))
{
if (scvf.boundary() && considerFace(scvf))
if (scvf.boundary() && considerFace(fvGeometry, scvf))
{
const auto& geo = scvf.geometry();
CornerStorage corners;
......
......@@ -75,7 +75,7 @@ void testElement(const GridGeometry& gridGeometry, const std::string& outputName
const auto bottom = gridGeometry.bBoxMin()[GridGeometry::Grid::dimension-1];
// Do not consider scvfs at top or bottom of domain.
const auto considerScvf = [&](const auto& scvf){
const auto considerScvf = [&](const auto& fvGeometry, const auto& scvf){
return scvf.ipGlobal()[GridGeometry::Grid::dimension-1] < top - 1e-6 &&
scvf.ipGlobal()[GridGeometry::Grid::dimension-1] > bottom + 1e-6;
};
......
Supports Markdown
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