From: Martin Kronbichler Date: Thu, 7 Jan 2016 12:28:16 +0000 (+0100) Subject: Add instantiations X-Git-Tag: v8.4.0-rc2~109^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e7ed6a15799add5b13efb6fafc0e3051f1b71c1;p=dealii.git Add instantiations --- diff --git a/source/multigrid/mg_level_global_transfer.cc b/source/multigrid/mg_level_global_transfer.cc index 8fec5c832c..884630a0fa 100644 --- a/source/multigrid/mg_level_global_transfer.cc +++ b/source/multigrid/mg_level_global_transfer.cc @@ -312,11 +312,9 @@ void MGLevelGlobalTransfer::clear() { sizes.resize(0); - std::vector > > - empty0, empty1, empty2; - copy_indices.swap(empty0); - copy_indices_global_mine.swap(empty1); - copy_indices_level_mine.swap(empty2); + copy_indices.clear(); + copy_indices_global_mine.clear(); + copy_indices_level_mine.clear(); component_to_block_map.resize(0); mg_constrained_dofs = 0; } @@ -505,11 +503,9 @@ void MGLevelGlobalTransfer >::clear() { sizes.resize(0); - std::vector > > - empty0, empty1, empty2; - copy_indices.swap(empty0); - copy_indices_global_mine.swap(empty1); - copy_indices_level_mine.swap(empty2); + copy_indices.clear(); + copy_indices_global_mine.clear(); + copy_indices_level_mine.clear(); component_to_block_map.resize(0); mg_constrained_dofs = 0; ghosted_global_vector.reinit(0); @@ -567,5 +563,10 @@ MGLevelGlobalTransfer >::memory_consumptio // explicit instantiation #include "mg_level_global_transfer.inst" +// create two additional instantiations currently not supported by the +// automatic template instantiation scheme +template class MGLevelGlobalTransfer >; +template class MGLevelGlobalTransfer >; + DEAL_II_NAMESPACE_CLOSE diff --git a/source/multigrid/mg_level_global_transfer.inst.in b/source/multigrid/mg_level_global_transfer.inst.in index 0437e9425d..8187c87da9 100644 --- a/source/multigrid/mg_level_global_transfer.inst.in +++ b/source/multigrid/mg_level_global_transfer.inst.in @@ -40,17 +40,27 @@ for (deal_II_dimension : DIMENSIONS; V1,V2 : DEAL_II_VEC_TEMPLATES; S1, S2 : REA const MGLevelObject >&) const; } -for (deal_II_dimension : DIMENSIONS; S2 : REAL_SCALARS) +for (deal_II_dimension : DIMENSIONS) + { + template + void MGLevelGlobalTransfer< parallel::distributed::Vector >::fill_and_communicate_copy_indices( + const DoFHandler &mg_dof); + template + void MGLevelGlobalTransfer< parallel::distributed::Vector >::fill_and_communicate_copy_indices( + const DoFHandler &mg_dof); + } + +for (deal_II_dimension : DIMENSIONS; S1, S2 : REAL_SCALARS) { template void - MGLevelGlobalTransfer >::copy_to_mg ( - const DoFHandler&, MGLevelObject >&, const parallel::distributed::Vector&) const; + MGLevelGlobalTransfer >::copy_to_mg ( + const DoFHandler&, MGLevelObject >&, const parallel::distributed::Vector&) const; template void - MGLevelGlobalTransfer >::copy_from_mg (const DoFHandler&, parallel::distributed::Vector&, - const MGLevelObject >&) const; + MGLevelGlobalTransfer >::copy_from_mg (const DoFHandler&, parallel::distributed::Vector&, + const MGLevelObject >&) const; template void - MGLevelGlobalTransfer >::copy_from_mg_add (const DoFHandler&, parallel::distributed::Vector&, - const MGLevelObject >&) const; + MGLevelGlobalTransfer >::copy_from_mg_add (const DoFHandler&, parallel::distributed::Vector&, + const MGLevelObject >&) const; } for(deal_II_dimension : DIMENSIONS)