From: Matthias Maier Date: Sat, 26 May 2018 00:52:21 +0000 (-0500) Subject: RCM: Update numerics, part 1: matrix_tools, matrix_creator X-Git-Tag: v9.1.0-rc1~1067^2~21 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fadc24335bd7aeacd8616efd27d23ccefb57c0ad;p=dealii.git RCM: Update numerics, part 1: matrix_tools, matrix_creator - Incompatible change: Change the signature of all mass matrix creator functions to matching number types for matrices and right-hand side. --- diff --git a/include/deal.II/numerics/matrix_creator.templates.h b/include/deal.II/numerics/matrix_creator.templates.h index f291f7dfcc..c6840c8b85 100644 --- a/include/deal.II/numerics/matrix_creator.templates.h +++ b/include/deal.II/numerics/matrix_creator.templates.h @@ -134,15 +134,12 @@ namespace MatrixCreator template struct Scratch { - Scratch( - const ::dealii::hp::FECollection &fe, - const UpdateFlags update_flags, - const Function::real_type> - * coefficient, - const Function * rhs_function, - const ::dealii::hp::QCollection & quadrature, - const ::dealii::hp::MappingCollection &mapping) : + Scratch(const ::dealii::hp::FECollection &fe, + const UpdateFlags update_flags, + const Function * coefficient, + const Function * rhs_function, + const ::dealii::hp::QCollection & quadrature, + const ::dealii::hp::MappingCollection &mapping) : fe_collection(fe), quadrature_collection(quadrature), mapping_collection(mapping), @@ -153,8 +150,7 @@ namespace MatrixCreator coefficient_values(quadrature_collection.max_n_quadrature_points()), coefficient_vector_values( quadrature_collection.max_n_quadrature_points(), - dealii::Vector::real_type>( - fe_collection.n_components())), + dealii::Vector(fe_collection.n_components())), rhs_values(quadrature_collection.max_n_quadrature_points()), rhs_vector_values( quadrature_collection.max_n_quadrature_points(), @@ -196,17 +192,12 @@ namespace MatrixCreator ::dealii::hp::FEValues x_fe_values; - std::vector::real_type> - coefficient_values; - std::vector< - dealii::Vector::real_type>> - coefficient_vector_values; + std::vector coefficient_values; + std::vector> coefficient_vector_values; std::vector rhs_values; std::vector> rhs_vector_values; - const Function::real_type> - * coefficient; + const Function *coefficient; const Function *rhs_function; const UpdateFlags update_flags; @@ -217,10 +208,9 @@ namespace MatrixCreator struct CopyData { std::vector dof_indices; - FullMatrix::real_type> - cell_matrix; - dealii::Vector cell_rhs; - const ConstraintMatrix *constraints; + FullMatrix cell_matrix; + dealii::Vector cell_rhs; + const AffineConstraints * constraints; }; } // namespace AssemblerData @@ -287,10 +277,7 @@ namespace MatrixCreator else { data.coefficient_vector_values.resize( - n_q_points, - dealii::Vector< - typename numbers::NumberTraits::real_type>( - n_components)); + n_q_points, dealii::Vector(n_components)); data.coefficient->vector_value_list( fe_values.get_quadrature_points(), data.coefficient_vector_values); @@ -314,9 +301,8 @@ namespace MatrixCreator if ((n_components == 1) || (fe.system_to_component_index(j).first == component_i)) { - const double *phi_j = &fe_values.shape_value(j, 0); - typename numbers::NumberTraits::real_type add_data = - 0; + const double *phi_j = &fe_values.shape_value(j, 0); + number add_data = 0; if (use_coefficient) { if (data.coefficient->n_components == 1) @@ -363,7 +349,7 @@ namespace MatrixCreator // symmetry again for (unsigned int j = i; j < dofs_per_cell; ++j) { - typename numbers::NumberTraits::real_type add_data = 0; + number add_data = 0; for (unsigned int comp_i = 0; comp_i < n_components; ++comp_i) if (fe.get_nonzero_components(i)[comp_i] && fe.get_nonzero_components(j)[comp_i]) @@ -675,10 +661,8 @@ namespace MatrixCreator std::vector dofs; std::vector> dof_is_on_face; typename DoFHandlerType::active_cell_iterator cell; - std::vector< - FullMatrix::real_type>> - cell_matrix; - std::vector> cell_vector; + std::vector> cell_matrix; + std::vector> cell_vector; }; @@ -711,7 +695,7 @@ namespace MatrixCreator const Quadrature & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix & constraints) + const AffineConstraints & constraints) { Assert(matrix.m() == dof.n_dofs(), ExcDimensionMismatch(matrix.m(), dof.n_dofs())); @@ -767,7 +751,7 @@ namespace MatrixCreator const Quadrature & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix & constraints) + const AffineConstraints & constraints) { create_mass_matrix(StaticMappingQ1::mapping, dof, @@ -781,16 +765,14 @@ namespace MatrixCreator template void - create_mass_matrix( - const Mapping & mapping, - const DoFHandler & dof, - const Quadrature & q, - SparseMatrix::real_type> &matrix, - const Function & rhs, - Vector & rhs_vector, - const Function::real_type> - *const coefficient, - const ConstraintMatrix &constraints) + create_mass_matrix(const Mapping & mapping, + const DoFHandler & dof, + const Quadrature & q, + SparseMatrix & matrix, + const Function & rhs, + Vector & rhs_vector, + const Function *const coefficient, + const AffineConstraints & constraints) { Assert(matrix.m() == dof.n_dofs(), ExcDimensionMismatch(matrix.m(), dof.n_dofs())); @@ -827,10 +809,8 @@ namespace MatrixCreator typename DoFHandler::active_cell_iterator, number>, std::bind( - &MatrixCreator::internal::copy_local_to_global< - number, - SparseMatrix::real_type>, - Vector>, + &MatrixCreator::internal:: + copy_local_to_global, Vector>, std::placeholders::_1, &matrix, &rhs_vector), @@ -842,15 +822,13 @@ namespace MatrixCreator template void - create_mass_matrix( - const DoFHandler & dof, - const Quadrature & q, - SparseMatrix::real_type> &matrix, - const Function & rhs, - Vector & rhs_vector, - const Function::real_type> - *const coefficient, - const ConstraintMatrix &constraints) + create_mass_matrix(const DoFHandler & dof, + const Quadrature & q, + SparseMatrix & matrix, + const Function & rhs, + Vector & rhs_vector, + const Function *const coefficient, + const AffineConstraints & constraints) { create_mass_matrix(StaticMappingQ1::mapping, dof, @@ -871,7 +849,7 @@ namespace MatrixCreator const hp::QCollection & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix & constraints) + const AffineConstraints & constraints) { Assert(matrix.m() == dof.n_dofs(), ExcDimensionMismatch(matrix.m(), dof.n_dofs())); @@ -923,7 +901,7 @@ namespace MatrixCreator const hp::QCollection & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix & constraints) + const AffineConstraints & constraints) { create_mass_matrix(hp::StaticMappingQ1::mapping_collection, dof, @@ -937,16 +915,14 @@ namespace MatrixCreator template void - create_mass_matrix( - const hp::MappingCollection & mapping, - const hp::DoFHandler & dof, - const hp::QCollection & q, - SparseMatrix::real_type> &matrix, - const Function & rhs, - Vector & rhs_vector, - const Function::real_type> - *const coefficient, - const ConstraintMatrix &constraints) + create_mass_matrix(const hp::MappingCollection &mapping, + const hp::DoFHandler & dof, + const hp::QCollection & q, + SparseMatrix & matrix, + const Function & rhs, + Vector & rhs_vector, + const Function *const coefficient, + const AffineConstraints & constraints) { Assert(matrix.m() == dof.n_dofs(), ExcDimensionMismatch(matrix.m(), dof.n_dofs())); @@ -980,10 +956,8 @@ namespace MatrixCreator typename hp::DoFHandler::active_cell_iterator, number>, std::bind( - &MatrixCreator::internal::copy_local_to_global< - number, - SparseMatrix::real_type>, - Vector>, + &MatrixCreator::internal:: + copy_local_to_global, Vector>, std::placeholders::_1, &matrix, &rhs_vector), @@ -995,15 +969,13 @@ namespace MatrixCreator template void - create_mass_matrix( - const hp::DoFHandler & dof, - const hp::QCollection & q, - SparseMatrix::real_type> &matrix, - const Function & rhs, - Vector & rhs_vector, - const Function::real_type> - *const coefficient, - const ConstraintMatrix &constraints) + create_mass_matrix(const hp::DoFHandler & dof, + const hp::QCollection & q, + SparseMatrix & matrix, + const Function & rhs, + Vector & rhs_vector, + const Function *const coefficient, + const AffineConstraints & constraints) { create_mass_matrix(hp::StaticMappingQ1::mapping_collection, dof, @@ -1029,11 +1001,9 @@ namespace MatrixCreator FiniteElement const & fe, Quadrature const & q, std::map *> const - &boundary_functions, - Function::real_type> const - *const coefficient, - std::vector const &component_mapping) + & boundary_functions, + Function const *const coefficient, + std::vector const & component_mapping) { // Most assertions for this function are in the calling function @@ -1056,13 +1026,9 @@ namespace MatrixCreator // two variables for the coefficient, one for the two cases // indicated in the name - std::vector::real_type> - coefficient_values(fe_values.n_quadrature_points, 1.); - std::vector::real_type>> - coefficient_vector_values( - fe_values.n_quadrature_points, - Vector::real_type>( - n_components)); + std::vector coefficient_values(fe_values.n_quadrature_points, 1.); + std::vector> coefficient_vector_values( + fe_values.n_quadrature_points, Vector(n_components)); const bool coefficient_is_vector = (coefficient != nullptr && coefficient->n_components != 1); @@ -1267,8 +1233,8 @@ namespace MatrixCreator std::map *> const & boundary_functions, std::vector const &dof_to_boundary_mapping, - SparseMatrix::real_type> &matrix, - Vector &rhs_vector) + SparseMatrix & matrix, + Vector & rhs_vector) { // now transfer cell matrix and vector to the whole boundary matrix // @@ -1377,17 +1343,16 @@ namespace MatrixCreator template void create_boundary_mass_matrix( - const Mapping & mapping, - const DoFHandler & dof, - const Quadrature & q, - SparseMatrix::real_type> &matrix, + const Mapping & mapping, + const DoFHandler &dof, + const Quadrature & q, + SparseMatrix & matrix, const std::map *> - & boundary_functions, - Vector & rhs_vector, - std::vector &dof_to_boundary_mapping, - const Function::real_type> - *const coefficient, - std::vector component_mapping) + & boundary_functions, + Vector & rhs_vector, + std::vector & dof_to_boundary_mapping, + const Function *const coefficient, + std::vector component_mapping) { // what would that be in 1d? the // identity matrix on the boundary @@ -1473,11 +1438,9 @@ namespace MatrixCreator hp::FECollection const & fe_collection, hp::QCollection const & q, const std::map *> - &boundary_functions, - Function::real_type> const - *const coefficient, - std::vector const &component_mapping) + & boundary_functions, + Function const *const coefficient, + std::vector const & component_mapping) { const unsigned int n_components = fe_collection.n_components(); const unsigned int n_function_components = @@ -1502,10 +1465,8 @@ namespace MatrixCreator // two variables for the coefficient, // one for the two cases indicated in // the name - std::vector::real_type> - coefficient_values; - std::vector::real_type>> - coefficient_vector_values; + std::vector coefficient_values; + std::vector> coefficient_vector_values; const bool coefficient_is_vector = (coefficient != nullptr && coefficient->n_components != 1); @@ -1545,10 +1506,8 @@ namespace MatrixCreator if (fe_is_system) // FE has several components { - coefficient_vector_values.resize( - fe_values.n_quadrature_points, - Vector::real_type>( - n_components)); + coefficient_vector_values.resize(fe_values.n_quadrature_points, + Vector(n_components)); coefficient_values.resize(fe_values.n_quadrature_points, 1.); rhs_values_system.resize(fe_values.n_quadrature_points, @@ -1729,8 +1688,8 @@ namespace MatrixCreator std::map *> const & boundary_functions, std::vector const &dof_to_boundary_mapping, - SparseMatrix::real_type> &matrix, - Vector &rhs_vector) + SparseMatrix & matrix, + Vector & rhs_vector) { // now transfer cell matrix and vector to the whole boundary matrix // @@ -1830,15 +1789,14 @@ namespace MatrixCreator template void create_boundary_mass_matrix( - const DoFHandler & dof, - const Quadrature & q, - SparseMatrix::real_type> &matrix, + const DoFHandler &dof, + const Quadrature & q, + SparseMatrix & matrix, const std::map *> &rhs, - Vector & rhs_vector, - std::vector &dof_to_boundary_mapping, - const Function::real_type> - *const a, - std::vector component_mapping) + Vector & rhs_vector, + std::vector & dof_to_boundary_mapping, + const Function *const a, + std::vector component_mapping) { create_boundary_mass_matrix(StaticMappingQ1::mapping, dof, @@ -1856,17 +1814,16 @@ namespace MatrixCreator template void create_boundary_mass_matrix( - const hp::MappingCollection & mapping, - const hp::DoFHandler & dof, - const hp::QCollection & q, - SparseMatrix::real_type> &matrix, + const hp::MappingCollection &mapping, + const hp::DoFHandler & dof, + const hp::QCollection & q, + SparseMatrix & matrix, const std::map *> - & boundary_functions, - Vector & rhs_vector, - std::vector &dof_to_boundary_mapping, - const Function::real_type> - *const coefficient, - std::vector component_mapping) + & boundary_functions, + Vector & rhs_vector, + std::vector & dof_to_boundary_mapping, + const Function *const coefficient, + std::vector component_mapping) { // what would that be in 1d? the // identity matrix on the boundary @@ -1942,15 +1899,14 @@ namespace MatrixCreator template void create_boundary_mass_matrix( - const hp::DoFHandler & dof, - const hp::QCollection & q, - SparseMatrix::real_type> &matrix, + const hp::DoFHandler &dof, + const hp::QCollection & q, + SparseMatrix & matrix, const std::map *> &rhs, - Vector & rhs_vector, - std::vector &dof_to_boundary_mapping, - const Function::real_type> - *const a, - std::vector component_mapping) + Vector & rhs_vector, + std::vector & dof_to_boundary_mapping, + const Function *const a, + std::vector component_mapping) { create_boundary_mass_matrix( hp::StaticMappingQ1::mapping_collection, @@ -1973,7 +1929,7 @@ namespace MatrixCreator const Quadrature & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix & constraints) + const AffineConstraints &constraints) { Assert(matrix.m() == dof.n_dofs(), ExcDimensionMismatch(matrix.m(), dof.n_dofs())); @@ -2027,7 +1983,7 @@ namespace MatrixCreator const Quadrature & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix & constraints) + const AffineConstraints &constraints) { create_laplace_matrix(StaticMappingQ1::mapping, dof, @@ -2048,7 +2004,7 @@ namespace MatrixCreator const Function & rhs, Vector & rhs_vector, const Function *const coefficient, - const ConstraintMatrix & constraints) + const AffineConstraints &constraints) { Assert(matrix.m() == dof.n_dofs(), ExcDimensionMismatch(matrix.m(), dof.n_dofs())); @@ -2103,7 +2059,7 @@ namespace MatrixCreator const Function & rhs, Vector & rhs_vector, const Function *const coefficient, - const ConstraintMatrix & constraints) + const AffineConstraints &constraints) { create_laplace_matrix(StaticMappingQ1::mapping, dof, @@ -2124,7 +2080,7 @@ namespace MatrixCreator const hp::QCollection & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix & constraints) + const AffineConstraints & constraints) { Assert(matrix.m() == dof.n_dofs(), ExcDimensionMismatch(matrix.m(), dof.n_dofs())); @@ -2175,7 +2131,7 @@ namespace MatrixCreator const hp::QCollection & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix & constraints) + const AffineConstraints & constraints) { create_laplace_matrix( hp::StaticMappingQ1::mapping_collection, @@ -2197,7 +2153,7 @@ namespace MatrixCreator const Function & rhs, Vector & rhs_vector, const Function *const coefficient, - const ConstraintMatrix & constraints) + const AffineConstraints & constraints) { Assert(matrix.m() == dof.n_dofs(), ExcDimensionMismatch(matrix.m(), dof.n_dofs())); @@ -2249,7 +2205,7 @@ namespace MatrixCreator const Function & rhs, Vector & rhs_vector, const Function *const coefficient, - const ConstraintMatrix & constraints) + const AffineConstraints & constraints) { create_laplace_matrix( hp::StaticMappingQ1::mapping_collection, diff --git a/include/deal.II/numerics/matrix_tools.h b/include/deal.II/numerics/matrix_tools.h index 9a6199337c..44f6d70892 100644 --- a/include/deal.II/numerics/matrix_tools.h +++ b/include/deal.II/numerics/matrix_tools.h @@ -25,7 +25,7 @@ #include -#include +#include #include @@ -126,13 +126,13 @@ namespace TrilinosWrappers * hanging nodes are not eliminated. The reason is that you may want to add * several matrices and could then condense afterwards only once, instead of * for every matrix. To actually do computations with these matrices, you have - * to condense the matrix using the ConstraintMatrix::condense function; you + * to condense the matrix using the AffineConstraints::condense function; you * also have to condense the right hand side accordingly and distribute the * solution afterwards. Alternatively, you can give an optional argument - * ConstraintMatrix that writes cell matrix (and vector) entries with + * AffineConstraints that writes cell matrix (and vector) entries with * distribute_local_to_global into the global matrix and vector. This way, - * adding several matrices from different sources is more complicated and you - * should make sure that you do not mix different ways of applying + * adding several matrices from different sources is more complicated and + * you should make sure that you do not mix different ways of applying * constraints. Particular caution is necessary when the given constraint * matrix contains inhomogeneous constraints: In that case, the matrix * assembled this way must be the only matrix (or you need to assemble the @@ -252,12 +252,13 @@ namespace MatrixCreator */ template void - create_mass_matrix(const Mapping & mapping, - const DoFHandler & dof, - const Quadrature & q, - SparseMatrix & matrix, - const Function *const a = nullptr, - const ConstraintMatrix &constraints = ConstraintMatrix()); + create_mass_matrix( + const Mapping & mapping, + const DoFHandler & dof, + const Quadrature & q, + SparseMatrix & matrix, + const Function *const a = nullptr, + const AffineConstraints &constraints = AffineConstraints()); /** * Call the create_mass_matrix() function, see above, with @@ -265,11 +266,12 @@ namespace MatrixCreator */ template void - create_mass_matrix(const DoFHandler & dof, - const Quadrature & q, - SparseMatrix & matrix, - const Function *const a = nullptr, - const ConstraintMatrix &constraints = ConstraintMatrix()); + create_mass_matrix( + const DoFHandler & dof, + const Quadrature & q, + SparseMatrix & matrix, + const Function *const a = nullptr, + const AffineConstraints &constraints = AffineConstraints()); /** * Assemble the mass matrix and a right hand side vector. If no coefficient @@ -293,15 +295,14 @@ namespace MatrixCreator template void create_mass_matrix( - const Mapping & mapping, - const DoFHandler & dof, - const Quadrature & q, - SparseMatrix::real_type> &matrix, - const Function & rhs, - Vector & rhs_vector, - const Function::real_type> - *const a = nullptr, - const ConstraintMatrix &constraints = ConstraintMatrix()); + const Mapping & mapping, + const DoFHandler & dof, + const Quadrature & q, + SparseMatrix & matrix, + const Function & rhs, + Vector & rhs_vector, + const Function *const a = nullptr, + const AffineConstraints &constraints = AffineConstraints()); /** * Call the create_mass_matrix() function, see above, with @@ -310,37 +311,38 @@ namespace MatrixCreator template void create_mass_matrix( - const DoFHandler & dof, - const Quadrature & q, - SparseMatrix::real_type> &matrix, - const Function & rhs, - Vector & rhs_vector, - const Function::real_type> - *const a = nullptr, - const ConstraintMatrix &constraints = ConstraintMatrix()); + const DoFHandler & dof, + const Quadrature & q, + SparseMatrix & matrix, + const Function & rhs, + Vector & rhs_vector, + const Function *const a = nullptr, + const AffineConstraints &constraints = AffineConstraints()); /** * Same function as above, but for hp objects. */ template void - create_mass_matrix(const hp::MappingCollection &mapping, - const hp::DoFHandler & dof, - const hp::QCollection & q, - SparseMatrix & matrix, - const Function *const a = nullptr, - const ConstraintMatrix &constraints = ConstraintMatrix()); + create_mass_matrix( + const hp::MappingCollection &mapping, + const hp::DoFHandler & dof, + const hp::QCollection & q, + SparseMatrix & matrix, + const Function *const a = nullptr, + const AffineConstraints &constraints = AffineConstraints()); /** * Same function as above, but for hp objects. */ template void - create_mass_matrix(const hp::DoFHandler & dof, - const hp::QCollection & q, - SparseMatrix & matrix, - const Function *const a = nullptr, - const ConstraintMatrix &constraints = ConstraintMatrix()); + create_mass_matrix( + const hp::DoFHandler & dof, + const hp::QCollection & q, + SparseMatrix & matrix, + const Function *const a = nullptr, + const AffineConstraints &constraints = AffineConstraints()); /** * Same function as above, but for hp objects. @@ -348,15 +350,14 @@ namespace MatrixCreator template void create_mass_matrix( - const hp::MappingCollection & mapping, - const hp::DoFHandler & dof, - const hp::QCollection & q, - SparseMatrix::real_type> &matrix, - const Function & rhs, - Vector & rhs_vector, - const Function::real_type> - *const a = nullptr, - const ConstraintMatrix &constraints = ConstraintMatrix()); + const hp::MappingCollection &mapping, + const hp::DoFHandler & dof, + const hp::QCollection & q, + SparseMatrix & matrix, + const Function & rhs, + Vector & rhs_vector, + const Function *const a = nullptr, + const AffineConstraints &constraints = AffineConstraints()); /** * Same function as above, but for hp objects. @@ -364,14 +365,13 @@ namespace MatrixCreator template void create_mass_matrix( - const hp::DoFHandler & dof, - const hp::QCollection & q, - SparseMatrix::real_type> &matrix, - const Function & rhs, - Vector & rhs_vector, - const Function::real_type> - *const a = nullptr, - const ConstraintMatrix &constraints = ConstraintMatrix()); + const hp::DoFHandler & dof, + const hp::QCollection & q, + SparseMatrix & matrix, + const Function & rhs, + Vector & rhs_vector, + const Function *const a = nullptr, + const AffineConstraints &constraints = AffineConstraints()); /** @@ -402,16 +402,15 @@ namespace MatrixCreator template void create_boundary_mass_matrix( - const Mapping & mapping, - const DoFHandler & dof, - const Quadrature & q, - SparseMatrix::real_type> &matrix, + const Mapping & mapping, + const DoFHandler &dof, + const Quadrature & q, + SparseMatrix & matrix, const std::map *> - & boundary_functions, - Vector & rhs_vector, - std::vector &dof_to_boundary_mapping, - const Function::real_type> - *const weight = 0, + & boundary_functions, + Vector & rhs_vector, + std::vector & dof_to_boundary_mapping, + const Function *const weight = 0, std::vector component_mapping = std::vector()); @@ -422,15 +421,14 @@ namespace MatrixCreator template void create_boundary_mass_matrix( - const DoFHandler & dof, - const Quadrature & q, - SparseMatrix::real_type> &matrix, + const DoFHandler &dof, + const Quadrature & q, + SparseMatrix & matrix, const std::map *> - & boundary_functions, - Vector & rhs_vector, - std::vector &dof_to_boundary_mapping, - const Function::real_type> - *const a = nullptr, + & boundary_functions, + Vector & rhs_vector, + std::vector & dof_to_boundary_mapping, + const Function *const a = nullptr, std::vector component_mapping = std::vector()); /** @@ -439,16 +437,15 @@ namespace MatrixCreator template void create_boundary_mass_matrix( - const hp::MappingCollection & mapping, - const hp::DoFHandler & dof, - const hp::QCollection & q, - SparseMatrix::real_type> &matrix, + const hp::MappingCollection &mapping, + const hp::DoFHandler & dof, + const hp::QCollection & q, + SparseMatrix & matrix, const std::map *> - & boundary_functions, - Vector & rhs_vector, - std::vector &dof_to_boundary_mapping, - const Function::real_type> - *const a = nullptr, + & boundary_functions, + Vector & rhs_vector, + std::vector & dof_to_boundary_mapping, + const Function *const a = nullptr, std::vector component_mapping = std::vector()); /** @@ -457,15 +454,14 @@ namespace MatrixCreator template void create_boundary_mass_matrix( - const hp::DoFHandler & dof, - const hp::QCollection & q, - SparseMatrix::real_type> &matrix, + const hp::DoFHandler &dof, + const hp::QCollection & q, + SparseMatrix & matrix, const std::map *> - & boundary_functions, - Vector & rhs_vector, - std::vector &dof_to_boundary_mapping, - const Function::real_type> - *const a = nullptr, + & boundary_functions, + Vector & rhs_vector, + std::vector & dof_to_boundary_mapping, + const Function *const a = nullptr, std::vector component_mapping = std::vector()); /** @@ -495,7 +491,7 @@ namespace MatrixCreator const Quadrature & q, SparseMatrix & matrix, const Function *const a = nullptr, - const ConstraintMatrix & constraints = ConstraintMatrix()); + const AffineConstraints &constraints = AffineConstraints()); /** * Call the create_laplace_matrix() function, see above, with @@ -508,7 +504,7 @@ namespace MatrixCreator const Quadrature & q, SparseMatrix & matrix, const Function *const a = nullptr, - const ConstraintMatrix & constraints = ConstraintMatrix()); + const AffineConstraints &constraints = AffineConstraints()); /** * Assemble the Laplace matrix and a right hand side vector. If no @@ -538,7 +534,7 @@ namespace MatrixCreator const Function & rhs, Vector & rhs_vector, const Function *const a = nullptr, - const ConstraintMatrix & constraints = ConstraintMatrix()); + const AffineConstraints &constraints = AffineConstraints()); /** * Call the create_laplace_matrix() function, see above, with @@ -553,7 +549,7 @@ namespace MatrixCreator const Function & rhs, Vector & rhs_vector, const Function *const a = nullptr, - const ConstraintMatrix & constraints = ConstraintMatrix()); + const AffineConstraints &constraints = AffineConstraints()); /** * Like the functions above, but for hp dof handlers, mappings, and @@ -567,7 +563,7 @@ namespace MatrixCreator const hp::QCollection & q, SparseMatrix & matrix, const Function *const a = nullptr, - const ConstraintMatrix &constraints = ConstraintMatrix()); + const AffineConstraints &constraints = AffineConstraints()); /** * Like the functions above, but for hp dof handlers, mappings, and @@ -579,8 +575,8 @@ namespace MatrixCreator const hp::DoFHandler &dof, const hp::QCollection & q, SparseMatrix & matrix, - const Function *const a = nullptr, - const ConstraintMatrix & constraints = ConstraintMatrix()); + const Function *const a = nullptr, + const AffineConstraints &constraints = AffineConstraints()); /** * Like the functions above, but for hp dof handlers, mappings, and @@ -596,7 +592,7 @@ namespace MatrixCreator const Function & rhs, Vector & rhs_vector, const Function *const a = nullptr, - const ConstraintMatrix &constraints = ConstraintMatrix()); + const AffineConstraints &constraints = AffineConstraints()); /** * Like the functions above, but for hp dof handlers, mappings, and @@ -610,8 +606,8 @@ namespace MatrixCreator SparseMatrix & matrix, const Function & rhs, Vector & rhs_vector, - const Function *const a = nullptr, - const ConstraintMatrix & constraints = ConstraintMatrix()); + const Function *const a = nullptr, + const AffineConstraints &constraints = AffineConstraints()); /** * Exception diff --git a/source/numerics/matrix_creator.inst.in b/source/numerics/matrix_creator.inst.in index 2a44491a1a..1a46dd9cc7 100644 --- a/source/numerics/matrix_creator.inst.in +++ b/source/numerics/matrix_creator.inst.in @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2010 - 2017 by the deal.II authors +// Copyright (C) 2010 - 2018 by the deal.II authors // // This file is part of the deal.II library. // @@ -29,14 +29,14 @@ for (scalar : REAL_SCALARS; deal_II_dimension : DIMENSIONS; const Quadrature & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix & constraints); + const AffineConstraints & constraints); template void MatrixCreator:: create_mass_matrix( const DoFHandler &dof, const Quadrature & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix & constraints); + const AffineConstraints & constraints); // hp versions of functions template void MatrixCreator:: @@ -47,7 +47,7 @@ for (scalar : REAL_SCALARS; deal_II_dimension : DIMENSIONS; const hp::QCollection & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix & constraints); + const AffineConstraints & constraints); template void MatrixCreator:: create_mass_matrix( @@ -55,7 +55,7 @@ for (scalar : REAL_SCALARS; deal_II_dimension : DIMENSIONS; const hp::QCollection & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix & constraints); + const AffineConstraints & constraints); #endif } @@ -72,24 +72,20 @@ for (scalar : REAL_AND_COMPLEX_SCALARS; deal_II_dimension : DIMENSIONS; const Mapping & mapping, const DoFHandler &dof, const Quadrature & q, - SparseMatrix::real_type> & matrix, + SparseMatrix & matrix, const Function & rhs, - Vector &rhs_vector, - const Function::real_type> - *const coefficient, - const ConstraintMatrix &constraints); + Vector & rhs_vector, + const Function *const coefficient, + const AffineConstraints & constraints); template void MatrixCreator:: create_mass_matrix( const DoFHandler &dof, const Quadrature & q, - SparseMatrix::real_type> & matrix, + SparseMatrix & matrix, const Function & rhs, - Vector &rhs_vector, - const Function::real_type> - *const coefficient, - const ConstraintMatrix &constraints); + Vector & rhs_vector, + const Function *const coefficient, + const AffineConstraints & constraints); // hp version template void MatrixCreator:: @@ -98,25 +94,21 @@ for (scalar : REAL_AND_COMPLEX_SCALARS; deal_II_dimension : DIMENSIONS; &mapping, const hp::DoFHandler &dof, const hp::QCollection & q, - SparseMatrix::real_type> &matrix, - const Function & rhs, - Vector & rhs_vector, - const Function::real_type> - *const coefficient, - const ConstraintMatrix &constraints); + SparseMatrix & matrix, + const Function & rhs, + Vector & rhs_vector, + const Function *const coefficient, + const AffineConstraints & constraints); template void MatrixCreator:: create_mass_matrix( const hp::DoFHandler &dof, const hp::QCollection & q, - SparseMatrix::real_type> &matrix, - const Function & rhs, - Vector & rhs_vector, - const Function::real_type> - *const coefficient, - const ConstraintMatrix &constraints); + SparseMatrix & matrix, + const Function & rhs, + Vector & rhs_vector, + const Function *const coefficient, + const AffineConstraints & constraints); #endif } @@ -131,13 +123,12 @@ for (scalar : REAL_AND_COMPLEX_SCALARS; deal_II_dimension : DIMENSIONS; scalar>( const DoFHandler & dof, const Quadrature & q, - SparseMatrix::real_type> & matrix, + SparseMatrix & matrix, const std::map *> &rhs, Vector & rhs_vector, std::vector &dof_to_boundary_mapping, - const Function::real_type> *const a, + const Function *const a, std::vector); template void @@ -147,13 +138,12 @@ for (scalar : REAL_AND_COMPLEX_SCALARS; deal_II_dimension : DIMENSIONS; const Mapping &, const DoFHandler & dof, const Quadrature & q, - SparseMatrix::real_type> & matrix, + SparseMatrix & matrix, const std::map *> &rhs, Vector & rhs_vector, std::vector &dof_to_boundary_mapping, - const Function::real_type> *const a, + const Function *const a, std::vector); template void @@ -163,13 +153,12 @@ for (scalar : REAL_AND_COMPLEX_SCALARS; deal_II_dimension : DIMENSIONS; const hp::MappingCollection &, const hp::DoFHandler &, const hp::QCollection &, - SparseMatrix::real_type> &, + SparseMatrix &, const std::map *> &, Vector &, std::vector &, - const Function::real_type> *const, + const Function *const, std::vector); template void @@ -178,13 +167,12 @@ for (scalar : REAL_AND_COMPLEX_SCALARS; deal_II_dimension : DIMENSIONS; scalar>( const hp::DoFHandler &, const hp::QCollection &, - SparseMatrix::real_type> &, + SparseMatrix &, const std::map *> &, Vector &, std::vector &, - const Function::real_type> *const, + const Function *const, std::vector); #endif } @@ -201,14 +189,14 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) const Quadrature & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix & constraints); + const AffineConstraints & constraints); template void MatrixCreator::create_laplace_matrix( const Mapping & mapping, const DoFHandler & dof, const Quadrature & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix & constraints); + const AffineConstraints & constraints); template void MatrixCreator::create_laplace_matrix( const Mapping & mapping, const DoFHandler & dof, @@ -217,7 +205,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) const Function & rhs, Vector & rhs_vector, const Function *const coefficient, - const ConstraintMatrix & constraints); + const AffineConstraints & constraints); template void MatrixCreator::create_laplace_matrix( const DoFHandler & dof, const Quadrature & q, @@ -225,7 +213,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) const Function & rhs, Vector & rhs_vector, const Function *const coefficient, - const ConstraintMatrix & constraints); + const AffineConstraints & constraints); // hp versions of create_laplace_matrix template void MatrixCreator::create_laplace_matrix( @@ -233,14 +221,14 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) const hp::QCollection &q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix & constraints); + const AffineConstraints & constraints); template void MatrixCreator::create_laplace_matrix( const hp::MappingCollection &mapping, const hp::DoFHandler & dof, const hp::QCollection & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix & constraints); + const AffineConstraints & constraints); template void MatrixCreator::create_laplace_matrix( const hp::MappingCollection &mapping, const hp::DoFHandler & dof, @@ -249,7 +237,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) const Function & rhs, Vector & rhs_vector, const Function *const coefficient, - const ConstraintMatrix & constraints); + const AffineConstraints & constraints); template void MatrixCreator::create_laplace_matrix( const hp::DoFHandler & dof, const hp::QCollection &q, @@ -257,7 +245,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) const Function & rhs, Vector & rhs_vector, const Function *const coefficient, - const ConstraintMatrix & constraints); + const AffineConstraints & constraints); #endif } @@ -273,14 +261,14 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) const Quadrature & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix &constraints); + const AffineConstraints &constraints); template void MatrixCreator::create_laplace_matrix( const DoFHandler &dof, const Quadrature & q, SparseMatrix & matrix, const Function *const coefficient, - const ConstraintMatrix &constraints); + const AffineConstraints &constraints); template void MatrixCreator::create_laplace_matrix( const Mapping & mapping, @@ -290,7 +278,7 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) const Function & rhs, Vector & rhs_vector, const Function *const coefficient, - const ConstraintMatrix &constraints); + const AffineConstraints &constraints); template void MatrixCreator::create_laplace_matrix( const DoFHandler &dof, @@ -299,6 +287,6 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) const Function & rhs, Vector & rhs_vector, const Function *const coefficient, - const ConstraintMatrix &constraints); + const AffineConstraints &constraints); #endif }