From d16e49e16b14e86f985decb1ece7f1d6f451d4c5 Mon Sep 17 00:00:00 2001 From: Felix Schindler <felix@schindlerfamily.de> Date: Sat, 26 Apr 2014 03:38:55 +0200 Subject: [PATCH] [spaces] added part_view_type --- dune/gdt/playground/spaces/finitevolume/default.hh | 3 ++- dune/gdt/playground/spaces/raviartthomas/fem-localfunctions.hh | 3 ++- dune/gdt/playground/spaces/raviartthomas/pdelab.hh | 3 ++- dune/gdt/spaces/continuouslagrange/fem-localfunctions.hh | 3 ++- dune/gdt/spaces/continuouslagrange/fem.hh | 3 ++- dune/gdt/spaces/continuouslagrange/pdelab.hh | 3 ++- dune/gdt/spaces/discontinuouslagrange/fem-localfunctions.hh | 3 ++- dune/gdt/spaces/interface.hh | 3 +++ tests/spaces.cc | 2 +- 9 files changed, 18 insertions(+), 8 deletions(-) diff --git a/dune/gdt/playground/spaces/finitevolume/default.hh b/dune/gdt/playground/spaces/finitevolume/default.hh index 399acb898..0006e1b07 100644 --- a/dune/gdt/playground/spaces/finitevolume/default.hh +++ b/dune/gdt/playground/spaces/finitevolume/default.hh @@ -43,7 +43,8 @@ public: typedef BaseFunctionSet::FiniteVolume<typename GridViewType::template Codim<0>::Entity, typename GridViewType::ctype, GridViewType::dimension, RangeFieldType, dimRange, dimRangeCols> BaseFunctionSetType; - static const bool needs_grid_view = true; + static const Stuff::Grid::ChoosePartView part_view_type = Stuff::Grid::ChoosePartView::view; + static const bool needs_grid_view = true; }; // class DefaultTraits diff --git a/dune/gdt/playground/spaces/raviartthomas/fem-localfunctions.hh b/dune/gdt/playground/spaces/raviartthomas/fem-localfunctions.hh index 3940f2ee4..ae626b6d1 100644 --- a/dune/gdt/playground/spaces/raviartthomas/fem-localfunctions.hh +++ b/dune/gdt/playground/spaces/raviartthomas/fem-localfunctions.hh @@ -93,7 +93,8 @@ public: typedef BaseFunctionSet::FemLocalfunctionsWrapper<BaseFunctionSetMapType, DomainFieldType, dimDomain, RangeFieldType, dimRange, dimRangeCols> BaseFunctionSetType; typedef typename BaseFunctionSetType::EntityType EntityType; - static const bool needs_grid_view = false; + static const Stuff::Grid::ChoosePartView part_view_type = Stuff::Grid::ChoosePartView::part; + static const bool needs_grid_view = false; private: template <class G, int p, class R, int r, int rC> diff --git a/dune/gdt/playground/spaces/raviartthomas/pdelab.hh b/dune/gdt/playground/spaces/raviartthomas/pdelab.hh index 684d91ad1..a1290047c 100644 --- a/dune/gdt/playground/spaces/raviartthomas/pdelab.hh +++ b/dune/gdt/playground/spaces/raviartthomas/pdelab.hh @@ -98,7 +98,8 @@ public: typedef typename GridViewType::template Codim<0>::Entity EntityType; typedef BaseFunctionSet::PiolaTransformedPdelabWrapper<BackendType, EntityType, DomainFieldType, dimDomain, RangeFieldType, dimRange, dimRangeCols> BaseFunctionSetType; - static const bool needs_grid_view = true; + static const Stuff::Grid::ChoosePartView part_view_type = Stuff::Grid::ChoosePartView::view; + static const bool needs_grid_view = true; private: friend class PdelabBased<GridViewImp, polynomialOrder, RangeFieldImp, rangeDim, rangeDimCols>; diff --git a/dune/gdt/spaces/continuouslagrange/fem-localfunctions.hh b/dune/gdt/spaces/continuouslagrange/fem-localfunctions.hh index 1d5aa0710..b052bd47b 100644 --- a/dune/gdt/spaces/continuouslagrange/fem-localfunctions.hh +++ b/dune/gdt/spaces/continuouslagrange/fem-localfunctions.hh @@ -92,7 +92,8 @@ public: typedef BaseFunctionSet::FemLocalfunctionsWrapper<BaseFunctionSetMapType, DomainFieldType, dimDomain, RangeFieldType, dimRange, dimRangeCols> BaseFunctionSetType; typedef typename BaseFunctionSetType::EntityType EntityType; - static const bool needs_grid_view = false; + static const Stuff::Grid::ChoosePartView part_view_type = Stuff::Grid::ChoosePartView::part; + static const bool needs_grid_view = false; private: template <class G, int p, class R, int r, int rC> diff --git a/dune/gdt/spaces/continuouslagrange/fem.hh b/dune/gdt/spaces/continuouslagrange/fem.hh index 413031594..31caa9aa6 100644 --- a/dune/gdt/spaces/continuouslagrange/fem.hh +++ b/dune/gdt/spaces/continuouslagrange/fem.hh @@ -66,7 +66,8 @@ public: typedef typename GridPartType::template Codim<0>::EntityType EntityType; typedef BaseFunctionSet::FemWrapper<typename BackendType::BaseFunctionSetType, EntityType, DomainFieldType, dimDomain, RangeFieldType, dimRange, dimRangeCols> BaseFunctionSetType; - static const bool needs_grid_view = false; + static const Stuff::Grid::ChoosePartView part_view_type = Stuff::Grid::ChoosePartView::part; + static const bool needs_grid_view = false; }; // class SpaceWrappedFemContinuousLagrangeTraits diff --git a/dune/gdt/spaces/continuouslagrange/pdelab.hh b/dune/gdt/spaces/continuouslagrange/pdelab.hh index 20eee7f66..462d3ff7f 100644 --- a/dune/gdt/spaces/continuouslagrange/pdelab.hh +++ b/dune/gdt/spaces/continuouslagrange/pdelab.hh @@ -91,7 +91,8 @@ public: typedef typename GridViewType::template Codim<0>::Entity EntityType; typedef BaseFunctionSet::PdelabWrapper<BackendType, EntityType, DomainFieldType, dimDomain, RangeFieldType, dimRange, dimRangeCols> BaseFunctionSetType; - static const bool needs_grid_view = true; + static const Stuff::Grid::ChoosePartView part_view_type = Stuff::Grid::ChoosePartView::view; + static const bool needs_grid_view = true; private: friend class PdelabBased<GridViewImp, polynomialOrder, RangeFieldImp, rangeDim, rangeDimCols>; diff --git a/dune/gdt/spaces/discontinuouslagrange/fem-localfunctions.hh b/dune/gdt/spaces/discontinuouslagrange/fem-localfunctions.hh index 411cf737a..39040ec55 100644 --- a/dune/gdt/spaces/discontinuouslagrange/fem-localfunctions.hh +++ b/dune/gdt/spaces/discontinuouslagrange/fem-localfunctions.hh @@ -89,7 +89,8 @@ public: typedef BaseFunctionSet::FemLocalfunctionsWrapper<BaseFunctionSetMapType, DomainFieldType, dimDomain, RangeFieldType, dimRange, dimRangeCols> BaseFunctionSetType; typedef typename BaseFunctionSetType::EntityType EntityType; - static const bool needs_grid_view = false; + static const Stuff::Grid::ChoosePartView part_view_type = Stuff::Grid::ChoosePartView::part; + static const bool needs_grid_view = false; private: template <class G, int p, class R, int r, int rC> diff --git a/dune/gdt/spaces/interface.hh b/dune/gdt/spaces/interface.hh index d7bc16acf..cc9750dee 100644 --- a/dune/gdt/spaces/interface.hh +++ b/dune/gdt/spaces/interface.hh @@ -19,6 +19,7 @@ #include <dune/stuff/la/container/pattern.hh> #include <dune/stuff/grid/boundaryinfo.hh> #include <dune/stuff/common/float_cmp.hh> +#include <dune/stuff/grid/partview.hh> #include "constraints.hh" @@ -54,6 +55,8 @@ public: typedef Stuff::Grid::BoundaryInfoInterface<IntersectionType> BoundaryInfoType; typedef Dune::Stuff::LA::SparsityPatternDefault PatternType; + static const Stuff::Grid::ChoosePartView part_view_type = Traits::part_view_type; + static const bool needs_grid_view = Traits::needs_grid_view; public: diff --git a/tests/spaces.cc b/tests/spaces.cc index 37abf7d37..e7f60e794 100644 --- a/tests/spaces.cc +++ b/tests/spaces.cc @@ -22,7 +22,7 @@ #include <dune/stuff/common/print.hh> -#include <dune/gdt/spaces/tools.hh> +#include <dune/gdt/spaces.hh> #include <dune/gdt/spaces/continuouslagrange/fem.hh> #include <dune/gdt/spaces/continuouslagrange/pdelab.hh> #include <dune/gdt/spaces/continuouslagrange/fem-localfunctions.hh> -- GitLab