... | ... | @@ -20,20 +20,25 @@ DomainMarkers = 1 |
|
|
BoundarySegments = 1
|
|
|
```
|
|
|
|
|
|
Unfortunately `ALUGrid` uses boundary flags differently, therefore you have to adapt your `FVGridGeometry` to use the class `GmshBoundaryFlag` instead of the normal `BoundaryFlag` class.
|
|
|
Unfortunately `ALUGrid` uses boundary flags differently, therefore you have to adapt your `FVGridGeometry` to use the class `BoundarySegmentIndexFlag` instead of the normal `BoundaryFlag` class.
|
|
|
This can be done in your property settings, where you need to add the following:
|
|
|
```
|
|
|
#include <dumux/common/boundaryflag.hh>
|
|
|
|
|
|
namespace Properties {
|
|
|
|
|
|
// other property settings
|
|
|
...
|
|
|
|
|
|
// custom grid geometry traits that enable you to use another boundary flag class
|
|
|
template<class GridView, class MyBoundaryFlag>
|
|
|
template<class GridView>
|
|
|
struct MyGridGeometryTraits : public BoxDefaultGridGeometryTraits<GridView>
|
|
|
{
|
|
|
struct MyScvfTraits : public BoxDefaultScvfGeometryTraits<GridView>
|
|
|
{ using BoundaryFlag = MyBoundaryFlag; };
|
|
|
{
|
|
|
// use BoundarySegmentIndexFlag
|
|
|
using BoundaryFlag = BoundarySegmentIndexFlag;
|
|
|
};
|
|
|
|
|
|
using SubControlVolumeFace = BoxSubControlVolumeFace<GridView, MyScvfTraits>;
|
|
|
};
|
... | ... | @@ -44,15 +49,11 @@ struct FVGridGeometry<TypeTag, TTag::MyProblem> |
|
|
{
|
|
|
private:
|
|
|
static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableFVGridGeometryCache>();
|
|
|
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
|
|
|
|
|
// this here is the important line: here you set the other boundary flag class
|
|
|
using BoundaryFlag = GmshBoundaryFlag<GetPropType<TypeTag, Properties::Grid>>;
|
|
|
|
|
|
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
|
|
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
|
|
public:
|
|
|
using type = BoxFVGridGeometry<Scalar, GridView, enableCache,
|
|
|
MyGridGeometryTraits<GridView, BoundaryFlag>>;
|
|
|
MyGridGeometryTraits<GridView>>;
|
|
|
};
|
|
|
...
|
|
|
} // end namespace properties
|
... | ... | @@ -64,11 +65,14 @@ namespace Properties { |
|
|
// other property settings
|
|
|
...
|
|
|
|
|
|
template<class GridView, class MyBoundaryFlag>
|
|
|
template<class GridView>
|
|
|
struct MyGridGeometryTraits : public CCTpfaDefaultGridGeometryTraits<GridView>
|
|
|
{
|
|
|
struct MyScvfTraits : public CCTpfaDefaultScvfGeometryTraits<GridView>
|
|
|
{ using BoundaryFlag = MyBoundaryFlag; };
|
|
|
{
|
|
|
// use BoundarySegmentIndexFlag
|
|
|
using BoundaryFlag = BoundarySegmentIndexFlag;
|
|
|
};
|
|
|
|
|
|
using SubControlVolumeFace = CCTpfaSubControlVolumeFace<GridView, MyScvfTraits>;
|
|
|
};
|
... | ... | @@ -79,11 +83,10 @@ struct FVGridGeometry<TypeTag, TTag::MyProblem> |
|
|
private:
|
|
|
static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableFVGridGeometryCache>();
|
|
|
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
|
|
using BoundaryFlag = GmshBoundaryFlag<GetPropType<TypeTag, Properties::Grid>>;
|
|
|
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
|
|
public:
|
|
|
using type = CCTpfaFVGridGeometry<GridView, enableCache,
|
|
|
MyGridGeometryTraits<GridView, BoundaryFlag>>;
|
|
|
MyGridGeometryTraits<GridView>>;
|
|
|
};
|
|
|
...
|
|
|
} // end namespace properties
|
... | ... | |