Skip to content
Snippets Groups Projects
Commit b21f4f41 authored by Tobias Leibner's avatar Tobias Leibner
Browse files

[pre-commit] use config from .vcsetup, apply cmake_format

parent 952388f2
No related branches found
No related tags found
1 merge request!3Add pre-commit hooks, general CI improvements
# 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"]
.vcsetup/pre-commit-config.yaml
\ No newline at end of file
Subproject commit 1efe93b62e36634240af102da555c2b90d937abe
Subproject commit a9ada423332d91cadddfc7ba50ce889ed1758435
......@@ -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)
......
......@@ -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")
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment