diff --git a/README.md b/README.md index f1ba1e30103beed6ccc2c45e49cf39c10b5b503f..e1e2d590d83ddcfb731f4a3d018f88a93e3692d5 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,6 @@ discretization toolbox for grid-based numerical methods. It contains building bl local operators, local evaluations, local assemblers - for discretization methods as well as generic interfaces for objects like discrete function spaces and basefunction sets. Implementations are provided using the main DUNE discretization modules, like -[dune-fem](https://www.dune-project.org/modules/dune-fem/) and [dune-functions](https://www.dune-project.org/modules/dune-functions/). New users may best try out this module by using the git supermodule diff --git a/dune/gdt/CMakeLists.txt b/dune/gdt/CMakeLists.txt index 7e330909a4144a796ea83c10586a3b0ad2c33c36..3daa2951eaed33af243f3ffe82ce20fd1e840502 100644 --- a/dune/gdt/CMakeLists.txt +++ b/dune/gdt/CMakeLists.txt @@ -11,18 +11,18 @@ if(DUNE_XT_WITH_PYTHON_BINDINGS) set(dunegdt_sources - assembler/system.lib/fem_alu_2d_simplex_conforming.cc - assembler/system.lib/fem_yasp_1d_equidistant_offset.cc - assembler/system.lib/fem_yasp_2d_equidistant_offset.cc - assembler/system.lib/fem_yasp_3d_equidistant_offset.cc - spaces/cg.lib/fem_alu_2d_simplex_conforming.cc - spaces/cg.lib/fem_yasp_1d_equidistant_offset.cc - spaces/cg.lib/fem_yasp_2d_equidistant_offset.cc - spaces/cg.lib/fem_yasp_3d_equidistant_offset.cc - spaces/dg.lib/fem_alu_2d_simplex_conforming.cc - spaces/dg.lib/fem_yasp_1d_equidistant_offset.cc - spaces/dg.lib/fem_yasp_2d_equidistant_offset.cc - spaces/dg.lib/fem_yasp_3d_equidistant_offset.cc) + assembler/system.lib/alu_2d_simplex_conforming.cc + assembler/system.lib/yasp_1d_equidistant_offset.cc + assembler/system.lib/yasp_2d_equidistant_offset.cc + assembler/system.lib/yasp_3d_equidistant_offset.cc + spaces/cg.lib/alu_2d_simplex_conforming.cc + spaces/cg.lib/yasp_1d_equidistant_offset.cc + spaces/cg.lib/yasp_2d_equidistant_offset.cc + spaces/cg.lib/yasp_3d_equidistant_offset.cc + spaces/dg.lib/alu_2d_simplex_conforming.cc + spaces/dg.lib/yasp_1d_equidistant_offset.cc + spaces/dg.lib/yasp_2d_equidistant_offset.cc + spaces/dg.lib/yasp_3d_equidistant_offset.cc) dune_library_add_sources(dunegdt SOURCES ${dunegdt_sources}) endif() @@ -34,10 +34,8 @@ if(dune-pybindxi_FOUND) list(APPEND pybindxi_modules __${_target}) endforeach() dune_pybindxi_add_helper_lib(__assembler_helper EXCLUDE_FROM_ALL - assembler/system.bindings/alu_fem.cc - assembler/system.bindings/alu_gdt.cc - assembler/system.bindings/yasp_fem.cc - assembler/system.bindings/yasp_gdt.cc) + assembler/system.bindings/alu.cc + assembler/system.bindings/yasp.cc) target_link_libraries(__assembler __assembler_helper) dune_pybindxi_add_module(__spaces_block EXCLUDE_FROM_ALL playground/spaces/block.bindings.cc) list(APPEND pybindxi_modules __spaces_block) @@ -51,14 +49,14 @@ if(dune-pybindxi_FOUND) # the operators # * elliptic dune_pybindxi_add_helper_lib(__operators_elliptic_helper EXCLUDE_FROM_ALL - operators/elliptic.bindings/fem_istl.cc) + operators/elliptic.bindings/istl.cc) dune_pybindxi_add_module(__operators_elliptic EXCLUDE_FROM_ALL operators/elliptic.bindings.cc) target_link_libraries(__operators_elliptic __operators_elliptic_helper) list(APPEND pybindxi_modules __operators_elliptic) # * elliptic-ipdg dune_pybindxi_add_helper_lib(__operators_elliptic_ipdg_helper EXCLUDE_FROM_ALL - operators/elliptic-ipdg.bindings/alu_fem_istl.cc - operators/elliptic-ipdg.bindings/yasp_fem_istl.cc) + operators/elliptic-ipdg.bindings/alu_istl.cc + operators/elliptic-ipdg.bindings/yasp_istl.cc) dune_pybindxi_add_module(__operators_elliptic_ipdg EXCLUDE_FROM_ALL operators/elliptic-ipdg.bindings.cc) target_link_libraries(__operators_elliptic_ipdg __operators_elliptic_ipdg_helper) list(APPEND pybindxi_modules __operators_elliptic_ipdg) @@ -85,14 +83,14 @@ if(dune-pybindxi_FOUND) dune_pybindxi_add_module(__operators_RS2017 EXCLUDE_FROM_ALL playground/operators/RS2017.bindings.cc) list(APPEND pybindxi_modules __operators_RS2017) dune_pybindxi_add_helper_lib(__functionals_elliptic_ipdg_helper EXCLUDE_FROM_ALL - functionals/elliptic-ipdg.bindings/alu_fem_istl.cc - functionals/elliptic-ipdg.bindings/yasp_fem_istl.cc) + functionals/elliptic-ipdg.bindings/alu_istl.cc + functionals/elliptic-ipdg.bindings/yasp_istl.cc) dune_pybindxi_add_module(__functionals_elliptic_ipdg EXCLUDE_FROM_ALL functionals/elliptic-ipdg.bindings.cc) target_link_libraries(__functionals_elliptic_ipdg __functionals_elliptic_ipdg_helper) list(APPEND pybindxi_modules __functionals_elliptic_ipdg) dune_pybindxi_add_helper_lib(__functionals_l2_helper EXCLUDE_FROM_ALL - functionals/l2.bindings/alu_gdt_istl.cc - functionals/l2.bindings/yasp_gdt_istl.cc) + functionals/l2.bindings/alu_istl.cc + functionals/l2.bindings/yasp_istl.cc) dune_pybindxi_add_module(__functionals_l2 EXCLUDE_FROM_ALL functionals/l2.bindings.cc) target_link_libraries(__functionals_l2 __functionals_l2_helper) list(APPEND pybindxi_modules __functionals_l2) diff --git a/dune/gdt/assembler/system.bindings.hh b/dune/gdt/assembler/system.bindings.hh index 869cef1ff0452411a5b84642eb0bae6032bf5d63..ed437b3201be544ed54760347e65d8ebf4c7921e 100644 --- a/dune/gdt/assembler/system.bindings.hh +++ b/dune/gdt/assembler/system.bindings.hh @@ -146,7 +146,7 @@ private: }; template <XT::LA::Backends la> - static void addbind_matrix(bound_type& c) + static void addaddbind_matrixatrix(bound_type& c) { namespace py = pybind11; using namespace pybind11::literals; @@ -206,7 +206,7 @@ private: py::keep_alive<0, 3>(), py::keep_alive<0, 4>(), py::keep_alive<0, 5>()); - } // ... addbind_matrix(...) + } // ... addaddbind_matrixatrix(...) public: static bound_type bind(pybind11::module& m) @@ -247,7 +247,7 @@ public: XT::Grid::extract_grid_t<typename type::GridLayerType>>::addbind(c); #if HAVE_DUNE_ISTL - addbind_matrix<XT::LA::Backends::istl_sparse>(c); + addaddbind_matrixatrix<XT::LA::Backends::istl_sparse>(c); #endif c.def("append", @@ -298,70 +298,41 @@ public: Dune::XT::Grid::Backends::_g_backend> #if HAVE_DUNE_ALUGRID -#define _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU( \ +#define _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU_SPACE( \ _pre, _g_layer, _g_backend, _s_type, _s_backend, _s_grid_layer, _p, _r, _rC) \ _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB( \ _pre, ALU_2D_SIMPLEX_CONFORMING, _g_layer, _g_backend, _s_type, _s_backend, _s_grid_layer, _p, _r, _rC) #else -#define _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU( \ +#define _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU_SPACE( \ _pre, _g_layer, _g_backend, _s_type, _s_backend, _s_grid_layer, _p, _r, _rC) #endif -#define _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP( \ +#define _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP_SPACE( \ _pre, _g_layer, _g_backend, _s_type, _s_backend, _s_grid_layer, _p, _r, _rC) \ _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB( \ _pre, YASP_1D_EQUIDISTANT_OFFSET, _g_layer, _g_backend, _s_type, _s_backend, _s_grid_layer, _p, _r, _rC); \ _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB( \ _pre, YASP_2D_EQUIDISTANT_OFFSET, _g_layer, _g_backend, _s_type, _s_backend, _s_grid_layer, _p, _r, _rC) -#if HAVE_DUNE_FEM +#define _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU(_pre, _s_type, _p, _r, _rC) \ + _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU_SPACE(_pre, leaf, view, _s_type, gdt, leaf, _p, 1, 1); \ + _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU_SPACE(_pre, level, view, _s_type, gdt, level, _p, 1, 1) -#define _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU_FEM(_pre, _s_type, _p, _r, _rC) \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU(_pre, leaf, part, _s_type, fem, leaf, _p, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU(_pre, level, part, _s_type, fem, level, _p, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU(_pre, dd_subdomain, part, _s_type, fem, dd_subdomain, _p, 1, 1) +#define _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP(_pre, _s_type, _p, _r, _rC) \ + _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP_SPACE(_pre, leaf, view, _s_type, gdt, leaf, _p, 1, 1); \ + _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP_SPACE(_pre, level, view, _s_type, gdt, level, _p, 1, 1) -#define _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP_FEM(_pre, _s_type, _p, _r, _rC) \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP(_pre, leaf, part, _s_type, fem, leaf, _p, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP(_pre, level, part, _s_type, fem, level, _p, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP(_pre, dd_subdomain, part, _s_type, fem, dd_subdomain, _p, 1, 1) +#define DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU(_pre) \ + _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU(_pre, fv, 0, 1, 1); \ + _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU(_pre, cg, 1, 1, 1) -#define DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU_FEM(_pre) \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU_FEM(_pre, dg, 1, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU(_pre, dd_subdomain_boundary, part, dg, fem, dd_subdomain, 1, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU(_pre, dd_subdomain_coupling, part, dg, fem, dd_subdomain, 1, 1, 1) - -#define DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP_FEM(_pre) \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP_FEM(_pre, dg, 1, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP(_pre, dd_subdomain_boundary, part, dg, fem, dd_subdomain, 1, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP(_pre, dd_subdomain_coupling, part, dg, fem, dd_subdomain, 1, 1, 1) - -#else // HAVE_DUNE_FEM -#define DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU_FEM(_pre) -#define DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP_FEM(_pre) -#endif - -#define _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU_GDT(_pre, _s_type, _p, _r, _rC) \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU(_pre, leaf, view, _s_type, gdt, leaf, _p, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU(_pre, level, view, _s_type, gdt, level, _p, 1, 1) - -#define _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP_GDT(_pre, _s_type, _p, _r, _rC) \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP(_pre, leaf, view, _s_type, gdt, leaf, _p, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP(_pre, level, view, _s_type, gdt, level, _p, 1, 1) - -#define DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU_GDT(_pre) \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU_GDT(_pre, fv, 0, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU_GDT(_pre, cg, 1, 1, 1) - -#define DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP_GDT(_pre) \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP_GDT(_pre, fv, 0, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP_GDT(_pre, cg, 1, 1, 1) +#define DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP(_pre) \ + _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP(_pre, fv, 0, 1, 1); \ + _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP(_pre, cg, 1, 1, 1) #define DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB(_pre) \ - DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU_FEM(_pre); \ - DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP_FEM(_pre); \ - DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU_GDT(_pre); \ - DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP_GDT(_pre) + DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU(_pre); \ + DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP(_pre) DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB(extern template); @@ -401,25 +372,15 @@ DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB(extern template); _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_YASP(_m, _g_layer, _g_backend, _s_type, _s_backend, _s_grid_layer, _p, _r, _rC); \ _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_ALU(_m, _g_layer, _g_backend, _s_type, _s_backend, _s_grid_layer, _p, _r, _rC) -#if HAVE_DUNE_FEM -#define _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_FEM(_m, _s_type, _p, _r, _rC) \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_ALL_GRIDS(_m, leaf, part, _s_type, fem, leaf, _p, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_ALL_GRIDS(_m, level, part, _s_type, fem, level, _p, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_ALL_GRIDS(_m, dd_subdomain, part, _s_type, fem, dd_subdomain, _p, 1, 1) -#else -#define _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_FEM(_m, _s_type, _p, _r, _rC) -#endif - -#define _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_GDT(_m, _s_type, _p, _r, _rC) \ +#define _DUNE_GDT_ASSEMBLER_SYSTEM_BIND(_m, _s_type, _p, _r, _rC) \ _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_ALL_GRIDS(_m, leaf, view, _s_type, gdt, leaf, _p, 1, 1); \ _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_ALL_GRIDS(_m, level, view, _s_type, gdt, level, _p, 1, 1) #define DUNE_GDT_ASSEMBLER_SYSTEM_BIND(_m) \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_GDT(_m, cg, 1, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_FEM(_m, dg, 1, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_ALL_GRIDS(_m, dd_subdomain_boundary, part, dg, fem, dd_subdomain, 1, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_ALL_GRIDS(_m, dd_subdomain_coupling, part, dg, fem, dd_subdomain, 1, 1, 1); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_BIND_GDT(_m, fv, 0, 1, 1) + _DUNE_GDT_ASSEMBLER_SYSTEM_BIND(_m, cg, 1, 1, 1); \ + /*_DUNE_GDT_ASSEMBLER_SYSTEM_BIND_ALL_GRIDS(_m, dd_subdomain_boundary, view, dg, gdt, dd_subdomain, 1, 1, 1);*/ \ + /*_DUNE_GDT_ASSEMBLER_SYSTEM_BIND_ALL_GRIDS(_m, dd_subdomain_coupling, view, dg, gdt, dd_subdomain, 1, 1, 1);*/ \ + _DUNE_GDT_ASSEMBLER_SYSTEM_BIND(_m, fv, 0, 1, 1) // end: this is what we need for the .so diff --git a/dune/gdt/assembler/system.bindings/alu_gdt.cc b/dune/gdt/assembler/system.bindings/alu.cc similarity index 100% rename from dune/gdt/assembler/system.bindings/alu_gdt.cc rename to dune/gdt/assembler/system.bindings/alu.cc diff --git a/dune/gdt/assembler/system.bindings/alu_fem.cc b/dune/gdt/assembler/system.bindings/alu_fem.cc deleted file mode 100644 index 5adda5fb5869d1c9448568a3d6b5c08a55b9a5fc..0000000000000000000000000000000000000000 --- a/dune/gdt/assembler/system.bindings/alu_fem.cc +++ /dev/null @@ -1,29 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include "config.h" - -#if HAVE_DUNE_PYBINDXI && HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM - -#include "../system.bindings.hh" - - -namespace Dune { -namespace GDT { -namespace bindings { - - -DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_ALU_FEM(template); - - -} // namespace bindings -} // namespace GDT -} // namespace Dune - -#endif // HAVE_DUNE_PYBINDXI && HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM diff --git a/dune/gdt/assembler/system.bindings/yasp_gdt.cc b/dune/gdt/assembler/system.bindings/yasp.cc similarity index 100% rename from dune/gdt/assembler/system.bindings/yasp_gdt.cc rename to dune/gdt/assembler/system.bindings/yasp.cc diff --git a/dune/gdt/assembler/system.bindings/yasp_fem.cc b/dune/gdt/assembler/system.bindings/yasp_fem.cc deleted file mode 100644 index e9a5ee505e53ac72d083725531935aef5f182f86..0000000000000000000000000000000000000000 --- a/dune/gdt/assembler/system.bindings/yasp_fem.cc +++ /dev/null @@ -1,29 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include "config.h" - -#if HAVE_DUNE_PYBINDXI && HAVE_DUNE_FEM - -#include "../system.bindings.hh" - - -namespace Dune { -namespace GDT { -namespace bindings { - - -DUNE_GDT_ASSEMBLER_SYSTEM_BIND_LIB_YASP_FEM(template); - - -} // namespace bindings -} // namespace GDT -} // namespace Dune - -#endif // HAVE_DUNE_PYBINDXI && HAVE_DUNE_FEM diff --git a/dune/gdt/assembler/system.lib.hh b/dune/gdt/assembler/system.lib.hh index 46a09510a72e4e71e3b5466ec5fb73815bd7c481..e7e0b68db9a41406d20e8c00d8e0ccf37ad44335 100644 --- a/dune/gdt/assembler/system.lib.hh +++ b/dune/gdt/assembler/system.lib.hh @@ -25,7 +25,6 @@ // everything related to dd subdomain -#if HAVE_DUNE_FEM #define _DUNE_GDT_ASSEMBLER_SYSTEM_LIB_APPEND_DD_SUBDOMAIN( \ _pre, _G, _g_layer, _g_backend, _s_type, _s_backend, _s_grid_layer, _p, _r, _rC, _la) \ typedef typename Dune::GDT::SpaceProvider<_G, \ @@ -188,10 +187,6 @@ Dune::XT::Grid::DD::SubdomainGrid<_G>>::type>; \ _DUNE_GDT_ASSEMBLER_SYSTEM_LIB_APPEND_DD_SUBDOMAIN_ISTL( \ _pre, _G, _g_layer, _g_backend, _s_type, _s_backend, _s_grid_layer, _p, _r, _rC) -#else -#define _DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN( \ - _pre, _G, _g_layer, _g_backend, _s_type, _s_backend, _s_grid_layer, _p, _r, _rC) -#endif // everything not related to dd subdomain #define _DUNE_GDT_ASSEMBLER_SYSTEM_LIB_APPEND( \ @@ -361,25 +356,23 @@ #define DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(_pre, _G, _s_type, _s_backend, _p, _r, _rC) \ DUNE_GDT_ASSEMBLER_SYSTEM_LIB(_pre, _G, _s_type, _s_backend, _p, _r, _rC); \ _DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN( \ - _pre, _G, adaptive_leaf, part, _s_type, _s_backend, adaptive_leaf, _p, _r, _rC); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(_pre, _G, leaf, part, _s_type, _s_backend, leaf, _p, _r, _rC); \ - _DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(_pre, _G, level, part, _s_type, _s_backend, level, _p, _r, _rC); \ + _pre, _G, adaptive_leaf, view, _s_type, _s_backend, adaptive_leaf, _p, _r, _rC); \ + _DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(_pre, _G, leaf, view, _s_type, _s_backend, leaf, _p, _r, _rC); \ + _DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(_pre, _G, level, view, _s_type, _s_backend, level, _p, _r, _rC); \ _DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN( \ - _pre, _G, dd_subdomain, part, _s_type, _s_backend, dd_subdomain, _p, _r, _rC); \ + _pre, _G, dd_subdomain, view, _s_type, _s_backend, dd_subdomain, _p, _r, _rC); \ _DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN( \ - _pre, _G, dd_subdomain_boundary, part, _s_type, _s_backend, dd_subdomain, _p, _r, _rC); \ + _pre, _G, dd_subdomain_boundary, view, _s_type, _s_backend, dd_subdomain, _p, _r, _rC); \ _DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN( \ - _pre, _G, dd_subdomain_coupling, part, _s_type, _s_backend, dd_subdomain, _p, _r, _rC) + _pre, _G, dd_subdomain_coupling, view, _s_type, _s_backend, dd_subdomain, _p, _r, _rC) -#if HAVE_DUNE_FEM #if HAVE_DUNE_ALUGRID -DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(extern template, ALU_2D_SIMPLEX_CONFORMING, cg, fem, 1, 1, 1); -#endif -DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(extern template, YASP_1D_EQUIDISTANT_OFFSET, cg, fem, 1, 1, 1); -DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(extern template, YASP_2D_EQUIDISTANT_OFFSET, cg, fem, 1, 1, 1); -DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(extern template, YASP_3D_EQUIDISTANT_OFFSET, cg, fem, 1, 1, 1); +DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(extern template, ALU_2D_SIMPLEX_CONFORMING, cg, gdt, 1, 1, 1); #endif +DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(extern template, YASP_1D_EQUIDISTANT_OFFSET, cg, gdt, 1, 1, 1); +DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(extern template, YASP_2D_EQUIDISTANT_OFFSET, cg, gdt, 1, 1, 1); +DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(extern template, YASP_3D_EQUIDISTANT_OFFSET, cg, gdt, 1, 1, 1); #endif // DUNE_XT_WITH_PYTHON_BINDINGS diff --git a/dune/gdt/assembler/system.lib/fem_alu_2d_simplex_conforming.cc b/dune/gdt/assembler/system.lib/alu_2d_simplex_conforming.cc similarity index 82% rename from dune/gdt/assembler/system.lib/fem_alu_2d_simplex_conforming.cc rename to dune/gdt/assembler/system.lib/alu_2d_simplex_conforming.cc index 0eb1e38972912410f8407d2ed76bb37f8fb03361..d0353f4961f60ac0437bbc713faa25c596411775 100644 --- a/dune/gdt/assembler/system.lib/fem_alu_2d_simplex_conforming.cc +++ b/dune/gdt/assembler/system.lib/alu_2d_simplex_conforming.cc @@ -9,12 +9,12 @@ #include <config.h> -#if HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM +#if HAVE_DUNE_ALUGRID #include "../system.lib.hh" -DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(template, ALU_2D_SIMPLEX_CONFORMING, cg, fem, 1, 1, 1); +DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(template, ALU_2D_SIMPLEX_CONFORMING, cg, gdt, 1, 1, 1); -#endif // HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM +#endif // HAVE_DUNE_ALUGRID diff --git a/dune/gdt/assembler/system.lib/fem_alu_2d_simplex_conforming_istl.cc b/dune/gdt/assembler/system.lib/fem_alu_2d_simplex_conforming_istl.cc deleted file mode 100644 index f337116e8d16c9bba456c3f7a249c85f2bb6cbf8..0000000000000000000000000000000000000000 --- a/dune/gdt/assembler/system.lib/fem_alu_2d_simplex_conforming_istl.cc +++ /dev/null @@ -1,20 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include <config.h> - -#if HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM - -#include "../system.lib.hh" - - -DUNE_GDT_ASSEMBLER_SYSTEM_LIB_PARTS(template, ALU_2D_SIMPLEX_CONFORMING, cg, fem, 1, 1, 1); - - -#endif // HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM diff --git a/dune/gdt/assembler/system.lib/fem_yasp_1d_equidistant_offset.cc b/dune/gdt/assembler/system.lib/yasp_1d_equidistant_offset.cc similarity index 87% rename from dune/gdt/assembler/system.lib/fem_yasp_1d_equidistant_offset.cc rename to dune/gdt/assembler/system.lib/yasp_1d_equidistant_offset.cc index 75ed61a2db1f29c6e5605300a714ea48abe00df7..71948c42d607456882b11a4affe2c782fd2508a2 100644 --- a/dune/gdt/assembler/system.lib/fem_yasp_1d_equidistant_offset.cc +++ b/dune/gdt/assembler/system.lib/yasp_1d_equidistant_offset.cc @@ -9,12 +9,7 @@ #include <config.h> -#if HAVE_DUNE_FEM - #include "../system.lib.hh" -DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(template, YASP_1D_EQUIDISTANT_OFFSET, cg, fem, 1, 1, 1); - - -#endif // HAVE_DUNE_FEM +DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(template, YASP_1D_EQUIDISTANT_OFFSET, cg, gdt, 1, 1, 1); diff --git a/dune/gdt/assembler/system.lib/fem_yasp_2d_equidistant_offset.cc b/dune/gdt/assembler/system.lib/yasp_2d_equidistant_offset.cc similarity index 87% rename from dune/gdt/assembler/system.lib/fem_yasp_2d_equidistant_offset.cc rename to dune/gdt/assembler/system.lib/yasp_2d_equidistant_offset.cc index 49c1edcfb167806c05352782d1c18a2eef6046af..455d8bbb4c777fcfe3acc57ff9b5b0cb78703c24 100644 --- a/dune/gdt/assembler/system.lib/fem_yasp_2d_equidistant_offset.cc +++ b/dune/gdt/assembler/system.lib/yasp_2d_equidistant_offset.cc @@ -9,12 +9,7 @@ #include <config.h> -#if HAVE_DUNE_FEM - #include "../system.lib.hh" -DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(template, YASP_2D_EQUIDISTANT_OFFSET, cg, fem, 1, 1, 1); - - -#endif // HAVE_DUNE_FEM +DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(template, YASP_2D_EQUIDISTANT_OFFSET, cg, gdt, 1, 1, 1); diff --git a/dune/gdt/assembler/system.lib/fem_yasp_3d_equidistant_offset.cc b/dune/gdt/assembler/system.lib/yasp_3d_equidistant_offset.cc similarity index 87% rename from dune/gdt/assembler/system.lib/fem_yasp_3d_equidistant_offset.cc rename to dune/gdt/assembler/system.lib/yasp_3d_equidistant_offset.cc index 23fd002a4e06e03829bf3649cbfd3fee6936a258..740e659d40b22aa88d5502d0293410e68105e20c 100644 --- a/dune/gdt/assembler/system.lib/fem_yasp_3d_equidistant_offset.cc +++ b/dune/gdt/assembler/system.lib/yasp_3d_equidistant_offset.cc @@ -9,12 +9,7 @@ #include <config.h> -#if HAVE_DUNE_FEM - #include "../system.lib.hh" -DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(template, YASP_3D_EQUIDISTANT_OFFSET, cg, fem, 1, 1, 1); - - -#endif // HAVE_DUNE_FEM +DUNE_GDT_ASSEMBLER_SYSTEM_LIB_DD_SUBDOMAIN(template, YASP_3D_EQUIDISTANT_OFFSET, cg, gdt, 1, 1, 1); diff --git a/dune/gdt/discretefunction/default.bindings.hh b/dune/gdt/discretefunction/default.bindings.hh index c13512d396d6aaa2e124242faa5e0886cf1c5434..9bd49aa4c072d996d7d0728c05aa953203d16c8c 100644 --- a/dune/gdt/discretefunction/default.bindings.hh +++ b/dune/gdt/discretefunction/default.bindings.hh @@ -102,7 +102,6 @@ public: "level"_a = -1, "path"_a, "subsampling"_a = true); -#if HAVE_DUNE_FEM c.def("visualize", [](const type& self, const XT::Grid::GridProvider<G, XT::Grid::DD::SubdomainGrid<G>>& dd_grid_provider, @@ -141,7 +140,6 @@ public: "level_or_subdomain"_a = -1, "path"_a, "subsampling"_a = true); -#endif // HAVE_DUNE_FEM return c; } // ... bind(...) }; // class ConstDiscreteFunction @@ -313,17 +311,7 @@ public: _DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND_YASP(_m, _g_layer, _s_type, _s_backend, _p, _r, _rC); \ _DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND_ALU(_m, _g_layer, _s_type, _s_backend, _p, _r, _rC) -#if HAVE_DUNE_FEM -#define _DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND_FEM(_m) \ - _DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND_ALL_GRIDS(_m, leaf, dg, fem, 1, 1, 1); \ - _DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND_ALL_GRIDS(_m, level, dg, fem, 1, 1, 1); \ - _DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND_ALL_GRIDS(_m, dd_subdomain, dg, fem, 1, 1, 1); \ - _DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND_ALL_GRIDS(_m, dd_subdomain, block_dg, fem, 1, 1, 1) -#else -#define _DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND_FEM(_m) -#endif - -#define _DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND_GDT(_m) \ +#define DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND(_m) \ _DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND_ALL_GRIDS(_m, leaf, fv, gdt, 0, 1, 1); \ _DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND_ALL_GRIDS(_m, level, fv, gdt, 0, 1, 1); \ _DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND_ALL_GRIDS(_m, leaf, cg, gdt, 1, 1, 1); \ @@ -332,10 +320,6 @@ public: // _DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND_ALL_GRIDS(_m, dd_subdomain, block_cg, gdt, 1, 1, 1); -#define DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND(_m) \ - _DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND_FEM(_m); \ - _DUNE_GDT_DISCRETEFUNCTION_DEFAULT_BIND_GDT(_m) - // end: this is what we need for the .so diff --git a/dune/gdt/functionals/elliptic-ipdg.bindings.cc b/dune/gdt/functionals/elliptic-ipdg.bindings.cc index 2730b0738dd92a355da80c3c3921fa5f3eff1673..90b4cfbad0ddd0700763e0c5071e30dbffae90c7 100644 --- a/dune/gdt/functionals/elliptic-ipdg.bindings.cc +++ b/dune/gdt/functionals/elliptic-ipdg.bindings.cc @@ -40,18 +40,18 @@ PYBIND11_PLUGIN(__functionals_elliptic_ipdg) py::module::import("dune.xt.la"); py::module::import("dune.gdt.__spaces"); -// alu_fem_istl.cc -#if HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM && HAVE_DUNE_ISTL - DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_ALU(m, leaf, part, dg, fem, 1, istl_dense); - DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_ALU(m, level, part, dg, fem, 1, istl_dense); - DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_ALU(m, dd_subdomain, part, dg, fem, 1, istl_dense); +// alu_istl.cc +#if HAVE_DUNE_ALUGRID && HAVE_DUNE_ISTL + DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_ALU(m, leaf, part, dg, gdt, 1, istl_dense); + DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_ALU(m, level, part, dg, gdt, 1, istl_dense); + DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_ALU(m, dd_subdomain, part, dg, gdt, 1, istl_dense); #endif -// yasp_fem_istl.cc -#if HAVE_DUNE_FEM && HAVE_DUNE_ISTL - DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_YASP(m, leaf, part, dg, fem, 1, istl_dense); - DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_YASP(m, level, part, dg, fem, 1, istl_dense); - DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_YASP(m, dd_subdomain, part, dg, fem, 1, istl_dense); +// yasp_istl.cc +#if HAVE_DUNE_ISTL + DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_YASP(m, leaf, part, dg, gdt, 1, istl_dense); + DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_YASP(m, level, part, dg, gdt, 1, istl_dense); + DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_YASP(m, dd_subdomain, part, dg, gdt, 1, istl_dense); #endif m.def("_init_mpi", diff --git a/dune/gdt/functionals/elliptic-ipdg.bindings.hh b/dune/gdt/functionals/elliptic-ipdg.bindings.hh index da513d9f66c76e81542a61ccc38c099061fd0073..ea291ec574386dabd5a9b02817c2db592e8c0d6e 100644 --- a/dune/gdt/functionals/elliptic-ipdg.bindings.hh +++ b/dune/gdt/functionals/elliptic-ipdg.bindings.hh @@ -536,18 +536,18 @@ public: _DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_METHODS_D( \ _prefix, 2, YASP_2D_EQUIDISTANT_OFFSET, _layer, _g_backend, _s_type, _s_backend, _p, _la) -// alu_fem__istl.cc +// alu_istl.cc #if HAVE_DUNE_ALUGRID && HAVE_DUNE_ISTL DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_ALU(extern template, leaf, view, cg, gdt, 1, istl_dense); DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_ALU(extern template, level, view, cg, gdt, 1, istl_dense); -// DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_ALU(extern template, dd_subdomain, part, cg, fem, 1, istl_dense); +// DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_ALU(extern template, dd_subdomain, part, cg, gdt, 1, istl_dense); #endif -// yasp_fem_istl.cc +// yasp_istl.cc #if HAVE_DUNE_ISTL DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_YASP(extern template, leaf, view, cg, gdt, 1, istl_dense); DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_YASP(extern template, level, view, cg, gdt, 1, istl_dense); -// DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_YASP(extern template, dd_subdomain, part, cg, fem, 1, istl_dense); +// DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_YASP(extern template, dd_subdomain, part, cg, gdt, 1, istl_dense); #endif // end: this is what we need for the lib diff --git a/dune/gdt/functionals/elliptic-ipdg.bindings/alu_fem_istl.cc b/dune/gdt/functionals/elliptic-ipdg.bindings/alu_istl.cc similarity index 83% rename from dune/gdt/functionals/elliptic-ipdg.bindings/alu_fem_istl.cc rename to dune/gdt/functionals/elliptic-ipdg.bindings/alu_istl.cc index 3c9c8e18e114feb9507ca5a6d689cb37327c40b2..454e8761db71841582d33c7dbf34ecf01f706e80 100644 --- a/dune/gdt/functionals/elliptic-ipdg.bindings/alu_fem_istl.cc +++ b/dune/gdt/functionals/elliptic-ipdg.bindings/alu_istl.cc @@ -14,10 +14,10 @@ #include <dune/gdt/functionals/elliptic-ipdg.bindings.hh> -#if HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM && HAVE_DUNE_ISTL -DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_ALU(template, leaf, part, dg, fem, 1, istl_sparse); -DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_ALU(template, level, part, dg, fem, 1, istl_sparse); -DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_ALU(template, dd_subdomain, part, dg, fem, 1, istl_sparse); +#if HAVE_DUNE_ALUGRID && HAVE_DUNE_ISTL +DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_ALU(template, leaf, view, dg, gdt, 1, istl_sparse); +DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_ALU(template, level, view, dg, gdt, 1, istl_sparse); +DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_ALU(template, dd_subdomain, view, dg, gdt, 1, istl_sparse); #endif diff --git a/dune/gdt/functionals/elliptic-ipdg.bindings/yasp_fem_istl.cc b/dune/gdt/functionals/elliptic-ipdg.bindings/yasp_istl.cc similarity index 84% rename from dune/gdt/functionals/elliptic-ipdg.bindings/yasp_fem_istl.cc rename to dune/gdt/functionals/elliptic-ipdg.bindings/yasp_istl.cc index 22aef532f2a916be558a6138e30528e8893c72f3..50b0c646b4dbf3fc6c21619bdd3cad22de684034 100644 --- a/dune/gdt/functionals/elliptic-ipdg.bindings/yasp_fem_istl.cc +++ b/dune/gdt/functionals/elliptic-ipdg.bindings/yasp_istl.cc @@ -14,10 +14,10 @@ #include <dune/gdt/functionals/elliptic-ipdg.bindings.hh> -#if HAVE_DUNE_FEM && HAVE_DUNE_ISTL -DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_YASP(template, leaf, part, dg, fem, 1, istl_sparse); -DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_YASP(template, level, part, dg, fem, 1, istl_sparse); -DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_YASP(template, dd_subdomain, part, dg, fem, 1, istl_sparse); +#if HAVE_DUNE_ISTL +DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_YASP(template, leaf, part, dg, gdt, 1, istl_sparse); +DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_YASP(template, level, part, dg, gdt, 1, istl_sparse); +DUNE_GDT_FUNCTIONALS_ELLIPTIC_IPDG_BIND_LIB_YASP(template, dd_subdomain, part, dg, gdt, 1, istl_sparse); #endif diff --git a/dune/gdt/functionals/l2.bindings.cc b/dune/gdt/functionals/l2.bindings.cc index 26560e777d075e0a47023645d8e55624239df699..986d4c86cf9a385f5b8f8f4635bfaa988152d362 100644 --- a/dune/gdt/functionals/l2.bindings.cc +++ b/dune/gdt/functionals/l2.bindings.cc @@ -40,24 +40,14 @@ PYBIND11_PLUGIN(__functionals_l2) py::module::import("dune.xt.la"); py::module::import("dune.gdt.__spaces"); -// alu_fem_istl.cc -#if HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM && HAVE_DUNE_ISTL - DUNE_GDT_FUNCTIONALS_L2_BIND_ALU(m, leaf, part, dg, fem, 1, istl_sparse); - DUNE_GDT_FUNCTIONALS_L2_BIND_ALU(m, level, part, dg, fem, 1, istl_sparse); - DUNE_GDT_FUNCTIONALS_L2_BIND_ALU(m, dd_subdomain, part, dg, fem, 1, istl_sparse); -#endif +// alu_istl.cc #if HAVE_DUNE_ALUGRID && HAVE_DUNE_ISTL DUNE_GDT_FUNCTIONALS_L2_BIND_ALU(m, leaf, view, cg, gdt, 1, istl_sparse); DUNE_GDT_FUNCTIONALS_L2_BIND_ALU(m, level, view, cg, gdt, 1, istl_sparse); // DUNE_GDT_FUNCTIONALS_L2_BIND_ALU(m, dd_subdomain, view, cg, gdt, 1, istl_sparse); #endif -// yasp_fem_istl.cc -#if HAVE_DUNE_FEM && HAVE_DUNE_ISTL - DUNE_GDT_FUNCTIONALS_L2_BIND_YASP(m, leaf, part, dg, fem, 1, istl_sparse); - DUNE_GDT_FUNCTIONALS_L2_BIND_YASP(m, level, part, dg, fem, 1, istl_sparse); - DUNE_GDT_FUNCTIONALS_L2_BIND_YASP(m, dd_subdomain, part, dg, fem, 1, istl_sparse); -#endif +// yasp_istl.cc #if HAVE_DUNE_ISTL DUNE_GDT_FUNCTIONALS_L2_BIND_YASP(m, leaf, view, cg, gdt, 1, istl_sparse); DUNE_GDT_FUNCTIONALS_L2_BIND_YASP(m, level, view, cg, gdt, 1, istl_sparse); diff --git a/dune/gdt/functionals/l2.bindings.hh b/dune/gdt/functionals/l2.bindings.hh index bed3dfa40218b01f92799b87b7722adcbe57847d..623762da7a163aa93fed949f2c46fb1152dbe453 100644 --- a/dune/gdt/functionals/l2.bindings.hh +++ b/dune/gdt/functionals/l2.bindings.hh @@ -233,14 +233,14 @@ public: _DUNE_GDT_FUNCTIONALS_L2_BIND_LIB( \ _prefix, 2, YASP_2D_EQUIDISTANT_OFFSET, _layer, _g_backend, _s_type, _s_backend, _p, _la) -// alu_fem_istl.cc +// alu_istl.cc #if HAVE_DUNE_ALUGRID && HAVE_DUNE_ISTL DUNE_GDT_FUNCTIONALS_L2_BIND_LIB_ALU(extern template, leaf, part, cg, gdt, 1, istl_sparse); DUNE_GDT_FUNCTIONALS_L2_BIND_LIB_ALU(extern template, level, part, cg, gdt, 1, istl_sparse); // DUNE_GDT_FUNCTIONALS_L2_BIND_LIB_ALU(extern template, dd_subdomain, part, cg, gdt, 1, istl_sparse); #endif -// yasp_fem_istl.cc +// yasp_istl.cc #if HAVE_DUNE_ISTL DUNE_GDT_FUNCTIONALS_L2_BIND_LIB_YASP(extern template, leaf, part, cg, gdt, 1, istl_sparse); DUNE_GDT_FUNCTIONALS_L2_BIND_LIB_YASP(extern template, level, part, cg, gdt, 1, istl_sparse); diff --git a/dune/gdt/functionals/l2.bindings/alu_gdt_istl.cc b/dune/gdt/functionals/l2.bindings/alu_istl.cc similarity index 100% rename from dune/gdt/functionals/l2.bindings/alu_gdt_istl.cc rename to dune/gdt/functionals/l2.bindings/alu_istl.cc diff --git a/dune/gdt/functionals/l2.bindings/yasp_gdt_istl.cc b/dune/gdt/functionals/l2.bindings/yasp_istl.cc similarity index 100% rename from dune/gdt/functionals/l2.bindings/yasp_gdt_istl.cc rename to dune/gdt/functionals/l2.bindings/yasp_istl.cc diff --git a/dune/gdt/local/elliptic-ipdg-operators.bindings.hh b/dune/gdt/local/elliptic-ipdg-operators.bindings.hh index c742003502bf67091ad51899ea1ab0bb54c88b2b..d2b9ae8460cdc8ad03d5b6f20a6a5c212aac1469 100644 --- a/dune/gdt/local/elliptic-ipdg-operators.bindings.hh +++ b/dune/gdt/local/elliptic-ipdg-operators.bindings.hh @@ -40,14 +40,8 @@ class LocalEllipticIpdgInnerIntegralOperator static_assert(is_space<S>::value, ""); typedef XT::Grid::extract_grid_t<typename S::GridLayerType> G; typedef typename S::BaseFunctionSetType B; - typedef XT::Grid::extract_intersection_t<typename XT::Grid::Layer<G, - layer, - S::layer_backend -#if HAVE_DUNE_FEM - , - XT::Grid::DD::SubdomainGrid<G> -#endif - >::type> + typedef XT::Grid::extract_intersection_t< + typename XT::Grid::Layer<G, layer, S::layer_backend, XT::Grid::DD::SubdomainGrid<G>>::type> I; public: @@ -213,14 +207,8 @@ class LocalEllipticIpdgBoundaryIntegralOperator static_assert(is_space<S>::value, ""); typedef XT::Grid::extract_grid_t<typename S::GridLayerType> G; typedef typename S::BaseFunctionSetType B; - typedef XT::Grid::extract_intersection_t<typename XT::Grid::Layer<G, - layer, - S::layer_backend -#if HAVE_DUNE_FEM - , - XT::Grid::DD::SubdomainGrid<G> -#endif - >::type> + typedef XT::Grid::extract_intersection_t< + typename XT::Grid::Layer<G, layer, S::layer_backend, XT::Grid::DD::SubdomainGrid<G>>::type> I; public: @@ -741,22 +729,9 @@ public: //_DUNE_GDT_LOCAL_ELLIPTIC_IPDG_OPERATORS_BIND_YASP( \ // _m, dd_subdomain, part, _s_type, _s_backend, dd_subdomain_coupling, _p, _R, _r, _rC, "_dd_subdomain_") -#if HAVE_DUNE_FEM -#define _DUNE_GDT_LOCAL_ELLIPTIC_IPDG_OPERATORS_BIND_PARTS(_m, _s_type, _s_backend, _p, _R, _r, _rC) \ +#define DUNE_GDT_LOCAL_ELLIPTIC_IPDG_OPERATORS_BIND(_m) \ _DUNE_GDT_LOCAL_ELLIPTIC_IPDG_OPERATORS_BIND_ALU( \ - _m, dd_subdomain, part, _s_type, _s_backend, dd_subdomain_coupling, _p, _R, _r, _rC, "_dd_subdomain_") -#else -#define _DUNE_GDT_LOCAL_ELLIPTIC_IPDG_OPERATORS_BIND_PARTS(_m, _s_type, _s_backend, _p, _R, _r, _rC) -#endif - -#if HAVE_DUNE_FEM -#define DUNE_GDT_LOCAL_ELLIPTIC_IPDG_OPERATORS_BIND_FEM(_m) \ - _DUNE_GDT_LOCAL_ELLIPTIC_IPDG_OPERATORS_BIND_PARTS(_m, dg, fem, 1, double, 1, 1) -#else -#define DUNE_GDT_LOCAL_ELLIPTIC_IPDG_OPERATORS_BIND_FEM(_m) -#endif - -#define DUNE_GDT_LOCAL_ELLIPTIC_IPDG_OPERATORS_BIND(_m) DUNE_GDT_LOCAL_ELLIPTIC_IPDG_OPERATORS_BIND_FEM(_m) + _m, dd_subdomain, view, dg, gdt, dd_subdomain_coupling, 1, double, 1, 1, "_dd_subdomain_") // end: this is what we need for the .so diff --git a/dune/gdt/operators/elliptic-ipdg.bindings.cc b/dune/gdt/operators/elliptic-ipdg.bindings.cc index de191be810a742b6175a4c8be8541b178f9010bf..2c9797c072d2661603cb0170e8369b66129bd1f4 100644 --- a/dune/gdt/operators/elliptic-ipdg.bindings.cc +++ b/dune/gdt/operators/elliptic-ipdg.bindings.cc @@ -41,18 +41,18 @@ PYBIND11_PLUGIN(__operators_elliptic_ipdg) py::module::import("dune.gdt.__spaces"); py::module::import("dune.gdt.__discretefunction"); -// alu_fem_istl.cc -#if HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM && HAVE_DUNE_ISTL - DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_ALU(m, leaf, part, dg, fem, 1, istl_sparse); - DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_ALU(m, level, part, dg, fem, 1, istl_sparse); - DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_ALU(m, dd_subdomain, part, dg, fem, 1, istl_sparse); +// alu_istl.cc +#if HAVE_DUNE_ALUGRID && HAVE_DUNE_ISTL + DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_ALU(m, leaf, part, dg, gdt, 1, istl_sparse); + DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_ALU(m, level, part, dg, gdt, 1, istl_sparse); + DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_ALU(m, dd_subdomain, part, dg, gdt, 1, istl_sparse); #endif -// yasp_fem_istl.cc -#if HAVE_DUNE_FEM && HAVE_DUNE_ISTL - DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_YASP(m, leaf, part, dg, fem, 1, istl_sparse); - DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_YASP(m, level, part, dg, fem, 1, istl_sparse); - DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_YASP(m, dd_subdomain, part, dg, fem, 1, istl_sparse); +// yasp_istl.cc +#if HAVE_DUNE_ISTL + DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_YASP(m, leaf, part, dg, gdt, 1, istl_sparse); + DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_YASP(m, level, part, dg, gdt, 1, istl_sparse); + DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_YASP(m, dd_subdomain, part, dg, gdt, 1, istl_sparse); #endif m.def("_init_mpi", diff --git a/dune/gdt/operators/elliptic-ipdg.bindings.hh b/dune/gdt/operators/elliptic-ipdg.bindings.hh index 111878428422ccd6863284c53347e64ec42863a4..204a834ffc3d23ab6efccbce190822de29935d61 100644 --- a/dune/gdt/operators/elliptic-ipdg.bindings.hh +++ b/dune/gdt/operators/elliptic-ipdg.bindings.hh @@ -419,18 +419,18 @@ public: _DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_METHODS_D( \ _prefix, 2, YASP_2D_EQUIDISTANT_OFFSET, _layer, _g_backend, _s_type, _s_backend, _p, _la) -// alu_fem__istl.cc -#if HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM && HAVE_DUNE_ISTL +// alu_istl.cc +#if HAVE_DUNE_ALUGRID && HAVE_DUNE_ISTL DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_ALU(extern template, leaf, view, cg, gdt, 1, istl_sparse); DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_ALU(extern template, level, view, cg, gdt, 1, istl_sparse); -// DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_ALU(extern template, dd_subdomain, part, cg, fem, 1, istl_sparse); +// DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_ALU(extern template, dd_subdomain, view, cg, gdt, 1, istl_sparse); #endif -// yasp_fem_istl.cc -#if HAVE_DUNE_FEM && HAVE_DUNE_ISTL +// yasp_istl.cc +#if HAVE_DUNE_ISTL DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_YASP(extern template, leaf, view, cg, gdt, 1, istl_sparse); DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_YASP(extern template, level, view, cg, gdt, 1, istl_sparse); -// DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_YASP(extern template, dd_subdomain, part, cg, fem, 1, istl_sparse); +// DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_YASP(extern template, dd_subdomain, view, cg, gdt, 1, istl_sparse); #endif // end: this is what we need for the lib diff --git a/dune/gdt/operators/elliptic-ipdg.bindings/alberta_fem_common.cc b/dune/gdt/operators/elliptic-ipdg.bindings/alberta_fem_common.cc deleted file mode 100644 index ea5dbd201cfd1b32d9fad3e8336261eb5ecb0390..0000000000000000000000000000000000000000 --- a/dune/gdt/operators/elliptic-ipdg.bindings/alberta_fem_common.cc +++ /dev/null @@ -1,35 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include "config.h" - -#if HAVE_DUNE_PYBINDXI - -#include <dune/pybindxi/pybind11.h> - -#include <dune/gdt/operators/elliptic-ipdg.bindings.hh> - - -PYBIND11_PLUGIN(__operators_elliptic_ipdg_alberta_fem_common) -{ - namespace py = pybind11; - - py::module m("__operators_elliptic_ipdg_alberta_fem_common", "dune-gdt: EllipticIpdgMatrixOperator"); - - py::module::import("dune.xt.common"); - py::module::import("dune.xt.grid"); - py::module::import("dune.xt.functions"); - py::module::import("dune.xt.la"); - - // DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_FEM_COMMON(m); - - return m.ptr(); -} - -#endif // HAVE_DUNE_PYBINDXI diff --git a/dune/gdt/operators/elliptic-ipdg.bindings/alberta_fem_eigen.cc b/dune/gdt/operators/elliptic-ipdg.bindings/alberta_fem_eigen.cc deleted file mode 100644 index 3b9843279ec3a911b80e5f0bbacecce29c9f0e01..0000000000000000000000000000000000000000 --- a/dune/gdt/operators/elliptic-ipdg.bindings/alberta_fem_eigen.cc +++ /dev/null @@ -1,35 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include "config.h" - -#if HAVE_DUNE_PYBINDXI - -#include <dune/pybindxi/pybind11.h> - -#include <dune/gdt/operators/elliptic-ipdg.bindings.hh> - - -PYBIND11_PLUGIN(__operators_elliptic_ipdg_alberta_fem_eigen) -{ - namespace py = pybind11; - - py::module m("__operators_elliptic_ipdg_alberta_fem_eigen", "dune-gdt: EllipticMatrixOperator"); - - py::module::import("dune.xt.common"); - py::module::import("dune.xt.grid"); - py::module::import("dune.xt.functions"); - py::module::import("dune.xt.la"); - - // DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_FEM_EIGEN(m); - - return m.ptr(); -} - -#endif // HAVE_DUNE_PYBINDXI diff --git a/dune/gdt/operators/elliptic-ipdg.bindings/alberta_fem_istl.cc b/dune/gdt/operators/elliptic-ipdg.bindings/alberta_fem_istl.cc deleted file mode 100644 index 0d6ef9ed26b49834ac3fefb48fac983048da9918..0000000000000000000000000000000000000000 --- a/dune/gdt/operators/elliptic-ipdg.bindings/alberta_fem_istl.cc +++ /dev/null @@ -1,35 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include "config.h" - -#if HAVE_DUNE_PYBINDXI - -#include <dune/pybindxi/pybind11.h> - -#include <dune/gdt/operators/elliptic-ipdg.bindings.hh> - - -PYBIND11_PLUGIN(__operators_elliptic_ipdg_alberta_fem_istl) -{ - namespace py = pybind11; - - py::module m("__operators_elliptic_ipdg_alberta_fem_istl", "dune-gdt: EllipticMatrixOperator"); - - py::module::import("dune.xt.common"); - py::module::import("dune.xt.grid"); - py::module::import("dune.xt.functions"); - py::module::import("dune.xt.la"); - - // DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_FEM_ISTL(m); - - return m.ptr(); -} - -#endif // HAVE_DUNE_PYBINDXI diff --git a/dune/gdt/operators/elliptic-ipdg.bindings/alu_fem_common.cc b/dune/gdt/operators/elliptic-ipdg.bindings/alu_fem_common.cc deleted file mode 100644 index abec86c732e78042430940c181f1e4e709a3d95b..0000000000000000000000000000000000000000 --- a/dune/gdt/operators/elliptic-ipdg.bindings/alu_fem_common.cc +++ /dev/null @@ -1,35 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include "config.h" - -#if HAVE_DUNE_PYBINDXI - -#include <dune/pybindxi/pybind11.h> - -#include <dune/gdt/operators/elliptic-ipdg.bindings.hh> - - -PYBIND11_PLUGIN(__operators_elliptic_ipdg_alu_fem_common) -{ - namespace py = pybind11; - - py::module m("__operators_elliptic_ipdg_alu_fem_common", "dune-gdt: EllipticMatrixOperator"); - - py::module::import("dune.xt.common"); - py::module::import("dune.xt.grid"); - py::module::import("dune.xt.functions"); - py::module::import("dune.xt.la"); - - // DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_FEM_COMMON(m); - - return m.ptr(); -} - -#endif // HAVE_DUNE_PYBINDXI diff --git a/dune/gdt/operators/elliptic-ipdg.bindings/alu_fem_eigen.cc b/dune/gdt/operators/elliptic-ipdg.bindings/alu_fem_eigen.cc deleted file mode 100644 index 0c536bf2aaf20f4d5d50df040128787ee067ffbb..0000000000000000000000000000000000000000 --- a/dune/gdt/operators/elliptic-ipdg.bindings/alu_fem_eigen.cc +++ /dev/null @@ -1,35 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include "config.h" - -#if HAVE_DUNE_PYBINDXI - -#include <dune/pybindxi/pybind11.h> - -#include <dune/gdt/operators/elliptic-ipdg.bindings.hh> - - -PYBIND11_PLUGIN(__operators_elliptic_ipdg_alu_fem_eigen) -{ - namespace py = pybind11; - - py::module m("__operators_elliptic_ipdg_alu_fem_eigen", "dune-gdt: EllipticMatrixOperator"); - - py::module::import("dune.xt.common"); - py::module::import("dune.xt.grid"); - py::module::import("dune.xt.functions"); - py::module::import("dune.xt.la"); - - // DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_FEM_EIGEN(m); - - return m.ptr(); -} - -#endif // HAVE_DUNE_PYBINDXI diff --git a/dune/gdt/operators/elliptic-ipdg.bindings/alu_fem_istl.cc b/dune/gdt/operators/elliptic-ipdg.bindings/alu_istl.cc similarity index 70% rename from dune/gdt/operators/elliptic-ipdg.bindings/alu_fem_istl.cc rename to dune/gdt/operators/elliptic-ipdg.bindings/alu_istl.cc index b8b2e782399696c16529c7190ffad76e3a074d29..b547af815c61797386e8a9c42f9a4216d3dd8a10 100644 --- a/dune/gdt/operators/elliptic-ipdg.bindings/alu_fem_istl.cc +++ b/dune/gdt/operators/elliptic-ipdg.bindings/alu_istl.cc @@ -14,10 +14,10 @@ #include <dune/gdt/operators/elliptic-ipdg.bindings.hh> -#if HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM && HAVE_DUNE_ISTL -DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_ALU(template, leaf, part, dg, fem, 1, istl_sparse); -DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_ALU(template, level, part, dg, fem, 1, istl_sparse); -DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_ALU(template, dd_subdomain, part, dg, fem, 1, istl_sparse); +#if HAVE_DUNE_ALUGRID && HAVE_DUNE_ISTL +DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_ALU(template, leaf, view, dg, gdt, 1, istl_sparse); +DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_ALU(template, level, view, dg, gdt, 1, istl_sparse); +DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_ALU(template, dd_subdomain, view, dg, gdt, 1, istl_sparse); #endif diff --git a/dune/gdt/operators/elliptic-ipdg.bindings/ug_fem_common.cc b/dune/gdt/operators/elliptic-ipdg.bindings/ug_fem_common.cc deleted file mode 100644 index d4b25fd03609ebeed3cdc3a9f0c2c0c3f83cbf27..0000000000000000000000000000000000000000 --- a/dune/gdt/operators/elliptic-ipdg.bindings/ug_fem_common.cc +++ /dev/null @@ -1,35 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include "config.h" - -#if HAVE_DUNE_PYBINDXI - -#include <dune/pybindxi/pybind11.h> - -#include <dune/gdt/operators/elliptic-ipdg.bindings.hh> - - -PYBIND11_PLUGIN(__operators_elliptic_ipdg_ug_fem_common) -{ - namespace py = pybind11; - - py::module m("__operators_elliptic_ipdg_ug_fem_common", "dune-gdt: EllipticMatrixOperator"); - - py::module::import("dune.xt.common"); - py::module::import("dune.xt.grid"); - py::module::import("dune.xt.functions"); - py::module::import("dune.xt.la"); - - // DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_FEM_COMMON(m); - - return m.ptr(); -} - -#endif // HAVE_DUNE_PYBINDXI diff --git a/dune/gdt/operators/elliptic-ipdg.bindings/ug_fem_eigen.cc b/dune/gdt/operators/elliptic-ipdg.bindings/ug_fem_eigen.cc deleted file mode 100644 index 947a14097b2c7f2d85a71259aa5a8c9b254a3087..0000000000000000000000000000000000000000 --- a/dune/gdt/operators/elliptic-ipdg.bindings/ug_fem_eigen.cc +++ /dev/null @@ -1,35 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include "config.h" - -#if HAVE_DUNE_PYBINDXI - -#include <dune/pybindxi/pybind11.h> - -#include <dune/gdt/operators/elliptic-ipdg.bindings.hh> - - -PYBIND11_PLUGIN(__operators_elliptic_ipdg_ug_fem_eigen) -{ - namespace py = pybind11; - - py::module m("__operators_elliptic_ipdg_ug_fem_eigen", "dune-gdt: EllipticMatrixOperator"); - - py::module::import("dune.xt.common"); - py::module::import("dune.xt.grid"); - py::module::import("dune.xt.functions"); - py::module::import("dune.xt.la"); - - // DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_FEM_EIGEN(m); - - return m.ptr(); -} - -#endif // HAVE_DUNE_PYBINDXI diff --git a/dune/gdt/operators/elliptic-ipdg.bindings/ug_fem_istl.cc b/dune/gdt/operators/elliptic-ipdg.bindings/ug_fem_istl.cc deleted file mode 100644 index d9d34a0db645dde48bfdb283e23bcc113cb34e9b..0000000000000000000000000000000000000000 --- a/dune/gdt/operators/elliptic-ipdg.bindings/ug_fem_istl.cc +++ /dev/null @@ -1,35 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include "config.h" - -#if HAVE_DUNE_PYBINDXI - -#include <dune/pybindxi/pybind11.h> - -#include <dune/gdt/operators/elliptic-ipdg.bindings.hh> - - -PYBIND11_PLUGIN(__operators_elliptic_ipdg_ug_fem_istl) -{ - namespace py = pybind11; - - py::module m("__operators_elliptic_ipdg_ug_fem_istl", "dune-gdt: EllipticMatrixOperator"); - - py::module::import("dune.xt.common"); - py::module::import("dune.xt.grid"); - py::module::import("dune.xt.functions"); - py::module::import("dune.xt.la"); - - // DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_FEM_ISTL(m); - - return m.ptr(); -} - -#endif // HAVE_DUNE_PYBINDXI diff --git a/dune/gdt/operators/elliptic-ipdg.bindings/yasp_fem_common.cc b/dune/gdt/operators/elliptic-ipdg.bindings/yasp_fem_common.cc deleted file mode 100644 index c5c1a800565e99f6b43fd2be93e364eb08a46710..0000000000000000000000000000000000000000 --- a/dune/gdt/operators/elliptic-ipdg.bindings/yasp_fem_common.cc +++ /dev/null @@ -1,35 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include "config.h" - -#if HAVE_DUNE_PYBINDXI - -#include <dune/pybindxi/pybind11.h> - -#include <dune/gdt/operators/elliptic-ipdg.bindings.hh> - - -PYBIND11_PLUGIN(__operators_elliptic_ipdg_yasp_fem_common) -{ - namespace py = pybind11; - - py::module m("__operators_elliptic_ipdg_yasp_fem_common", "dune-gdt: EllipticMatrixOperator"); - - py::module::import("dune.xt.common"); - py::module::import("dune.xt.grid"); - py::module::import("dune.xt.functions"); - py::module::import("dune.xt.la"); - - // DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_FEM_COMMON(m); - - return m.ptr(); -} - -#endif // HAVE_DUNE_PYBINDXI diff --git a/dune/gdt/operators/elliptic-ipdg.bindings/yasp_fem_eigen.cc b/dune/gdt/operators/elliptic-ipdg.bindings/yasp_fem_eigen.cc deleted file mode 100644 index 4a811c04c8b1b623714df41f891970c9f454cd3e..0000000000000000000000000000000000000000 --- a/dune/gdt/operators/elliptic-ipdg.bindings/yasp_fem_eigen.cc +++ /dev/null @@ -1,35 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include "config.h" - -#if HAVE_DUNE_PYBINDXI - -#include <dune/pybindxi/pybind11.h> - -#include <dune/gdt/operators/elliptic-ipdg.bindings.hh> - - -PYBIND11_PLUGIN(__operators_elliptic_ipdg_yasp_fem_eigen) -{ - namespace py = pybind11; - - py::module m("__operators_elliptic_ipdg_yasp_fem_eigen", "dune-gdt: EllipticMatrixOperator"); - - py::module::import("dune.xt.common"); - py::module::import("dune.xt.grid"); - py::module::import("dune.xt.functions"); - py::module::import("dune.xt.la"); - - // DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_FEM_EIGEN(m); - - return m.ptr(); -} - -#endif // HAVE_DUNE_PYBINDXI diff --git a/dune/gdt/operators/elliptic-ipdg.bindings/yasp_fem_istl.cc b/dune/gdt/operators/elliptic-ipdg.bindings/yasp_istl.cc similarity index 78% rename from dune/gdt/operators/elliptic-ipdg.bindings/yasp_fem_istl.cc rename to dune/gdt/operators/elliptic-ipdg.bindings/yasp_istl.cc index c1ff0c512e324c281f8b158c1ccafd362b3672e9..d6caef7f26f198865ab7d415f98c6a5426eeaaa1 100644 --- a/dune/gdt/operators/elliptic-ipdg.bindings/yasp_fem_istl.cc +++ b/dune/gdt/operators/elliptic-ipdg.bindings/yasp_istl.cc @@ -14,10 +14,10 @@ #include <dune/gdt/operators/elliptic-ipdg.bindings.hh> -#if HAVE_DUNE_FEM && HAVE_DUNE_ISTL -DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_YASP(template, leaf, part, dg, fem, 1, istl_sparse); -DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_YASP(template, level, part, dg, fem, 1, istl_sparse); -DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_YASP(template, dd_subdomain, part, dg, fem, 1, istl_sparse); +#if HAVE_DUNE_ISTL +DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_YASP(template, leaf, view, dg, gdt, 1, istl_sparse); +DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_YASP(template, level, view, dg, gdt, 1, istl_sparse); +DUNE_GDT_OPERATORS_ELLIPTIC_IPDG_BIND_LIB_YASP(template, dd_subdomain, view, dg, gdt, 1, istl_sparse); #endif diff --git a/dune/gdt/operators/elliptic.bindings.cc b/dune/gdt/operators/elliptic.bindings.cc index 283cf21964beb5235f6ddf370c5784c4fae1761a..e1be69552c55b7353035c3fd1b560eb3c18956cf 100644 --- a/dune/gdt/operators/elliptic.bindings.cc +++ b/dune/gdt/operators/elliptic.bindings.cc @@ -41,7 +41,7 @@ PYBIND11_PLUGIN(__operators_elliptic) py::module::import("dune.gdt.__spaces"); py::module::import("dune.gdt.__discretefunction"); - DUNE_GDT_OPERATORS_ELLIPTIC_BIND_FEM_ISTL(m); + DUNE_GDT_OPERATORS_ELLIPTIC_BIND_ISTL(m); m.def("_init_mpi", [](const std::vector<std::string>& args) { diff --git a/dune/gdt/operators/elliptic.bindings.hh b/dune/gdt/operators/elliptic.bindings.hh index 112b9846fb1b32bf209fe8c346331f7a52f2e025..d9ebb9275a5342a8795fcd2c883f65b1d68ec9c4 100644 --- a/dune/gdt/operators/elliptic.bindings.hh +++ b/dune/gdt/operators/elliptic.bindings.hh @@ -301,32 +301,22 @@ public: _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_YASP(_prefix, _layer, _g_backend, _s_type, _s_backend, _p, _la) -#define _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_DEFAULT(_prefix, _la) \ +#define _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB(_prefix, _la) \ _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_GRIDS(_prefix, leaf, part, cg, gdt, 1, _la); \ _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_GRIDS(_prefix, level, part, cg, gdt, 1, _la); \ _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_GRIDS(_prefix, dd_subdomain, part, cg, gdt, 1, _la); \ - _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_GRIDS(_prefix, leaf, part, dg, fem, 1, _la); \ - _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_GRIDS(_prefix, level, part, dg, fem, 1, _la); \ - _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_GRIDS(_prefix, dd_subdomain, part, dg, fem, 1, _la) -#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_FEM_COMMON(_prefix) -//_DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_DEFAULT(_prefix, common_dense) -//#if HAVE_EIGEN -//#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_FEM_EIGEN(_prefix) \ -// _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_DEFAULT(_prefix, eigen_dense); \ -// _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_DEFAULT(_prefix, eigen_sparse) -//#else -#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_FEM_EIGEN(_prefix) -//#endif + _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_GRIDS(_prefix, leaf, view, dg, gdt, 1, _la); \ + _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_GRIDS(_prefix, level, view, dg, gdt, 1, _la); \ + _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_GRIDS(_prefix, dd_subdomain, view, dg, gdt, 1, _la) + #if HAVE_DUNE_ISTL -#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_FEM_ISTL(_prefix) \ - _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_DEFAULT(_prefix, istl_sparse) +#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_ISTL(_prefix) _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB(_prefix, istl_sparse) #else -#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_FEM_ISTL(_prefix) +#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_ISTL(_prefix) #endif - -// fem_istl.cc -DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_FEM_ISTL(extern template); +// istl.cc +DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_ISTL(extern template); // end: this is what we need for the lib @@ -459,32 +449,26 @@ DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_FEM_ISTL(extern template); _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_UG(_m, _layer, _g_backend, _s_type, _s_backend, _p, _la); \ _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_YASP(_m, _layer, _g_backend, _s_type, _s_backend, _p, _la) -#if HAVE_DUNE_FEM -#define _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_FEM(_m, _la) \ +#define _DUNE_GDT_OPERATORS_ELLIPTIC_BIND(_m, _la) \ _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_GRIDS(_m, leaf, view, cg, gdt, 1, _la); \ _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_GRIDS(_m, level, view, cg, gdt, 1, _la); \ - _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_GRIDS(_m, leaf, part, dg, fem, 1, _la); \ - _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_GRIDS(_m, level, part, dg, fem, 1, _la); \ - _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_GRIDS(_m, dd_subdomain, part, dg, fem, 1, _la) -//_DUNE_GDT_OPERATORS_ELLIPTIC_BIND_GRIDS(_m, dd_subdomain, view, cg, gdt, 1, _la); -#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_FEM_COMMON(_m) -//_DUNE_GDT_OPERATORS_ELLIPTIC_BIND_FEM(_m, common_dense) + _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_GRIDS(_m, leaf, view, dg, gdt, 1, _la); \ + _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_GRIDS(_m, level, view, dg, gdt, 1, _la); \ + _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_GRIDS(_m, dd_subdomain, view, cg, gdt, 1, _la); \ + _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_GRIDS(_m, dd_subdomain, view, dg, gdt, 1, _la) +#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_COMMON(_m) +//_DUNE_GDT_OPERATORS_ELLIPTIC_BIND(_m, common_dense) //#if HAVE_EIGEN -//#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_FEM_EIGEN(_m) \ -// _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_FEM(_m, eigen_dense); \ -// _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_FEM(_m, eigen_sparse) +//#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_EIGEN(_m) \ +// _DUNE_GDT_OPERATORS_ELLIPTIC_BIND(_m, eigen_dense); \ +// _DUNE_GDT_OPERATORS_ELLIPTIC_BIND(_m, eigen_sparse) //#else -#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_FEM_EIGEN(_m) +#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_EIGEN(_m) //#endif #if HAVE_DUNE_ISTL -#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_FEM_ISTL(_m) _DUNE_GDT_OPERATORS_ELLIPTIC_BIND_FEM(_m, istl_sparse) -#else -#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_FEM_ISTL(_m) -#endif +#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_ISTL(_m) _DUNE_GDT_OPERATORS_ELLIPTIC_BIND(_m, istl_sparse) #else -#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_FEM_COMMON(_m) -#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_FEM_EIGEN(_m) -#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_FEM_ISTL(_m) +#define DUNE_GDT_OPERATORS_ELLIPTIC_BIND_ISTL(_m) #endif // end: this is what we need for the .so diff --git a/dune/gdt/operators/elliptic.bindings/fem_common.cc b/dune/gdt/operators/elliptic.bindings/fem_common.cc deleted file mode 100644 index 8d71b2105d246aecd75cad45aaf5811dd69765af..0000000000000000000000000000000000000000 --- a/dune/gdt/operators/elliptic.bindings/fem_common.cc +++ /dev/null @@ -1,36 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include "config.h" - -#if HAVE_DUNE_PYBINDXI - -#include <dune/pybindxi/pybind11.h> - -#include <dune/gdt/operators/elliptic.bindings.hh> - - -PYBIND11_PLUGIN(__operators_elliptic_fem_common) -{ - namespace py = pybind11; - - py::module m("__operators_elliptic_fem_common", - "dune-gdt: EllipticMatrixOperator (fem space backend, common la backend)"); - - py::module::import("dune.xt.common"); - py::module::import("dune.xt.grid"); - py::module::import("dune.xt.functions"); - py::module::import("dune.xt.la"); - - DUNE_GDT_OPERATORS_ELLIPTIC_BIND_FEM_COMMON(m); - - return m.ptr(); -} - -#endif // HAVE_DUNE_PYBINDXI diff --git a/dune/gdt/operators/elliptic.bindings/fem_eigen.cc b/dune/gdt/operators/elliptic.bindings/fem_eigen.cc deleted file mode 100644 index 5233c3a743328f0dc4d490722ce37ab69afee5a1..0000000000000000000000000000000000000000 --- a/dune/gdt/operators/elliptic.bindings/fem_eigen.cc +++ /dev/null @@ -1,36 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include "config.h" - -#if HAVE_DUNE_PYBINDXI - -#include <dune/pybindxi/pybind11.h> - -#include <dune/gdt/operators/elliptic.bindings.hh> - - -PYBIND11_PLUGIN(__operators_elliptic_fem_eigen) -{ - namespace py = pybind11; - - py::module m("__operators_elliptic_fem_eigen", - "dune-gdt: EllipticMatrixOperator (fem space backend, eigen la backend)"); - - py::module::import("dune.xt.common"); - py::module::import("dune.xt.grid"); - py::module::import("dune.xt.functions"); - py::module::import("dune.xt.la"); - - DUNE_GDT_OPERATORS_ELLIPTIC_BIND_FEM_EIGEN(m); - - return m.ptr(); -} - -#endif // HAVE_DUNE_PYBINDXI diff --git a/dune/gdt/operators/elliptic.bindings/fem_istl.cc b/dune/gdt/operators/elliptic.bindings/istl.cc similarity index 91% rename from dune/gdt/operators/elliptic.bindings/fem_istl.cc rename to dune/gdt/operators/elliptic.bindings/istl.cc index a9f5a466e07576acdc0367e041496f68864ffa06..554074f0d0c92e12494a9456b3c27ed54e38c0c3 100644 --- a/dune/gdt/operators/elliptic.bindings/fem_istl.cc +++ b/dune/gdt/operators/elliptic.bindings/istl.cc @@ -14,7 +14,7 @@ #include <dune/gdt/operators/elliptic.bindings.hh> -DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_FEM_ISTL(template); +DUNE_GDT_OPERATORS_ELLIPTIC_BIND_LIB_ISTL(template); #endif // HAVE_DUNE_PYBINDXI diff --git a/dune/gdt/operators/fluxreconstruction.bindings.cc b/dune/gdt/operators/fluxreconstruction.bindings.cc index da2e2aeda8856b0f1d5e44dca7fc1c2c952d9ed2..2092e65fdcf22f96264ec4381d53209686a6ff71 100644 --- a/dune/gdt/operators/fluxreconstruction.bindings.cc +++ b/dune/gdt/operators/fluxreconstruction.bindings.cc @@ -44,7 +44,7 @@ PYBIND11_PLUGIN(__operators_fluxreconstruction) py::module::import("dune.gdt.__spaces"); py::module::import("dune.gdt.__discretefunction"); -#if HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM && HAVE_DUNE_ISTL +#if HAVE_DUNE_ALUGRID && HAVE_DUNE_ISTL Dune::GDT::bindings::DiffusiveFluxReconstructionOperator<ALU_2D_SIMPLEX_CONFORMING, Dune::GDT::SpaceType::rt, Dune::GDT::Backends::gdt, @@ -53,7 +53,7 @@ PYBIND11_PLUGIN(__operators_fluxreconstruction) double, 2, Dune::XT::LA::Backends::istl_dense>::bind(m); -#endif // HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM && HAVE_DUNE_ISTL +#endif // HAVE_DUNE_ALUGRID && HAVE_DUNE_ISTL m.def("_init_mpi", [](const std::vector<std::string>& args) { diff --git a/dune/gdt/operators/l2.bindings.cc b/dune/gdt/operators/l2.bindings.cc index a6718cc9f494127a23c113f4ac5570a00e8ec305..d7168d4b801d9d7db49cb58dce9499d026895631 100644 --- a/dune/gdt/operators/l2.bindings.cc +++ b/dune/gdt/operators/l2.bindings.cc @@ -66,25 +66,24 @@ PYBIND11_PLUGIN(__operators_l2) #if HAVE_DUNE_ALUGRID bind_l2_localizable_product<ALU_2D_SIMPLEX_CONFORMING, Layers::dd_subdomain, XT::Grid::Backends::part>(m); -#if HAVE_DUNE_FEM Dune::GDT::bindings::L2MatrixOperator<ALU_2D_SIMPLEX_CONFORMING, Layers::dd_subdomain, SpaceType::dg, - GDT::Backends::fem, + GDT::Backends::gdt, 1, 1, LA::Backends::istl_sparse>::bind(m); Dune::GDT::bindings::L2MatrixOperator<ALU_2D_SIMPLEX_CONFORMING, Layers::leaf, SpaceType::dg, - GDT::Backends::fem, + GDT::Backends::gdt, 1, 1, LA::Backends::istl_sparse>::bind(m); Dune::GDT::bindings::L2MatrixOperator<ALU_2D_SIMPLEX_CONFORMING, Layers::level, SpaceType::dg, - GDT::Backends::fem, + GDT::Backends::gdt, 1, 1, LA::Backends::istl_sparse>::bind(m); @@ -104,7 +103,6 @@ PYBIND11_PLUGIN(__operators_l2) XT::LA::IstlRowMajorSparseMatrix<double>>::bind(m, "RtAlu2dSimplexLeafRestrictedSubdomainPartSpace", "istl_row_major_sparse_matrix_double"); -#endif // HAVE_DUNE_FEM #endif // HAVE_DUNE_ALUGRID m.def("_init_mpi", diff --git a/dune/gdt/operators/oswaldinterpolation.bindings.cc b/dune/gdt/operators/oswaldinterpolation.bindings.cc index c53d351e06598eb9bf38a54366fab917e1c2fa29..3f382723b4eae7c43f311027c0cca06120c11788 100644 --- a/dune/gdt/operators/oswaldinterpolation.bindings.cc +++ b/dune/gdt/operators/oswaldinterpolation.bindings.cc @@ -44,17 +44,17 @@ PYBIND11_PLUGIN(__operators_oswaldinterpolation) py::module::import("dune.gdt.__spaces"); py::module::import("dune.gdt.__discretefunction"); -#if HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM && HAVE_DUNE_ISTL +#if HAVE_DUNE_ALUGRID && HAVE_DUNE_ISTL Dune::GDT::bindings::OswaldInterpolationOperator<ALU_2D_SIMPLEX_CONFORMING, Dune::GDT::SpaceType::block_dg, - Dune::GDT::Backends::fem, + Dune::GDT::Backends::gdt, Dune::XT::Grid::Layers::dd_subdomain, 1, double, 1, Dune::XT::LA::Backends::istl_dense, Dune::XT::Grid::Layers::dd_subdomain_oversampled>::bind(m); -#endif // HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM && HAVE_DUNE_ISTL +#endif // HAVE_DUNE_ALUGRID && HAVE_DUNE_ISTL m.def("_init_mpi", [](const std::vector<std::string>& args) { diff --git a/dune/gdt/operators/weighted-l2.bindings.cc b/dune/gdt/operators/weighted-l2.bindings.cc index d6c46d8387bfc33e04eed1c02b326cc6238f68aa..30840e49382acf61afff50a8a4b27241e446656c 100644 --- a/dune/gdt/operators/weighted-l2.bindings.cc +++ b/dune/gdt/operators/weighted-l2.bindings.cc @@ -50,12 +50,8 @@ PYBIND11_PLUGIN(__operators_weighted_l2) #if HAVE_DUNE_ALUGRID Dune::GDT::bindings::WeightedL2LocalizableProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::leaf, Backends::view>::bind(m); Dune::GDT::bindings::WeightedL2LocalizableProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::level, Backends::view>::bind(m); -#if HAVE_DUNE_FEM - Dune::GDT::bindings::WeightedL2LocalizableProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::leaf, Backends::part>::bind(m); - Dune::GDT::bindings::WeightedL2LocalizableProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::level, Backends::part>::bind(m); - Dune::GDT::bindings::WeightedL2LocalizableProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::dd_subdomain, Backends::part>:: + Dune::GDT::bindings::WeightedL2LocalizableProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::dd_subdomain, Backends::view>:: bind(m); -#endif // HAVE_DUNE_FEM #endif // HAVE_DUNE_ALUGRID m.def("_init_mpi", diff --git a/dune/gdt/operators/weighted-l2.bindings.hh b/dune/gdt/operators/weighted-l2.bindings.hh index 187cbac78445aad00247239399d348a93d766e24..c0afc8794372f463bb4e9d3f79866e6c099fa163 100644 --- a/dune/gdt/operators/weighted-l2.bindings.hh +++ b/dune/gdt/operators/weighted-l2.bindings.hh @@ -31,14 +31,7 @@ template <class G, XT::Grid::Layers layer_type, XT::Grid::Backends layer_backend class WeightedL2LocalizableProduct { static_assert(XT::Grid::is_grid<G>::value, ""); - typedef typename XT::Grid::Layer<G, - layer_type, - layer_backend -#if HAVE_DUNE_FEM - , - XT::Grid::DD::SubdomainGrid<G> -#endif - >::type GL; + typedef typename XT::Grid::Layer<G, layer_type, layer_backend, XT::Grid::DD::SubdomainGrid<G>>::type GL; typedef XT::Grid::extract_entity_t<GL> E; typedef typename G::ctype D; @@ -56,7 +49,6 @@ class WeightedL2LocalizableProduct namespace py = pybind11; using namespace pybind11::literals; -#if HAVE_DUNE_FEM m.def(std::string("apply_weighted_l2_product_" + XT::Grid::bindings::layer_name<layer_type>::value() + "_" + XT::Grid::bindings::backend_name<layer_backend>::value()) .c_str(), @@ -80,7 +72,6 @@ class WeightedL2LocalizableProduct "grid"_a, "level_or_subdomain"_a = -1, "over_integrate"_a = 0); -#endif // HAVE_DUNE_FEM } // ... bind(...) }; // struct helper<true, ...> @@ -111,7 +102,6 @@ class WeightedL2LocalizableProduct "grid"_a, "level"_a = -1, "over_integrate"_a = 0); -#if HAVE_DUNE_FEM m.def(std::string("apply_weighted_l2_product_" + XT::Grid::bindings::layer_name<layer_type>::value() + "_" + XT::Grid::bindings::backend_name<layer_backend>::value()) .c_str(), @@ -131,7 +121,6 @@ class WeightedL2LocalizableProduct "grid"_a, "layer"_a = -1, "over_integrate"_a = 0); -#endif // HAVE_DUNE_FEM } // ... bind(...) }; // struct helper<false, ...> diff --git a/dune/gdt/playground/operators/ESV2007.bindings.cc b/dune/gdt/playground/operators/ESV2007.bindings.cc index 0f13a7e0318c31b7dfd0c6fd0d9d93136775a301..08ff3202b50b34c584a6bde91b3ff2abd869bfb5 100644 --- a/dune/gdt/playground/operators/ESV2007.bindings.cc +++ b/dune/gdt/playground/operators/ESV2007.bindings.cc @@ -45,7 +45,7 @@ struct NonconformityProduct static_assert(XT::Grid::is_grid<G>::value, ""); typedef typename XT::Grid::Layer<G, layer_type, layer_backend, XT::Grid::DD::SubdomainGrid<G>>::type GL; typedef - typename XT::Grid::Layer<G, interpolation_layer_type, Backends::part, XT::Grid::DD::SubdomainGrid<G>>::type IGL; + typename XT::Grid::Layer<G, interpolation_layer_type, Backends::view, XT::Grid::DD::SubdomainGrid<G>>::type IGL; typedef GDT::ESV2007::NonconformityProduct<GL, IGL> type; typedef py::class_<type, XT::Grid::Walker<GL>> bound_type; @@ -107,7 +107,7 @@ struct NonconformityProduct const ssize_t over_integrate) { return new type(dd_grid_provider.template layer<layer_type, layer_backend>( XT::Common::numeric_cast<int>(layer_level_or_subdomain)), - dd_grid_provider.template layer<interpolation_layer_type, Backends::part>( + dd_grid_provider.template layer<interpolation_layer_type, Backends::view>( XT::Common::numeric_cast<int>(interpolation_layer_level_or_subdomain)), interpolation_boundary_info, lambda, @@ -147,7 +147,7 @@ struct NonconformityProduct const ssize_t over_integrate) { return new type( grid_provider.template layer<layer_type, layer_backend>(XT::Common::numeric_cast<int>(layer_level)), - grid_provider.template layer<interpolation_layer_type, Backends::part>( + grid_provider.template layer<interpolation_layer_type, Backends::view>( XT::Common::numeric_cast<int>(interpolation_layer_level)), interpolation_boundary_info, lambda, @@ -505,24 +505,21 @@ PYBIND11_PLUGIN(__operators_ESV2007) py::module::import("dune.xt.functions"); py::module::import("dune.xt.la"); -#if HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM +#if HAVE_DUNE_ALUGRID NonconformityProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::leaf, Backends::view>::bind(m); - NonconformityProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::leaf, Backends::part>::bind(m); - NonconformityProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::dd_subdomain, Backends::part>::bind(m); + NonconformityProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::dd_subdomain, Backends::view>::bind(m); NonconformityProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::dd_subdomain, - Backends::part, + Backends::view, Layers::dd_subdomain_oversampled>::bind(m); ResidualProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::leaf, Backends::view>::bind(m); - ResidualProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::leaf, Backends::part>::bind(m); // This is not efficient: we reconstruct on the whole leaf instead of only the neighborhood, but the rt space - // on a dd_subdomain_oversampled grid view (which is a wrapped part) is broken, if based on + // on a dd_subdomain_oversampled grid view is broken, if based on // a 2d simplex alugrid. - ResidualProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::dd_subdomain, Backends::part, Layers::leaf>::bind(m); + ResidualProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::dd_subdomain, Backends::view, Layers::leaf>::bind(m); DiffusiveFluxProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::leaf, Backends::view>::bind(m); - DiffusiveFluxProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::leaf, Backends::part>::bind(m); // s.a. - DiffusiveFluxProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::dd_subdomain, Backends::part, Layers::leaf>::bind(m); + DiffusiveFluxProduct<ALU_2D_SIMPLEX_CONFORMING, Layers::dd_subdomain, Backends::view, Layers::leaf>::bind(m); #endif m.def("_init_mpi", diff --git a/dune/gdt/playground/operators/ESV2007.hh b/dune/gdt/playground/operators/ESV2007.hh index 75eafc2e6efe48c4a2386aaae1f2f6fa92e7d2b3..a2683636292915d4bdd859210588d67f82e826ef 100644 --- a/dune/gdt/playground/operators/ESV2007.hh +++ b/dune/gdt/playground/operators/ESV2007.hh @@ -33,8 +33,6 @@ namespace Dune { namespace GDT { namespace ESV2007 { -#if HAVE_DUNE_FEM - template <class ProductGridLayer, class InterpolationGridLayerType> class NonconformityProduct @@ -64,7 +62,7 @@ private: typedef LocalVolumeIntegralOperator<LocalLambdaBinaryVolumeIntegrand<E>, typename ScalarFunctionType::LocalfunctionType> LocalProductType; - typedef DuneFemDgSpaceWrapper<InterpolationGridLayerType, 1, R, 1> DgSpaceType; + typedef DiscontinuousLagrangeSpace<InterpolationGridLayerType, 1, R> DgSpaceType; typedef DiscreteFunction<DgSpaceType> DiscreteFunctionType; public: @@ -132,18 +130,6 @@ private: }; // class NonconformityProduct -#else // HAVE_DUNE_FEM - - -template <class ProductGridLayer, class InterpolationGridLayerType> -class NonconformityProduct -{ - static_assert(AlwaysFalse<ProductGridLayer>::value, "You are missing dune-fem!"); -}; - - -#endif // HAVE_DUNE_FEM - namespace internal { diff --git a/dune/gdt/playground/operators/OS2015.bindings.cc b/dune/gdt/playground/operators/OS2015.bindings.cc index d4c44dfbf198bbdd25b67ffafa60efcbc61e7961..3be24d21fad3cc8c9d6e597a97a443e67178bd0f 100644 --- a/dune/gdt/playground/operators/OS2015.bindings.cc +++ b/dune/gdt/playground/operators/OS2015.bindings.cc @@ -366,7 +366,7 @@ PYBIND11_PLUGIN(__operators_OS2015) py::module::import("dune.xt.functions"); py::module::import("dune.xt.la"); -#if HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM +#if HAVE_DUNE_ALUGRID // This is not efficient: we reconstruct on the whole leaf instead of only the neighborhood, but the rt space // on a dd_subdomain_oversampled grid view (which is a wrapped part) is broken, if based on // a 2d simplex alugrid. diff --git a/dune/gdt/playground/operators/RS2017.bindings.cc b/dune/gdt/playground/operators/RS2017.bindings.cc index b96f199a87ba4c5c4925027b053dd479cf8c8d4e..f17c70365fc35ac073621ebfd98a69195631aa6d 100644 --- a/dune/gdt/playground/operators/RS2017.bindings.cc +++ b/dune/gdt/playground/operators/RS2017.bindings.cc @@ -160,7 +160,7 @@ PYBIND11_PLUGIN(__operators_RS2017) typename GDT::SpaceProvider<ALU_2D_SIMPLEX_CONFORMING, Layers::dd_subdomain, GDT::SpaceType::dg, - GDT::Backends::fem, + GDT::Backends::gdt, 1, double, 1>::type, diff --git a/dune/gdt/playground/operators/RS2017.hh b/dune/gdt/playground/operators/RS2017.hh index 69a1c1cde0e9aef6db613cbada48c50e09daf821..78b535b62145d4d1c8fe97c975afffc7eceb75eb 100644 --- a/dune/gdt/playground/operators/RS2017.hh +++ b/dune/gdt/playground/operators/RS2017.hh @@ -43,7 +43,7 @@ namespace Dune { namespace GDT { namespace RS2017 { -#if HAVE_DUNE_FEM && HAVE_DUNE_ISTL +#if HAVE_DUNE_ISTL template <class G> @@ -52,7 +52,7 @@ class DiffusiveFluxAaProduct typename GDT::SpaceProvider<G, XT::Grid::Layers::dd_subdomain, GDT::SpaceType::dg, - GDT::Backends::fem, + GDT::Backends::gdt, 1, double, 1>::type, @@ -63,7 +63,7 @@ class DiffusiveFluxAaProduct { static_assert(XT::Grid::is_grid<G>::value, ""); typedef typename GDT:: - SpaceProvider<G, XT::Grid::Layers::dd_subdomain, GDT::SpaceType::dg, GDT::Backends::fem, 1, double, 1> + SpaceProvider<G, XT::Grid::Layers::dd_subdomain, GDT::SpaceType::dg, GDT::Backends::gdt, 1, double, 1> SP; typedef GDT::MatrixOperatorBase<XT::LA::IstlRowMajorSparseMatrix<double>, typename SP::type, @@ -210,7 +210,7 @@ class DiffusiveFluxAbProduct typename GDT::SpaceProvider<G, XT::Grid::Layers::dd_subdomain, GDT::SpaceType::dg, - GDT::Backends::fem, + GDT::Backends::gdt, 1, double, 1>::type, @@ -235,7 +235,7 @@ class DiffusiveFluxAbProduct typename GDT::SpaceProvider<G, XT::Grid::Layers::dd_subdomain, GDT::SpaceType::dg, - GDT::Backends::fem, + GDT::Backends::gdt, 1, double, 1>::type, @@ -546,7 +546,7 @@ class SwipdgPenaltySubdomainProduct typename GDT::SpaceProvider<G, XT::Grid::Layers::dd_subdomain, GDT::SpaceType::dg, - GDT::Backends::fem, + GDT::Backends::gdt, 1, double, 1>::type, @@ -556,7 +556,7 @@ class SwipdgPenaltySubdomainProduct XT::Grid::DD::SubdomainGrid<G>>::type> { static_assert(XT::Grid::is_grid<G>::value, ""); - typedef GDT::SpaceProvider<G, XT::Grid::Layers::dd_subdomain, GDT::SpaceType::dg, GDT::Backends::fem, 1, double, 1> + typedef GDT::SpaceProvider<G, XT::Grid::Layers::dd_subdomain, GDT::SpaceType::dg, GDT::Backends::gdt, 1, double, 1> SP; typedef GDT::MatrixOperatorBase<XT::LA::IstlRowMajorSparseMatrix<double>, typename SP::type, @@ -794,7 +794,7 @@ void bind_neighborhood_discretization(pybind11::module& m) XT::Grid::Backends::part, XT::Grid::DD::SubdomainGrid<G>>::type NGL; typedef GDT:: - SpaceProvider<G, XT::Grid::Layers::dd_subdomain, GDT::SpaceType::block_dg, GDT::Backends::fem, 1, double, 1> + SpaceProvider<G, XT::Grid::Layers::dd_subdomain, GDT::SpaceType::block_dg, GDT::Backends::gdt, 1, double, 1> SP; typedef typename SP::type S; typedef XT::LA::IstlDenseVector<R> V; @@ -1238,66 +1238,66 @@ void bind_neighborhood_reconstruction(pybind11::module& m) } // ... bind_neighborhood_reconstruction(...) -#else // HAVE_DUNE_FEM && HAVE_DUNE_ISTL +#else // HAVE_DUNE_ISTL template <class G> class DiffusiveFluxAaProduct { - static_assert(AlwaysFalse<G>::value, "You are missing dune-fem or dune-istl!"); + static_assert(AlwaysFalse<G>::value, "You are missing dune-istl!"); }; template <class G> class DiffusiveFluxAbProduct { - static_assert(AlwaysFalse<G>::value, "You are missing dune-fem or dune-istl!"); + static_assert(AlwaysFalse<G>::value, "You are missing dune-istl!"); }; template <class G> class DiffusiveFluxBbProduct { - static_assert(AlwaysFalse<G>::value, "You are missing dune-fem or dune-istl!"); + static_assert(AlwaysFalse<G>::value, "You are missing dune-istl!"); }; template <class G> class SwipdgPenaltySubdomainProduct { - static_assert(AlwaysFalse<G>::value, "You are missing dune-fem or dune-istl!"); + static_assert(AlwaysFalse<G>::value, "You are missing dune-istl!"); }; template <class G> void bind_neighborhood_discretization(pybind11::module& /*m*/) { - static_assert(AlwaysFalse<G>::value, "You are missing dune-fem or dune-istl!"); + static_assert(AlwaysFalse<G>::value, "You are missing dune-istl!"); } template <class G> class HdivSemiProduct { - static_assert(AlwaysFalse<G>::value, "You are missing dune-fem or dune-istl!"); + static_assert(AlwaysFalse<G>::value, "You are missing dune-istl!"); }; template <class G> class ResidualPartFunctional { - static_assert(AlwaysFalse<G>::value, "You are missing dune-fem or dune-istl!"); + static_assert(AlwaysFalse<G>::value, "You are missing dune-istl!"); }; template <class G> void bind_neighborhood_reconstruction(pybind11::module& /*m*/) { - static_assert(AlwaysFalse<G>::value, "You are missing dune-fem or dune-istl!"); + static_assert(AlwaysFalse<G>::value, "You are missing dune-istl!"); } -#endif // HAVE_DUNE_FEM && HAVE_DUNE_ISTL +#endif // HAVE_DUNE_ISTL } // namespace RS2017 } // namespace GDT diff --git a/dune/gdt/playground/spaces/block.bindings.hh b/dune/gdt/playground/spaces/block.bindings.hh index f4bff367968a2106147dc2369f4c9eea1c82be64..69211dfb1aa33980fc8a30fefc410b1e63c49d77 100644 --- a/dune/gdt/playground/spaces/block.bindings.hh +++ b/dune/gdt/playground/spaces/block.bindings.hh @@ -440,13 +440,7 @@ public: _DUNE_GDT_SPACES_BLOCK_BIND_YASP(_m, _s_type, _s_backend, _p) -#if HAVE_DUNE_FEM -#define _DUNE_GDT_SPACES_BLOCK_BIND_FEM(_m) _DUNE_GDT_SPACES_BLOCK_BIND_ALL_GRIDS(_m, dg, fem, 1) -#else -#define _DUNE_GDT_SPACES_BLOCK_BIND_FEM(_m) -#endif - -#define DUNE_GDT_SPACES_BLOCK_BIND(_m) _DUNE_GDT_SPACES_BLOCK_BIND_FEM(_m) +#define DUNE_GDT_SPACES_BLOCK_BIND(_m) _DUNE_GDT_SPACES_BLOCK_BIND_ALL_GRIDS(_m, dg, gdt, 1) // end: this is what we need for the .so diff --git a/dune/gdt/projections.bindings.hh b/dune/gdt/projections.bindings.hh index 436e0ed2cb8bed486a59e0ff0c785000ebce7c21..284182a6e5b16182c27abab757d81932299674e8 100644 --- a/dune/gdt/projections.bindings.hh +++ b/dune/gdt/projections.bindings.hh @@ -109,11 +109,7 @@ public: _DUNE_GDT_PROJECTIONS_BIND_ALL_GRIDS(_m, dd_subdomain, gdt, cg, 1, _la); \ _DUNE_GDT_PROJECTIONS_BIND_ALL_GRIDS(_m, level, gdt, fv, 0, _la) -#if HAVE_DUNE_FEM -#define _DUNE_GDT_PROJECTIONS_BIND_FEM(_m, _la) _DUNE_GDT_PROJECTIONS_BIND_ALL_GRIDS(_m, dd_subdomain, fem, dg, 1, _la) -#else -#define _DUNE_GDT_PROJECTIONS_BIND_FEM(_m, _la) -#endif +#define _DUNE_GDT_PROJECTIONS_BIND(_m, _la) _DUNE_GDT_PROJECTIONS_BIND_ALL_GRIDS(_m, dd_subdomain, gdt, dg, 1, _la) //#if HAVE_DUNE_FUNCTIONS // ... @@ -123,7 +119,7 @@ public: #define _DUNE_GDT_PROJECTIONS_BIND_ALL_SPACES(_m, _la) \ _DUNE_GDT_PROJECTIONS_BIND_DEFAULT(_m, _la); \ - _DUNE_GDT_PROJECTIONS_BIND_FEM(_m, _la); \ + _DUNE_GDT_PROJECTIONS_BIND(_m, _la); \ _DUNE_GDT_PROJECTIONS_BIND_FUNCTIONS(_m, _la) // for each la backend diff --git a/dune/gdt/spaces/basefunctionset/dune-fem-wrapper.hh b/dune/gdt/spaces/basefunctionset/dune-fem-wrapper.hh deleted file mode 100644 index 84fe2c96f3f2de93b6835454f564926e2fb11fa5..0000000000000000000000000000000000000000 --- a/dune/gdt/spaces/basefunctionset/dune-fem-wrapper.hh +++ /dev/null @@ -1,201 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2013 - 2017) -// Rene Milk (2014, 2016 - 2018) -// Tobias Leibner (2014, 2017) - -#ifndef DUNE_GDT_SAPCES_BASEFUNCTIONSET_DUNE_FEM_WRAPPER_HH -#define DUNE_GDT_SAPCES_BASEFUNCTIONSET_DUNE_FEM_WRAPPER_HH - -#include <dune/common/fmatrix.hh> -#include <dune/common/fvector.hh> - -#if HAVE_DUNE_FEM -#include <dune/fem/space/basisfunctionset/default.hh> -#include <dune/fem/space/common/discretefunctionspace.hh> -#endif - -#include <dune/xt/common/memory.hh> -#include <dune/xt/common/type_traits.hh> - -#include "interface.hh" - -namespace Dune { -namespace GDT { -namespace BaseFunctionSet { - -#if HAVE_DUNE_FEM - - -// forward, to be used in the traits and to allow for specialization -template <class BasisFunctionSetImp, - class EntityImp, - class DomainFieldImp, - size_t domainDim, - class RangeFieldImp, - size_t rangeDim, - size_t rangeDimCols = 1> -class DuneFemWrapper -{ - static_assert(Dune::AlwaysFalse<BasisFunctionSetImp>::value, "Untested for these dimensions!"); -}; - - -namespace internal { - - -template <class BasisFunctionSetImp, - class EntityImp, - class DomainFieldImp, - size_t domainDim, - class RangeFieldImp, - size_t rangeDim, - size_t rangeDimCols> -class DuneFemWrapperTraits -{ -public: - typedef DuneFemWrapper<BasisFunctionSetImp, - EntityImp, - DomainFieldImp, - domainDim, - RangeFieldImp, - rangeDim, - rangeDimCols> - derived_type; - typedef typename Dune::Fem::DefaultBasisFunctionSet<EntityImp, typename BasisFunctionSetImp::ShapeFunctionSetType> - BackendType; - typedef EntityImp EntityType; -}; - - -} // namespace internal - - -template <class BasisFunctionSetImp, - class EntityImp, - class DomainFieldImp, - size_t domainDim, - class RangeFieldImp, - size_t rangeDim> -class DuneFemWrapper<BasisFunctionSetImp, EntityImp, DomainFieldImp, domainDim, RangeFieldImp, rangeDim, 1> - : public BaseFunctionSetInterface<internal::DuneFemWrapperTraits<BasisFunctionSetImp, - EntityImp, - DomainFieldImp, - domainDim, - RangeFieldImp, - rangeDim, - 1>, - DomainFieldImp, - domainDim, - RangeFieldImp, - rangeDim, - 1> -{ - typedef DuneFemWrapper<BasisFunctionSetImp, EntityImp, DomainFieldImp, domainDim, RangeFieldImp, rangeDim, 1> - ThisType; - typedef BaseFunctionSetInterface<internal::DuneFemWrapperTraits<BasisFunctionSetImp, - EntityImp, - DomainFieldImp, - domainDim, - RangeFieldImp, - rangeDim, - 1>, - DomainFieldImp, - domainDim, - RangeFieldImp, - rangeDim, - 1> - BaseType; - -public: - typedef internal:: - DuneFemWrapperTraits<BasisFunctionSetImp, EntityImp, DomainFieldImp, domainDim, RangeFieldImp, rangeDim, 1> - Traits; - typedef typename Traits::BackendType BackendType; - typedef typename BaseType::EntityType EntityType; - typedef typename BaseType::DomainType DomainType; - typedef typename BaseType::RangeType RangeType; - typedef typename BaseType::JacobianRangeType JacobianRangeType; - - template <class S> - DuneFemWrapper(const Dune::Fem::DiscreteFunctionSpaceInterface<S>& femSpace, const EntityType& ent) - : BaseType(ent) - , backend_(new BackendType(ent, femSpace.basisFunctionSet(ent).shapeFunctionSet())) - { - } - - DuneFemWrapper(ThisType&& source) = default; - - DuneFemWrapper(const ThisType& /*other*/) = delete; - - ThisType& operator=(const ThisType& /*other*/) = delete; - - const BackendType& backend() const - { - return *backend_; - } - - virtual size_t size() const override final - { - return backend_->size(); - } - - virtual size_t order(const XT::Common::Parameter& /*mu*/ = {}) const override final - { - assert(backend_->order() >= 0); - return backend_->order(); - } - - void evaluate(const DomainType& xx, - std::vector<RangeType>& ret, - const XT::Common::Parameter& /*mu*/ = {}) const override final - { - assert(ret.size() >= size()); - backend_->evaluateAll(xx, ret); - } - - using BaseType::evaluate; - - void jacobian(const DomainType& xx, - std::vector<JacobianRangeType>& ret, - const XT::Common::Parameter& /*mu*/ = {}) const override final - { - assert(ret.size() >= size()); - backend_->jacobianAll(xx, ret); - } - - using BaseType::jacobian; - -private: - std::unique_ptr<const BackendType> backend_; -}; // class DuneFemWrapper - - -#else // HAVE_DUNE_FEM - - -template <class BasisFunctionSetImp, - class EntityImp, - class DomainFieldImp, - size_t domainDim, - class RangeFieldImp, - size_t rangeDim, - size_t rangeDimCols = 1> -class DuneFemWrapper -{ - static_assert(Dune::AlwaysFalse<BasisFunctionSetImp>::value, "You are missing dune-fem!"); -}; - - -#endif // HAVE_DUNE_FEM - -} // namespace BaseFunctionSet -} // namespace GDT -} // namespace Dune - -#endif // DUNE_GDT_SAPCES_BASEFUNCTIONSET_DUNE_FEM_WRAPPER_HH diff --git a/dune/gdt/spaces/cg.bindings.hh b/dune/gdt/spaces/cg.bindings.hh index 1eae6a62bcd9a0ee2984cb7db7552b5b37c2952e..8c2fa88668ae56abd5532f0f2eafb4df6be60c54 100644 --- a/dune/gdt/spaces/cg.bindings.hh +++ b/dune/gdt/spaces/cg.bindings.hh @@ -19,9 +19,7 @@ // begin: this is what we need for the .so -// * fem -#if HAVE_DUNE_FEM -#define _DUNE_GDT_SPACES_CG_BIND_GDT(_m, _GRID, _layer, _r, _rC) \ +#define _DUNE_GDT_SPACES_CG_BIND(_m, _GRID, _layer, _r, _rC) \ Dune::GDT::bindings::SpaceInterface<Dune::GDT::CgSpaceProvider<_GRID, \ Dune::XT::Grid::Layers::_layer, \ Dune::GDT::Backends::gdt, \ @@ -31,56 +29,51 @@ _rC>>::bind(_m) //#if HAVE_ALBERTA -//#define _DUNE_GDT_SPACES_CG_BIND_GDT_ALBERTA_LAYER(_m, _layer) \ -// _DUNE_GDT_SPACES_CG_BIND_GDT(_m, ALBERTA_2D, _layer, 1, 1) -//#define _DUNE_GDT_SPACES_CG_BIND_GDT_ALBERTA(_m) \ -// _DUNE_GDT_SPACES_CG_BIND_GDT_ALBERTA_LAYER(_m, dd_subdomain); \ -// _DUNE_GDT_SPACES_CG_BIND_GDT_ALBERTA_LAYER(_m, leaf); \ -// _DUNE_GDT_SPACES_CG_BIND_GDT_ALBERTA_LAYER(_m, level) +//#define _DUNE_GDT_SPACES_CG_BIND_ALBERTA_LAYER(_m, _layer) \ +// _DUNE_GDT_SPACES_CG_BIND(_m, ALBERTA_2D, _layer, 1, 1) +//#define _DUNE_GDT_SPACES_CG_BIND_ALBERTA(_m) \ +// _DUNE_GDT_SPACES_CG_BIND_ALBERTA_LAYER(_m, dd_subdomain); \ +// _DUNE_GDT_SPACES_CG_BIND_ALBERTA_LAYER(_m, leaf); \ +// _DUNE_GDT_SPACES_CG_BIND_ALBERTA_LAYER(_m, level) //#else -#define _DUNE_GDT_SPACES_CG_BIND_GDT_ALBERTA(_m) +#define _DUNE_GDT_SPACES_CG_BIND_ALBERTA(_m) //#endif #if HAVE_DUNE_ALUGRID -#define _DUNE_GDT_SPACES_CG_BIND_GDT_ALU_LAYER(_m, _layer) \ - _DUNE_GDT_SPACES_CG_BIND_GDT(_m, ALU_2D_SIMPLEX_CONFORMING, _layer, 1, 1) -#define _DUNE_GDT_SPACES_CG_BIND_GDT_ALU(_m) \ - _DUNE_GDT_SPACES_CG_BIND_GDT_ALU_LAYER(_m, dd_subdomain); \ - _DUNE_GDT_SPACES_CG_BIND_GDT_ALU_LAYER(_m, leaf); \ - _DUNE_GDT_SPACES_CG_BIND_GDT_ALU_LAYER(_m, level) +#define _DUNE_GDT_SPACES_CG_BIND_ALU_LAYER(_m, _layer) \ + _DUNE_GDT_SPACES_CG_BIND(_m, ALU_2D_SIMPLEX_CONFORMING, _layer, 1, 1) +#define _DUNE_GDT_SPACES_CG_BIND_ALU(_m) \ + _DUNE_GDT_SPACES_CG_BIND_ALU_LAYER(_m, dd_subdomain); \ + _DUNE_GDT_SPACES_CG_BIND_ALU_LAYER(_m, leaf); \ + _DUNE_GDT_SPACES_CG_BIND_ALU_LAYER(_m, level) #else -#define _DUNE_GDT_SPACES_CG_BIND_GDT_ALU(_m) +#define _DUNE_GDT_SPACES_CG_BIND_ALU(_m) #endif //#if HAVE_DUNE_UGGRID || HAVE_UG -//#define _DUNE_GDT_SPACES_CG_BIND_GDT_UG_LAYER(_m, _layer) _DUNE_GDT_SPACES_CG_BIND_GDT(_m, UG_2D, _layer, 1, 1) -//#define _DUNE_GDT_SPACES_CG_BIND_GDT_UG(_m) \ -// _DUNE_GDT_SPACES_CG_BIND_GDT_UG_LAYER(_m, dd_subdomain); \ -// _DUNE_GDT_SPACES_CG_BIND_GDT_UG_LAYER(_m, leaf); \ -// _DUNE_GDT_SPACES_CG_BIND_GDT_UG_LAYER(_m, level) +//#define _DUNE_GDT_SPACES_CG_BIND_UG_LAYER(_m, _layer) _DUNE_GDT_SPACES_CG_BIND(_m, UG_2D, _layer, 1, 1) +//#define _DUNE_GDT_SPACES_CG_BIND_UG(_m) \ +// _DUNE_GDT_SPACES_CG_BIND_UG_LAYER(_m, dd_subdomain); \ +// _DUNE_GDT_SPACES_CG_BIND_UG_LAYER(_m, leaf); \ +// _DUNE_GDT_SPACES_CG_BIND_UG_LAYER(_m, level) //#else -#define _DUNE_GDT_SPACES_CG_BIND_GDT_UG(_m) +#define _DUNE_GDT_SPACES_CG_BIND_UG(_m) //#endif -#define _DUNE_GDT_SPACES_CG_BIND_GDT_YASP_LAYER(_m, _layer) \ - _DUNE_GDT_SPACES_CG_BIND_GDT(_m, YASP_1D_EQUIDISTANT_OFFSET, _layer, 1, 1); \ - _DUNE_GDT_SPACES_CG_BIND_GDT(_m, YASP_2D_EQUIDISTANT_OFFSET, _layer, 1, 1) -#define _DUNE_GDT_SPACES_CG_BIND_GDT_YASP(_m) \ - _DUNE_GDT_SPACES_CG_BIND_GDT_YASP_LAYER(_m, dd_subdomain); \ - _DUNE_GDT_SPACES_CG_BIND_GDT_YASP_LAYER(_m, leaf); \ - _DUNE_GDT_SPACES_CG_BIND_GDT_YASP_LAYER(_m, level) - -#define _DUNE_GDT_SPACES_CG_BIND_GDT_ALL(_m) \ - _DUNE_GDT_SPACES_CG_BIND_GDT_ALBERTA(_m); \ - _DUNE_GDT_SPACES_CG_BIND_GDT_ALU(_m); \ - _DUNE_GDT_SPACES_CG_BIND_GDT_UG(_m); \ - _DUNE_GDT_SPACES_CG_BIND_GDT_YASP(_m) -#else // HAVE_DUNE_FEM -#define _DUNE_GDT_SPACES_CG_BIND_GDT_ALL(_m) -#endif +#define _DUNE_GDT_SPACES_CG_BIND_YASP_LAYER(_m, _layer) \ + _DUNE_GDT_SPACES_CG_BIND(_m, YASP_1D_EQUIDISTANT_OFFSET, _layer, 1, 1); \ + _DUNE_GDT_SPACES_CG_BIND(_m, YASP_2D_EQUIDISTANT_OFFSET, _layer, 1, 1) +#define _DUNE_GDT_SPACES_CG_BIND_YASP(_m) \ + _DUNE_GDT_SPACES_CG_BIND_YASP_LAYER(_m, dd_subdomain); \ + _DUNE_GDT_SPACES_CG_BIND_YASP_LAYER(_m, leaf); \ + _DUNE_GDT_SPACES_CG_BIND_YASP_LAYER(_m, level) +#define DUNE_GDT_SPACES_CG_BIND(_m) \ + _DUNE_GDT_SPACES_CG_BIND_ALBERTA(_m); \ + _DUNE_GDT_SPACES_CG_BIND_ALU(_m); \ + _DUNE_GDT_SPACES_CG_BIND_UG(_m); \ + _DUNE_GDT_SPACES_CG_BIND_YASP(_m) -#define DUNE_GDT_SPACES_CG_BIND(_m) _DUNE_GDT_SPACES_CG_BIND_GDT_ALL(_m); // end: this is what we need for the .so diff --git a/dune/gdt/spaces/cg.lib.hh b/dune/gdt/spaces/cg.lib.hh index ec91df8ce76d744291911b37d4d23c7e4e8c5ccb..cd2548ed08c16feb10f60820add27ae7bede105a 100644 --- a/dune/gdt/spaces/cg.lib.hh +++ b/dune/gdt/spaces/cg.lib.hh @@ -22,26 +22,22 @@ _prefix class Dune::GDT:: \ CgSpaceProvider<_GRID, Dune::XT::Grid::Layers::_layer_type, Dune::GDT::Backends::_backend, _p, _R, _r, _rC> -#if HAVE_DUNE_FEM +#define _DUNE_GDT_SPACES_CG_LIB(_prefix, _GRID, _p, _R, _r, _rC) \ + _DUNE_GDT_SPACES_CG_LIB(_prefix, _GRID, adaptive_leaf, gdt, _p, _R, _r, _rC); \ + _DUNE_GDT_SPACES_CG_LIB(_prefix, _GRID, leaf, gdt, _p, _R, _r, _rC); \ + _DUNE_GDT_SPACES_CG_LIB(_prefix, _GRID, level, gdt, _p, _R, _r, _rC); \ + _DUNE_GDT_SPACES_CG_LIB(_prefix, _GRID, dd_subdomain, gdt, _p, _R, _r, _rC); \ + _DUNE_GDT_SPACES_CG_LIB(_prefix, _GRID, dd_subdomain_boundary, gdt, _p, _R, _r, _rC); \ + _DUNE_GDT_SPACES_CG_LIB(_prefix, _GRID, dd_subdomain_coupling, gdt, _p, _R, _r, _rC) -#define _DUNE_GDT_SPACES_CG_FEM_LIB(_prefix, _GRID, _p, _R, _r, _rC) \ - _DUNE_GDT_SPACES_CG_LIB(_prefix, _GRID, adaptive_leaf, fem, _p, _R, _r, _rC); \ - _DUNE_GDT_SPACES_CG_LIB(_prefix, _GRID, leaf, fem, _p, _R, _r, _rC); \ - _DUNE_GDT_SPACES_CG_LIB(_prefix, _GRID, level, fem, _p, _R, _r, _rC); \ - _DUNE_GDT_SPACES_CG_LIB(_prefix, _GRID, dd_subdomain, fem, _p, _R, _r, _rC); \ - _DUNE_GDT_SPACES_CG_LIB(_prefix, _GRID, dd_subdomain_boundary, fem, _p, _R, _r, _rC); \ - _DUNE_GDT_SPACES_CG_LIB(_prefix, _GRID, dd_subdomain_coupling, fem, _p, _R, _r, _rC) - -#define DUNE_GDT_SPACES_CG_FEM_LIB(_prefix, _GRID) _DUNE_GDT_SPACES_CG_FEM_LIB(_prefix, _GRID, 1, double, 1, 1) +#define DUNE_GDT_SPACES_CG_LIB(_prefix, _GRID) _DUNE_GDT_SPACES_CG_LIB(_prefix, _GRID, 1, double, 1, 1) #if HAVE_DUNE_ALUGRID -DUNE_GDT_SPACES_CG_FEM_LIB(extern template, ALU_2D_SIMPLEX_CONFORMING); +DUNE_GDT_SPACES_CG_LIB(extern template, ALU_2D_SIMPLEX_CONFORMING); #endif -DUNE_GDT_SPACES_CG_FEM_LIB(extern template, YASP_1D_EQUIDISTANT_OFFSET); -DUNE_GDT_SPACES_CG_FEM_LIB(extern template, YASP_2D_EQUIDISTANT_OFFSET); -DUNE_GDT_SPACES_CG_FEM_LIB(extern template, YASP_3D_EQUIDISTANT_OFFSET); - -#endif // HAVE_DUNE_FEM +DUNE_GDT_SPACES_CG_LIB(extern template, YASP_1D_EQUIDISTANT_OFFSET); +DUNE_GDT_SPACES_CG_LIB(extern template, YASP_2D_EQUIDISTANT_OFFSET); +DUNE_GDT_SPACES_CG_LIB(extern template, YASP_3D_EQUIDISTANT_OFFSET); #endif // DUNE_XT_WITH_PYTHON_BINDINGS diff --git a/dune/gdt/spaces/cg.lib/fem_yasp_1d_equidistant_offset.cc b/dune/gdt/spaces/cg.lib/alu_2d_simplex_conforming.cc similarity index 82% rename from dune/gdt/spaces/cg.lib/fem_yasp_1d_equidistant_offset.cc rename to dune/gdt/spaces/cg.lib/alu_2d_simplex_conforming.cc index 38ad228c29eb1e736f90c633169d6776d029acda..77ba6f9d7f45ca391f2432b022b5881bd3d559d0 100644 --- a/dune/gdt/spaces/cg.lib/fem_yasp_1d_equidistant_offset.cc +++ b/dune/gdt/spaces/cg.lib/alu_2d_simplex_conforming.cc @@ -9,12 +9,12 @@ #include <config.h> -#if HAVE_DUNE_FEM +#if HAVE_DUNE_ALUGRID #include "../cg.lib.hh" -DUNE_GDT_SPACES_CG_FEM_LIB(template, YASP_1D_EQUIDISTANT_OFFSET); +DUNE_GDT_SPACES_CG_LIB(template, ALU_2D_SIMPLEX_CONFORMING); -#endif // HAVE_DUNE_FEM +#endif // HAVE_DUNE_ALUGRID diff --git a/dune/gdt/spaces/cg.lib/fem_alu_2d_simplex_conforming.cc b/dune/gdt/spaces/cg.lib/fem_alu_2d_simplex_conforming.cc deleted file mode 100644 index fa0bea4014b6aedb042c8493ce44290a5e64c972..0000000000000000000000000000000000000000 --- a/dune/gdt/spaces/cg.lib/fem_alu_2d_simplex_conforming.cc +++ /dev/null @@ -1,20 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include <config.h> - -#if HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM - -#include "../cg.lib.hh" - - -DUNE_GDT_SPACES_CG_FEM_LIB(template, ALU_2D_SIMPLEX_CONFORMING); - - -#endif // HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM diff --git a/dune/gdt/spaces/cg.lib/fem_yasp_2d_equidistant_offset.cc b/dune/gdt/spaces/cg.lib/yasp_1d_equidistant_offset.cc similarity index 82% rename from dune/gdt/spaces/cg.lib/fem_yasp_2d_equidistant_offset.cc rename to dune/gdt/spaces/cg.lib/yasp_1d_equidistant_offset.cc index 1439bcf2cf0000ded47fc5f78726ab665684dce9..a85841612f99f6b061ca9ac8573191d982f54b17 100644 --- a/dune/gdt/spaces/cg.lib/fem_yasp_2d_equidistant_offset.cc +++ b/dune/gdt/spaces/cg.lib/yasp_1d_equidistant_offset.cc @@ -9,12 +9,7 @@ #include <config.h> -#if HAVE_DUNE_FEM - #include "../cg.lib.hh" -DUNE_GDT_SPACES_CG_FEM_LIB(template, YASP_2D_EQUIDISTANT_OFFSET); - - -#endif // HAVE_DUNE_FEM +DUNE_GDT_SPACES_CG_LIB(template, YASP_1D_EQUIDISTANT_OFFSET); diff --git a/dune/gdt/spaces/cg.lib/fem_yasp_3d_equidistant_offset.cc b/dune/gdt/spaces/cg.lib/yasp_2d_equidistant_offset.cc similarity index 82% rename from dune/gdt/spaces/cg.lib/fem_yasp_3d_equidistant_offset.cc rename to dune/gdt/spaces/cg.lib/yasp_2d_equidistant_offset.cc index b69ed5853d6316a41214d414abad462fc9f31b21..c58d15325bf1769e912acb89105734276d93a5ee 100644 --- a/dune/gdt/spaces/cg.lib/fem_yasp_3d_equidistant_offset.cc +++ b/dune/gdt/spaces/cg.lib/yasp_2d_equidistant_offset.cc @@ -9,12 +9,7 @@ #include <config.h> -#if HAVE_DUNE_FEM - #include "../cg.lib.hh" -DUNE_GDT_SPACES_CG_FEM_LIB(template, YASP_3D_EQUIDISTANT_OFFSET); - - -#endif // HAVE_DUNE_FEM +DUNE_GDT_SPACES_CG_LIB(template, YASP_2D_EQUIDISTANT_OFFSET); diff --git a/dune/gdt/spaces/cg.lib/yasp_3d_equidistant_offset.cc b/dune/gdt/spaces/cg.lib/yasp_3d_equidistant_offset.cc new file mode 100644 index 0000000000000000000000000000000000000000..467ea3d8a977a7c099642503737ac498149248ab --- /dev/null +++ b/dune/gdt/spaces/cg.lib/yasp_3d_equidistant_offset.cc @@ -0,0 +1,15 @@ +// This file is part of the dune-gdt project: +// https://github.com/dune-community/dune-gdt +// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. +// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) +// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) +// with "runtime exception" (http://www.dune-project.org/license.html) +// Authors: +// Felix Schindler (2017) + +#include <config.h> + +#include "../cg.lib.hh" + + +DUNE_GDT_SPACES_CG_LIB(template, YASP_3D_EQUIDISTANT_OFFSET); diff --git a/dune/gdt/spaces/dg.bindings.hh b/dune/gdt/spaces/dg.bindings.hh index 066db803d90abab9ce403b0eb0a0e36aef3b6f3b..d27698d76bc3be70d363a32b20f4907f671ec590 100644 --- a/dune/gdt/spaces/dg.bindings.hh +++ b/dune/gdt/spaces/dg.bindings.hh @@ -9,7 +9,7 @@ #ifndef DUNE_GDT_SPACES_DG_BINDINGS_HH #define DUNE_GDT_SPACES_DG_BINDINGS_HH -//#if HAVE_DUNE_PYBINDXI +#if HAVE_DUNE_PYBINDXI #include <dune/xt/grid/grids.bindings.hh> @@ -19,70 +19,63 @@ // begin: this is what we need for the .so -// * fem -#if HAVE_DUNE_FEM -#define _DUNE_GDT_SPACES_DG_BIND_FEM(_m, _GRID, _layer, _r, _rC) \ +#define _DUNE_GDT_SPACES_DG_BIND(_m, _GRID, _layer, _r, _rC) \ Dune::GDT::bindings::SpaceInterface<Dune::GDT::DgSpaceProvider<_GRID, \ Dune::XT::Grid::Layers::_layer, \ - Dune::GDT::Backends::fem, \ + Dune::GDT::Backends::gdt, \ 1, \ double, \ _r, \ _rC>>::bind(_m) //#if HAVE_ALBERTA -//#define _DUNE_GDT_SPACES_DG_BIND_FEM_ALBERTA_LAYER(_m, _layer) \ -// _DUNE_GDT_SPACES_DG_BIND_FEM(_m, ALBERTA_2D, _layer, 1, 1) -//#define _DUNE_GDT_SPACES_DG_BIND_FEM_ALBERTA(_m) \ -// _DUNE_GDT_SPACES_DG_BIND_FEM_ALBERTA_LAYER(_m, dd_subdomain); \ -// _DUNE_GDT_SPACES_DG_BIND_FEM_ALBERTA_LAYER(_m, leaf); \ -// _DUNE_GDT_SPACES_DG_BIND_FEM_ALBERTA_LAYER(_m, level) +//#define _DUNE_GDT_SPACES_DG_BIND_ALBERTA_LAYER(_m, _layer) \ +// _DUNE_GDT_SPACES_DG_BIND(_m, ALBERTA_2D, _layer, 1, 1) +//#define _DUNE_GDT_SPACES_DG_BIND_ALBERTA(_m) \ +// _DUNE_GDT_SPACES_DG_BIND_ALBERTA_LAYER(_m, dd_subdomain); \ +// _DUNE_GDT_SPACES_DG_BIND_ALBERTA_LAYER(_m, leaf); \ +// _DUNE_GDT_SPACES_DG_BIND_ALBERTA_LAYER(_m, level) //#else -#define _DUNE_GDT_SPACES_DG_BIND_FEM_ALBERTA(_m) +#define _DUNE_GDT_SPACES_DG_BIND_ALBERTA(_m) //#endif #if HAVE_DUNE_ALUGRID -#define _DUNE_GDT_SPACES_DG_BIND_FEM_ALU_LAYER(_m, _layer) \ - _DUNE_GDT_SPACES_DG_BIND_FEM(_m, ALU_2D_SIMPLEX_CONFORMING, _layer, 1, 1) -#define _DUNE_GDT_SPACES_DG_BIND_FEM_ALU(_m) \ - _DUNE_GDT_SPACES_DG_BIND_FEM_ALU_LAYER(_m, dd_subdomain); \ - _DUNE_GDT_SPACES_DG_BIND_FEM_ALU_LAYER(_m, leaf); \ - _DUNE_GDT_SPACES_DG_BIND_FEM_ALU_LAYER(_m, level) +#define _DUNE_GDT_SPACES_DG_BIND_ALU_LAYER(_m, _layer) \ + _DUNE_GDT_SPACES_DG_BIND(_m, ALU_2D_SIMPLEX_CONFORMING, _layer, 1, 1) +#define _DUNE_GDT_SPACES_DG_BIND_ALU(_m) \ + _DUNE_GDT_SPACES_DG_BIND_ALU_LAYER(_m, dd_subdomain); \ + _DUNE_GDT_SPACES_DG_BIND_ALU_LAYER(_m, leaf); \ + _DUNE_GDT_SPACES_DG_BIND_ALU_LAYER(_m, level) #else -#define _DUNE_GDT_SPACES_DG_BIND_FEM_ALU(_m) +#define _DUNE_GDT_SPACES_DG_BIND_ALU(_m) #endif //#if HAVE_DUNE_UGGRID || HAVE_UG // <- does not work -//#define _DUNE_GDT_SPACES_DG_BIND_FEM_UG_LAYER(_m, _layer) _DUNE_GDT_SPACES_DG_BIND_FEM(_m, UG_2D, _layer, 1, 1) -//#define _DUNE_GDT_SPACES_DG_BIND_FEM_UG(_m) -// _DUNE_GDT_SPACES_DG_BIND_FEM_UG_LAYER(_m, dd_subdomain); -// _DUNE_GDT_SPACES_DG_BIND_FEM_UG_LAYER(_m, leaf); -// _DUNE_GDT_SPACES_DG_BIND_FEM_UG_LAYER(_m, level) +//#define _DUNE_GDT_SPACES_DG_BIND_UG_LAYER(_m, _layer) _DUNE_GDT_SPACES_DG_BIND(_m, UG_2D, _layer, 1, 1) +//#define _DUNE_GDT_SPACES_DG_BIND_UG(_m) +// _DUNE_GDT_SPACES_DG_BIND_UG_LAYER(_m, dd_subdomain); +// _DUNE_GDT_SPACES_DG_BIND_UG_LAYER(_m, leaf); +// _DUNE_GDT_SPACES_DG_BIND_UG_LAYER(_m, level) //#else -//#define _DUNE_GDT_SPACES_DG_BIND_FEM_UG(_m) +//#define _DUNE_GDT_SPACES_DG_BIND_UG(_m) //#endif -#define _DUNE_GDT_SPACES_DG_BIND_FEM_YASP_LAYER(_m, _layer) \ - _DUNE_GDT_SPACES_DG_BIND_FEM(_m, YASP_1D_EQUIDISTANT_OFFSET, _layer, 1, 1); \ - _DUNE_GDT_SPACES_DG_BIND_FEM(_m, YASP_2D_EQUIDISTANT_OFFSET, _layer, 1, 1) -#define _DUNE_GDT_SPACES_DG_BIND_FEM_YASP(_m) \ - _DUNE_GDT_SPACES_DG_BIND_FEM_YASP_LAYER(_m, dd_subdomain); \ - _DUNE_GDT_SPACES_DG_BIND_FEM_YASP_LAYER(_m, leaf); \ - _DUNE_GDT_SPACES_DG_BIND_FEM_YASP_LAYER(_m, level) +#define _DUNE_GDT_SPACES_DG_BIND_YASP_LAYER(_m, _layer) \ + _DUNE_GDT_SPACES_DG_BIND(_m, YASP_1D_EQUIDISTANT_OFFSET, _layer, 1, 1); \ + _DUNE_GDT_SPACES_DG_BIND(_m, YASP_2D_EQUIDISTANT_OFFSET, _layer, 1, 1) +#define _DUNE_GDT_SPACES_DG_BIND_YASP(_m) \ + _DUNE_GDT_SPACES_DG_BIND_YASP_LAYER(_m, dd_subdomain); \ + _DUNE_GDT_SPACES_DG_BIND_YASP_LAYER(_m, leaf); \ + _DUNE_GDT_SPACES_DG_BIND_YASP_LAYER(_m, level) -#define _DUNE_GDT_SPACES_DG_BIND_FEM_ALL(_m) \ - _DUNE_GDT_SPACES_DG_BIND_FEM_ALBERTA(_m); \ - _DUNE_GDT_SPACES_DG_BIND_FEM_ALU(_m); \ - _DUNE_GDT_SPACES_DG_BIND_FEM_YASP(_m) -//_DUNE_GDT_SPACES_DG_BIND_FEM_UG(_m); // <- does not work -#else // HAVE_DUNE_FEM -#define _DUNE_GDT_SPACES_DG_BIND_FEM_ALL(_m) -#endif - -#define DUNE_GDT_SPACES_DG_BIND(_m) _DUNE_GDT_SPACES_DG_BIND_FEM_ALL(_m) +#define DUNE_GDT_SPACES_DG_BIND(_m) \ + _DUNE_GDT_SPACES_DG_BIND_ALBERTA(_m); \ + _DUNE_GDT_SPACES_DG_BIND_ALU(_m); \ + _DUNE_GDT_SPACES_DG_BIND_YASP(_m) +//_DUNE_GDT_SPACES_DG_BIND_UG(_m); // <- does not work // end: this is what we need for the .so -//#endif // HAVE_DUNE_PYBINDXI +#endif // HAVE_DUNE_PYBINDXI #endif // DUNE_GDT_SPACES_DG_BINDINGS_HH diff --git a/dune/gdt/spaces/dg.lib.hh b/dune/gdt/spaces/dg.lib.hh index 96f56b95ef9398cfad8393d913d473f1599bb614..9655744a4e67649eeb5e16fcb1566319861bbbf3 100644 --- a/dune/gdt/spaces/dg.lib.hh +++ b/dune/gdt/spaces/dg.lib.hh @@ -18,39 +18,31 @@ #if DUNE_XT_WITH_PYTHON_BINDINGS -#if HAVE_DUNE_FEM #define _DUNE_GDT_SPACES_DG_LIB_BLOCK(_prefix, _GRID, _layer_type, _backend, _p, _R, _r, _rC) \ _prefix class Dune::GDT:: \ BlockDgSpaceProvider<_GRID, Dune::XT::Grid::Layers::_layer_type, Dune::GDT::Backends::_backend, _p, _R, _r, _rC> -#else -#define _DUNE_GDT_SPACES_DG_LIB_BLOCK(_prefix, _GRID, _layer_type, _backend, _p, _R, _r, _rC) -#endif #define _DUNE_GDT_SPACES_DG_LIB(_prefix, _GRID, _layer_type, _backend, _p, _R, _r, _rC) \ _prefix class Dune::GDT:: \ DgSpaceProvider<_GRID, Dune::XT::Grid::Layers::_layer_type, Dune::GDT::Backends::_backend, _p, _R, _r, _rC> -#if HAVE_DUNE_FEM - -#define _DUNE_GDT_SPACES_DG_FEM_LIB(_prefix, _GRID, _p, _R, _r, _rC) \ - _DUNE_GDT_SPACES_DG_LIB(_prefix, _GRID, adaptive_leaf, fem, _p, _R, _r, _rC); \ - _DUNE_GDT_SPACES_DG_LIB(_prefix, _GRID, leaf, fem, _p, _R, _r, _rC); \ - _DUNE_GDT_SPACES_DG_LIB(_prefix, _GRID, level, fem, _p, _R, _r, _rC); \ - _DUNE_GDT_SPACES_DG_LIB(_prefix, _GRID, dd_subdomain, fem, _p, _R, _r, _rC); \ - _DUNE_GDT_SPACES_DG_LIB(_prefix, _GRID, dd_subdomain_boundary, fem, _p, _R, _r, _rC); \ - _DUNE_GDT_SPACES_DG_LIB(_prefix, _GRID, dd_subdomain_coupling, fem, _p, _R, _r, _rC); \ - _DUNE_GDT_SPACES_DG_LIB_BLOCK(_prefix, _GRID, dd_subdomain, fem, _p, _R, _r, _rC) +#define _DUNE_GDT_SPACES_DG_LIB(_prefix, _GRID, _p, _R, _r, _rC) \ + _DUNE_GDT_SPACES_DG_LIB(_prefix, _GRID, adaptive_leaf, gdt, _p, _R, _r, _rC); \ + _DUNE_GDT_SPACES_DG_LIB(_prefix, _GRID, leaf, gdt, _p, _R, _r, _rC); \ + _DUNE_GDT_SPACES_DG_LIB(_prefix, _GRID, level, gdt, _p, _R, _r, _rC); \ + _DUNE_GDT_SPACES_DG_LIB(_prefix, _GRID, dd_subdomain, gdt, _p, _R, _r, _rC); \ + _DUNE_GDT_SPACES_DG_LIB(_prefix, _GRID, dd_subdomain_boundary, gdt, _p, _R, _r, _rC); \ + _DUNE_GDT_SPACES_DG_LIB(_prefix, _GRID, dd_subdomain_coupling, gdt, _p, _R, _r, _rC); \ + _DUNE_GDT_SPACES_DG_LIB_BLOCK(_prefix, _GRID, dd_subdomain, gdt, _p, _R, _r, _rC) -#define DUNE_GDT_SPACES_DG_FEM_LIB(_prefix, _GRID) _DUNE_GDT_SPACES_DG_FEM_LIB(_prefix, _GRID, 1, double, 1, 1) +#define DUNE_GDT_SPACES_DG_LIB(_prefix, _GRID) _DUNE_GDT_SPACES_DG_LIB(_prefix, _GRID, 1, double, 1, 1) #if HAVE_DUNE_ALUGRID -DUNE_GDT_SPACES_DG_FEM_LIB(extern template, ALU_2D_SIMPLEX_CONFORMING); +DUNE_GDT_SPACES_DG_LIB(extern template, ALU_2D_SIMPLEX_CONFORMING); #endif -DUNE_GDT_SPACES_DG_FEM_LIB(extern template, YASP_1D_EQUIDISTANT_OFFSET); -DUNE_GDT_SPACES_DG_FEM_LIB(extern template, YASP_2D_EQUIDISTANT_OFFSET); -DUNE_GDT_SPACES_DG_FEM_LIB(extern template, YASP_3D_EQUIDISTANT_OFFSET); - -#endif // HAVE_DUNE_FEM +DUNE_GDT_SPACES_DG_LIB(extern template, YASP_1D_EQUIDISTANT_OFFSET); +DUNE_GDT_SPACES_DG_LIB(extern template, YASP_2D_EQUIDISTANT_OFFSET); +DUNE_GDT_SPACES_DG_LIB(extern template, YASP_3D_EQUIDISTANT_OFFSET); #endif // DUNE_XT_WITH_PYTHON_BINDINGS diff --git a/dune/gdt/spaces/dg.lib/fem_yasp_2d_equidistant_offset.cc b/dune/gdt/spaces/dg.lib/alu_2d_simplex_conforming.cc similarity index 82% rename from dune/gdt/spaces/dg.lib/fem_yasp_2d_equidistant_offset.cc rename to dune/gdt/spaces/dg.lib/alu_2d_simplex_conforming.cc index 095b6fe4c1b25987fa0a9cf6e1a7f73282350fe5..cf07cc004d3aa879d6262368f2a7814c93d8e3fb 100644 --- a/dune/gdt/spaces/dg.lib/fem_yasp_2d_equidistant_offset.cc +++ b/dune/gdt/spaces/dg.lib/alu_2d_simplex_conforming.cc @@ -9,12 +9,12 @@ #include <config.h> -#if HAVE_DUNE_FEM +#if HAVE_DUNE_ALUGRID #include "../dg.lib.hh" -DUNE_GDT_SPACES_DG_FEM_LIB(template, YASP_2D_EQUIDISTANT_OFFSET); +DUNE_GDT_SPACES_DG_LIB(template, ALU_2D_SIMPLEX_CONFORMING); -#endif // HAVE_DUNE_FEM +#endif // HAVE_DUNE_ALUGRID diff --git a/dune/gdt/spaces/dg.lib/fem_alu_2d_simplex_conforming.cc b/dune/gdt/spaces/dg.lib/fem_alu_2d_simplex_conforming.cc deleted file mode 100644 index 3a760c04aa5bc02da1c177682852a3006421b743..0000000000000000000000000000000000000000 --- a/dune/gdt/spaces/dg.lib/fem_alu_2d_simplex_conforming.cc +++ /dev/null @@ -1,20 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2017) - -#include <config.h> - -#if HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM - -#include "../dg.lib.hh" - - -DUNE_GDT_SPACES_DG_FEM_LIB(template, ALU_2D_SIMPLEX_CONFORMING); - - -#endif // HAVE_DUNE_ALUGRID && HAVE_DUNE_FEM diff --git a/dune/gdt/spaces/dg.lib/fem_yasp_3d_equidistant_offset.cc b/dune/gdt/spaces/dg.lib/yasp_1d_equidistant_offset.cc similarity index 82% rename from dune/gdt/spaces/dg.lib/fem_yasp_3d_equidistant_offset.cc rename to dune/gdt/spaces/dg.lib/yasp_1d_equidistant_offset.cc index ca15b4b47406e6606d572b824e2ade3f304f3d74..203fbf67f2a165b9f7f3946d4169b11c339693bf 100644 --- a/dune/gdt/spaces/dg.lib/fem_yasp_3d_equidistant_offset.cc +++ b/dune/gdt/spaces/dg.lib/yasp_1d_equidistant_offset.cc @@ -9,12 +9,7 @@ #include <config.h> -#if HAVE_DUNE_FEM - #include "../dg.lib.hh" -DUNE_GDT_SPACES_DG_FEM_LIB(template, YASP_3D_EQUIDISTANT_OFFSET); - - -#endif // HAVE_DUNE_FEM +DUNE_GDT_SPACES_DG_LIB(template, YASP_1D_EQUIDISTANT_OFFSET); diff --git a/dune/gdt/spaces/dg.lib/fem_yasp_1d_equidistant_offset.cc b/dune/gdt/spaces/dg.lib/yasp_2d_equidistant_offset.cc similarity index 82% rename from dune/gdt/spaces/dg.lib/fem_yasp_1d_equidistant_offset.cc rename to dune/gdt/spaces/dg.lib/yasp_2d_equidistant_offset.cc index a5dacd63059a15ad13a463e90e126e1b491ced46..8f1f45dc17925bf42065968bce4e5118a4ac9bdb 100644 --- a/dune/gdt/spaces/dg.lib/fem_yasp_1d_equidistant_offset.cc +++ b/dune/gdt/spaces/dg.lib/yasp_2d_equidistant_offset.cc @@ -9,12 +9,7 @@ #include <config.h> -#if HAVE_DUNE_FEM - #include "../dg.lib.hh" -DUNE_GDT_SPACES_DG_FEM_LIB(template, YASP_1D_EQUIDISTANT_OFFSET); - - -#endif // HAVE_DUNE_FEM +DUNE_GDT_SPACES_DG_LIB(template, YASP_2D_EQUIDISTANT_OFFSET); diff --git a/dune/gdt/spaces/dg.lib/yasp_3d_equidistant_offset.cc b/dune/gdt/spaces/dg.lib/yasp_3d_equidistant_offset.cc new file mode 100644 index 0000000000000000000000000000000000000000..cbf5744c9cfda28478a502854642cc5513ccec8f --- /dev/null +++ b/dune/gdt/spaces/dg.lib/yasp_3d_equidistant_offset.cc @@ -0,0 +1,15 @@ +// This file is part of the dune-gdt project: +// https://github.com/dune-community/dune-gdt +// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. +// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) +// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) +// with "runtime exception" (http://www.dune-project.org/license.html) +// Authors: +// Felix Schindler (2017) + +#include <config.h> + +#include "../dg.lib.hh" + + +DUNE_GDT_SPACES_DG_LIB(template, YASP_3D_EQUIDISTANT_OFFSET); diff --git a/dune/gdt/spaces/interface.bindings.hh b/dune/gdt/spaces/interface.bindings.hh index 3484c4f86205bfd5c78736a23b7d5a9a92e0c20b..754d5724ebb6f057da937f7dd9f4385eba5d5d8a 100644 --- a/dune/gdt/spaces/interface.bindings.hh +++ b/dune/gdt/spaces/interface.bindings.hh @@ -47,15 +47,6 @@ struct backend_name } }; -template <> -struct backend_name<Backends::fem> -{ - static std::string value() - { - return "fem"; - } -}; - template <> struct backend_name<Backends::gdt> { diff --git a/dune/gdt/spaces/interface.hh b/dune/gdt/spaces/interface.hh index 1f4702b5ed92958f4c801c864b0b96e297635948..619176ccd13a2d2230619794f6990e0916266ab4 100644 --- a/dune/gdt/spaces/interface.hh +++ b/dune/gdt/spaces/interface.hh @@ -49,13 +49,12 @@ namespace GDT { enum class Backends { - fem, functions, gdt }; -static const XT::Common::FixedMap<Backends, std::string, 4> backend_names = { - {Backends::fem, "fem"}, {Backends::functions, "functions"}, {Backends::gdt, "gdt"}}; +static const XT::Common::FixedMap<Backends, std::string, 4> backend_names = {{Backends::functions, "functions"}, + {Backends::gdt, "gdt"}}; // disable GCC warning "type attributes ignored after type is already defined [-Wattributes]" #include <dune/xt/common/disable_warnings.hh> @@ -100,12 +99,7 @@ struct space_type_dependent_typename } // namespace internal -static constexpr Backends default_space_backend = -#if HAVE_DUNE_FEM - Backends::fem; -#else - Backends::gdt; -#endif +static constexpr Backends default_space_backend = Backends::gdt; enum class ChoosePattern @@ -119,12 +113,6 @@ enum class ChoosePattern template <Backends type> struct layer_from_backend; -template <> -struct layer_from_backend<Backends::fem> -{ - static const XT::Grid::Backends type = XT::Grid::Backends::part; -}; - template <> struct layer_from_backend<Backends::functions> { diff --git a/dune/gdt/spaces/mapper/dune-fem-wrapper.hh b/dune/gdt/spaces/mapper/dune-fem-wrapper.hh deleted file mode 100644 index 957a161c25ca902b07089e3d3ee133fbada447a2..0000000000000000000000000000000000000000 --- a/dune/gdt/spaces/mapper/dune-fem-wrapper.hh +++ /dev/null @@ -1,270 +0,0 @@ -// This file is part of the dune-gdt project: -// https://github.com/dune-community/dune-gdt -// Copyright 2010-2018 dune-gdt developers and contributors. All rights reserved. -// License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) -// or GPL-2.0+ (http://opensource.org/licenses/gpl-license) -// with "runtime exception" (http://www.dune-project.org/license.html) -// Authors: -// Felix Schindler (2013 - 2017) -// Rene Milk (2014, 2016 - 2018) - -#ifndef DUNE_GDT_SPACES_MAPPER_DUNE_FEM_WRAPPER_HH -#define DUNE_GDT_SPACES_MAPPER_DUNE_FEM_WRAPPER_HH - -#include <dune/common/dynvector.hh> -#include <dune/common/typetraits.hh> - -#if HAVE_DUNE_FEM -#include <dune/fem/space/mapper/nonblockmapper.hh> -#endif - -#include <dune/xt/common/type_traits.hh> - -#include "interfaces.hh" - -namespace Dune { -namespace GDT { -namespace Mapper { - -#if HAVE_DUNE_FEM - - -// forward -template <class FemDofMapperImp, int block_size = 1> -class FemDofWrapper; - - -namespace internal { - - -template <class FemDofMapperImp, int block_size> -class FemDofWrapperTraits -{ -public: - typedef FemDofWrapper<FemDofMapperImp, block_size> derived_type; - typedef Fem::NonBlockMapper<FemDofMapperImp, block_size> BackendType; - typedef typename BackendType::ElementType EntityType; -}; - - -template <class FemDofMapperImp> -class FemDofWrapperTraits<FemDofMapperImp, 1> -{ -public: - typedef FemDofWrapper<FemDofMapperImp, 1> derived_type; - typedef FemDofMapperImp BackendType; - typedef typename BackendType::ElementType EntityType; -}; - -template <class Backend, class Entity, int cd> -size_t fem_dof_count(Backend& /*backend*/, Entity& entity, std::integral_constant<int, cd>) -{ - DUNE_THROW(NotImplemented, "not sure if this should ever be called"); - return 0; -} - -template <class Backend, class Entity> -size_t fem_dof_count(Backend& backend, Entity& entity, std::integral_constant<int, 0>) -{ - return backend.numDofs(entity); -} - -} // namespace internal - - -template <class FemDofMapperImp, int block_size> -class FemDofWrapper : public MapperInterface<internal::FemDofWrapperTraits<FemDofMapperImp, block_size>> -{ - typedef MapperInterface<internal::FemDofWrapperTraits<FemDofMapperImp, block_size>> InterfaceType; - -public: - typedef internal::FemDofWrapperTraits<FemDofMapperImp, block_size> Traits; - typedef typename Traits::BackendType BackendType; - typedef typename Traits::EntityType EntityType; - - explicit FemDofWrapper(FemDofMapperImp& femNonBlockMapper) - : backend_(femNonBlockMapper) - { - assert(size() > 0); - } - - const BackendType& backend() const - { - return backend_; - } - - size_t size() const - { - return backend_.size(); - } - - template <int cd, class GridImp, template <int, int, class> class EntityImp> - size_t numDofs(const Entity<cd, EntityType::dimension, GridImp, EntityImp>& entity) const - { - return backend_.numEntityDofs(entity); - } - - size_t numDofs(const EntityType& entity) const - { - return backend_.numDofs(entity); - } - - size_t maxNumDofs() const - { - return backend_.maxNumDofs(); - } - -private: - class Functor - { - public: - explicit Functor(Dune::DynamicVector<size_t>& globalIndices) - : globalIndices_(globalIndices) - { - } - - void operator()(size_t localDoF, size_t globalDoF) - { - assert(localDoF < globalIndices_.size()); - globalIndices_[localDoF] = globalDoF; - } - - private: - Dune::DynamicVector<size_t>& globalIndices_; - }; - -public: - void globalIndices(const EntityType& entity, Dune::DynamicVector<size_t>& ret) const - { - // some checks - const size_t numLocalDofs = numDofs(entity); - if (ret.size() < numLocalDofs) - ret.resize(numLocalDofs); - // compute - Functor functor(ret); - backend_.mapEach(entity, functor); - } - - using InterfaceType::globalIndices; - - /** - * \attention This method is implemented using globalIndices() and thus not optimal! - */ - size_t mapToGlobal(const EntityType& entity, const size_t& localIndex) const - { - const size_t numLocalDofs = numDofs(entity); - assert(localIndex < numLocalDofs); - Dune::DynamicVector<size_t> tmpGlobalIndices(numLocalDofs); - globalIndices(entity, tmpGlobalIndices); - return tmpGlobalIndices[localIndex]; - } - -private: - const BackendType backend_; -}; // class FemDofWrapper - - -template <class FemDofMapperImp> -class FemDofWrapper<FemDofMapperImp, 1> : public MapperInterface<internal::FemDofWrapperTraits<FemDofMapperImp, 1>> -{ - typedef MapperInterface<internal::FemDofWrapperTraits<FemDofMapperImp, 1>> InterfaceType; - -public: - typedef internal::FemDofWrapperTraits<FemDofMapperImp, 1> Traits; - typedef typename Traits::BackendType BackendType; - typedef typename Traits::EntityType EntityType; - - explicit FemDofWrapper(const BackendType& femMapper) - : backend_(femMapper) - { - assert(size() > 0); - } - - const BackendType& backend() const - { - return backend_; - } - - size_t size() const - { - return backend_.size(); - } - - template <int cd, class GridImp, template <int, int, class> class EntityImp> - size_t numDofs(const Entity<cd, EntityType::dimension, GridImp, EntityImp>& entity) const - { - return internal::fem_dof_count(backend_, entity, std::integral_constant<int, cd>()); - } - - size_t maxNumDofs() const - { - return backend_.maxNumDofs(); - } - -private: - class Functor - { - public: - explicit Functor(Dune::DynamicVector<size_t>& globalIndices) - : globalIndices_(globalIndices) - { - } - - void operator()(size_t localDoF, size_t globalDoF) - { - assert(localDoF < globalIndices_.size()); - globalIndices_[localDoF] = globalDoF; - } - - private: - Dune::DynamicVector<size_t>& globalIndices_; - }; - -public: - void globalIndices(const EntityType& entity, Dune::DynamicVector<size_t>& ret) const - { - // some checks - const size_t numLocalDofs = numDofs(entity); - if (ret.size() < numLocalDofs) - ret.resize(numLocalDofs); - // compute - Functor functor(ret); - backend_.mapEach(entity, functor); - } - - using InterfaceType::globalIndices; - - /** - * \attention This method is implemented using globalIndices() and thus not optimal! - */ - size_t mapToGlobal(const EntityType& entity, const size_t& localIndex) const - { - const size_t numLocalDofs = numDofs(entity); - assert(localIndex < numLocalDofs); - Dune::DynamicVector<size_t> tmpGlobalIndices(numLocalDofs); - globalIndices(entity, tmpGlobalIndices); - return tmpGlobalIndices[localIndex]; - } - -private: - const BackendType& backend_; -}; // class FemDofWrapper< ..., 1 > - - -#else // HAVE_DUNE_FEM - - -template <class FemDofMapperImp> -class FemDofWrapper -{ - static_assert(Dune::AlwaysFalse<FemDofMapperImp>::value, "You are missing dune-fem!"); -}; - - -#endif // HAVE_DUNE_FEM - -} // namespace Mapper -} // namespace GDT -} // namespace Dune - -#endif // DUNE_GDT_SPACES_MAPPER_DUNE_FEM_WRAPPER_HH diff --git a/dune/gdt/spaces/tools.hh b/dune/gdt/spaces/tools.hh index c95135fa6bf12b5b9052d76940f29d89eedd0b6b..079707de4eb5e2255f5e8db55726d76aa69ca46d 100644 --- a/dune/gdt/spaces/tools.hh +++ b/dune/gdt/spaces/tools.hh @@ -19,11 +19,6 @@ #include "interface.hh" -#if HAVE_DUNE_FEM -#include <dune/fem/gridpart/levelgridpart.hh> -#include <dune/fem/gridpart/leafgridpart.hh> -#endif - #include <dune/xt/grid/type_traits.hh> namespace Dune { @@ -57,40 +52,6 @@ struct DUNE_DEPRECATED_MSG("Do not use this any more, all information is in the }; // struct LevelGridPartView< ..., true > -#if HAVE_DUNE_FEM - - -template <class GridType> -struct DUNE_DEPRECATED_MSG("Do not use this any more, all information is in the space (04.04.2017)!") - LeafGridPartView<GridType, false> -{ - typedef Dune::Fem::LeafGridPart<GridType> Type; - - static Type create(GridType& grid) - { - return Type(grid); - } -}; // struct LeafGridPartView< ..., false > - - -template <class GridType> -struct DUNE_DEPRECATED_MSG("Do not use this any more, all information is in the space (04.04.2017)!") - LevelGridPartView<GridType, false> -{ - typedef Dune::Fem::LevelGridPart<GridType> Type; - - static Type create(GridType& grid, const int level) - { - assert(level >= 0); - assert(level <= grid.maxLevel()); - return Type(grid, level); - } -}; // struct LevelGridPartView< ..., false > - - -#endif // HAVE_DUNE_FEM - - template <class SpaceType> class DUNE_DEPRECATED_MSG("Do not use this any more, all information is in the space (04.04.2017)!") GridPartView { diff --git a/dune/gdt/test/linearelliptic/discretizers/block-ipdg.hh b/dune/gdt/test/linearelliptic/discretizers/block-ipdg.hh index d55a8a1150ab4624a562ef8a26bce91e76b94d61..4194b67b0fb9bee48726dab49b4a7594627e3710 100644 --- a/dune/gdt/test/linearelliptic/discretizers/block-ipdg.hh +++ b/dune/gdt/test/linearelliptic/discretizers/block-ipdg.hh @@ -39,7 +39,7 @@ namespace LinearElliptic { * \todo add pattern() to StationaryContainerBasedDefaultDiscretization, avoid computation of local_pattern below */ template <class GridType, - Backends spacebackend = Backends::fem, // we only have local grid parts atm + Backends spacebackend = Backends::gdt, // we only have local grid parts atm XT::LA::Backends la = XT::LA::default_sparse_backend, int pol = 1, class RangeFieldType = double, diff --git a/dune/gdt/test/operators/darcy.hh b/dune/gdt/test/operators/darcy.hh index 3dcc0a686a443ff49774ddeec79e40299639d08a..494630148f51403bc8ddd5396e41b82adda3d7f2 100644 --- a/dune/gdt/test/operators/darcy.hh +++ b/dune/gdt/test/operators/darcy.hh @@ -33,7 +33,7 @@ namespace Test { /** * \note This test assumes that DiscreteFunction, Operators::L2Projection, Products::L2, Products::H1Semi, - * DuneFemCgSpaceWrapper, RaviartThomasSpace and FvSpace work correctly. + * ContinuousLagrangeSpace, RaviartThomasSpace and FvSpace work correctly. * \todo This test is rather old and could be refactored in terms of the other operator tests. * \todo Missing ctor and make_darcy_operator tests. */ diff --git a/dune/gdt/test/operators/mpi_operators__elliptic__matrix_operator.cc b/dune/gdt/test/operators/mpi_operators__elliptic__matrix_operator.cc index f3e9c35523f35d21ab7dcc466b75a8f5d3a699ae..b1bdc32fa0800d71f29ed2c13c0ead0c8b649aa6 100644 --- a/dune/gdt/test/operators/mpi_operators__elliptic__matrix_operator.cc +++ b/dune/gdt/test/operators/mpi_operators__elliptic__matrix_operator.cc @@ -11,26 +11,16 @@ #include <dune/xt/common/test/main.hxx> // <- this one has to come first -#include "elliptic.hh" #include <dune/gdt/test/spaces/dg/default.hh> -#include <dune/gdt/test/spaces/cg/default.hh> -using namespace Dune::GDT::Test; +#include "elliptic.hh" +using namespace Dune::GDT::Test; -#if HAVE_DUNE_FEM -typedef testing::Types<SPACE_DG_FEM_YASPGRID(1, 1, 3), SPACE_DG_FEM_YASPGRID(2, 1, 3), SPACE_DG_FEM_YASPGRID(3, 1, 3)> - CubicSpaces; +typedef testing::Types<SPACE_DG_YASPGRID(1, 1, 3), SPACE_DG_YASPGRID(2, 1, 3), SPACE_DG_YASPGRID(3, 1, 3)> CubicSpaces; TYPED_TEST_CASE(EllipticMatrixOperatorTest, CubicSpaces); -#else // HAVE_DUNE_FEM - -typedef testing::Types<SPACE_CG_YASPGRID(1, 1, 1), SPACE_CG_YASPGRID(2, 1, 1), SPACE_CG_YASPGRID(3, 1, 1)> LinearSpaces; -TYPED_TEST_CASE(EllipticMatrixOperatorTest, LinearSpaces); - -#endif // HAVE_DUNE_FEM - TYPED_TEST(EllipticMatrixOperatorTest, constructible_by_ctor) { @@ -49,8 +39,6 @@ TYPED_TEST(EllipticMatrixOperatorTest, correct_for_constant_arguments) { this->correct_for_constant_arguments(6.90e-13); } - -#if HAVE_DUNE_FEM TYPED_TEST(EllipticMatrixOperatorTest, correct_for_linear_arguments) { this->correct_for_linear_arguments(); @@ -59,13 +47,3 @@ TYPED_TEST(EllipticMatrixOperatorTest, correct_for_quadratic_arguments) { this->correct_for_quadratic_arguments(); } -#else // HAVE_DUNE_FEM -TEST(DISABLED_EllipticMatrixOperatorTest, correct_for_linear_arguments) -{ - std::cerr << Dune::XT::Common::colorStringRed("Missing dependencies!") << std::endl; -} -TEST(DISABLED_EllipticMatrixOperatorTest, correct_for_quadratic_arguments) -{ - std::cerr << Dune::XT::Common::colorStringRed("Missing dependencies!") << std::endl; -} -#endif // HAVE_DUNE_FEM diff --git a/dune/gdt/test/operators/mpi_operators__l2__matrix_operator.cc b/dune/gdt/test/operators/mpi_operators__l2__matrix_operator.cc index a4fe5463b52d1cbeb534dbfbc1a297ce3a9d07eb..e6283f483ce25901875dede58c946aed3f20b329 100644 --- a/dune/gdt/test/operators/mpi_operators__l2__matrix_operator.cc +++ b/dune/gdt/test/operators/mpi_operators__l2__matrix_operator.cc @@ -11,26 +11,17 @@ #include <dune/xt/common/test/main.hxx> // <- this one has to come first -#include "l2.hh" -#include <dune/gdt/test/spaces/cg/default.hh> #include <dune/gdt/test/spaces/dg/default.hh> -using namespace Dune::GDT::Test; +#include "l2.hh" +using namespace Dune::GDT::Test; -#if HAVE_DUNE_FEM -typedef testing::Types<SPACE_DG_FEM_YASPGRID(1, 1, 2), SPACE_DG_FEM_YASPGRID(2, 1, 2), SPACE_DG_FEM_YASPGRID(3, 1, 2)> +typedef testing::Types<SPACE_DG_YASPGRID(1, 1, 2), SPACE_DG_YASPGRID(2, 1, 2), SPACE_DG_YASPGRID(3, 1, 2)> QuadraticSpaces; TYPED_TEST_CASE(L2MatrixOperatorTest, QuadraticSpaces); -#else HAVE_DUNE_FEM - -typedef testing::Types<SPACE_CG_YASPGRID(1, 1, 1), SPACE_CG_YASPGRID(2, 1, 1), SPACE_CG_YASPGRID(3, 1, 1)> LinearSpaces; -TYPED_TEST_CASE(L2MatrixOperatorTest, LinearSpaces); - -#endif // HAVE_DUNE_FEM - TYPED_TEST(L2MatrixOperatorTest, constructible_by_ctor) { @@ -49,20 +40,11 @@ TYPED_TEST(L2MatrixOperatorTest, correct_for_constant_arguments) const double rel_tol = this->space_.grid_layer().grid().comm().size() > 1 ? 1.5e-14 : 1.5e-13; this->correct_for_constant_arguments(rel_tol); } - TYPED_TEST(L2MatrixOperatorTest, correct_for_linear_arguments) { this->correct_for_linear_arguments(); } - -#if HAVE_DUNE_FEM TYPED_TEST(L2MatrixOperatorTest, correct_for_quadratic_arguments) { this->correct_for_quadratic_arguments(); } -#else -TEST(DISABLED_L2MatrixOperatorTest, correct_for_quadratic_arguments) -{ - std::cerr << Dune::XT::Common::colorStringRed("Missing dependencies!") << std::endl; -} -#endif diff --git a/dune/gdt/test/operators/mpi_operators__laplace__matrix_operator.cc b/dune/gdt/test/operators/mpi_operators__laplace__matrix_operator.cc index fb888bcb32978ba263d52ae3c4651ee0f1cef277..c5abd8d3e9917684268bb58dab9809c295969829 100644 --- a/dune/gdt/test/operators/mpi_operators__laplace__matrix_operator.cc +++ b/dune/gdt/test/operators/mpi_operators__laplace__matrix_operator.cc @@ -11,26 +11,16 @@ #include <dune/xt/common/test/main.hxx> // <- this one has to come first -#include "laplace.hh" #include <dune/gdt/test/spaces/dg/default.hh> -#include <dune/gdt/test/spaces/cg/default.hh> -using namespace Dune::GDT::Test; +#include "laplace.hh" +using namespace Dune::GDT::Test; -#if HAVE_DUNE_FEM -typedef testing::Types<SPACE_DG_FEM_YASPGRID(1, 1, 3), SPACE_DG_FEM_YASPGRID(2, 1, 3), SPACE_DG_FEM_YASPGRID(3, 1, 3)> - CubicSpaces; +typedef testing::Types<SPACE_DG_YASPGRID(1, 1, 3), SPACE_DG_YASPGRID(2, 1, 3), SPACE_DG_YASPGRID(3, 1, 3)> CubicSpaces; TYPED_TEST_CASE(LaplaceMatrixOperatorTest, CubicSpaces); -#else // HAVE_DUNE_FEM - -typedef testing::Types<SPACE_CG_YASPGRID(1, 1, 1), SPACE_CG_YASPGRID(2, 1, 1), SPACE_CG_YASPGRID(3, 1, 1)> LinearSpaces; -TYPED_TEST_CASE(LaplaceMatrixOperatorTest, LinearSpaces); - -#endif // HAVE_DUNE_FEM - TYPED_TEST(LaplaceMatrixOperatorTest, constructible_by_ctor) { @@ -44,13 +34,10 @@ TYPED_TEST(LaplaceMatrixOperatorTest, is_matrix_operator) { this->is_matrix_operator(); } - TYPED_TEST(LaplaceMatrixOperatorTest, correct_for_constant_arguments) { this->correct_for_constant_arguments(); } - -#if HAVE_DUNE_FEM TYPED_TEST(LaplaceMatrixOperatorTest, correct_for_linear_arguments) { this->correct_for_linear_arguments(); @@ -59,13 +46,3 @@ TYPED_TEST(LaplaceMatrixOperatorTest, correct_for_quadratic_arguments) { this->correct_for_quadratic_arguments(); } -#else // HAVE_DUNE_FEM -TEST(DISABLED_LaplaceMatrixOperatorTest, correct_for_linear_arguments) -{ - std::cerr << Dune::XT::Common::colorStringRed("Missing dependencies!") << std::endl; -} -TEST(DISABLED_LaplaceMatrixOperatorTest, correct_for_quadratic_arguments) -{ - std::cerr << Dune::XT::Common::colorStringRed("Missing dependencies!") << std::endl; -} -#endif // HAVE_DUNE_FEM diff --git a/dune/gdt/test/operators/mpi_operators__weighted_l2__matrix_operator.cc b/dune/gdt/test/operators/mpi_operators__weighted_l2__matrix_operator.cc index db137c984981a3fb234ab71c76d22a2debda48b4..2b73d677583591004f646df89356bb614cf1ddf4 100644 --- a/dune/gdt/test/operators/mpi_operators__weighted_l2__matrix_operator.cc +++ b/dune/gdt/test/operators/mpi_operators__weighted_l2__matrix_operator.cc @@ -11,26 +11,17 @@ #include <dune/xt/common/test/main.hxx> // <- this one has to come first -#include "weighted-l2.hh" #include <dune/gdt/test/spaces/dg/default.hh> -#include <dune/gdt/test/spaces/cg/default.hh> -using namespace Dune::GDT::Test; +#include "weighted-l2.hh" +using namespace Dune::GDT::Test; -#if HAVE_DUNE_FEM -typedef testing::Types<SPACE_DG_FEM_YASPGRID(1, 1, 2), SPACE_DG_FEM_YASPGRID(2, 1, 2), SPACE_DG_FEM_YASPGRID(3, 1, 2)> +typedef testing::Types<SPACE_DG_YASPGRID(1, 1, 2), SPACE_DG_YASPGRID(2, 1, 2), SPACE_DG_YASPGRID(3, 1, 2)> QuadraticSpaces; TYPED_TEST_CASE(WeightedL2MatrixOperatorTest, QuadraticSpaces); -#else // HAVE_DUNE_FEM - -typedef testing::Types<SPACE_CG_YASPGRID(1, 1, 1), SPACE_CG_YASPGRID(2, 1, 1), SPACE_CG_YASPGRID(3, 1, 1)> LinearSpaces; -TYPED_TEST_CASE(WeightedL2MatrixOperatorTest, LinearSpaces); - -#endif // HAVE_DUNE_FEM - TYPED_TEST(WeightedL2MatrixOperatorTest, constructible_by_ctor) { @@ -53,7 +44,6 @@ TYPED_TEST(WeightedL2MatrixOperatorTest, correct_for_constant_arguments) #endif this->correct_for_constant_arguments(this->dimDomain == 1 ? 2.2e-14 : (this->dimDomain == 2 ? 2.85e-14 : tolerance)); } - TYPED_TEST(WeightedL2MatrixOperatorTest, correct_for_linear_arguments) { #ifndef NDEBUG @@ -63,8 +53,6 @@ TYPED_TEST(WeightedL2MatrixOperatorTest, correct_for_linear_arguments) #endif this->correct_for_linear_arguments(this->dimDomain == 3 ? 2.67e-14 : tolerance); } - -#if HAVE_DUNE_FEM TYPED_TEST(WeightedL2MatrixOperatorTest, correct_for_quadratic_arguments) { #ifndef NDEBUG @@ -74,9 +62,3 @@ TYPED_TEST(WeightedL2MatrixOperatorTest, correct_for_quadratic_arguments) #endif this->correct_for_quadratic_arguments(this->dimDomain == 3 ? 1.43e-14 : tolerance); } -#else -TEST(DISABLED_WeightedL2MatrixOperatorTest, correct_for_quadratic_arguments) -{ - std::cerr << Dune::XT::Common::colorStringRed("Missing dependencies!") << std::endl; -} -#endif diff --git a/dune/gdt/test/operators/operators__darcy.cc b/dune/gdt/test/operators/operators__darcy.cc index 857e5d723fe12ac97bbd42e5d9f94cecb05050a2..ef9528f918e3c8dd9abb0dc2c775c110b3f612e7 100644 --- a/dune/gdt/test/operators/operators__darcy.cc +++ b/dune/gdt/test/operators/operators__darcy.cc @@ -18,11 +18,11 @@ using namespace Dune::GDT::Test; -#if HAVE_DUNE_FEM && HAVE_DUNE_ALUGRID +#if HAVE_DUNE_ALUGRID typedef testing::Types< - /*std::pair< SPACE_CG_DEFAULT_ALUCONFORMGRID(2, 1, 1), SPACE_CG_DEFAULT_ALUCONFORMGRID(2, 2, 1) > // <- TODO: enable once #40 is resolved - ,*/ std::pair<SPACE_CG_DEFAULT_ALUCONFORMGRID(2, 1, 1), SPACE_RT_ALUCONFORMGRID(2)>> + /*std::pair< SPACE_CG_ALUCONFORMGRID(2, 1, 1), SPACE_CG_ALUCONFORMGRID(2, 2, 1) > // <- TODO: enable once #40 is resolved + ,*/ std::pair<SPACE_CG_ALUCONFORMGRID(2, 1, 1), SPACE_RT_ALUCONFORMGRID(2)>> SpaceTypes; // this test cannot run in parallel ATM because the RT space does not have a parallel dof_comm setup @@ -33,7 +33,7 @@ TYPED_TEST(DarcyOperatorTest, produces_correct_results) } -#else // HAVE_DUNE_FEM && HAVE_DUNE_ALUGRID +#else // HAVE_DUNE_ALUGRID TEST(DISABLED_DarcyOperatorTest, produces_correct_results) @@ -41,4 +41,4 @@ TEST(DISABLED_DarcyOperatorTest, produces_correct_results) } -#endif // HAVE_DUNE_FEM && HAVE_DUNE_ALUGRID +#endif // HAVE_DUNE_ALUGRID diff --git a/dune/gdt/test/projections/mpi_projections__local.tpl b/dune/gdt/test/projections/mpi_projections__local.tpl index e5ca93fed8fc77be41edd8baf01e88a3dd9c43df..3f29d7f4ae19c8587b2b674871125f79787cb331 100644 --- a/dune/gdt/test/projections/mpi_projections__local.tpl +++ b/dune/gdt/test/projections/mpi_projections__local.tpl @@ -36,7 +36,7 @@ typedef L2LocalProjectionLocalizableOperatorTest<{{SpaceType}}> const double {{Name}}_tolerance = 1.45e-1; {% elif 'RaviartThomasSpace' in SpaceType %} const auto {{Name}}_tolerance = rt_tolerance<L2LocalProjectionOperatorTest_{{Name}}>(); -{% elif 'FemCg' in SpaceType %} +{% elif 'ContinuousLagrangeSpace' in SpaceType %} const auto {{Name}}_tolerance = cg_tolerance<L2LocalProjectionOperatorTest_{{Name}}>(); {% else %} const auto {{Name}}_tolerance = Dune::XT::Grid::is_alugrid<Dune::XT::Grid::extract_grid_t<typename {{SpaceType}}::GridLayerType>>::value diff --git a/dune/gdt/test/prolongations/mpi_prolongations__lagrange_and_global.tpl b/dune/gdt/test/prolongations/mpi_prolongations__lagrange_and_global.tpl index b8c21869995b6a92de364fac40f3f0d057b4dbc9..af5879a97afe1a4ef649555e8273e09c016e1c52 100644 --- a/dune/gdt/test/prolongations/mpi_prolongations__lagrange_and_global.tpl +++ b/dune/gdt/test/prolongations/mpi_prolongations__lagrange_and_global.tpl @@ -42,7 +42,7 @@ typedef L2GlobalProlongationLocalizableOperatorTest<{{SpaceType}}> const double {{Name}}_tolerance = 1.45e-1; {% elif 'RaviartThomasSpace' in SpaceType %} const auto {{Name}}_tolerance = rt_tolerance<L2GlobalProlongationOperatorTest_{{Name}}>(); -{% elif 'FemCg' in SpaceType %} +{% elif 'ContinuousLagrangeSpace' in SpaceType %} const auto {{Name}}_tolerance = cg_tolerance<L2GlobalProlongationOperatorTest_{{Name}}>(); {% else %} const auto {{Name}}_tolerance = Dune::XT::Grid::is_alugrid<Dune::XT::Grid::extract_grid_t<typename {{SpaceType}}::GridLayerType>>::value diff --git a/dune/gdt/test/prolongations/mpi_prolongations__local.tpl b/dune/gdt/test/prolongations/mpi_prolongations__local.tpl index dd067aedcf22cc421077d54b46b80253d882ef3e..62a7d87ec5127edbe8af36a13b96bea075b9eefd 100644 --- a/dune/gdt/test/prolongations/mpi_prolongations__local.tpl +++ b/dune/gdt/test/prolongations/mpi_prolongations__local.tpl @@ -37,7 +37,7 @@ typedef L2LocalProlongationLocalizableOperatorTest<{{SpaceType}}> const double {{Name}}_tolerance = 1.45e-1; {% elif 'RaviartThomasSpace' in SpaceType %} const auto {{Name}}_tolerance = rt_tolerance<L2LocalProlongationOperatorTest_{{Name}}>(); -{% elif 'FemCg' in SpaceType %} +{% elif 'ContinuousLagrangeSpace' in SpaceType %} const auto {{Name}}_tolerance = cg_tolerance<L2LocalProlongationOperatorTest_{{Name}}>(); {% else %} const auto {{Name}}_tolerance = Dune::XT::Grid::is_alugrid<Dune::XT::Grid::extract_grid_t<{{SpaceType}}::GridLayerType>>::value diff --git a/dune/gdt/test/prolongations/mpi_prolongations_cg_dg.tpl b/dune/gdt/test/prolongations/mpi_prolongations_cg_dg.tpl index 8da697c421a585ef8c07d104eecd217570820325..89bcda5b3cdc841e4d3e9335a64dd3ca26b6ea14 100644 --- a/dune/gdt/test/prolongations/mpi_prolongations_cg_dg.tpl +++ b/dune/gdt/test/prolongations/mpi_prolongations_cg_dg.tpl @@ -39,7 +39,7 @@ typedef L2ProlongationLocalizableOperatorTest<{{SpaceType}}> const double {{Name}}_tolerance = 1.45e-1; {% elif 'RaviartThomasSpace' in SpaceType %} const auto {{Name}}_tolerance = rt_tolerance<L2ProlongationOperatorTest_{{Name}}>(); -{% elif 'FemCg' in SpaceType %} +{% elif 'ContinuousLagrangeSpace' in SpaceType %} const auto {{Name}}_tolerance = cg_tolerance<L2ProlongationOperatorTest_{{Name}}>(); {% else %} const auto {{Name}}_tolerance = Dune::XT::Grid::is_alugrid<Dune::XT::Grid::extract_grid_t<typename {{SpaceType}}::GridLayerType>>::value ? L2ProlongationOperatorTest_{{Name}}::alugrid_tolerance : L2ProlongationOperatorTest_{{Name}}::default_tolerance; diff --git a/dune/gdt/test/spaces.tpl b/dune/gdt/test/spaces.tpl index 0d183eb0ba474b1058966e948f2fcfdf0f94f6ff..d830974f15d8a11958aa8f8ee535db16f5fecd4d 100644 --- a/dune/gdt/test/spaces.tpl +++ b/dune/gdt/test/spaces.tpl @@ -48,25 +48,5 @@ TEST_F(TestType_{{Name}}, check_for_correct_copy) this->check_for_correct_copy(); } -{% if 'CgSpaceWrapper' in SpaceType %} - typedef P1Q1_CG_Space<{{SpaceType}}> P1Q1_CG_Space_{{Name}}; - TEST_F(P1Q1_CG_Space_{{Name}}, fulfills_cg_interface) - { - this->fulfills_continuous_interface(); - } - TEST_F(P1Q1_CG_Space_{{Name}}, maps_correctly) - { - this->maps_correctly(); - } -{% endif %} - -{% if 'DgSpaceWrapper' in SpaceType %} - typedef P1Q1_DG_Space<{{SpaceType}}> P1Q1_DG_Space_{{Name}}; - TEST_F(P1Q1_DG_Space_{{Name}}, fulfills_dg_interface) - { - this->maps_correctly(); - } -{% endif %} - {% endfor %} // clang-format on diff --git a/dune/gdt/test/spaces/cg/default.hh b/dune/gdt/test/spaces/cg/default.hh index 799b7e8f4a691c4c5a0bdc819747f70f17eae9b2..4da5c6a6f96a80fb221d835d0e758c521268fede 100644 --- a/dune/gdt/test/spaces/cg/default.hh +++ b/dune/gdt/test/spaces/cg/default.hh @@ -17,38 +17,34 @@ #include <dune/gdt/spaces/cg/default.hh> -#define SPACE_CG_DEFAULT_YASPGRID(dd, rr, pp) \ - Dune::GDT::ContinuousLagrangeSpace<Yasp##dd##dLeafGridViewType, pp, double> +#define SPACE_CG_YASPGRID(dd, rr, pp) Dune::GDT::ContinuousLagrangeSpace<Yasp##dd##dLeafGridViewType, pp, double> -#define SPACE_CG_DEFAULT_YASPGRID_LEVEL(dd, rr, pp) \ - Dune::GDT::ContinuousLagrangeSpace<Yasp##dd##dLevelGridViewType, pp, double> +#define SPACE_CG_YASPGRID_LEVEL(dd, rr, pp) Dune::GDT::ContinuousLagrangeSpace<Yasp##dd##dLevelGridViewType, pp, double> #define SPACES_CG_LEVEL(pp) \ - SPACE_CG_DEFAULT_YASPGRID_LEVEL(1, 1, pp) \ - , SPACE_CG_DEFAULT_YASPGRID_LEVEL(2, 1, pp), SPACE_CG_DEFAULT_YASPGRID_LEVEL(3, 1, pp) + SPACE_CG_YASPGRID_LEVEL(1, 1, pp) \ + , SPACE_CG_YASPGRID_LEVEL(2, 1, pp), SPACE_CG_YASPGRID_LEVEL(3, 1, pp) #if HAVE_DUNE_ALUGRID -#define SPACE_CG_DEFAULT_ALUCONFORMGRID(dd, rr, pp) \ +#define SPACE_CG_ALUCONFORMGRID(dd, rr, pp) \ Dune::GDT::ContinuousLagrangeSpace<AluConform##dd##dLeafGridViewType, pp, double> -#define SPACE_CG_DEFAULT_ALUCUBEGRID(dd, rr, pp) \ - Dune::GDT::ContinuousLagrangeSpace<AluCube##dd##dLeafGridViewType, pp, double> +#define SPACE_CG_ALUCUBEGRID(dd, rr, pp) Dune::GDT::ContinuousLagrangeSpace<AluCube##dd##dLeafGridViewType, pp, double> #define SPACES_CG_ALUGRID(pp) \ - SPACE_CG_DEFAULT_ALUCONFORMGRID(2, 1, pp) \ - , SPACE_CG_DEFAULT_ALUCONFORMGRID(3, 1, pp), SPACE_CG_DEFAULT_ALUCUBEGRID(2, 1, pp), \ - SPACE_CG_DEFAULT_ALUCUBEGRID(3, 1, pp) + SPACE_CG_ALUCONFORMGRID(2, 1, pp) \ + , SPACE_CG_ALUCONFORMGRID(3, 1, pp), SPACE_CG_ALUCUBEGRID(2, 1, pp), SPACE_CG_ALUCUBEGRID(3, 1, pp) -#define SPACE_CG_DEFAULT_ALUCUBEGRID_LEVEL(dd, rr, pp) \ +#define SPACE_CG_ALUCUBEGRID_LEVEL(dd, rr, pp) \ Dune::GDT::ContinuousLagrangeSpace<AluCube##dd##dLevelGridViewType, pp, double> #define SPACES_CG_ALUGRID_LEVEL(pp) \ - SPACE_CG_DEFAULT_ALUCUBEGRID_LEVEL(2, 1, pp) \ - , SPACE_CG_DEFAULT_ALUCUBEGRID_LEVEL(3, 1, pp) + SPACE_CG_ALUCUBEGRID_LEVEL(2, 1, pp) \ + , SPACE_CG_ALUCUBEGRID_LEVEL(3, 1, pp) #endif // HAVE_DUNE_ALUGRID diff --git a/dune/gdt/test/spaces/dg/default.hh b/dune/gdt/test/spaces/dg/default.hh index 28af0214b6f15f83751328f189af2326e307475e..68704903908ecceceb206e0e0f27db81ee854d41 100644 --- a/dune/gdt/test/spaces/dg/default.hh +++ b/dune/gdt/test/spaces/dg/default.hh @@ -16,42 +16,38 @@ #include <dune/gdt/test/grids.hh> -#define SPACE_DG_FEM_YASPGRID(dd, rr, pp) Dune::GDT::DiscontinuousLagrangeSpace<Yasp##dd##dLeafGridViewType, pp, double> +#define SPACE_DG_YASPGRID(dd, rr, pp) Dune::GDT::DiscontinuousLagrangeSpace<Yasp##dd##dLeafGridViewType, pp, double> -#define SPACES_DG_FEM(pp) \ - SPACE_DG_FEM_YASPGRID(1, 1, pp), SPACE_DG_FEM_YASPGRID(2, 1, pp), SPACE_DG_FEM_YASPGRID(3, 1, pp) - -#define SPACE_DG_FEM_YASPGRID_LEVEL(dd, rr, pp) \ +#define SPACE_DG_YASPGRID_LEVEL(dd, rr, pp) \ Dune::GDT::DiscontinuousLagrangeSpace<Yasp##dd##dLevelGridViewType, pp, double> -#define SPACES_DG_FEM_LEVEL(pp) \ - SPACE_DG_FEM_YASPGRID_LEVEL(1, 1, pp), SPACE_DG_FEM_YASPGRID_LEVEL(2, 1, pp), SPACE_DG_FEM_YASPGRID_LEVEL(3, 1, pp) +#define SPACES_DG_LEVEL(pp) \ + SPACE_DG_YASPGRID_LEVEL(1, 1, pp), SPACE_DG_YASPGRID_LEVEL(2, 1, pp), SPACE_DG_YASPGRID_LEVEL(3, 1, pp) #if HAVE_DUNE_ALUGRID -#define SPACE_DG_FEM_ALUCONFORMGRID(dd, rr, pp) \ +#define SPACE_DG_ALUCONFORMGRID(dd, rr, pp) \ Dune::GDT::DiscontinuousLagrangeSpace<AluConform##dd##dLeafGridViewType, pp, double> -#define SPACE_DG_FEM_ALUCUBEGRID(dd, rr, pp) \ +#define SPACE_DG_ALUCUBEGRID(dd, rr, pp) \ Dune::GDT::DiscontinuousLagrangeSpace<AluCube##dd##dLeafGridViewType, pp, double> -#define SPACES_DG_FEM_ALUGRID(pp) \ - SPACE_DG_FEM_ALUCONFORMGRID(2, 1, pp) \ - , SPACE_DG_FEM_ALUCONFORMGRID(3, 1, pp), SPACE_DG_FEM_ALUCUBEGRID(2, 1, pp), SPACE_DG_FEM_ALUCUBEGRID(3, 1, pp) +#define SPACES_DG_ALUGRID(pp) \ + SPACE_DG_ALUCONFORMGRID(2, 1, pp) \ + , SPACE_DG_ALUCONFORMGRID(3, 1, pp), SPACE_DG_ALUCUBEGRID(2, 1, pp), SPACE_DG_ALUCUBEGRID(3, 1, pp) -#define SPACE_DG_FEM_ALUCONFORMGRID_LEVEL(dd, rr, pp) \ +#define SPACE_DG_ALUCONFORMGRID_LEVEL(dd, rr, pp) \ Dune::GDT::DiscontinuousLagrangeSpace<AluConform##dd##dLevelGridViewType, pp, double> -#define SPACE_DG_FEM_ALUCUBEGRID_LEVEL(dd, rr, pp) \ +#define SPACE_DG_ALUCUBEGRID_LEVEL(dd, rr, pp) \ Dune::GDT::DiscontinuousLagrangeSpace<AluCube##dd##dLevelGridViewType, pp, double> -#define SPACES_DG_FEM_ALUGRID_LEVEL(pp) \ - SPACE_DG_FEM_ALUCONFORMGRID_LEVEL(2, 1, pp) \ - , SPACE_DG_FEM_ALUCONFORMGRID_LEVEL(3, 1, pp), SPACE_DG_FEM_ALUCUBEGRID_LEVEL(2, 1, pp), \ - SPACE_DG_FEM_ALUCUBEGRID_LEVEL(3, 1, pp) +#define SPACES_DG_ALUGRID_LEVEL(pp) \ + SPACE_DG_ALUCONFORMGRID_LEVEL(2, 1, pp) \ + , SPACE_DG_ALUCONFORMGRID_LEVEL(3, 1, pp), SPACE_DG_ALUCUBEGRID_LEVEL(2, 1, pp), SPACE_DG_ALUCUBEGRID_LEVEL(3, 1, pp) #endif // HAVE_DUNE_ALUGRID diff --git a/examples/parallel_discretizations/block_swipdg.cc b/examples/parallel_discretizations/block_swipdg.cc index 507f3d5d5050755d62abf0187693a4cea25d4a66..97f02f5eb2041d97ad8dd540a7b29f660e148096 100644 --- a/examples/parallel_discretizations/block_swipdg.cc +++ b/examples/parallel_discretizations/block_swipdg.cc @@ -280,20 +280,20 @@ int main(int argc, char** argv) switch (DXTC_CONFIG_GET("global.problem", 0)) { case 0: - single_run<GDT::Backends::fem, + single_run<GDT::Backends::gdt, GDT::LinearElliptic::ER2007TestCase<GridType>, GDT::LinearElliptic::ER2007DdSubdomainsTestCase<GridType>>(); break; case 1: - single_run<GDT::Backends::fem, + single_run<GDT::Backends::gdt, GDT::LinearElliptic::ESV2007TestCase<GridType>, GDT::LinearElliptic::ESV2007DdSubdomainsTestCase<GridType>>(); break; case 2: - single_run<GDT::Backends::fem, + single_run<GDT::Backends::gdt, GDT::LinearElliptic::ER2007TestCase<GridType>, GDT::LinearElliptic::ER2007DdSubdomainsTestCase<GridType>>(); - single_run<GDT::Backends::fem, + single_run<GDT::Backends::gdt, GDT::LinearElliptic::ESV2007TestCase<GridType>, GDT::LinearElliptic::ESV2007DdSubdomainsTestCase<GridType>>(); break; diff --git a/examples/parallel_discretizations/block_swipdg.ini b/examples/parallel_discretizations/block_swipdg.ini index 8ebec6f5e4075cdd04111a1cc4c93916ab15a08d..3821b4b31e05d200400cb4e3905a1be8907a4490 100644 --- a/examples/parallel_discretizations/block_swipdg.ini +++ b/examples/parallel_discretizations/block_swipdg.ini @@ -36,7 +36,7 @@ overlap = 1 calc_error = 1 visualize = 1 intersection_vis = 0 -# with fem: 0: ER2007, 1: ESV2007, 2: both +# 0: ER2007, 1: ESV2007, 2: both problem = 1 block = 1 ipdg = 1 diff --git a/python/dune/gdt/__init__.py b/python/dune/gdt/__init__.py index 251154754fab8a6578fb4215afa7c082edd63ae9..6e8e525d482a8ee1e94dd56ce7f88b7752c33c45 100644 --- a/python/dune/gdt/__init__.py +++ b/python/dune/gdt/__init__.py @@ -96,5 +96,3 @@ def init_mpi(args=list()): init_mpi_method(args) -HAVE_DUNE_FEM = np.any(['FemP1Space' in var for var in globals().keys()]) -