#
enable_if_supported(DEAL_II_CXX_FLAGS "-Wno-unsupported-friend")
- #
- # Disable a diagnostic that warns about potentially uninstantiated static
- # members. This leads to a ton of false positives.
- #
- enable_if_supported(DEAL_II_CXX_FLAGS "-Wno-undefined-var-template")
-
#
# Clang versions prior to 3.6 emit a lot of false positives wrt
# "-Wunused-function". Also suppress warnings for Xcode older than 6.3
/** @} */
+template <int dim, int spacedim>
+MappingQ<dim, spacedim> StaticMappingQ1<dim, spacedim>::mapping =
+ MappingQ1<dim, spacedim>{};
DEAL_II_NAMESPACE_CLOSE
#include <deal.II/fe/fe.h>
#include <deal.II/fe/mapping.h>
+#include <deal.II/fe/mapping_q1.h>
#include <deal.II/hp/collection.h>
push_back(*p);
}
+
+
+ template <int dim, int spacedim>
+ MappingCollection<dim, spacedim>
+ StaticMappingQ1<dim, spacedim>::mapping_collection =
+ MappingCollection<dim, spacedim>(MappingQ1<dim, spacedim>{});
+
} // namespace hp
return std::make_unique<MappingQ1<dim, spacedim>>(*this);
}
-//---------------------------------------------------------------------------
-
-
-template <int dim, int spacedim>
-MappingQ<dim, spacedim>
- StaticMappingQ1<dim, spacedim>::mapping = MappingQ<dim, spacedim>(1);
-
-
-
//--------------------------- Explicit instantiations -----------------------
#include "mapping_q1.inst"
std::shared_ptr<const Mapping<dim, spacedim>>(new_mapping.clone()));
}
- //---------------------------------------------------------------------------
-
-
- namespace
- {
- /**
- * Create and return a reference to a static MappingQ1 object. We can't
- * use the one in ::StaticMappingQ1 to initialize the static object below
- * since we can't make sure that the constructor for that object is run
- * before we want to use the object (when constructing mapping_collection
- * below). Therefore we create a helper function which returns a
- * reference to a static object that will be constructed the first time
- * this function is called.
- */
- template <int dim, int spacedim>
- MappingQ<dim, spacedim> &
- get_static_mapping_q1()
- {
- static MappingQ1<dim, spacedim> mapping;
- return mapping;
- }
- } // namespace
-
- template <int dim, int spacedim>
- MappingCollection<dim, spacedim>
- StaticMappingQ1<dim, spacedim>::mapping_collection =
- MappingCollection<dim, spacedim>(get_static_mapping_q1<dim, spacedim>());
-
} // namespace hp