Commit c82bf2c8 authored by Timo Koch's avatar Timo Koch
Browse files

[tpfa][scvf] Add boundary flag

parent 089aee73
......@@ -31,6 +31,8 @@
#include <dune/common/reservedvector.hh>
#include <dune/geometry/multilineargeometry.hh>
#include <dumux/common/boundaryflag.hh>
#include <dumux/discretization/methods.hh>
#include <dumux/discretization/fvproperties.hh>
......@@ -126,6 +128,7 @@ private:
using Geometry = Dune::MultiLinearGeometry<Scalar, dim-1, dimWorld, ScvfMLGTraits<Scalar> >;
using CornerStorage = typename ScvfMLGTraits<Scalar>::template CornerStorage<dim-1, dimWorld>::Type;
using GlobalPosition = typename CornerStorage::value_type;
using BoundaryFlag = Dumux::BoundaryFlag<Grid>;
};
public:
typedef Dumux::CCTpfaSubControlVolumeFace<ScvfGeometryTraits> type;
......
......@@ -44,6 +44,7 @@ class CCTpfaSubControlVolumeFace : public SubControlVolumeFaceBase<CCTpfaSubCont
using GlobalPosition = typename ScvfGeometryTraits::GlobalPosition;
using CornerStorage = typename ScvfGeometryTraits::CornerStorage;
using Geometry = typename ScvfGeometryTraits::Geometry;
using BoundaryFlag = typename ScvfGeometryTraits::BoundaryFlag;
public:
//! state the traits public and thus export all types
......@@ -75,6 +76,7 @@ public:
, scvfIndex_(scvfIndex)
, scvIndices_(scvIndices)
, boundary_(isBoundary)
, boundaryFlag_{is}
{
corners_.resize(isGeometry.corners());
for (int i = 0; i < isGeometry.corners(); ++i)
......@@ -150,6 +152,12 @@ public:
return Geometry(geomType_, corners_);
}
//! Return the boundary flag
typename BoundaryFlag::value_type boundaryFlag() const
{
return boundaryFlag_.get();
}
private:
Dune::GeometryType geomType_;
CornerStorage corners_;
......@@ -159,6 +167,7 @@ private:
GridIndexType scvfIndex_;
std::vector<GridIndexType> scvIndices_;
bool boundary_;
BoundaryFlag boundaryFlag_;
};
} // end namespace
......
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