From 57ac589b379d16be163ce310a33d41bf1034feac Mon Sep 17 00:00:00 2001 From: Rene Milk <rene.milk@wwu.de> Date: Tue, 30 May 2017 16:29:12 +0200 Subject: [PATCH] fix Backends usage --- dune/gdt/playground/spaces/block.hh | 8 +++++--- dune/gdt/playground/spaces/dg/dune-pdelab-wrapper.hh | 2 +- dune/gdt/spaces/dg/dune-fem-wrapper.hh | 4 ++-- dune/gdt/spaces/fv/default.hh | 2 +- dune/gdt/spaces/interface.hh | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dune/gdt/playground/spaces/block.hh b/dune/gdt/playground/spaces/block.hh index 5220f69f1..bb0b2c4dd 100644 --- a/dune/gdt/playground/spaces/block.hh +++ b/dune/gdt/playground/spaces/block.hh @@ -51,7 +51,7 @@ public: typedef typename LocalSpaceType::RangeFieldType RangeFieldType; static const XT::Grid::Backends layer_backend = XT::Grid::Backends::part; - static const constexpr auto backend_type{Backends::gdt}; + static const constexpr Backends backend_type{Backends::gdt}; using CommunicationChooserType = CommunicationChooser<GridLayerType, true>; using CommunicatorType = typename CommunicationChooserType::type; @@ -89,14 +89,16 @@ public: typedef typename CommunicationChooserType::Type CommunicatorType; typedef XT::Grid::DD::SubdomainGrid<typename XT::Grid::extract_grid<GridLayerType>::type> DdSubdomainsGridType; + static const constexpr Backends backend_type{Backends::gdt}; BlockSpace(const DdSubdomainsGridType& grid, const std::vector<std::shared_ptr<const LocalSpaceType>>& spaces) : dd_grid_(grid) , entity_to_subdomain_map_(dd_grid_.entityToSubdomainMap()) , global_grid_part_(new GridLayerType(dd_grid_.globalGridPart())) , local_spaces_(new std::vector<std::shared_ptr<const LocalSpaceType>>(spaces)) - , communicator_(CommunicationChooserType::create(*grid_view_)) - , communicator__prepared_(false) + , mapper_(new MapperType(dd_grid_, global_grid_part_, local_spaces_)) + , communicator_(Traits::CommunicationChooserType::create(*global_grid_part_)) + , communicator_prepared_(false) { if (local_spaces_->size() != dd_grid_.size()) DUNE_THROW(XT::Common::Exceptions::shapes_do_not_match, diff --git a/dune/gdt/playground/spaces/dg/dune-pdelab-wrapper.hh b/dune/gdt/playground/spaces/dg/dune-pdelab-wrapper.hh index f6d8d7690..c46678175 100644 --- a/dune/gdt/playground/spaces/dg/dune-pdelab-wrapper.hh +++ b/dune/gdt/playground/spaces/dg/dune-pdelab-wrapper.hh @@ -70,7 +70,7 @@ public: typedef GridLayerImp GridLayerType; static const int polOrder = polynomialOrder; static const bool continuous = false; - static const constexpr auto backend_type{Backends::pdelab}; + static const constexpr Backends backend_type{Backends::pdelab}; private: typedef typename GridLayerType::ctype DomainFieldType; diff --git a/dune/gdt/spaces/dg/dune-fem-wrapper.hh b/dune/gdt/spaces/dg/dune-fem-wrapper.hh index 4dcef3aa2..e2122c2af 100644 --- a/dune/gdt/spaces/dg/dune-fem-wrapper.hh +++ b/dune/gdt/spaces/dg/dune-fem-wrapper.hh @@ -57,7 +57,7 @@ public: static const int polOrder = polynomialOrder; static const bool continuous = false; static_assert(polOrder >= 1, "Wrong polOrder given!"); - static const constexpr auto backend_type{Backends::fem}; + static const constexpr Backends backend_type{Backends::fem}; private: typedef typename GridLayerType::ctype DomainFieldType; @@ -83,7 +83,7 @@ public: BaseFunctionSetType; static const XT::Grid::Backends layer_backend = XT::Grid::Backends::part; static const bool needs_grid_view = false; - typedef CommunicationChooser<GridLayerType, false> CommunicationChooserType; + typedef CommunicationChooser<GridLayerType, true> CommunicationChooserType; typedef typename CommunicationChooserType::Type CommunicatorType; }; // class DuneFemDgSpaceWrapperTraits diff --git a/dune/gdt/spaces/fv/default.hh b/dune/gdt/spaces/fv/default.hh index bfd9e5579..6326fe4e9 100644 --- a/dune/gdt/spaces/fv/default.hh +++ b/dune/gdt/spaces/fv/default.hh @@ -64,7 +64,7 @@ public: static const bool needs_grid_view = true; typedef CommunicationChooser<GridLayerType> CommunicationChooserType; typedef typename CommunicationChooserType::Type CommunicatorType; - static const constexpr auto backend_type{GDT::Backends::gdt}; + static const constexpr Backends backend_type{GDT::Backends::gdt}; }; // class FvSpaceTraits diff --git a/dune/gdt/spaces/interface.hh b/dune/gdt/spaces/interface.hh index 367927b15..5fb7d3d1a 100644 --- a/dune/gdt/spaces/interface.hh +++ b/dune/gdt/spaces/interface.hh @@ -166,7 +166,7 @@ public: static const size_t dimDomain = domainDim; static const size_t dimRange = rangeDim; static const size_t dimRangeCols = rangeDimCols; - static const constexpr auto backend_type{Traits::backend_type}; + static const constexpr Backends backend_type{Traits::backend_type}; private: static_assert(dimDomain > 0, "dimDomain has to be positive"); -- GitLab