From 990ed45aaa1ffb0526da0c263f8ad3b1fda209ff Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 5 Nov 2022 11:42:24 -0400 Subject: [PATCH] DoFTools: Remove template on sparsity pattern type. --- include/deal.II/dofs/dof_tools.h | 53 ++--- source/dofs/dof_tools_sparsity.cc | 274 ++++++++++++++----------- source/dofs/dof_tools_sparsity.inst.in | 263 ++++++++++++------------ 3 files changed, 300 insertions(+), 290 deletions(-) diff --git a/include/deal.II/dofs/dof_tools.h b/include/deal.II/dofs/dof_tools.h index 3b0616ed74..56992386fb 100644 --- a/include/deal.II/dofs/dof_tools.h +++ b/include/deal.II/dofs/dof_tools.h @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -55,7 +56,6 @@ template class InterGridMap; template class Mapping; -class SparsityPattern; template class Table; template @@ -405,14 +405,11 @@ namespace DoFTools * * @ingroup constraints */ - template + template void make_sparsity_pattern( const DoFHandler &dof_handler, - SparsityPatternType & sparsity_pattern, + SparsityPatternBase & sparsity_pattern, const AffineConstraints &constraints = AffineConstraints(), const bool keep_constrained_dofs = true, const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id); @@ -482,15 +479,12 @@ namespace DoFTools * * @ingroup constraints */ - template + template void make_sparsity_pattern( const DoFHandler &dof_handler, const Table<2, Coupling> & coupling, - SparsityPatternType & sparsity_pattern, + SparsityPatternBase & sparsity_pattern, const AffineConstraints &constraints = AffineConstraints(), const bool keep_constrained_dofs = true, const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id); @@ -515,11 +509,11 @@ namespace DoFTools * whereas the ones that correspond to columns come from the second * DoFHandler. */ - template + template void make_sparsity_pattern(const DoFHandler &dof_row, const DoFHandler &dof_col, - SparsityPatternType & sparsity); + SparsityPatternBase & sparsity); /** * Compute which entries of a matrix built on the given @p dof_handler may @@ -566,10 +560,10 @@ namespace DoFTools * * @ingroup constraints */ - template + template void make_flux_sparsity_pattern(const DoFHandler &dof_handler, - SparsityPatternType & sparsity_pattern); + SparsityPatternBase & sparsity_pattern); /** * This function does essentially the same as the other @@ -579,14 +573,11 @@ namespace DoFTools * * @ingroup constraints */ - template + template void make_flux_sparsity_pattern( const DoFHandler &dof_handler, - SparsityPatternType & sparsity_pattern, + SparsityPatternBase & sparsity_pattern, const AffineConstraints &constraints, const bool keep_constrained_dofs = true, const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id); @@ -611,11 +602,11 @@ namespace DoFTools * * @ingroup constraints */ - template + template void make_flux_sparsity_pattern( const DoFHandler &dof, - SparsityPatternType & sparsity, + SparsityPatternBase & sparsity, const Table<2, Coupling> & cell_integrals_mask, const Table<2, Coupling> & face_integrals_mask, const types::subdomain_id subdomain_id = numbers::invalid_subdomain_id); @@ -647,14 +638,11 @@ namespace DoFTools * }; * @endcode */ - template + template void make_flux_sparsity_pattern( const DoFHandler &dof, - SparsityPatternType & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints &constraints, const bool keep_constrained_dofs, const Table<2, Coupling> & couplings, @@ -674,12 +662,12 @@ namespace DoFTools * the matrix does not consist of domain integrals, but only of integrals * over the boundary of the domain. */ - template + template void make_boundary_sparsity_pattern( const DoFHandler & dof, const std::vector &dof_to_boundary_mapping, - SparsityPatternType & sparsity_pattern); + SparsityPatternBase & sparsity_pattern); /** * This function is a variation of the previous @@ -698,17 +686,14 @@ namespace DoFTools * map with the boundary indicators you want and set the function pointers to * null pointers). */ - template + template void make_boundary_sparsity_pattern( const DoFHandler &dof, const std::map *> & boundary_ids, const std::vector &dof_to_boundary_mapping, - SparsityPatternType & sparsity); + SparsityPatternBase & sparsity); /** * @} diff --git a/source/dofs/dof_tools_sparsity.cc b/source/dofs/dof_tools_sparsity.cc index 5afba2999f..5f850fd097 100644 --- a/source/dofs/dof_tools_sparsity.cc +++ b/source/dofs/dof_tools_sparsity.cc @@ -54,13 +54,10 @@ DEAL_II_NAMESPACE_OPEN namespace DoFTools { - template + template void make_sparsity_pattern(const DoFHandler &dof, - SparsityPatternType & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints &constraints, const bool keep_constrained_dofs, const types::subdomain_id subdomain_id) @@ -114,14 +111,11 @@ namespace DoFTools - template + template void make_sparsity_pattern(const DoFHandler &dof, const Table<2, Coupling> & couplings, - SparsityPatternType & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints &constraints, const bool keep_constrained_dofs, const types::subdomain_id subdomain_id) @@ -207,11 +201,11 @@ namespace DoFTools - template + template void make_sparsity_pattern(const DoFHandler &dof_row, const DoFHandler &dof_col, - SparsityPatternType & sparsity) + SparsityPatternBase & sparsity) { const types::global_dof_index n_dofs_row = dof_row.n_dofs(); const types::global_dof_index n_dofs_col = dof_col.n_dofs(); @@ -288,9 +282,8 @@ namespace DoFTools cell_row->get_dof_indices(local_dof_indices_row); cell_col->get_dof_indices(local_dof_indices_col); for (unsigned int i = 0; i < dofs_per_cell_row; ++i) - sparsity.add_entries(local_dof_indices_row[i], - local_dof_indices_col.begin(), - local_dof_indices_col.end()); + sparsity.add_row_entries(local_dof_indices_row[i], + make_array_view(local_dof_indices_col)); } else if (cell_row->has_children()) { @@ -314,9 +307,9 @@ namespace DoFTools cell_row_child->get_dof_indices(local_dof_indices_row); cell_col->get_dof_indices(local_dof_indices_col); for (unsigned int r = 0; r < dofs_per_cell_row; ++r) - sparsity.add_entries(local_dof_indices_row[r], - local_dof_indices_col.begin(), - local_dof_indices_col.end()); + sparsity.add_row_entries(local_dof_indices_row[r], + make_array_view( + local_dof_indices_col)); } } else @@ -341,9 +334,9 @@ namespace DoFTools cell_row->get_dof_indices(local_dof_indices_row); cell_col_child->get_dof_indices(local_dof_indices_col); for (unsigned int r = 0; r < dofs_per_cell_row; ++r) - sparsity.add_entries(local_dof_indices_row[r], - local_dof_indices_col.begin(), - local_dof_indices_col.end()); + sparsity.add_row_entries(local_dof_indices_row[r], + make_array_view( + local_dof_indices_col)); } } } @@ -351,12 +344,12 @@ namespace DoFTools - template + template void make_boundary_sparsity_pattern( const DoFHandler & dof, const std::vector &dof_to_boundary_mapping, - SparsityPatternType & sparsity) + SparsityPatternBase & sparsity) { if (dim == 1) { @@ -366,8 +359,10 @@ namespace DoFTools boundary_ids; boundary_ids[0] = nullptr; boundary_ids[1] = nullptr; - make_boundary_sparsity_pattern( - dof, boundary_ids, dof_to_boundary_mapping, sparsity); + make_boundary_sparsity_pattern(dof, + boundary_ids, + dof_to_boundary_mapping, + sparsity); return; } @@ -391,6 +386,15 @@ namespace DoFTools std::vector dofs_on_this_face; dofs_on_this_face.reserve(dof.get_fe_collection().max_dofs_per_face()); + std::vector rows; + std::vector cols; + + auto append_pair = [&](const types::global_dof_index i, + const types::global_dof_index j) { + rows.push_back(i); + cols.push_back(j); + }; + // loop over all faces to check whether they are at a boundary. note // that we need not take special care of single lines (using // @p{cell->has_boundary_lines}), since we do not support boundaries of @@ -409,24 +413,25 @@ namespace DoFTools // make sparsity pattern for this cell for (unsigned int i = 0; i < dofs_per_face; ++i) for (unsigned int j = 0; j < dofs_per_face; ++j) - sparsity.add(dof_to_boundary_mapping[dofs_on_this_face[i]], - dof_to_boundary_mapping[dofs_on_this_face[j]]); + append_pair(dof_to_boundary_mapping[dofs_on_this_face[i]], + dof_to_boundary_mapping[dofs_on_this_face[j]]); + + sparsity.add_entries(make_array_view(rows), make_array_view(cols)); + rows.clear(); + cols.clear(); } } - template + template void make_boundary_sparsity_pattern( const DoFHandler &dof, const std::map *> & boundary_ids, const std::vector &dof_to_boundary_mapping, - SparsityPatternType & sparsity) + SparsityPatternBase & sparsity) { if (dim == 1) { @@ -457,9 +462,9 @@ namespace DoFTools dof_to_boundary_mapping[cell->vertex_dof_index(direction, i)]; for (unsigned int i = 0; i < dofs_per_vertex; ++i) - sparsity.add_entries(boundary_dof_boundary_indices[i], - boundary_dof_boundary_indices.begin(), - boundary_dof_boundary_indices.end()); + sparsity.add_row_entries(boundary_dof_boundary_indices[i], + make_array_view( + boundary_dof_boundary_indices)); } return; } @@ -490,6 +495,16 @@ namespace DoFTools std::vector dofs_on_this_face; dofs_on_this_face.reserve(dof.get_fe_collection().max_dofs_per_face()); + + std::vector rows; + std::vector cols; + + auto append_pair = [&](const types::global_dof_index i, + const types::global_dof_index j) { + rows.push_back(i); + cols.push_back(j); + }; + for (const auto &cell : dof.active_cell_iterators()) for (const unsigned int f : cell->face_indices()) if (boundary_ids.find(cell->face(f)->boundary_id()) != @@ -504,20 +519,21 @@ namespace DoFTools // make sparsity pattern for this cell for (unsigned int i = 0; i < dofs_per_face; ++i) for (unsigned int j = 0; j < dofs_per_face; ++j) - sparsity.add(dof_to_boundary_mapping[dofs_on_this_face[i]], - dof_to_boundary_mapping[dofs_on_this_face[j]]); + append_pair(dof_to_boundary_mapping[dofs_on_this_face[i]], + dof_to_boundary_mapping[dofs_on_this_face[j]]); + + sparsity.add_entries(make_array_view(rows), make_array_view(cols)); + rows.clear(); + cols.clear(); } } - template + template void make_flux_sparsity_pattern(const DoFHandler &dof, - SparsityPatternType & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints &constraints, const bool keep_constrained_dofs, const types::subdomain_id subdomain_id) @@ -683,10 +699,10 @@ namespace DoFTools - template + template void make_flux_sparsity_pattern(const DoFHandler &dof, - SparsityPatternType & sparsity) + SparsityPatternBase & sparsity) { AffineConstraints dummy; make_flux_sparsity_pattern(dof, sparsity, dummy); @@ -755,14 +771,11 @@ namespace DoFTools { // implementation of the same function in namespace DoFTools for // non-hp-DoFHandlers - template + template void make_flux_sparsity_pattern( const DoFHandler &dof, - SparsityPatternType & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints &constraints, const bool keep_constrained_dofs, const Table<2, Coupling> & int_mask, @@ -772,6 +785,15 @@ namespace DoFTools bool(const typename DoFHandler::active_cell_iterator &, const unsigned int)> &face_has_flux_coupling) { + std::vector rows; + std::vector cols; + + auto append_pair = [&](const types::global_dof_index i, + const types::global_dof_index j) { + rows.push_back(i); + cols.push_back(j); + }; + if (dof.has_hp_capabilities() == false) { const FiniteElement &fe = dof.get_fe(); @@ -839,10 +861,14 @@ namespace DoFTools if (flux_dof_mask(i, j) == always || (flux_dof_mask(i, j) == nonzero && i_non_zero_i && j_non_zero_i)) - sparsity.add(dofs_on_this_cell[i], - dofs_on_this_cell[j]); + append_pair(dofs_on_this_cell[i], + dofs_on_this_cell[j]); } } + sparsity.add_entries(make_array_view(rows), + make_array_view(cols)); + rows.clear(); + cols.clear(); } else { @@ -934,16 +960,14 @@ namespace DoFTools if (flux_dof_mask(i, j) == always) { - sparsity.add( + append_pair( dofs_on_this_cell[i], dofs_on_other_cell[j]); - sparsity.add( - dofs_on_other_cell[i], - dofs_on_this_cell[j]); - sparsity.add( - dofs_on_this_cell[i], - dofs_on_this_cell[j]); - sparsity.add( + append_pair(dofs_on_other_cell[i], + dofs_on_this_cell[j]); + append_pair(dofs_on_this_cell[i], + dofs_on_this_cell[j]); + append_pair( dofs_on_other_cell[i], dofs_on_other_cell[j]); } @@ -951,35 +975,33 @@ namespace DoFTools nonzero) { if (i_non_zero_i && j_non_zero_e) - sparsity.add( + append_pair( dofs_on_this_cell[i], dofs_on_other_cell[j]); if (i_non_zero_e && j_non_zero_i) - sparsity.add( + append_pair( dofs_on_other_cell[i], dofs_on_this_cell[j]); if (i_non_zero_i && j_non_zero_i) - sparsity.add( + append_pair( dofs_on_this_cell[i], dofs_on_this_cell[j]); if (i_non_zero_e && j_non_zero_e) - sparsity.add( + append_pair( dofs_on_other_cell[i], dofs_on_other_cell[j]); } if (flux_dof_mask(j, i) == always) { - sparsity.add( + append_pair( dofs_on_this_cell[j], dofs_on_other_cell[i]); - sparsity.add( - dofs_on_other_cell[j], - dofs_on_this_cell[i]); - sparsity.add( - dofs_on_this_cell[j], - dofs_on_this_cell[i]); - sparsity.add( + append_pair(dofs_on_other_cell[j], + dofs_on_this_cell[i]); + append_pair(dofs_on_this_cell[j], + dofs_on_this_cell[i]); + append_pair( dofs_on_other_cell[j], dofs_on_other_cell[i]); } @@ -987,25 +1009,29 @@ namespace DoFTools nonzero) { if (j_non_zero_i && i_non_zero_e) - sparsity.add( + append_pair( dofs_on_this_cell[j], dofs_on_other_cell[i]); if (j_non_zero_e && i_non_zero_i) - sparsity.add( + append_pair( dofs_on_other_cell[j], dofs_on_this_cell[i]); if (j_non_zero_i && i_non_zero_i) - sparsity.add( + append_pair( dofs_on_this_cell[j], dofs_on_this_cell[i]); if (j_non_zero_e && i_non_zero_e) - sparsity.add( + append_pair( dofs_on_other_cell[j], dofs_on_other_cell[i]); } } } } + sparsity.add_entries(make_array_view(rows), + make_array_view(cols)); + rows.clear(); + cols.clear(); } else { @@ -1027,59 +1053,63 @@ namespace DoFTools support_on_face(j, neighbor_face_n); if (flux_dof_mask(i, j) == always) { - sparsity.add(dofs_on_this_cell[i], - dofs_on_other_cell[j]); - sparsity.add(dofs_on_other_cell[i], - dofs_on_this_cell[j]); - sparsity.add(dofs_on_this_cell[i], - dofs_on_this_cell[j]); - sparsity.add(dofs_on_other_cell[i], - dofs_on_other_cell[j]); + append_pair(dofs_on_this_cell[i], + dofs_on_other_cell[j]); + append_pair(dofs_on_other_cell[i], + dofs_on_this_cell[j]); + append_pair(dofs_on_this_cell[i], + dofs_on_this_cell[j]); + append_pair(dofs_on_other_cell[i], + dofs_on_other_cell[j]); } if (flux_dof_mask(i, j) == nonzero) { if (i_non_zero_i && j_non_zero_e) - sparsity.add(dofs_on_this_cell[i], - dofs_on_other_cell[j]); + append_pair(dofs_on_this_cell[i], + dofs_on_other_cell[j]); if (i_non_zero_e && j_non_zero_i) - sparsity.add(dofs_on_other_cell[i], - dofs_on_this_cell[j]); + append_pair(dofs_on_other_cell[i], + dofs_on_this_cell[j]); if (i_non_zero_i && j_non_zero_i) - sparsity.add(dofs_on_this_cell[i], - dofs_on_this_cell[j]); + append_pair(dofs_on_this_cell[i], + dofs_on_this_cell[j]); if (i_non_zero_e && j_non_zero_e) - sparsity.add(dofs_on_other_cell[i], - dofs_on_other_cell[j]); + append_pair(dofs_on_other_cell[i], + dofs_on_other_cell[j]); } if (flux_dof_mask(j, i) == always) { - sparsity.add(dofs_on_this_cell[j], - dofs_on_other_cell[i]); - sparsity.add(dofs_on_other_cell[j], - dofs_on_this_cell[i]); - sparsity.add(dofs_on_this_cell[j], - dofs_on_this_cell[i]); - sparsity.add(dofs_on_other_cell[j], - dofs_on_other_cell[i]); + append_pair(dofs_on_this_cell[j], + dofs_on_other_cell[i]); + append_pair(dofs_on_other_cell[j], + dofs_on_this_cell[i]); + append_pair(dofs_on_this_cell[j], + dofs_on_this_cell[i]); + append_pair(dofs_on_other_cell[j], + dofs_on_other_cell[i]); } if (flux_dof_mask(j, i) == nonzero) { if (j_non_zero_i && i_non_zero_e) - sparsity.add(dofs_on_this_cell[j], - dofs_on_other_cell[i]); + append_pair(dofs_on_this_cell[j], + dofs_on_other_cell[i]); if (j_non_zero_e && i_non_zero_i) - sparsity.add(dofs_on_other_cell[j], - dofs_on_this_cell[i]); + append_pair(dofs_on_other_cell[j], + dofs_on_this_cell[i]); if (j_non_zero_i && i_non_zero_i) - sparsity.add(dofs_on_this_cell[j], - dofs_on_this_cell[i]); + append_pair(dofs_on_this_cell[j], + dofs_on_this_cell[i]); if (j_non_zero_e && i_non_zero_e) - sparsity.add(dofs_on_other_cell[j], - dofs_on_other_cell[i]); + append_pair(dofs_on_other_cell[j], + dofs_on_other_cell[i]); } } } + sparsity.add_entries(make_array_view(rows), + make_array_view(cols)); + rows.clear(); + cols.clear(); } } } @@ -1269,7 +1299,7 @@ namespace DoFTools if ((flux_mask(ii, jj) == always) || (flux_mask(ii, jj) == nonzero)) { - sparsity.add( + append_pair( dofs_on_this_cell[i], dofs_on_other_cell[j]); } @@ -1277,9 +1307,8 @@ namespace DoFTools if ((flux_mask(jj, ii) == always) || (flux_mask(jj, ii) == nonzero)) { - sparsity.add( - dofs_on_other_cell[j], - dofs_on_this_cell[i]); + append_pair(dofs_on_other_cell[j], + dofs_on_this_cell[i]); } } } @@ -1326,21 +1355,25 @@ namespace DoFTools if ((flux_mask(ii, jj) == always) || (flux_mask(ii, jj) == nonzero)) { - sparsity.add(dofs_on_this_cell[i], - dofs_on_other_cell[j]); + append_pair(dofs_on_this_cell[i], + dofs_on_other_cell[j]); } if ((flux_mask(jj, ii) == always) || (flux_mask(jj, ii) == nonzero)) { - sparsity.add(dofs_on_other_cell[j], - dofs_on_this_cell[i]); + append_pair(dofs_on_other_cell[j], + dofs_on_this_cell[i]); } } } } } } + sparsity.add_entries(make_array_view(rows), + make_array_view(cols)); + rows.clear(); + cols.clear(); } } } @@ -1350,10 +1383,10 @@ namespace DoFTools - template + template void make_flux_sparsity_pattern(const DoFHandler &dof, - SparsityPatternType & sparsity, + SparsityPatternBase & sparsity, const Table<2, Coupling> & int_mask, const Table<2, Coupling> & flux_mask, const types::subdomain_id subdomain_id) @@ -1374,14 +1407,11 @@ namespace DoFTools - template + template void make_flux_sparsity_pattern( const DoFHandler &dof, - SparsityPatternType & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints &constraints, const bool keep_constrained_dofs, const Table<2, Coupling> & int_mask, diff --git a/source/dofs/dof_tools_sparsity.inst.in b/source/dofs/dof_tools_sparsity.inst.in index b582874473..3af8f6f1bd 100644 --- a/source/dofs/dof_tools_sparsity.inst.in +++ b/source/dofs/dof_tools_sparsity.inst.in @@ -13,32 +13,29 @@ // // --------------------------------------------------------------------- -for (scalar : REAL_AND_COMPLEX_SCALARS; SP : SPARSITY_PATTERNS; - deal_II_dimension : DIMENSIONS) +for (scalar : REAL_AND_COMPLEX_SCALARS; deal_II_dimension : DIMENSIONS) { template void DoFTools::make_boundary_sparsity_pattern( const DoFHandler & dof, const std::map *> &boundary_ids, const std::vector &dof_to_boundary_mapping, - SP & sparsity); + SparsityPatternBase & sparsity); #if deal_II_dimension < 3 template void DoFTools::make_boundary_sparsity_pattern( const DoFHandler &dof, const std::map *> & boundary_ids, const std::vector &dof_to_boundary_mapping, - SP & sparsity); + SparsityPatternBase & sparsity); #endif @@ -46,121 +43,119 @@ for (scalar : REAL_AND_COMPLEX_SCALARS; SP : SPARSITY_PATTERNS; template void DoFTools::make_boundary_sparsity_pattern( const DoFHandler &dof, const std::map *> & boundary_ids, const std::vector &dof_to_boundary_mapping, - SP & sparsity); + SparsityPatternBase & sparsity); #endif } -for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS; - S : REAL_AND_COMPLEX_SCALARS) +for (deal_II_dimension : DIMENSIONS; S : REAL_AND_COMPLEX_SCALARS) { template void - DoFTools::make_sparsity_pattern( + DoFTools::make_sparsity_pattern( const DoFHandler &dof, - SP & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints &, const bool, const types::subdomain_id); template void - DoFTools::make_sparsity_pattern( + DoFTools::make_sparsity_pattern( const DoFHandler &, const Table<2, Coupling> &, - SP &, + SparsityPatternBase &, const AffineConstraints &, const bool, const types::subdomain_id); - template void DoFTools:: - make_flux_sparsity_pattern( - const DoFHandler &dof, - SP & sparsity, - const AffineConstraints &, - const bool, - const Table<2, Coupling> &, - const Table<2, Coupling> &, - const types::subdomain_id, - const std::function::active_cell_iterator &, - const unsigned int)> &); - - template void DoFTools:: - make_flux_sparsity_pattern( - const DoFHandler &dof, - SP & sparsity, - const AffineConstraints &, - const bool, - const types::subdomain_id); + template void + DoFTools::make_flux_sparsity_pattern( + const DoFHandler &dof, + SparsityPatternBase & sparsity, + const AffineConstraints &, + const bool, + const Table<2, Coupling> &, + const Table<2, Coupling> &, + const types::subdomain_id, + const std::function::active_cell_iterator &, + const unsigned int)> &); + + template void + DoFTools::make_flux_sparsity_pattern( + const DoFHandler &dof, + SparsityPatternBase & sparsity, + const AffineConstraints &, + const bool, + const types::subdomain_id); #if deal_II_dimension < 3 - template void DoFTools:: - make_sparsity_pattern( - const DoFHandler &dof, - SP & sparsity, - const AffineConstraints &, - const bool, - const types::subdomain_id); - - template void DoFTools:: - make_sparsity_pattern( - const DoFHandler &, - const Table<2, Coupling> &, - SP &, - const AffineConstraints &, - const bool, - const types::subdomain_id); - - template void DoFTools:: - make_flux_sparsity_pattern( - const DoFHandler &dof, - SP & sparsity, - const AffineConstraints &, - const bool, - const Table<2, Coupling> &, - const Table<2, Coupling> &, - const types::subdomain_id, - const std::function:: - active_cell_iterator &, - const unsigned int)> &); - - template void DoFTools:: - make_flux_sparsity_pattern( - const DoFHandler &dof, - SP & sparsity, - const AffineConstraints &, - const bool, - const types::subdomain_id); + template void + DoFTools::make_sparsity_pattern( + const DoFHandler &dof, + SparsityPatternBase & sparsity, + const AffineConstraints &, + const bool, + const types::subdomain_id); + + template void + DoFTools::make_sparsity_pattern( + const DoFHandler &, + const Table<2, Coupling> &, + SparsityPatternBase &, + const AffineConstraints &, + const bool, + const types::subdomain_id); + + template void DoFTools::make_flux_sparsity_pattern( + const DoFHandler &dof, + SparsityPatternBase & sparsity, + const AffineConstraints &, + const bool, + const Table<2, Coupling> &, + const Table<2, Coupling> &, + const types::subdomain_id, + const std::function:: + active_cell_iterator &, + const unsigned int)> &); + + template void DoFTools::make_flux_sparsity_pattern( + const DoFHandler &dof, + SparsityPatternBase & sparsity, + const AffineConstraints &, + const bool, + const types::subdomain_id); #endif #if deal_II_dimension == 3 - template void DoFTools::make_sparsity_pattern<1, 3, SP>( + template void DoFTools::make_sparsity_pattern<1, 3>( const DoFHandler<1, 3> &dof, - SP & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints &, const bool, const types::subdomain_id); - template void DoFTools::make_sparsity_pattern<1, 3, SP>( + template void DoFTools::make_sparsity_pattern<1, 3>( const DoFHandler<1, 3> &, const Table<2, Coupling> &, - SP &, + SparsityPatternBase &, const AffineConstraints &, const bool, const types::subdomain_id); - template void DoFTools::make_flux_sparsity_pattern<1, 3, SP>( + template void DoFTools::make_flux_sparsity_pattern<1, 3>( const DoFHandler<1, 3> &dof, - SP & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints &, const bool, const Table<2, Coupling> &, @@ -170,9 +165,9 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS; bool(const typename DoFHandler<1, 3>::active_cell_iterator &, const unsigned int)> &); - template void DoFTools::make_flux_sparsity_pattern<1, 3, SP>( + template void DoFTools::make_flux_sparsity_pattern<1, 3>( const DoFHandler<1, 3> &dof, - SP & sparsity, + SparsityPatternBase & sparsity, const AffineConstraints &, const bool, const types::subdomain_id); @@ -180,81 +175,81 @@ for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS; #endif } -for (SP : SPARSITY_PATTERNS; deal_II_dimension : DIMENSIONS) +for (deal_II_dimension : DIMENSIONS) { template void - DoFTools::make_sparsity_pattern( + DoFTools::make_sparsity_pattern( const DoFHandler &dof_row, const DoFHandler &dof_col, - SP & sparsity); - - template void DoFTools:: - make_boundary_sparsity_pattern( - const DoFHandler &dof, - const std::vector &, - SP &); - - template void DoFTools:: - make_flux_sparsity_pattern( - const DoFHandler &dof, SP &sparsity); - - template void DoFTools:: - make_flux_sparsity_pattern( - const DoFHandler &dof, - SP & sparsity, - const Table<2, Coupling> &, - const Table<2, Coupling> &, - const types::subdomain_id); + SparsityPatternBase & sparsity); + + template void DoFTools::make_boundary_sparsity_pattern( + const DoFHandler &dof, + const std::vector &, + SparsityPatternBase &); + + template void + DoFTools::make_flux_sparsity_pattern( + const DoFHandler &dof, SparsityPatternBase &sparsity); + + template void + DoFTools::make_flux_sparsity_pattern( + const DoFHandler &dof, + SparsityPatternBase & sparsity, + const Table<2, Coupling> &, + const Table<2, Coupling> &, + const types::subdomain_id); #if deal_II_dimension < 3 - template void DoFTools:: - make_flux_sparsity_pattern( - const DoFHandler &dof, - SP & sparsity); - - template void DoFTools:: - make_flux_sparsity_pattern( - const DoFHandler &dof, - SP & sparsity, - const Table<2, Coupling> &, - const Table<2, Coupling> &, - const types::subdomain_id); - - template void DoFTools:: - make_sparsity_pattern( - const DoFHandler &dof_row, - const DoFHandler &dof_col, - SP & sparsity); - - template void DoFTools::make_boundary_sparsity_pattern< - deal_II_dimension, - deal_II_dimension + 1, - SP>(const DoFHandler &dof, - const std::vector &, - SP &); + template void DoFTools::make_flux_sparsity_pattern( + const DoFHandler &dof, + SparsityPatternBase & sparsity); + + template void DoFTools::make_flux_sparsity_pattern( + const DoFHandler &dof, + SparsityPatternBase & sparsity, + const Table<2, Coupling> &, + const Table<2, Coupling> &, + const types::subdomain_id); + + template void + DoFTools::make_sparsity_pattern( + const DoFHandler &dof_row, + const DoFHandler &dof_col, + SparsityPatternBase & sparsity); + + template void + DoFTools::make_boundary_sparsity_pattern( + const DoFHandler &dof, + const std::vector &, + SparsityPatternBase &); #endif #if deal_II_dimension == 3 - template void DoFTools::make_sparsity_pattern<1, 3, SP>( + template void DoFTools::make_sparsity_pattern<1, 3>( const DoFHandler<1, 3> &dof_row, const DoFHandler<1, 3> &dof_col, - SP & sparsity); + SparsityPatternBase & sparsity); - template void DoFTools::make_boundary_sparsity_pattern<1, 3, SP>( + template void DoFTools::make_boundary_sparsity_pattern<1, 3>( const DoFHandler<1, 3> &dof, const std::vector &, - SP &); + SparsityPatternBase &); - template void DoFTools::make_flux_sparsity_pattern<1, 3, SP>( - const DoFHandler<1, 3> &dof, SP &sparsity); + template void DoFTools::make_flux_sparsity_pattern<1, 3>( + const DoFHandler<1, 3> &dof, SparsityPatternBase &sparsity); - template void DoFTools::make_flux_sparsity_pattern<1, 3, SP>( + template void DoFTools::make_flux_sparsity_pattern<1, 3>( const DoFHandler<1, 3> &dof, - SP & sparsity, + SparsityPatternBase & sparsity, const Table<2, Coupling> &, const Table<2, Coupling> &, const types::subdomain_id); -- 2.39.5