Skip to content
Snippets Groups Projects
Commit a1ca8f2f authored by Timo Koch's avatar Timo Koch
Browse files

[geometry] Use delegate constructor

parent 8f099c8d
No related branches found
No related tags found
1 merge request!1586Fix/intersectingentities
...@@ -39,25 +39,23 @@ namespace Dumux { ...@@ -39,25 +39,23 @@ namespace Dumux {
template <class GridView, int codim = 0, class Mapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>> template <class GridView, int codim = 0, class Mapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>>
class GridViewGeometricEntitySet class GridViewGeometricEntitySet
{ {
using EntityMap = Dumux::EntityMap<GridView, codim>;
public: public:
using Entity = typename GridView::template Codim<codim>::Entity; using Entity = typename GridView::template Codim<codim>::Entity;
GridViewGeometricEntitySet(const GridView& gridView) GridViewGeometricEntitySet(const GridView& gridView)
: gridView_(gridView) : GridViewGeometricEntitySet(gridView, Dune::mcmgLayout(Dune::Codim<codim>()))
, mapper_(gridView, Dune::mcmgLayout(Dune::Codim<codim>()))
, entityMap_(std::make_shared<EntityMap<GridView, codim>>(gridView.grid(), mapper_))
{} {}
GridViewGeometricEntitySet(const GridView& gridView, GridViewGeometricEntitySet(const GridView& gridView, const Mapper& mapper)
const Mapper& mapper)
: gridView_(gridView) : gridView_(gridView)
, mapper_(mapper) , mapper_(mapper)
, entityMap_(std::make_shared<EntityMap<GridView, codim>>(gridView.grid(), mapper_)) , entityMap_(std::make_shared<EntityMap>(gridView.grid(), mapper_))
{} {}
GridViewGeometricEntitySet(const GridView& gridView, GridViewGeometricEntitySet(const GridView& gridView,
const Mapper& mapper, const Mapper& mapper,
std::shared_ptr<const EntityMap<GridView, codim>> entityMap) std::shared_ptr<const EntityMap> entityMap)
: gridView_(gridView) : gridView_(gridView)
, mapper_(mapper) , mapper_(mapper)
, entityMap_(entityMap) , entityMap_(entityMap)
...@@ -106,7 +104,7 @@ public: ...@@ -106,7 +104,7 @@ public:
private: private:
GridView gridView_; GridView gridView_;
Mapper mapper_; Mapper mapper_;
std::shared_ptr<const EntityMap<GridView, codim>> entityMap_; std::shared_ptr<const EntityMap> entityMap_;
}; };
......
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