diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index a73d1351004f5018cd3ccd297fe2a5a8028c03de..0000000000000000000000000000000000000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# See https://pre-commit.com for more information -# See https://pre-commit.com/hooks.html for more hooks -repos: -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 - hooks: - - id: trailing-whitespace - - id: check-yaml - - id: check-added-large-files - - id: debug-statements -- repo: https://github.com/pycqa/flake8 - rev: 3.9.2 - hooks: - - id: flake8 - exclude: "^pybind11" - args: ["--config=./python/setup.cfg"] -- repo: https://github.com/pre-commit/mirrors-clang-format - rev: 'v8.0.1' - hooks: - - id: clang-format - exclude: "^(dune/xt/test/gtest/|pybind11)" -- repo: https://github.com/pre-commit/mirrors-yapf - rev: 'v0.25.0' - hooks: - - id: yapf - args: ["--style=.vcsetup/.style.yapf"] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 120000 index 0000000000000000000000000000000000000000..304f535ee03a85bfa7688db32c84e305d181de0b --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1 @@ +.vcsetup/pre-commit-config.yaml \ No newline at end of file diff --git a/.vcsetup b/.vcsetup index 1efe93b62e36634240af102da555c2b90d937abe..a9ada423332d91cadddfc7ba50ce889ed1758435 160000 --- a/.vcsetup +++ b/.vcsetup @@ -1 +1 @@ -Subproject commit 1efe93b62e36634240af102da555c2b90d937abe +Subproject commit a9ada423332d91cadddfc7ba50ce889ed1758435 diff --git a/CMakeLists.txt b/CMakeLists.txt index 083b6db4c89c20ac2a0a4461f8d12830f508e3c1..56d56b824a33b57b2e33f66cd5710d4bbf41d868 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,11 +17,11 @@ project("dune-gdt" CXX) cmake_minimum_required(VERSION 3.1) -if(NOT (dune-common_DIR OR dune-common_ROOT OR "${CMAKE_PREFIX_PATH}" MATCHES ".*dune-common.*")) - string(REPLACE ${CMAKE_PROJECT_NAME} - dune-common - dune-common_DIR - ${PROJECT_BINARY_DIR}) +if(NOT + (dune-common_DIR + OR dune-common_ROOT + OR "${CMAKE_PREFIX_PATH}" MATCHES ".*dune-common.*")) + string(REPLACE ${CMAKE_PROJECT_NAME} dune-common dune-common_DIR ${PROJECT_BINARY_DIR}) endif() # dune-common @@ -51,11 +51,12 @@ if(EIGEN3_FOUND) endif(EIGEN3_FOUND) # search for spe10 data files -find_file(SPE10MODEL1DATA - NAMES perm_case1.dat - PATHS "${dune-gdt_SOURCE_DIR}/../local/src/spe10/model1" - DOC "Location of perm_case1.dat" - NO_DEFAULT_PATH) +find_file( + SPE10MODEL1DATA + NAMES perm_case1.dat + PATHS "${dune-gdt_SOURCE_DIR}/../local/src/spe10/model1" + DOC "Location of perm_case1.dat" + NO_DEFAULT_PATH) add_subdirectory(doc) add_subdirectory(dune) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 3fa7dac5f82dfd5f1a51067838938c2c4c5d5533..a0297dc3139f786808785bf0ee69fadfd48eb89c 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -12,24 +12,10 @@ # ~~~ macro(cleanup_target_name arg) - string(REPLACE ${PROJECT_SOURCE_DIR} - "" - targname - ${arg}) - string(REPLACE ".cc" - "" - targname - ${targname}) - string(REGEX - REPLACE "/" - "__" - targname - ${targname}) - string(REGEX - REPLACE "^__" - "" - targname - ${targname}) + string(REPLACE ${PROJECT_SOURCE_DIR} "" targname ${arg}) + string(REPLACE ".cc" "" targname ${targname}) + string(REGEX REPLACE "/" "__" targname ${targname}) + string(REGEX REPLACE "^__" "" targname ${targname}) endmacro(cleanup_target_name) file(GLOB_RECURSE example_sources "${CMAKE_CURRENT_SOURCE_DIR}/*.cc") diff --git a/python/dune/gdt/CMakeLists.txt b/python/dune/gdt/CMakeLists.txt index c59e2cdd2997cc00b4d66a94be2ea7c57bd0256c..f7e96731d9a773a0ce26187701309f5a1bfd34f0 100644 --- a/python/dune/gdt/CMakeLists.txt +++ b/python/dune/gdt/CMakeLists.txt @@ -13,9 +13,7 @@ file(GLOB_RECURSE header "*.hh") -dune_pybindxi_add_module(_discretefunction_discretefunction - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_discretefunction_discretefunction EXCLUDE_FROM_ALL ${header} discretefunction/discretefunction.cc) dune_pybindxi_add_module(_discretefunction_dof_vector EXCLUDE_FROM_ALL ${header} discretefunction/dof-vector.cc) dune_pybindxi_add_module(_functionals_interfaces_common EXCLUDE_FROM_ALL ${header} functionals/interfaces_common.cc) @@ -25,136 +23,72 @@ dune_pybindxi_add_module(_functionals_vector_based EXCLUDE_FROM_ALL ${header} fu dune_pybindxi_add_module(_interpolations_boundary EXCLUDE_FROM_ALL ${header} interpolations/boundary.cc) dune_pybindxi_add_module(_interpolations_default EXCLUDE_FROM_ALL ${header} interpolations/default.cc) dune_pybindxi_add_module(_interpolations_oswald EXCLUDE_FROM_ALL ${header} interpolations/oswald.cc) -dune_pybindxi_add_module(_local_bilinear_forms_coupling_intersection_integrals - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_bilinear_forms_coupling_intersection_integrals EXCLUDE_FROM_ALL ${header} local/bilinear-forms/coupling_intersection_integrals.cc) -dune_pybindxi_add_module(_local_bilinear_forms_coupling_intersection_interface - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_bilinear_forms_coupling_intersection_interface EXCLUDE_FROM_ALL ${header} local/bilinear-forms/coupling_intersection_interface.cc) -dune_pybindxi_add_module(_local_bilinear_forms_element_integrals - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_bilinear_forms_element_integrals EXCLUDE_FROM_ALL ${header} local/bilinear-forms/element_integrals.cc) -dune_pybindxi_add_module(_local_bilinear_forms_element_interface - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_bilinear_forms_element_interface EXCLUDE_FROM_ALL ${header} local/bilinear-forms/element_interface.cc) -dune_pybindxi_add_module(_local_bilinear_forms_intersection_integrals - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_bilinear_forms_intersection_integrals EXCLUDE_FROM_ALL ${header} local/bilinear-forms/intersection_integrals.cc) -dune_pybindxi_add_module(_local_bilinear_forms_intersection_interface - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_bilinear_forms_intersection_interface EXCLUDE_FROM_ALL ${header} local/bilinear-forms/intersection_interface.cc) -dune_pybindxi_add_module(_local_bilinear_forms_restricted_coupling_intersection_integrals - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_bilinear_forms_restricted_coupling_intersection_integrals EXCLUDE_FROM_ALL ${header} local/bilinear-forms/restricted_coupling_intersection_integrals.cc) -dune_pybindxi_add_module(_local_bilinear_forms_restricted_intersection_integrals - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_bilinear_forms_restricted_intersection_integrals EXCLUDE_FROM_ALL ${header} local/bilinear-forms/restricted_intersection_integrals.cc) -dune_pybindxi_add_module(_local_functionals_element_integrals - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_functionals_element_integrals EXCLUDE_FROM_ALL ${header} local/functionals/element_integrals.cc) -dune_pybindxi_add_module(_local_functionals_element_interface - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_functionals_element_interface EXCLUDE_FROM_ALL ${header} local/functionals/element_interface.cc) -dune_pybindxi_add_module(_local_functionals_intersection_integrals - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_functionals_intersection_integrals EXCLUDE_FROM_ALL ${header} local/functionals/intersection_integrals.cc) -dune_pybindxi_add_module(_local_functionals_intersection_interface - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_functionals_intersection_interface EXCLUDE_FROM_ALL ${header} local/functionals/intersection_interface.cc) -dune_pybindxi_add_module(_local_functionals_restricted_intersection_integrals - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_functionals_restricted_intersection_integrals EXCLUDE_FROM_ALL ${header} local/functionals/restricted_intersection_integrals.cc) -dune_pybindxi_add_module(_local_integrands_binary_element_interface - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_integrands_binary_element_interface EXCLUDE_FROM_ALL ${header} local/integrands/binary_element_interface.cc) -dune_pybindxi_add_module(_local_integrands_binary_intersection_interface - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_integrands_binary_intersection_interface EXCLUDE_FROM_ALL ${header} local/integrands/binary_intersection_interface.cc) -dune_pybindxi_add_module(_local_integrands_element_product - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_integrands_element_product EXCLUDE_FROM_ALL ${header} local/integrands/element_product.cc) -dune_pybindxi_add_module(_local_integrands_intersection_product - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_integrands_intersection_product EXCLUDE_FROM_ALL ${header} local/integrands/intersection_product.cc) -dune_pybindxi_add_module(_local_integrands_ipdg_boundary_penalty - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_integrands_ipdg_boundary_penalty EXCLUDE_FROM_ALL ${header} local/integrands/ipdg_boundary_penalty.cc) -dune_pybindxi_add_module(_local_integrands_ipdg_inner_penalty - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_integrands_ipdg_inner_penalty EXCLUDE_FROM_ALL ${header} local/integrands/ipdg_inner_penalty.cc) dune_pybindxi_add_module(_local_integrands_jump_boundary EXCLUDE_FROM_ALL ${header} local/integrands/jump_boundary.cc) dune_pybindxi_add_module(_local_integrands_jump_inner EXCLUDE_FROM_ALL ${header} local/integrands/jump_inner.cc) dune_pybindxi_add_module(_local_integrands_laplace EXCLUDE_FROM_ALL ${header} local/integrands/laplace.cc) -dune_pybindxi_add_module(_local_integrands_laplace_ipdg_dirichlet_coupling - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_integrands_laplace_ipdg_dirichlet_coupling EXCLUDE_FROM_ALL ${header} local/integrands/laplace_ipdg_dirichlet_coupling.cc) -dune_pybindxi_add_module(_local_integrands_laplace_ipdg_inner_coupling - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_integrands_laplace_ipdg_inner_coupling EXCLUDE_FROM_ALL ${header} local/integrands/laplace_ipdg_inner_coupling.cc) -dune_pybindxi_add_module(_local_integrands_linear_advection - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_integrands_linear_advection EXCLUDE_FROM_ALL ${header} local/integrands/linear_advection.cc) -dune_pybindxi_add_module(_local_integrands_linear_advection_upwind_dirichlet_coupling - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_integrands_linear_advection_upwind_dirichlet_coupling EXCLUDE_FROM_ALL ${header} local/integrands/linear_advection_upwind_dirichlet_coupling.cc) -dune_pybindxi_add_module(_local_integrands_linear_advection_upwind_inner_coupling - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_integrands_linear_advection_upwind_inner_coupling EXCLUDE_FROM_ALL ${header} local/integrands/linear_advection_upwind_inner_coupling.cc) -dune_pybindxi_add_module(_local_integrands_quaternary_intersection_interface - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_integrands_quaternary_intersection_interface EXCLUDE_FROM_ALL ${header} local/integrands/quaternary_intersection_interface.cc) -dune_pybindxi_add_module(_local_integrands_unary_element_interface - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_integrands_unary_element_interface EXCLUDE_FROM_ALL ${header} local/integrands/unary_element_interface.cc) -dune_pybindxi_add_module(_local_integrands_unary_intersection_interface - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_integrands_unary_intersection_interface EXCLUDE_FROM_ALL ${header} local/integrands/unary_intersection_interface.cc) -dune_pybindxi_add_module(_local_operators_coupling_intersection_indicator - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_operators_coupling_intersection_indicator EXCLUDE_FROM_ALL ${header} local/operators/coupling_intersection_indicator.cc) -dune_pybindxi_add_module(_local_operators_element_indicator - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_operators_element_indicator EXCLUDE_FROM_ALL ${header} local/operators/element_indicator.cc) -dune_pybindxi_add_module(_local_operators_element_interface - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_operators_element_interface EXCLUDE_FROM_ALL ${header} local/operators/element_interface.cc) -dune_pybindxi_add_module(_local_operators_intersection_indicator - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_operators_intersection_indicator EXCLUDE_FROM_ALL ${header} local/operators/intersection_indicator.cc) -dune_pybindxi_add_module(_local_operators_intersection_interface - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_local_operators_intersection_interface EXCLUDE_FROM_ALL ${header} local/operators/intersection_interface.cc) dune_pybindxi_add_module(_operators_bilinear_form EXCLUDE_FROM_ALL ${header} operators/bilinear-form.cc) dune_pybindxi_add_module(_operators_interfaces_common EXCLUDE_FROM_ALL ${header} operators/interfaces_common.cc) @@ -162,9 +96,7 @@ dune_pybindxi_add_module(_operators_interfaces_eigen EXCLUDE_FROM_ALL ${header} dune_pybindxi_add_module(_operators_interfaces_istl_1d EXCLUDE_FROM_ALL ${header} operators/interfaces_istl_1d.cc) dune_pybindxi_add_module(_operators_interfaces_istl_2d EXCLUDE_FROM_ALL ${header} operators/interfaces_istl_2d.cc) dune_pybindxi_add_module(_operators_interfaces_istl_3d EXCLUDE_FROM_ALL ${header} operators/interfaces_istl_3d.cc) -dune_pybindxi_add_module(_operators_laplace_ipdg_flux_reconstruction - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_operators_laplace_ipdg_flux_reconstruction EXCLUDE_FROM_ALL ${header} operators/laplace_ipdg_flux_reconstruction.cc) dune_pybindxi_add_module(_operators_matrix_based_factory EXCLUDE_FROM_ALL ${header} operators/matrix-based_factory.cc) dune_pybindxi_add_module(_operators_operator EXCLUDE_FROM_ALL ${header} operators/operator.cc) @@ -172,9 +104,7 @@ dune_pybindxi_add_module(_prolongations EXCLUDE_FROM_ALL ${header} prolongations dune_pybindxi_add_module(_spaces_h1_continuous_lagrange EXCLUDE_FROM_ALL ${header} spaces/h1/continuous-lagrange.cc) dune_pybindxi_add_module(_spaces_hdiv_raviart_thomas EXCLUDE_FROM_ALL ${header} spaces/hdiv/raviart-thomas.cc) dune_pybindxi_add_module(_spaces_interface EXCLUDE_FROM_ALL ${header} spaces/interface.cc) -dune_pybindxi_add_module(_spaces_l2_discontinuous_lagrange - EXCLUDE_FROM_ALL - ${header} +dune_pybindxi_add_module(_spaces_l2_discontinuous_lagrange EXCLUDE_FROM_ALL ${header} spaces/l2/discontinuous-lagrange.cc) dune_pybindxi_add_module(_spaces_l2_finite_volume EXCLUDE_FROM_ALL ${header} spaces/l2/finite-volume.cc) dune_pybindxi_add_module(_spaces_skeleton_finite_volume EXCLUDE_FROM_ALL ${header} spaces/skeleton/finite-volume.cc)