From: Daniel Arndt Date: Sat, 17 Feb 2018 12:16:33 +0000 (+0100) Subject: Fix get_fe_by_name for MSVC X-Git-Tag: v9.0.0-rc1~423^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbee10c6e3952d99676df44affdda4cbee9a7de4;p=dealii.git Fix get_fe_by_name for MSVC --- diff --git a/include/deal.II/fe/fe_tools.templates.h b/include/deal.II/fe/fe_tools.templates.h index 5079e80a5c..9286a882b2 100644 --- a/include/deal.II/fe/fe_tools.templates.h +++ b/include/deal.II/fe/fe_tools.templates.h @@ -1068,60 +1068,58 @@ namespace void fill_no_codim_fe_names (std::map > &result) { - typedef std::unique_ptr FEFactoryPointer; - result["FE_Q_Hierarchical"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_ABF"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_Bernstein"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_BDM"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_DGBDM"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_DGNedelec"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_DGRaviartThomas"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_RaviartThomas"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_RaviartThomasNodal"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_RT_Bubbles"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_Nedelec"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_DGPNonparametric"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_DGP"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_DGPMonomial"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_DGQ"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_DGQArbitraryNodes"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_DGQLegendre"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_DGQHermite"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_FaceQ"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_FaceP"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_Q"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_Q_DG0"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_Q_Bubbles"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_Q_iso_Q1"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_Nothing"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_RannacherTurek"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); } @@ -1133,50 +1131,45 @@ namespace void fill_codim_fe_names (std::map > &result) { - typedef std::unique_ptr FEFactoryPointer; - result["FE_Bernstein"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_DGP"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_DGQ"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_Nothing"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_DGQArbitraryNodes"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_DGQLegendre"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_DGQHermite"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_Q_Bubbles"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_Q_DG0"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_Q_iso_Q1"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_Q"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); result["FE_Bernstein"] - = FEFactoryPointer(new FETools::FEFactory >); + = std_cxx14::make_unique > >(); } // The function filling the vector fe_name_map below. It iterates // through all legal dimension/spacedimension pairs and fills // fe_name_map[dimension][spacedimension] with the maps generated // by the functions above. - std::vector > > > + std::unique_ptr >, 4>, 4> fill_default_map() { - std::vector > > > - result(4); - - for (unsigned int d=0; d<4; ++d) - result[d].resize(4); + std::unique_ptr >, 4>, 4> + result; fill_no_codim_fe_names<1> (result[1][1]); fill_no_codim_fe_names<2> (result[2][2]); @@ -1222,9 +1215,9 @@ namespace // compiled for all dimensions at once, need to create objects for // each dimension and then separate between them further down static - std::vector > > > + std::unique_ptr >, 4>, 4> fe_name_map = fill_default_map(); }