diff --git a/include/deal2lkit/parsed_dirichlet_bcs.h b/include/deal2lkit/parsed_dirichlet_bcs.h index eafb6243..ef73e68f 100644 --- a/include/deal2lkit/parsed_dirichlet_bcs.h +++ b/include/deal2lkit/parsed_dirichlet_bcs.h @@ -20,7 +20,27 @@ #include -#include +// old versions of dealii use ConstraintMatrix but the new versions +// have switched to AffineConstraints +#if DEAL_II_VERSION_GTE(9, 1, 0) +# include +#else +# include +namespace dealii +{ + template + struct ConstraintsHelper; + + template <> + struct ConstraintsHelper + { + using type = ConstraintMatrix; + }; + + template + using AffineConstraints = typename ConstraintsHelper::type; +} // namespace dealii +#endif #include diff --git a/include/deal2lkit/parsed_zero_average_constraints.h b/include/deal2lkit/parsed_zero_average_constraints.h index bbf15bf2..db28a646 100644 --- a/include/deal2lkit/parsed_zero_average_constraints.h +++ b/include/deal2lkit/parsed_zero_average_constraints.h @@ -23,7 +23,27 @@ #include -#include +// old versions of dealii use ConstraintMatrix but the new versions +// have switched to AffineConstraints +#if DEAL_II_VERSION_GTE(9, 1, 0) +# include +#else +# include +namespace dealii +{ + template + struct ConstraintsHelper; + + template <> + struct ConstraintsHelper + { + using type = ConstraintMatrix; + }; + + template + using AffineConstraints = typename ConstraintsHelper::type; +} // namespace dealii +#endif #include #include diff --git a/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_05.cc b/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_05.cc index 17928ab1..94d927b5 100644 --- a/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_05.cc +++ b/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_05.cc @@ -32,7 +32,6 @@ #include -#include #include #include diff --git a/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_06.cc b/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_06.cc index bd69aafd..18934d63 100644 --- a/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_06.cc +++ b/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_06.cc @@ -31,7 +31,6 @@ #include -#include #include #include diff --git a/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_07.cc b/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_07.cc index 25420de8..60a32e7c 100644 --- a/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_07.cc +++ b/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_07.cc @@ -32,7 +32,6 @@ #include -#include #include #include diff --git a/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_08.cc b/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_08.cc index 1a281d23..4b91ba59 100644 --- a/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_08.cc +++ b/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_08.cc @@ -33,7 +33,6 @@ #include -#include #include #include diff --git a/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_09.cc b/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_09.cc index 6c7d0c19..41cbcccd 100644 --- a/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_09.cc +++ b/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_09.cc @@ -32,7 +32,6 @@ #include -#include #include #include diff --git a/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_10.cc b/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_10.cc index 9897af8e..c8daa194 100644 --- a/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_10.cc +++ b/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_10.cc @@ -32,7 +32,6 @@ #include -#include #include #include diff --git a/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_11.cc b/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_11.cc index ec2ba171..8c95f034 100644 --- a/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_11.cc +++ b/tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_11.cc @@ -30,7 +30,6 @@ #include -#include #include #include