From: Martin Kronbichler Date: Thu, 28 Apr 2022 12:49:42 +0000 (+0200) Subject: Instantiate make_periodicity_constraints for all scalar numbers X-Git-Tag: v9.4.0-rc1~298^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95e07aa8acf84abb1509151f2ac390a630682b3b;p=dealii.git Instantiate make_periodicity_constraints for all scalar numbers --- diff --git a/source/dofs/dof_tools_constraints.cc b/source/dofs/dof_tools_constraints.cc index 589d93c0b9..244fc6bf08 100644 --- a/source/dofs/dof_tools_constraints.cc +++ b/source/dofs/dof_tools_constraints.cc @@ -2140,7 +2140,7 @@ namespace DoFTools if (constraints_are_cyclic) { - if (std::abs(cycle_constraint_factor - 1.) > eps) + if (std::abs(cycle_constraint_factor - number(1.)) > eps) affine_constraints.add_line(dof_left); } else @@ -2169,10 +2169,10 @@ namespace DoFTools // just very small due to roundoff. Of course, constraining x2 in // terms of x1 has the same problem. So one chooses x1 = b/a*x2 if // |b|<|a|, and x2 = a/b*x1 if |a|<|b|. - Assert( - std::abs(constraint_factor) < 1e10, - ExcMessage( - "The periodicity constraint is too large. The parameter periodicity_factor might be too large or too small.")); + Assert(std::abs(constraint_factor) < 1e10, + ExcMessage("The periodicity constraint is too large. " + "The parameter periodicity_factor might " + "be too large or too small.")); } } /* for dofs_per_face */ } diff --git a/source/dofs/dof_tools_constraints.inst.in b/source/dofs/dof_tools_constraints.inst.in index f583f5abf3..43ac1d6d71 100644 --- a/source/dofs/dof_tools_constraints.inst.in +++ b/source/dofs/dof_tools_constraints.inst.in @@ -13,7 +13,8 @@ // // --------------------------------------------------------------------- -for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) +for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; + S : REAL_AND_COMPLEX_SCALARS) { #if deal_II_dimension <= deal_II_space_dimension template void DoFTools::make_periodicity_constraints( @@ -21,99 +22,49 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) deal_II_space_dimension>::face_iterator &, const DoFHandler::face_iterator &, - AffineConstraints &, - const ComponentMask &, - bool, - bool, - bool, - const FullMatrix &, - const std::vector &, - const double); - -# ifdef DEAL_II_WITH_COMPLEX_VALUES - template void DoFTools::make_periodicity_constraints( - const DoFHandler::face_iterator &, - const DoFHandler::face_iterator &, - AffineConstraints> &, + AffineConstraints &, const ComponentMask &, bool, bool, bool, const FullMatrix &, const std::vector &, - std::complex); -# endif + const S); #endif } -for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) +for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS; + S : REAL_AND_COMPLEX_SCALARS) { #if deal_II_dimension <= deal_II_space_dimension template void DoFTools::make_periodicity_constraints( - const std::vector::cell_iterator>> - &, - AffineConstraints &, - const ComponentMask &, - const std::vector &, - const double); - -# ifdef DEAL_II_WITH_COMPLEX_VALUES - template void - DoFTools::make_periodicity_constraints>( + S>( const std::vector::cell_iterator>> &, - AffineConstraints> &, + AffineConstraints &, const ComponentMask &, const std::vector &, - const std::complex); -# endif - - template void DoFTools::make_periodicity_constraints( - const DoFHandler &, - const types::boundary_id, - const types::boundary_id, - const unsigned int, - AffineConstraints &, - const ComponentMask &, - const double); + const S); -# ifdef DEAL_II_WITH_COMPLEX_VALUES template void DoFTools::make_periodicity_constraints( const DoFHandler &, const types::boundary_id, const types::boundary_id, const unsigned int, - AffineConstraints> &, - const ComponentMask &, - const std::complex); -# endif - - template void DoFTools::make_periodicity_constraints( - const DoFHandler &, - const types::boundary_id, - const unsigned int, - AffineConstraints &, + AffineConstraints &, const ComponentMask &, - const double); + const S); -# ifdef DEAL_II_WITH_COMPLEX_VALUES template void DoFTools::make_periodicity_constraints( const DoFHandler &, const types::boundary_id, const unsigned int, - AffineConstraints> &, + AffineConstraints &, const ComponentMask &, - const std::complex); -# endif + const S); #endif }