Skip to content

Commit

Permalink
Merge pull request #386 from rezarastak/backward_affine_constraints
Browse files Browse the repository at this point in the history
Make AffineConstraints work with dealii 9.0
  • Loading branch information
luca-heltai authored Aug 9, 2019
2 parents fb01702 + d39068f commit 8e0a96f
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 9 deletions.
22 changes: 21 additions & 1 deletion include/deal2lkit/parsed_dirichlet_bcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,27 @@

#include <deal.II/dofs/dof_handler.h>

#include <deal.II/lac/affine_constraints.h>
// old versions of dealii use ConstraintMatrix but the new versions
// have switched to AffineConstraints<double>
#if DEAL_II_VERSION_GTE(9, 1, 0)
# include <deal.II/lac/affine_constraints.h>
#else
# include <deal.II/lac/constraint_matrix.h>
namespace dealii
{
template <typename Number>
struct ConstraintsHelper;

template <>
struct ConstraintsHelper<double>
{
using type = ConstraintMatrix;
};

template <typename Number>
using AffineConstraints = typename ConstraintsHelper<Number>::type;
} // namespace dealii
#endif

#include <deal.II/numerics/vector_tools.h>

Expand Down
22 changes: 21 additions & 1 deletion include/deal2lkit/parsed_zero_average_constraints.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,27 @@

#include <deal.II/fe/component_mask.h>

#include <deal.II/lac/affine_constraints.h>
// old versions of dealii use ConstraintMatrix but the new versions
// have switched to AffineConstraints<double>
#if DEAL_II_VERSION_GTE(9, 1, 0)
# include <deal.II/lac/affine_constraints.h>
#else
# include <deal.II/lac/constraint_matrix.h>
namespace dealii
{
template <typename Number>
struct ConstraintsHelper;

template <>
struct ConstraintsHelper<double>
{
using type = ConstraintMatrix;
};

template <typename Number>
using AffineConstraints = typename ConstraintsHelper<Number>::type;
} // namespace dealii
#endif

#include <deal2lkit/config.h>
#include <deal2lkit/parameter_acceptor.h>
Expand Down
1 change: 0 additions & 1 deletion tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_05.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

#include <deal.II/grid/grid_generator.h>

#include <deal.II/lac/affine_constraints.h>
#include <deal.II/lac/vector.h>

#include <deal.II/numerics/vector_tools.h>
Expand Down
1 change: 0 additions & 1 deletion tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_06.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

#include <deal.II/grid/grid_generator.h>

#include <deal.II/lac/affine_constraints.h>
#include <deal.II/lac/vector.h>

#include <deal.II/numerics/vector_tools.h>
Expand Down
1 change: 0 additions & 1 deletion tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_07.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

#include <deal.II/grid/grid_generator.h>

#include <deal.II/lac/affine_constraints.h>
#include <deal.II/lac/vector.h>

#include <deal.II/numerics/vector_tools.h>
Expand Down
1 change: 0 additions & 1 deletion tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_08.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

#include <deal.II/grid/grid_generator.h>

#include <deal.II/lac/affine_constraints.h>
#include <deal.II/lac/vector.h>

#include <deal.II/numerics/vector_tools.h>
Expand Down
1 change: 0 additions & 1 deletion tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_09.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

#include <deal.II/grid/grid_generator.h>

#include <deal.II/lac/affine_constraints.h>
#include <deal.II/lac/vector.h>

#include <deal.II/numerics/vector_tools.h>
Expand Down
1 change: 0 additions & 1 deletion tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_10.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

#include <deal.II/grid/grid_generator.h>

#include <deal.II/lac/affine_constraints.h>
#include <deal.II/lac/vector.h>

#include <deal.II/numerics/vector_tools.h>
Expand Down
1 change: 0 additions & 1 deletion tests/parsed_dirichlet_bcs/parsed_dirichlet_bcs_11.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

#include <deal.II/grid/grid_generator.h>

#include <deal.II/lac/affine_constraints.h>
#include <deal.II/lac/vector.h>

#include <deal.II/numerics/vector_tools.h>
Expand Down

0 comments on commit 8e0a96f

Please sign in to comment.