From ec2c729a84987375e8eef5967f6884f2b6ffb112 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 17 Jan 2023 17:49:55 -0700 Subject: [PATCH] Declare the existence of explicit instantiations. --- include/deal.II/hp/mapping_collection.h | 21 +++++++++++++++++++++ source/hp/mapping_collection.cc | 6 ------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/include/deal.II/hp/mapping_collection.h b/include/deal.II/hp/mapping_collection.h index 17dd12662d..15fb484424 100644 --- a/include/deal.II/hp/mapping_collection.h +++ b/include/deal.II/hp/mapping_collection.h @@ -151,6 +151,7 @@ namespace hp }; + /* --------------- inline functions ------------------- */ template @@ -172,6 +173,26 @@ namespace hp push_back(*p); } + + + template + MappingCollection + StaticMappingQ1::mapping_collection = + MappingCollection(MappingQ1{}); + + +#ifndef DOXYGEN + // Declare the existence of explicit instantiations of the class + // above to avoid certain warnings issues by clang and + // newer (LLVM-based) Intel compilers: + extern template struct StaticMappingQ1<1, 1>; + extern template struct StaticMappingQ1<1, 2>; + extern template struct StaticMappingQ1<1, 3>; + extern template struct StaticMappingQ1<2, 2>; + extern template struct StaticMappingQ1<2, 3>; + extern template struct StaticMappingQ1<3, 3>; +#endif + } // namespace hp diff --git a/source/hp/mapping_collection.cc b/source/hp/mapping_collection.cc index e3d0975240..49647fa51c 100644 --- a/source/hp/mapping_collection.cc +++ b/source/hp/mapping_collection.cc @@ -73,12 +73,6 @@ namespace hp return mapping; } } // namespace - - template - MappingCollection - StaticMappingQ1::mapping_collection = - MappingCollection(get_static_mapping_q1()); - } // namespace hp -- 2.39.5