From: Matthias Maier Date: Sun, 24 May 2020 05:00:50 +0000 (-0500) Subject: C++14 cleanup: do not use wrapper namespace X-Git-Tag: v9.3.0-rc1~1571^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77b0e678c102f30bb2ad7e4670261e68d782b0a1;p=dealii.git C++14 cleanup: do not use wrapper namespace --- diff --git a/contrib/python-bindings/source/manifold_wrapper.cc b/contrib/python-bindings/source/manifold_wrapper.cc index 7bc1a44196..bf2249fd0d 100644 --- a/contrib/python-bindings/source/manifold_wrapper.cc +++ b/contrib/python-bindings/source/manifold_wrapper.cc @@ -91,8 +91,8 @@ namespace python boost::python::object &pull_back) { return new FunctionManifold( - std_cxx14::make_unique>(push_forward, spacedim), - std_cxx14::make_unique>(pull_back, dim)); + std::make_unique>(push_forward, spacedim), + std::make_unique>(pull_back, dim)); } diff --git a/examples/step-13/step-13.cc b/examples/step-13/step-13.cc index 702892c62b..dbd81a07f8 100644 --- a/examples/step-13/step-13.cc +++ b/examples/step-13/step-13.cc @@ -1368,14 +1368,14 @@ namespace Step13 // having to delete the pointer after use. For initializing, we want to use // the C++14 function std::make_unique. Since deal.II only requires C++11 up // to now, we define this function in a separate namespace called - // `std_cxx14`. In case the compiler supports C++14, this just calls + // `std`. In case the compiler supports C++14, this just calls // std::make_unique. std::unique_ptr> solver; if (solver_name == "global") - solver = std_cxx14::make_unique>( + solver = std::make_unique>( triangulation, fe, quadrature, rhs_function, boundary_values); else if (solver_name == "kelly") - solver = std_cxx14::make_unique>( + solver = std::make_unique>( triangulation, fe, quadrature, rhs_function, boundary_values); else AssertThrow(false, ExcNotImplemented()); diff --git a/examples/step-14/step-14.cc b/examples/step-14/step-14.cc index 3332f75102..e21a762777 100644 --- a/examples/step-14/step-14.cc +++ b/examples/step-14/step-14.cc @@ -2706,56 +2706,53 @@ namespace Step14 { case ProblemDescription::dual_weighted_error_estimator: { - solver = - std_cxx14::make_unique>( - triangulation, - primal_fe, - dual_fe, - quadrature, - face_quadrature, - descriptor.data->get_right_hand_side(), - descriptor.data->get_boundary_values(), - *descriptor.dual_functional); + solver = std::make_unique>( + triangulation, + primal_fe, + dual_fe, + quadrature, + face_quadrature, + descriptor.data->get_right_hand_side(), + descriptor.data->get_boundary_values(), + *descriptor.dual_functional); break; } case ProblemDescription::global_refinement: { - solver = - std_cxx14::make_unique>( - triangulation, - primal_fe, - quadrature, - face_quadrature, - descriptor.data->get_right_hand_side(), - descriptor.data->get_boundary_values()); + solver = std::make_unique>( + triangulation, + primal_fe, + quadrature, + face_quadrature, + descriptor.data->get_right_hand_side(), + descriptor.data->get_boundary_values()); break; } case ProblemDescription::kelly_indicator: + { + solver = std::make_unique>( + triangulation, + primal_fe, + quadrature, + face_quadrature, + descriptor.data->get_right_hand_side(), + descriptor.data->get_boundary_values()); + break; + } + + case ProblemDescription::weighted_kelly_indicator: { solver = - std_cxx14::make_unique>( + std::make_unique>( triangulation, primal_fe, quadrature, face_quadrature, descriptor.data->get_right_hand_side(), - descriptor.data->get_boundary_values()); - break; - } - - case ProblemDescription::weighted_kelly_indicator: - { - solver = std_cxx14::make_unique< - LaplaceSolver::RefinementWeightedKelly>( - triangulation, - primal_fe, - quadrature, - face_quadrature, - descriptor.data->get_right_hand_side(), - descriptor.data->get_boundary_values(), - *descriptor.kelly_weight); + descriptor.data->get_boundary_values(), + *descriptor.kelly_weight); break; } @@ -2838,7 +2835,7 @@ int main() // take here the description of Exercise_2_3, but you can // also use CurvedRidges@: descriptor.data = - std_cxx14::make_unique, dim>>(); + std::make_unique, dim>>(); // Next set first a dual functional, then a list of evaluation // objects. We choose as default the evaluation of the value at an @@ -2855,7 +2852,7 @@ int main() // each step. const Point evaluation_point(0.75, 0.75); descriptor.dual_functional = - std_cxx14::make_unique>( + std::make_unique>( evaluation_point); Evaluation::PointValueEvaluation postprocessor1(evaluation_point); diff --git a/examples/step-27/step-27.cc b/examples/step-27/step-27.cc index 87f3bb252d..cd7d451044 100644 --- a/examples/step-27/step-27.cc +++ b/examples/step-27/step-27.cc @@ -232,8 +232,10 @@ namespace Step27 // Now we are ready to set-up the FESeries::Fourier object const std::vector n_coefficients_per_direction( fe_collection.size(), N); - fourier = std_cxx14::make_unique>( - n_coefficients_per_direction, fe_collection, fourier_q_collection); + fourier = + std::make_unique>(n_coefficients_per_direction, + fe_collection, + fourier_q_collection); // We need to resize the matrix of fourier coefficients according to the // number of modes N. diff --git a/examples/step-28/step-28.cc b/examples/step-28/step-28.cc index e06dc88206..f5bb6a7602 100644 --- a/examples/step-28/step-28.cc +++ b/examples/step-28/step-28.cc @@ -1460,7 +1460,7 @@ namespace Step28 // of energy group objects and let them initialize their individual meshes // with the coarse mesh generated above: for (unsigned int group = 0; group < parameters.n_groups; ++group) - energy_groups.emplace_back(std_cxx14::make_unique>( + energy_groups.emplace_back(std::make_unique>( group, material_data, coarse_grid, fe)); convergence_table_stream.open("convergence_table"); convergence_table_stream.precision(12); diff --git a/examples/step-53/step-53.cc b/examples/step-53/step-53.cc index 03cc1fdc1c..b018645035 100644 --- a/examples/step-53/step-53.cc +++ b/examples/step-53/step-53.cc @@ -237,7 +237,7 @@ namespace Step53 // unique pointer to its base class automatically: std::unique_ptr> AfricaGeometry::clone() const { - return std_cxx14::make_unique(); + return std::make_unique(); } diff --git a/examples/step-60/step-60.cc b/examples/step-60/step-60.cc index acabe84591..8f02eb8df1 100644 --- a/examples/step-60/step-60.cc +++ b/examples/step-60/step-60.cc @@ -594,7 +594,7 @@ namespace Step60 // @sect3{Set up} // // The function `DistributedLagrangeProblem::setup_grids_and_dofs()` is used - // to set up the finite element spaces. Notice how `std_cxx14::make_unique` is + // to set up the finite element spaces. Notice how `std::make_unique` is // used to create objects wrapped inside `std::unique_ptr` objects. template void DistributedLagrangeProblem::setup_grids_and_dofs() @@ -603,7 +603,7 @@ namespace Step60 // Initializing $\Omega$: constructing the Triangulation and wrapping it // into a `std::unique_ptr` object - space_grid = std_cxx14::make_unique>(); + space_grid = std::make_unique>(); // Next, we actually create the triangulation using // GridGenerator::hyper_cube(). The last argument is set to true: this @@ -617,22 +617,22 @@ namespace Step60 // GridTools::Cache with it. space_grid->refine_global(parameters.initial_refinement); space_grid_tools_cache = - std_cxx14::make_unique>(*space_grid); + std::make_unique>(*space_grid); // The same is done with the embedded grid. Since the embedded grid is // deformed, we first need to setup the deformation mapping. We do so in the // following few lines: - embedded_grid = std_cxx14::make_unique>(); + embedded_grid = std::make_unique>(); GridGenerator::hyper_cube(*embedded_grid); embedded_grid->refine_global(parameters.initial_embedded_refinement); - embedded_configuration_fe = std_cxx14::make_unique>( + embedded_configuration_fe = std::make_unique>( FE_Q( parameters.embedded_configuration_finite_element_degree), spacedim); embedded_configuration_dh = - std_cxx14::make_unique>(*embedded_grid); + std::make_unique>(*embedded_grid); embedded_configuration_dh->distribute_dofs(*embedded_configuration_fe); embedded_configuration.reinit(embedded_configuration_dh->n_dofs()); @@ -671,16 +671,16 @@ namespace Step60 if (parameters.use_displacement == true) embedded_mapping = - std_cxx14::make_unique, spacedim>>( + std::make_unique, spacedim>>( parameters.embedded_configuration_finite_element_degree, *embedded_configuration_dh, embedded_configuration); else embedded_mapping = - std_cxx14::make_unique, - DoFHandler>>( + std::make_unique, + DoFHandler>>( *embedded_configuration_dh, embedded_configuration); setup_embedded_dofs(); @@ -836,8 +836,8 @@ namespace Step60 template void DistributedLagrangeProblem::setup_embedding_dofs() { - space_dh = std_cxx14::make_unique>(*space_grid); - space_fe = std_cxx14::make_unique>( + space_dh = std::make_unique>(*space_grid); + space_fe = std::make_unique>( parameters.embedding_space_finite_element_degree); space_dh->distribute_dofs(*space_fe); @@ -863,9 +863,8 @@ namespace Step60 template void DistributedLagrangeProblem::setup_embedded_dofs() { - embedded_dh = - std_cxx14::make_unique>(*embedded_grid); - embedded_fe = std_cxx14::make_unique>( + embedded_dh = std::make_unique>(*embedded_grid); + embedded_fe = std::make_unique>( parameters.embedded_space_finite_element_degree); embedded_dh->distribute_dofs(*embedded_fe); diff --git a/examples/step-63/step-63.cc b/examples/step-63/step-63.cc index 67250df424..8a75ab4f08 100644 --- a/examples/step-63/step-63.cc +++ b/examples/step-63/step-63.cc @@ -918,9 +918,9 @@ namespace Step63 using Smoother = PreconditionSOR>; auto smoother = - std_cxx14::make_unique, - Smoother, - Vector>>(); + std::make_unique, + Smoother, + Vector>>(); smoother->initialize(mg_matrices, Smoother::AdditionalData(fe.degree == 1 ? 1.0 : 0.62)); @@ -931,9 +931,9 @@ namespace Step63 { using Smoother = PreconditionJacobi>; auto smoother = - std_cxx14::make_unique, - Smoother, - Vector>>(); + std::make_unique, + Smoother, + Vector>>(); smoother->initialize(mg_matrices, Smoother::AdditionalData(fe.degree == 1 ? 0.6667 : 0.47)); @@ -991,7 +991,7 @@ namespace Step63 if (settings.smoother_type == "block SOR") { - auto smoother = std_cxx14::make_unique, RelaxationBlockSOR, double, Vector>, Vector>>(); @@ -1001,7 +1001,7 @@ namespace Step63 } else if (settings.smoother_type == "block Jacobi") { - auto smoother = std_cxx14::make_unique< + auto smoother = std::make_unique< MGSmootherPrecondition, RelaxationBlockJacobi, double, diff --git a/examples/step-67/step-67.cc b/examples/step-67/step-67.cc index 86f9862a7b..835abf0169 100644 --- a/examples/step-67/step-67.cc +++ b/examples/step-67/step-67.cc @@ -2012,7 +2012,7 @@ namespace Euler_DG triangulation.refine_global(2); euler_operator.set_inflow_boundary( - 0, std_cxx14::make_unique>(0)); + 0, std::make_unique>(0)); break; } @@ -2023,16 +2023,16 @@ namespace Euler_DG triangulation, 0.03, 1, 0, true); euler_operator.set_inflow_boundary( - 0, std_cxx14::make_unique>(0)); + 0, std::make_unique>(0)); euler_operator.set_subsonic_outflow_boundary( - 1, std_cxx14::make_unique>(0)); + 1, std::make_unique>(0)); euler_operator.set_wall_boundary(2); euler_operator.set_wall_boundary(3); if (dim == 3) euler_operator.set_body_force( - std_cxx14::make_unique>( + std::make_unique>( std::vector({0., 0., -0.2}))); break; diff --git a/examples/step-70/step-70.cc b/examples/step-70/step-70.cc index 6ad11701ea..cdfa13c229 100644 --- a/examples/step-70/step-70.cc +++ b/examples/step-70/step-70.cc @@ -1232,20 +1232,21 @@ namespace Step70 { TimerOutput::Scope t(computing_timer, "Initial setup"); - fluid_fe = std_cxx14::make_unique>( - FE_Q(par.velocity_degree), - spacedim, - FE_Q(par.velocity_degree - 1), - 1); + fluid_fe = + std::make_unique>(FE_Q(par.velocity_degree), + spacedim, + FE_Q(par.velocity_degree - + 1), + 1); - solid_fe = std_cxx14::make_unique>(); + solid_fe = std::make_unique>(); solid_dh.distribute_dofs(*solid_fe); fluid_quadrature_formula = - std_cxx14::make_unique>(par.velocity_degree + 1); + std::make_unique>(par.velocity_degree + 1); solid_quadrature_formula = - std_cxx14::make_unique>(par.velocity_degree + 1); + std::make_unique>(par.velocity_degree + 1); } diff --git a/include/deal.II/base/mpi_consensus_algorithms.templates.h b/include/deal.II/base/mpi_consensus_algorithms.templates.h index 6da99a5943..ad878a53db 100644 --- a/include/deal.II/base/mpi_consensus_algorithms.templates.h +++ b/include/deal.II/base/mpi_consensus_algorithms.templates.h @@ -238,10 +238,8 @@ namespace Utilities AssertThrowMPI(ierr); // allocate memory for answer message - request_buffers.emplace_back( - std_cxx14::make_unique>()); - request_requests.emplace_back( - std_cxx14::make_unique()); + request_buffers.emplace_back(std::make_unique>()); + request_requests.emplace_back(std::make_unique()); // process request auto &request_buffer = *request_buffers.back(); diff --git a/include/deal.II/base/parameter_handler.h b/include/deal.II/base/parameter_handler.h index 206401efab..b593ca0552 100644 --- a/include/deal.II/base/parameter_handler.h +++ b/include/deal.II/base/parameter_handler.h @@ -1939,7 +1939,7 @@ operator|(const ParameterHandler::OutputStyle f1, * * void HelperClass::create_new (const unsigned int run_no) * { - * p = std_cxx14::make_unique()); + * p = std::make_unique()); * } * * diff --git a/include/deal.II/base/patterns.h b/include/deal.II/base/patterns.h index a4582cd63c..b5698fd43a 100644 --- a/include/deal.II/base/patterns.h +++ b/include/deal.II/base/patterns.h @@ -1504,7 +1504,7 @@ namespace Patterns std::unique_ptr>::type to_pattern() { - return std_cxx14::make_unique(); + return std::make_unique(); } template @@ -1515,7 +1515,7 @@ namespace Patterns std::unique_ptr>::type to_pattern() { - return std_cxx14::make_unique( + return std::make_unique( std::numeric_limits::lowest(), std::numeric_limits::max()); } @@ -1527,7 +1527,7 @@ namespace Patterns std::unique_ptr>::type to_pattern() { - return std_cxx14::make_unique( + return std::make_unique( std::numeric_limits::lowest(), std::numeric_limits::max()); } @@ -1677,8 +1677,7 @@ namespace Patterns constexpr int max_list_rank() { - return std_cxx14::max(RankInfo::list_rank, - max_list_rank()); + return std::max(RankInfo::list_rank, max_list_rank()); } // Helper function for map_rank @@ -1693,8 +1692,7 @@ namespace Patterns constexpr int max_map_rank() { - return std_cxx14::max(RankInfo::map_rank, - max_map_rank()); + return std::max(RankInfo::map_rank, max_map_rank()); } // Rank of vector types @@ -1762,10 +1760,9 @@ namespace Patterns struct RankInfo> { static constexpr int list_rank = - std_cxx14::max(RankInfo::list_rank, RankInfo::list_rank); + std::max(RankInfo::list_rank, RankInfo::list_rank); static constexpr int map_rank = - std_cxx14::max(RankInfo::map_rank, RankInfo::map_rank) + - 1; + std::max(RankInfo::map_rank, RankInfo::map_rank) + 1; }; @@ -1787,7 +1784,7 @@ namespace Patterns { static_assert(internal::RankInfo::list_rank > 0, "Cannot use this class for non List-compatible types."); - return std_cxx14::make_unique( + return std::make_unique( *Convert::to_pattern(), 0, std::numeric_limits::max(), @@ -1857,7 +1854,7 @@ namespace Patterns "Cannot use this class for non List-compatible types."); static_assert(internal::RankInfo::map_rank > 0, "Cannot use this class for non Map-compatible types."); - return std_cxx14::make_unique( + return std::make_unique( *Convert::to_pattern(), *Convert::to_pattern(), 0, @@ -1938,7 +1935,7 @@ namespace Patterns { static_assert(internal::RankInfo::list_rank > 0, "Cannot use this class for non List-compatible types."); - return std_cxx14::make_unique( + return std::make_unique( *Convert::to_pattern(), dim, dim, @@ -2037,7 +2034,7 @@ namespace Patterns static_assert(internal::RankInfo::list_rank > 0, "Cannot use this class for non List-compatible types."); - return std_cxx14::make_unique( + return std::make_unique( Patterns::Anything(), 1, Patterns::List::max_int_value, @@ -2082,7 +2079,7 @@ namespace Patterns const auto expressions = Utilities::split_string_list(s, p->get_separator()); - T t = std_cxx14::make_unique>(expressions.size()); + T t = std::make_unique>(expressions.size()); const std::string var = FunctionParser::default_variable_names() + ",t"; const typename FunctionParser::ConstMap constants; @@ -2136,7 +2133,7 @@ namespace Patterns { static_assert(internal::RankInfo::list_rank > 0, "Cannot use this class for non List-compatible types."); - return std_cxx14::make_unique( + return std::make_unique( *Convert::to_pattern(), 2, 2, @@ -2198,7 +2195,7 @@ namespace Patterns static std::unique_ptr to_pattern() { - return std_cxx14::make_unique(); + return std::make_unique(); } static std::string @@ -2231,7 +2228,7 @@ namespace Patterns { static_assert(internal::RankInfo::map_rank > 0, "Cannot use this class for non Map-compatible types."); - return std_cxx14::make_unique( + return std::make_unique( internal::default_map_separator[internal::RankInfo::map_rank - 1], *Convert::to_pattern(), *Convert::to_pattern()); @@ -2270,7 +2267,7 @@ namespace Patterns { static_assert(internal::RankInfo::map_rank > 0, "Cannot use this class for non tuple-compatible types."); - return std_cxx14::make_unique( + return std::make_unique( internal::default_map_separator[internal::RankInfo::map_rank - 1], *Convert::to_pattern()...); } @@ -2315,7 +2312,7 @@ namespace Patterns static std::array::value> to_string_internal_1(const T & t, const Patterns::Tuple &pattern, - std_cxx14::index_sequence) + std::index_sequence) { std::array::value> a = { {Convert::type>::to_string( @@ -2327,16 +2324,14 @@ namespace Patterns to_string_internal_2(const T &t, const Patterns::Tuple &pattern) { return Convert::to_string_internal_1( - t, - pattern, - std_cxx14::make_index_sequence::value>{}); + t, pattern, std::make_index_sequence::value>{}); } template static T to_value_internal_1(const std::vector &s, const Patterns::Tuple & pattern, - std_cxx14::index_sequence) + std::index_sequence) { return std::make_tuple( Convert::type>::to_value( @@ -2348,9 +2343,7 @@ namespace Patterns const Patterns::Tuple & pattern) { return Convert::to_value_internal_1( - s, - pattern, - std_cxx14::make_index_sequence::value>{}); + s, pattern, std::make_index_sequence::value>{}); } }; diff --git a/include/deal.II/base/polynomials_p.h b/include/deal.II/base/polynomials_p.h index 5f2dc4b488..c5cb90d2ea 100644 --- a/include/deal.II/base/polynomials_p.h +++ b/include/deal.II/base/polynomials_p.h @@ -82,7 +82,7 @@ public: std::unique_ptr> clone() const override { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } private: diff --git a/include/deal.II/base/std_cxx17/tuple.h b/include/deal.II/base/std_cxx17/tuple.h index e3a465a317..2228e15577 100644 --- a/include/deal.II/base/std_cxx17/tuple.h +++ b/include/deal.II/base/std_cxx17/tuple.h @@ -29,7 +29,7 @@ namespace std_cxx17 #ifndef __cpp_lib_apply template auto - apply_impl(F &&fn, Tuple &&t, std_cxx14::index_sequence) + apply_impl(F &&fn, Tuple &&t, std::index_sequence) -> decltype(std::forward(fn)(std::get(std::forward(t))...)) { return std::forward(fn)(std::get(std::forward(t))...); @@ -40,14 +40,14 @@ namespace std_cxx17 apply(F &&fn, Tuple &&t) -> decltype(apply_impl( std::forward(fn), std::forward(t), - std_cxx14::make_index_sequence< + std::make_index_sequence< std::tuple_size::type>::value>())) { std::size_t constexpr tSize = std::tuple_size::type>::value; return apply_impl(std::forward(fn), std::forward(t), - std_cxx14::make_index_sequence()); + std::make_index_sequence()); } #else using std::apply; diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index 9580b92999..c8ecc33b57 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -774,7 +774,7 @@ private: */ template constexpr DEAL_II_CUDA_HOST_DEV - Tensor(const ArrayLike &initializer, std_cxx14::index_sequence); + Tensor(const ArrayLike &initializer, std::index_sequence); // Allow an arbitrary Tensor to access the underlying values. template @@ -1143,7 +1143,7 @@ template template constexpr DEAL_II_ALWAYS_INLINE DEAL_II_CUDA_HOST_DEV Tensor::Tensor(const ArrayLike &initializer, - std_cxx14::index_sequence) + std::index_sequence) : values{Tensor(initializer[indices])...} { static_assert(sizeof...(indices) == dim, @@ -1154,7 +1154,7 @@ constexpr DEAL_II_ALWAYS_INLINE DEAL_II_CUDA_HOST_DEV template constexpr DEAL_II_ALWAYS_INLINE DEAL_II_CUDA_HOST_DEV Tensor::Tensor(const array_type &initializer) - : Tensor(initializer, std_cxx14::make_index_sequence{}) + : Tensor(initializer, std::make_index_sequence{}) {} @@ -1163,7 +1163,7 @@ template constexpr DEAL_II_ALWAYS_INLINE DEAL_II_CUDA_HOST_DEV Tensor::Tensor( const Tensor &initializer) - : Tensor(initializer, std_cxx14::make_index_sequence{}) + : Tensor(initializer, std::make_index_sequence{}) {} @@ -1172,7 +1172,7 @@ template constexpr DEAL_II_ALWAYS_INLINE Tensor::Tensor( const Tensor<1, dim, Tensor> &initializer) - : Tensor(initializer, std_cxx14::make_index_sequence{}) + : Tensor(initializer, std::make_index_sequence{}) {} diff --git a/include/deal.II/fe/fe_dg_vector.templates.h b/include/deal.II/fe/fe_dg_vector.templates.h index dce7212141..69e85b6b3d 100644 --- a/include/deal.II/fe/fe_dg_vector.templates.h +++ b/include/deal.II/fe/fe_dg_vector.templates.h @@ -61,8 +61,7 @@ template std::unique_ptr> FE_DGVector::clone() const { - return std_cxx14::make_unique>( - *this); + return std::make_unique>(*this); } diff --git a/include/deal.II/fe/fe_face.h b/include/deal.II/fe/fe_face.h index dc9194ce42..178293f149 100644 --- a/include/deal.II/fe/fe_face.h +++ b/include/deal.II/fe/fe_face.h @@ -343,7 +343,7 @@ protected: spacedim> & /*output_data*/) const override { - return std_cxx14::make_unique< + return std::make_unique< typename FiniteElement<1, spacedim>::InternalDataBase>(); } @@ -357,8 +357,8 @@ protected: & /*output_data*/) const override { // generate a new data object and initialize some fields - auto data_ptr = std_cxx14::make_unique< - typename FiniteElement<1, spacedim>::InternalDataBase>(); + auto data_ptr = + std::make_unique::InternalDataBase>(); data_ptr->update_each = requires_update_flags(update_flags); const unsigned int n_q_points = quadrature.size(); diff --git a/include/deal.II/fe/fe_poly.h b/include/deal.II/fe/fe_poly.h index 23834d51a3..2afd1087d9 100644 --- a/include/deal.II/fe/fe_poly.h +++ b/include/deal.II/fe/fe_poly.h @@ -264,7 +264,7 @@ protected: // generate a new data object and // initialize some fields std::unique_ptr::InternalDataBase> - data_ptr = std_cxx14::make_unique(); + data_ptr = std::make_unique(); auto &data = dynamic_cast(*data_ptr); data.update_each = requires_update_flags(update_flags); diff --git a/include/deal.II/fe/fe_poly_face.h b/include/deal.II/fe/fe_poly_face.h index c6a47626cf..f07e5a7381 100644 --- a/include/deal.II/fe/fe_poly_face.h +++ b/include/deal.II/fe/fe_poly_face.h @@ -97,7 +97,7 @@ protected: spacedim> & /*output_data*/) const override { - return std_cxx14::make_unique(); + return std::make_unique(); } std::unique_ptr::InternalDataBase> @@ -112,7 +112,7 @@ protected: // generate a new data object and // initialize some fields std::unique_ptr::InternalDataBase> - data_ptr = std_cxx14::make_unique(); + data_ptr = std::make_unique(); auto &data = dynamic_cast(*data_ptr); data.update_each = requires_update_flags(update_flags); diff --git a/include/deal.II/fe/fe_poly_tensor.h b/include/deal.II/fe/fe_poly_tensor.h index 48f2dc887b..0bf7b691ed 100644 --- a/include/deal.II/fe/fe_poly_tensor.h +++ b/include/deal.II/fe/fe_poly_tensor.h @@ -248,7 +248,7 @@ protected: // generate a new data object and // initialize some fields std::unique_ptr::InternalDataBase> - data_ptr = std_cxx14::make_unique(); + data_ptr = std::make_unique(); auto &data = dynamic_cast(*data_ptr); data.update_each = requires_update_flags(update_flags); diff --git a/include/deal.II/fe/fe_tools.h b/include/deal.II/fe/fe_tools.h index 060f155717..fe8b0821fc 100644 --- a/include/deal.II/fe/fe_tools.h +++ b/include/deal.II/fe/fe_tools.h @@ -1477,7 +1477,7 @@ namespace FETools std::unique_ptr> FEFactory::get(const unsigned int degree) const { - return std_cxx14::make_unique(degree); + return std::make_unique(degree); } namespace Compositing diff --git a/include/deal.II/fe/fe_tools.templates.h b/include/deal.II/fe/fe_tools.templates.h index 8eefec7ae6..2e40735396 100644 --- a/include/deal.II/fe/fe_tools.templates.h +++ b/include/deal.II/fe/fe_tools.templates.h @@ -1035,21 +1035,21 @@ namespace FETools std::unique_ptr> FEFactory>::get(const Quadrature<1> &quad) const { - return std_cxx14::make_unique>(quad); + return std::make_unique>(quad); } template <> std::unique_ptr> FEFactory>::get(const Quadrature<1> &quad) const { - return std_cxx14::make_unique>(quad); + return std::make_unique>(quad); } template <> std::unique_ptr> FEFactory>::get(const Quadrature<1> &quad) const { - return std_cxx14::make_unique>(quad); + return std::make_unique>(quad); } // Specializations for FE_Q_DG0. @@ -1057,21 +1057,21 @@ namespace FETools std::unique_ptr> FEFactory>::get(const Quadrature<1> &quad) const { - return std_cxx14::make_unique>(quad); + return std::make_unique>(quad); } template <> std::unique_ptr> FEFactory>::get(const Quadrature<1> &quad) const { - return std_cxx14::make_unique>(quad); + return std::make_unique>(quad); } template <> std::unique_ptr> FEFactory>::get(const Quadrature<1> &quad) const { - return std_cxx14::make_unique>(quad); + return std::make_unique>(quad); } // Specializations for FE_Q_Bubbles. @@ -1079,21 +1079,21 @@ namespace FETools std::unique_ptr> FEFactory>::get(const Quadrature<1> &quad) const { - return std_cxx14::make_unique>(quad); + return std::make_unique>(quad); } template <> std::unique_ptr> FEFactory>::get(const Quadrature<1> &quad) const { - return std_cxx14::make_unique>(quad); + return std::make_unique>(quad); } template <> std::unique_ptr> FEFactory>::get(const Quadrature<1> &quad) const { - return std_cxx14::make_unique>(quad); + return std::make_unique>(quad); } // Specializations for FE_DGQArbitraryNodes. @@ -1101,42 +1101,42 @@ namespace FETools std::unique_ptr> FEFactory>::get(const Quadrature<1> &quad) const { - return std_cxx14::make_unique>(quad); + return std::make_unique>(quad); } template <> std::unique_ptr> FEFactory>::get(const Quadrature<1> &quad) const { - return std_cxx14::make_unique>(quad); + return std::make_unique>(quad); } template <> std::unique_ptr> FEFactory>::get(const Quadrature<1> &quad) const { - return std_cxx14::make_unique>(quad); + return std::make_unique>(quad); } template <> std::unique_ptr> FEFactory>::get(const Quadrature<1> &quad) const { - return std_cxx14::make_unique>(quad); + return std::make_unique>(quad); } template <> std::unique_ptr> FEFactory>::get(const Quadrature<1> &quad) const { - return std_cxx14::make_unique>(quad); + return std::make_unique>(quad); } template <> std::unique_ptr> FEFactory>::get(const Quadrature<1> &quad) const { - return std_cxx14::make_unique>(quad); + return std::make_unique>(quad); } @@ -1156,57 +1156,52 @@ namespace FETools std::map> &result) { result["FE_Q_Hierarchical"] = - std_cxx14::make_unique>>(); - result["FE_ABF"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); + result["FE_ABF"] = std::make_unique>>(); result["FE_Bernstein"] = - std_cxx14::make_unique>>(); - result["FE_BDM"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); + result["FE_BDM"] = std::make_unique>>(); result["FE_DGBDM"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); result["FE_DGNedelec"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); result["FE_DGRaviartThomas"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); result["FE_RaviartThomas"] = - std_cxx14::make_unique>>(); - result["FE_RaviartThomasNodal"] = std_cxx14::make_unique< - FETools::FEFactory>>(); + std::make_unique>>(); + result["FE_RaviartThomasNodal"] = + std::make_unique>>(); result["FE_RT_Bubbles"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); result["FE_Nedelec"] = - std_cxx14::make_unique>>(); - result["FE_DGPNonparametric"] = std_cxx14::make_unique< - FETools::FEFactory>>(); - result["FE_DGP"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); + result["FE_DGPNonparametric"] = + std::make_unique>>(); + result["FE_DGP"] = std::make_unique>>(); result["FE_DGPMonomial"] = - std_cxx14::make_unique>>(); - result["FE_DGQ"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); + result["FE_DGQ"] = std::make_unique>>(); result["FE_DGQArbitraryNodes"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); result["FE_DGQLegendre"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); result["FE_DGQHermite"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); result["FE_FaceQ"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); result["FE_FaceP"] = - std_cxx14::make_unique>>(); - result["FE_Q"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); + result["FE_Q"] = std::make_unique>>(); result["FE_Q_DG0"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); result["FE_Q_Bubbles"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); result["FE_Q_iso_Q1"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); result["FE_Nothing"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); result["FE_RannacherTurek"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); } @@ -1219,30 +1214,30 @@ namespace FETools fill_codim_fe_names( std::map> &result) { - result["FE_Bernstein"] = std_cxx14::make_unique< - FETools::FEFactory>>(); + result["FE_Bernstein"] = + std::make_unique>>(); result["FE_DGP"] = - std_cxx14::make_unique>>(); + std::make_unique>>(); result["FE_DGQ"] = - std_cxx14::make_unique>>(); - result["FE_Nothing"] = std_cxx14::make_unique< - FETools::FEFactory>>(); + std::make_unique>>(); + result["FE_Nothing"] = + std::make_unique>>(); result["FE_DGQArbitraryNodes"] = - std_cxx14::make_unique>>(); - result["FE_DGQLegendre"] = std_cxx14::make_unique< - FETools::FEFactory>>(); - result["FE_DGQHermite"] = std_cxx14::make_unique< - FETools::FEFactory>>(); - result["FE_Q_Bubbles"] = std_cxx14::make_unique< - FETools::FEFactory>>(); + std::make_unique>>(); + result["FE_DGQLegendre"] = + std::make_unique>>(); + result["FE_DGQHermite"] = + std::make_unique>>(); + result["FE_Q_Bubbles"] = + std::make_unique>>(); result["FE_Q_DG0"] = - std_cxx14::make_unique>>(); - result["FE_Q_iso_Q1"] = std_cxx14::make_unique< - FETools::FEFactory>>(); + std::make_unique>>(); + result["FE_Q_iso_Q1"] = + std::make_unique>>(); result["FE_Q"] = - std_cxx14::make_unique>>(); - result["FE_Bernstein"] = std_cxx14::make_unique< - FETools::FEFactory>>(); + std::make_unique>>(); + result["FE_Bernstein"] = + std::make_unique>>(); } // The function filling the vector fe_name_map below. It iterates @@ -2508,7 +2503,7 @@ namespace FETools // ok, apparently everything went ok. so generate the composed // element. and return it. - return std_cxx14::make_unique>( + return std::make_unique>( raw_base_fes, base_multiplicities); } else if (name_part == "FE_Nothing") diff --git a/include/deal.II/fe/fe_tools_interpolate.templates.h b/include/deal.II/fe/fe_tools_interpolate.templates.h index b108dd5e4e..e0181c8fd9 100644 --- a/include/deal.II/fe/fe_tools_interpolate.templates.h +++ b/include/deal.II/fe/fe_tools_interpolate.templates.h @@ -192,8 +192,8 @@ namespace FETools .get() == nullptr) { auto interpolation_matrix = - std_cxx14::make_unique>(dofs_per_cell2, - dofs_per_cell1); + std::make_unique>(dofs_per_cell2, + dofs_per_cell1); get_interpolation_matrix(cell1->get_fe(), cell2->get_fe(), @@ -342,8 +342,8 @@ namespace FETools if (interpolation_matrices[&cell->get_fe()] == nullptr) { interpolation_matrices[&cell->get_fe()] = - std_cxx14::make_unique>(dofs_per_cell1, - dofs_per_cell1); + std::make_unique>(dofs_per_cell1, + dofs_per_cell1); get_back_interpolation_matrix( cell->get_fe(), fe2, *interpolation_matrices[&cell->get_fe()]); } diff --git a/include/deal.II/grid/composition_manifold.h b/include/deal.II/grid/composition_manifold.h index eab1e6386b..b60f198d81 100644 --- a/include/deal.II/grid/composition_manifold.h +++ b/include/deal.II/grid/composition_manifold.h @@ -161,7 +161,7 @@ std::unique_ptr> CompositionManifold:: clone() const { - return std_cxx14::make_unique< + return std::make_unique< CompositionManifold>( *F, *G); } diff --git a/include/deal.II/grid/filtered_iterator.h b/include/deal.II/grid/filtered_iterator.h index 982e97b01e..d27e870f70 100644 --- a/include/deal.II/grid/filtered_iterator.h +++ b/include/deal.II/grid/filtered_iterator.h @@ -1152,7 +1152,7 @@ template std::unique_ptr::PredicateBase> FilteredIterator::PredicateTemplate::clone() const { - return std_cxx14::make_unique(predicate); + return std::make_unique(predicate); } diff --git a/include/deal.II/grid/manifold_lib.h b/include/deal.II/grid/manifold_lib.h index eaa7ce1543..7016135be2 100644 --- a/include/deal.II/grid/manifold_lib.h +++ b/include/deal.II/grid/manifold_lib.h @@ -620,8 +620,8 @@ public: * This constructor is useful because it allows creating function objects at * the place of calling the constructor without having to name and later * delete these objects. This allows the following idiom: - * FunctionManifold manifold(std_cxx14::make_unique(...), - * std_cxx14::make_unique(...)); + * FunctionManifold manifold(std::make_unique(...), + * std::make_unique(...)); */ FunctionManifold( std::unique_ptr> push_forward, diff --git a/include/deal.II/grid/tensor_product_manifold.h b/include/deal.II/grid/tensor_product_manifold.h index 5f371c3437..c222a2faa5 100644 --- a/include/deal.II/grid/tensor_product_manifold.h +++ b/include/deal.II/grid/tensor_product_manifold.h @@ -216,14 +216,14 @@ TensorProductManifold::clone() const { - return std_cxx14::make_unique>(*manifold_A, - *manifold_B); + return std::make_unique>(*manifold_A, + *manifold_B); } template ::reinit(const ChunkSparsityPattern &sparsity) cols->sparsity_pattern.n_nonzero_elements() * chunk_size * chunk_size; if (N > max_len || max_len == 0) { - val = std_cxx14::make_unique(N); + val = std::make_unique(N); max_len = N; } @@ -1598,7 +1598,7 @@ ChunkSparseMatrix::block_read(std::istream &in) AssertThrow(c == '[', ExcIO()); // reallocate space - val = std_cxx14::make_unique(max_len); + val = std::make_unique(max_len); // then read data in.read(reinterpret_cast(val.get()), diff --git a/include/deal.II/lac/qr.h b/include/deal.II/lac/qr.h index 343038c482..95501984d4 100644 --- a/include/deal.II/lac/qr.h +++ b/include/deal.II/lac/qr.h @@ -597,7 +597,7 @@ ImplicitQR::append_column(const VectorType &column) if (this->current_size == 0) { this->R.grow_or_shrink(this->current_size + 1); - this->columns.push_back(std_cxx14::make_unique(column)); + this->columns.push_back(std::make_unique(column)); this->R(0, 0) = column.l2_norm(); ++this->current_size; } @@ -630,7 +630,7 @@ ImplicitQR::append_column(const VectorType &column) // at this point we update is successful and we can enlarge R // and store the column: - this->columns.push_back(std_cxx14::make_unique(column)); + this->columns.push_back(std::make_unique(column)); this->R.grow_or_shrink(this->current_size + 1); this->R(this->current_size, this->current_size) = std::sqrt(rho2); for (unsigned int i = 0; i < this->current_size; ++i) @@ -756,7 +756,7 @@ QR::append_column(const VectorType &column) { // resize R: this->R.grow_or_shrink(this->current_size + 1); - this->columns.push_back(std_cxx14::make_unique(column)); + this->columns.push_back(std::make_unique(column)); // now a Gram-Schmidt part: orthonormalize the new column // against everything we have so far: diff --git a/include/deal.II/lac/solver_gmres.h b/include/deal.II/lac/solver_gmres.h index 45af42ad6e..7cbc765f8a 100644 --- a/include/deal.II/lac/solver_gmres.h +++ b/include/deal.II/lac/solver_gmres.h @@ -869,7 +869,7 @@ SolverGMRES::solve(const MatrixType & A, r->reinit(x); x_->reinit(x); - gamma_ = std_cxx14::make_unique>(gamma.size()); + gamma_ = std::make_unique>(gamma.size()); } bool re_orthogonalize = additional_data.force_re_orthogonalization; diff --git a/include/deal.II/lac/sparse_matrix.templates.h b/include/deal.II/lac/sparse_matrix.templates.h index 77d8798ecf..64790c30c8 100644 --- a/include/deal.II/lac/sparse_matrix.templates.h +++ b/include/deal.II/lac/sparse_matrix.templates.h @@ -269,7 +269,7 @@ SparseMatrix::reinit(const SparsityPattern &sparsity) const std::size_t N = cols->n_nonzero_elements(); if (N > max_len || max_len == 0) { - val = std_cxx14::make_unique(N); + val = std::make_unique(N); max_len = N; } @@ -2056,7 +2056,7 @@ SparseMatrix::block_read(std::istream &in) AssertThrow(c == '[', ExcIO()); // reallocate space - val = std_cxx14::make_unique(max_len); + val = std::make_unique(max_len); // then read data in.read(reinterpret_cast(val.get()), diff --git a/include/deal.II/lac/sparsity_pattern.h b/include/deal.II/lac/sparsity_pattern.h index 35801674c2..d615c603aa 100644 --- a/include/deal.II/lac/sparsity_pattern.h +++ b/include/deal.II/lac/sparsity_pattern.h @@ -1595,8 +1595,8 @@ SparsityPatternBase::load(Archive &ar, const unsigned int) ar &max_dim &rows &cols &max_vec_len &max_row_length &compressed; - rowstart = std_cxx14::make_unique(max_dim + 1); - colnums = std_cxx14::make_unique(max_vec_len); + rowstart = std::make_unique(max_dim + 1); + colnums = std::make_unique(max_vec_len); ar &boost::serialization::make_array(rowstart.get(), max_dim + 1); ar &boost::serialization::make_array(colnums.get(), max_vec_len); diff --git a/include/deal.II/lac/trilinos_tpetra_vector.templates.h b/include/deal.II/lac/trilinos_tpetra_vector.templates.h index 3fa8caef58..a88d2506e2 100644 --- a/include/deal.II/lac/trilinos_tpetra_vector.templates.h +++ b/include/deal.II/lac/trilinos_tpetra_vector.templates.h @@ -88,7 +88,7 @@ namespace LinearAlgebra Tpetra::Map input_map = parallel_partitioner.make_tpetra_map(communicator, false); if (vector->getMap()->isSameAs(input_map) == false) - vector = std_cxx14::make_unique< + vector = std::make_unique< Tpetra::Vector>(Teuchos::rcp( new Tpetra::Map(input_map))); else if (omit_zeroing_entries == false) @@ -140,7 +140,7 @@ namespace LinearAlgebra Tpetra::REPLACE); } else - vector = std_cxx14::make_unique< + vector = std::make_unique< Tpetra::Vector>( V.trilinos_vector()); } diff --git a/include/deal.II/lac/vector_memory.templates.h b/include/deal.II/lac/vector_memory.templates.h index 8378d6bcce..4b9c6df9de 100644 --- a/include/deal.II/lac/vector_memory.templates.h +++ b/include/deal.II/lac/vector_memory.templates.h @@ -76,7 +76,7 @@ GrowingVectorMemory::Pool::initialize(const size_type size) ++i) { i->first = false; - i->second = std_cxx14::make_unique(); + i->second = std::make_unique(); } } } @@ -134,7 +134,7 @@ GrowingVectorMemory::alloc() } // no free vector found, so let's just allocate a new one - get_pool().data->emplace_back(true, std_cxx14::make_unique()); + get_pool().data->emplace_back(true, std::make_unique()); return get_pool().data->back().second.get(); } diff --git a/include/deal.II/numerics/data_out_dof_data.templates.h b/include/deal.II/numerics/data_out_dof_data.templates.h index b2a6e26ed1..55c81fdc5f 100644 --- a/include/deal.II/numerics/data_out_dof_data.templates.h +++ b/include/deal.II/numerics/data_out_dof_data.templates.h @@ -1415,7 +1415,7 @@ DataOut_DoFData::add_data_vector( dof_handler.get_triangulation().n_active_cells())); - auto new_entry = std_cxx14::make_unique< + auto new_entry = std::make_unique< internal::DataOutImplementation::DataEntry>( &dof_handler, &vec, &data_postprocessor); dof_data.emplace_back(std::move(new_entry)); @@ -1537,7 +1537,7 @@ DataOut_DoFData:: DataComponentInterpretation::component_is_scalar)); // finally, add the data vector: - auto new_entry = std_cxx14::make_unique< + auto new_entry = std::make_unique< internal::DataOutImplementation::DataEntry>( dof_handler, &data_vector, deduced_names, data_component_interpretation); @@ -1610,7 +1610,7 @@ DataOut_DoFData::add_mg_data_vector( ExcMessage( "Invalid number of entries in data_component_interpretation.")); - auto new_entry = std_cxx14::make_unique< + auto new_entry = std::make_unique< internal::DataOutImplementation::MGDataEntry>( &dof_handler, &data, deduced_names, data_component_interpretation); dof_data.emplace_back(std::move(new_entry)); diff --git a/include/deal.II/numerics/history.h b/include/deal.II/numerics/history.h index 45f361d822..27aee75eff 100644 --- a/include/deal.II/numerics/history.h +++ b/include/deal.II/numerics/history.h @@ -172,7 +172,7 @@ FiniteSizeHistory::add(const T &element) if (cache.size() == 0) // nothing is cached, just copy a given element { - new_el = std_cxx14::make_unique(element); + new_el = std::make_unique(element); } else // something is cached, take one element and copy diff --git a/include/deal.II/numerics/vector_tools_common.h b/include/deal.II/numerics/vector_tools_common.h index c775245493..5e04a20cca 100644 --- a/include/deal.II/numerics/vector_tools_common.h +++ b/include/deal.II/numerics/vector_tools_common.h @@ -297,7 +297,7 @@ namespace Patterns static std::unique_ptr to_pattern() { - return std_cxx14::make_unique( + return std::make_unique( "mean|L1_norm|L2_norm|Lp_norm|" "Linfty_norm|H1_seminorm|Hdiv_seminorm|" "H1_norm|W1p_seminorm|W1p_norm|" diff --git a/source/base/function_parser.cc b/source/base/function_parser.cc index ded8832382..1226cab8b6 100644 --- a/source/base/function_parser.cc +++ b/source/base/function_parser.cc @@ -64,12 +64,12 @@ FunctionParser::FunctionParser(const std::string &expression, { auto constants_map = Patterns::Tools::Convert::to_value( constants, - std_cxx14::make_unique(Patterns::Anything(), - Patterns::Double(), - 0, - Patterns::Map::max_int_value, - ",", - "=")); + std::make_unique(Patterns::Anything(), + Patterns::Double(), + 0, + Patterns::Map::max_int_value, + ",", + "=")); initialize(variable_names, expression, constants_map, diff --git a/source/base/parameter_handler.cc b/source/base/parameter_handler.cc index b8e3cb3080..fd93db4123 100644 --- a/source/base/parameter_handler.cc +++ b/source/base/parameter_handler.cc @@ -774,7 +774,7 @@ ParameterHandler::parse_input_from_json(std::istream &in, void ParameterHandler::clear() { - entries = std_cxx14::make_unique(); + entries = std::make_unique(); entries_set_status.clear(); } diff --git a/source/base/patterns.cc b/source/base/patterns.cc index c48451c645..765506a585 100644 --- a/source/base/patterns.cc +++ b/source/base/patterns.cc @@ -326,17 +326,17 @@ namespace Patterns is.ignore(strlen(description_init) + strlen(" range ")); if (!(is >> lower_bound)) - return std_cxx14::make_unique(); + return std::make_unique(); is.ignore(strlen("...")); if (!(is >> upper_bound)) - return std_cxx14::make_unique(); + return std::make_unique(); - return std_cxx14::make_unique(lower_bound, upper_bound); + return std::make_unique(lower_bound, upper_bound); } else - return std_cxx14::make_unique(); + return std::make_unique(); } else return std::unique_ptr(); @@ -500,8 +500,8 @@ namespace Patterns std::string temp = description.substr(description_init_str.size()); if (temp == "]") - return std_cxx14::make_unique(1.0, - -1.0); // return an invalid range + return std::make_unique(1.0, + -1.0); // return an invalid range if (temp.find("...") != std::string::npos) temp.replace(temp.find("..."), 3, " "); @@ -523,7 +523,7 @@ namespace Patterns if (is.fail()) upper_bound = max_double_value; - return std_cxx14::make_unique(lower_bound, upper_bound); + return std::make_unique(lower_bound, upper_bound); } @@ -637,7 +637,7 @@ namespace Patterns sequence.erase(0, std::strlen(description_init) + 1); sequence.erase(sequence.length() - 2, 2); - return std_cxx14::make_unique(sequence); + return std::make_unique(sequence); } else return std::unique_ptr(); @@ -792,11 +792,11 @@ namespace Patterns is.ignore(strlen(" of length ")); if (!(is >> min_elements)) - return std_cxx14::make_unique(*base_pattern); + return std::make_unique(*base_pattern); is.ignore(strlen("...")); if (!(is >> max_elements)) - return std_cxx14::make_unique(*base_pattern, min_elements); + return std::make_unique(*base_pattern, min_elements); is.ignore(strlen(" (inclusive) separated by <")); std::string separator; @@ -805,10 +805,10 @@ namespace Patterns else separator = ","; - return std_cxx14::make_unique(*base_pattern, - min_elements, - max_elements, - separator); + return std::make_unique(*base_pattern, + min_elements, + max_elements, + separator); } else return std::unique_ptr(); @@ -992,13 +992,13 @@ namespace Patterns is.ignore(strlen(" of length ")); if (!(is >> min_elements)) - return std_cxx14::make_unique(*key_pattern, *value_pattern); + return std::make_unique(*key_pattern, *value_pattern); is.ignore(strlen("...")); if (!(is >> max_elements)) - return std_cxx14::make_unique(*key_pattern, - *value_pattern, - min_elements); + return std::make_unique(*key_pattern, + *value_pattern, + min_elements); is.ignore(strlen(" (inclusive) separated by <")); std::string separator; @@ -1007,12 +1007,12 @@ namespace Patterns else separator = ","; - return std_cxx14::make_unique(*key_pattern, - *value_pattern, - min_elements, - max_elements, - separator, - key_value_separator); + return std::make_unique(*key_pattern, + *value_pattern, + min_elements, + max_elements, + separator, + key_value_separator); } else return std::unique_ptr(); @@ -1211,7 +1211,7 @@ namespace Patterns else separator = ":"; - return std_cxx14::make_unique(patterns, separator); + return std::make_unique(patterns, separator); } else return std::unique_ptr(); @@ -1378,7 +1378,7 @@ namespace Patterns sequence.erase(0, std::strlen(description_init) + 1); sequence.erase(sequence.length() - 2, 2); - return std_cxx14::make_unique(sequence); + return std::make_unique(sequence); } else return std::unique_ptr(); @@ -1437,7 +1437,7 @@ namespace Patterns if (description.compare(0, std::strlen(description_init), description_init) == 0) - return std_cxx14::make_unique(); + return std::make_unique(); else return std::unique_ptr(); } @@ -1498,7 +1498,7 @@ namespace Patterns if (description.compare(0, std::strlen(description_init), description_init) == 0) - return std_cxx14::make_unique(); + return std::make_unique(); else return std::unique_ptr(); } @@ -1586,7 +1586,7 @@ namespace Patterns else type = output; - return std_cxx14::make_unique(type); + return std::make_unique(type); } else return std::unique_ptr(); @@ -1648,7 +1648,7 @@ namespace Patterns if (description.compare(0, std::strlen(description_init), description_init) == 0) - return std_cxx14::make_unique(); + return std::make_unique(); else return std::unique_ptr(); } diff --git a/source/base/polynomial.cc b/source/base/polynomial.cc index 2539fb41a4..c83a04900c 100644 --- a/source/base/polynomial.cc +++ b/source/base/polynomial.cc @@ -374,7 +374,7 @@ namespace Polynomials const Polynomial * q = nullptr; if (p.in_lagrange_product_form == true) { - q_data = std_cxx14::make_unique>(p); + q_data = std::make_unique>(p); q_data->transform_into_standard_form(); q = q_data.get(); } @@ -418,7 +418,7 @@ namespace Polynomials const Polynomial * q = nullptr; if (p.in_lagrange_product_form == true) { - q_data = std_cxx14::make_unique>(p); + q_data = std::make_unique>(p); q_data->transform_into_standard_form(); q = q_data.get(); } @@ -454,7 +454,7 @@ namespace Polynomials const Polynomial * q = nullptr; if (p.in_lagrange_product_form == true) { - q_data = std_cxx14::make_unique>(p); + q_data = std::make_unique>(p); q_data->transform_into_standard_form(); q = q_data.get(); } @@ -599,7 +599,7 @@ namespace Polynomials const Polynomial * q = nullptr; if (in_lagrange_product_form == true) { - q_data = std_cxx14::make_unique>(*this); + q_data = std::make_unique>(*this); q_data->transform_into_standard_form(); q = q_data.get(); } @@ -625,7 +625,7 @@ namespace Polynomials const Polynomial * q = nullptr; if (in_lagrange_product_form == true) { - q_data = std_cxx14::make_unique>(*this); + q_data = std::make_unique>(*this); q_data->transform_into_standard_form(); q = q_data.get(); } @@ -1071,9 +1071,9 @@ namespace Polynomials // now make these arrays // const recursive_coefficients[0] = - std_cxx14::make_unique>(std::move(c0)); + std::make_unique>(std::move(c0)); recursive_coefficients[1] = - std_cxx14::make_unique>(std::move(c1)); + std::make_unique>(std::move(c1)); } else if (k == 2) { @@ -1090,7 +1090,7 @@ namespace Polynomials c2[2] = 4. * a; recursive_coefficients[2] = - std_cxx14::make_unique>(std::move(c2)); + std::make_unique>(std::move(c2)); } else { @@ -1134,7 +1134,7 @@ namespace Polynomials // const pointer in the // coefficients array recursive_coefficients[k] = - std_cxx14::make_unique>(std::move(ck)); + std::make_unique>(std::move(ck)); } } } diff --git a/source/base/polynomial_space.cc b/source/base/polynomial_space.cc index 3305f0d116..8b7e705e1a 100644 --- a/source/base/polynomial_space.cc +++ b/source/base/polynomial_space.cc @@ -403,7 +403,7 @@ template std::unique_ptr> PolynomialSpace::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/base/polynomials_abf.cc b/source/base/polynomials_abf.cc index 3ade2f546d..3792bc67e6 100644 --- a/source/base/polynomials_abf.cc +++ b/source/base/polynomials_abf.cc @@ -185,7 +185,7 @@ template std::unique_ptr> PolynomialsABF::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/base/polynomials_adini.cc b/source/base/polynomials_adini.cc index 9eae6504c8..2625de0728 100644 --- a/source/base/polynomials_adini.cc +++ b/source/base/polynomials_adini.cc @@ -260,7 +260,7 @@ template std::unique_ptr> PolynomialsAdini::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/base/polynomials_bdm.cc b/source/base/polynomials_bdm.cc index 2f7aaabf80..678dec0b3f 100644 --- a/source/base/polynomials_bdm.cc +++ b/source/base/polynomials_bdm.cc @@ -447,7 +447,7 @@ template std::unique_ptr> PolynomialsBDM::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/base/polynomials_bernardi_raugel.cc b/source/base/polynomials_bernardi_raugel.cc index a9ab446d2b..51f6e635c2 100644 --- a/source/base/polynomials_bernardi_raugel.cc +++ b/source/base/polynomials_bernardi_raugel.cc @@ -254,7 +254,7 @@ template std::unique_ptr> PolynomialsBernardiRaugel::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } template class PolynomialsBernardiRaugel<1>; // to prevent errors diff --git a/source/base/polynomials_nedelec.cc b/source/base/polynomials_nedelec.cc index 8650c43740..950f37bb93 100644 --- a/source/base/polynomials_nedelec.cc +++ b/source/base/polynomials_nedelec.cc @@ -1512,7 +1512,7 @@ template std::unique_ptr> PolynomialsNedelec::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/base/polynomials_rannacher_turek.cc b/source/base/polynomials_rannacher_turek.cc index 947514ea2c..c0ed061b41 100644 --- a/source/base/polynomials_rannacher_turek.cc +++ b/source/base/polynomials_rannacher_turek.cc @@ -194,7 +194,7 @@ template std::unique_ptr> PolynomialsRannacherTurek::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/base/polynomials_raviart_thomas.cc b/source/base/polynomials_raviart_thomas.cc index f62dbe37a5..36e600e20d 100644 --- a/source/base/polynomials_raviart_thomas.cc +++ b/source/base/polynomials_raviart_thomas.cc @@ -188,7 +188,7 @@ template std::unique_ptr> PolynomialsRaviartThomas::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/base/polynomials_rt_bubbles.cc b/source/base/polynomials_rt_bubbles.cc index 8a318be6af..f28337f635 100644 --- a/source/base/polynomials_rt_bubbles.cc +++ b/source/base/polynomials_rt_bubbles.cc @@ -849,7 +849,7 @@ template std::unique_ptr> PolynomialsRT_Bubbles::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/base/quadrature.cc b/source/base/quadrature.cc index 85fe246297..15787716c2 100644 --- a/source/base/quadrature.cc +++ b/source/base/quadrature.cc @@ -153,7 +153,7 @@ Quadrature::Quadrature(const SubQuadrature &q1, const Quadrature<1> &q2) if (is_tensor_product_flag) { - tensor_basis = std_cxx14::make_unique, dim>>(); + tensor_basis = std::make_unique, dim>>(); for (unsigned int i = 0; i < dim - 1; ++i) (*tensor_basis)[i] = q1.get_tensor_basis()[i]; (*tensor_basis)[dim - 1] = q2; @@ -251,7 +251,7 @@ Quadrature::Quadrature(const Quadrature &q) ++k; } - tensor_basis = std_cxx14::make_unique, dim>>(); + tensor_basis = std::make_unique, dim>>(); for (unsigned int i = 0; i < dim; ++i) (*tensor_basis)[i] = q; } @@ -267,7 +267,7 @@ Quadrature::Quadrature(const Quadrature &q) { if (dim > 1 && is_tensor_product_flag) tensor_basis = - std_cxx14::make_unique, dim>>(*q.tensor_basis); + std::make_unique, dim>>(*q.tensor_basis); } @@ -282,8 +282,8 @@ Quadrature::operator=(const Quadrature &q) if (dim > 1 && is_tensor_product_flag) { if (tensor_basis == nullptr) - tensor_basis = std_cxx14::make_unique, dim>>( - *q.tensor_basis); + tensor_basis = + std::make_unique, dim>>(*q.tensor_basis); else *tensor_basis = *q.tensor_basis; } @@ -384,8 +384,7 @@ QAnisotropic<2>::QAnisotropic(const Quadrature<1> &qx, const Quadrature<1> &qy) Assert(k == this->size(), ExcInternalError()); this->is_tensor_product_flag = true; const std::array, 2> q_array{{qx, qy}}; - this->tensor_basis = - std_cxx14::make_unique, 2>>(q_array); + this->tensor_basis = std::make_unique, 2>>(q_array); } @@ -420,8 +419,7 @@ QAnisotropic<3>::QAnisotropic(const Quadrature<1> &qx, Assert(k == this->size(), ExcInternalError()); this->is_tensor_product_flag = true; const std::array, 3> q_array{{qx, qy, qz}}; - this->tensor_basis = - std_cxx14::make_unique, 3>>(q_array); + this->tensor_basis = std::make_unique, 3>>(q_array); } diff --git a/source/base/tensor_function_parser.cc b/source/base/tensor_function_parser.cc index 969385448c..69acd512c3 100644 --- a/source/base/tensor_function_parser.cc +++ b/source/base/tensor_function_parser.cc @@ -63,12 +63,12 @@ TensorFunctionParser::TensorFunctionParser( { auto constants_map = Patterns::Tools::Convert::to_value( constants, - std_cxx14::make_unique(Patterns::Anything(), - Patterns::Double(), - 0, - Patterns::Map::max_int_value, - ",", - "=")); + std::make_unique(Patterns::Anything(), + Patterns::Double(), + 0, + Patterns::Map::max_int_value, + ",", + "=")); initialize(variable_names, expression, constants_map, diff --git a/source/base/tensor_product_polynomials.cc b/source/base/tensor_product_polynomials.cc index c086b52ec0..46f7177ad8 100644 --- a/source/base/tensor_product_polynomials.cc +++ b/source/base/tensor_product_polynomials.cc @@ -430,8 +430,7 @@ template std::unique_ptr> TensorProductPolynomials::clone() const { - return std_cxx14::make_unique>( - *this); + return std::make_unique>(*this); } @@ -738,7 +737,7 @@ template std::unique_ptr> AnisotropicPolynomials::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/base/tensor_product_polynomials_bubbles.cc b/source/base/tensor_product_polynomials_bubbles.cc index dafc940478..802cca256b 100644 --- a/source/base/tensor_product_polynomials_bubbles.cc +++ b/source/base/tensor_product_polynomials_bubbles.cc @@ -336,7 +336,7 @@ template std::unique_ptr> TensorProductPolynomialsBubbles::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/base/tensor_product_polynomials_const.cc b/source/base/tensor_product_polynomials_const.cc index a2fcb95ce5..002d6c2704 100644 --- a/source/base/tensor_product_polynomials_const.cc +++ b/source/base/tensor_product_polynomials_const.cc @@ -203,7 +203,7 @@ template std::unique_ptr> TensorProductPolynomialsConst::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/distributed/fully_distributed_tria.cc b/source/distributed/fully_distributed_tria.cc index c7bbf5a656..2d76ff040c 100644 --- a/source/distributed/fully_distributed_tria.cc +++ b/source/distributed/fully_distributed_tria.cc @@ -251,7 +251,7 @@ namespace parallel *>(&other_tria) == nullptr) { serial_tria = - std_cxx14::make_unique>(); + std::make_unique>(); // actually copy the serial triangulation serial_tria->copy_triangulation(other_tria); diff --git a/source/dofs/dof_handler.cc b/source/dofs/dof_handler.cc index 5372d6872b..aea54f9db3 100644 --- a/source/dofs/dof_handler.cc +++ b/source/dofs/dof_handler.cc @@ -336,8 +336,8 @@ namespace internal numbers::invalid_dof_index); } - dof_handler.faces = std_cxx14::make_unique< - internal::DoFHandlerImplementation::DoFFaces<2>>(); + dof_handler.faces = + std::make_unique>(); // avoid access to n_raw_lines when there are no cells if (dof_handler.tria->n_cells() > 0) { @@ -371,8 +371,8 @@ namespace internal dof_handler.get_fe().dofs_per_cell, numbers::invalid_dof_index); } - dof_handler.faces = std_cxx14::make_unique< - internal::DoFHandlerImplementation::DoFFaces<3>>(); + dof_handler.faces = + std::make_unique>(); // avoid access to n_raw_lines when there are no cells if (dof_handler.tria->n_cells() > 0) @@ -471,7 +471,7 @@ namespace internal for (unsigned int i = 0; i < n_levels; ++i) { dof_handler.mg_levels.emplace_back( - std_cxx14::make_unique< + std::make_unique< internal::DoFHandlerImplementation::DoFLevel<2>>()); dof_handler.mg_levels.back()->dof_object.dofs = std::vector(tria.n_raw_quads(i) * @@ -479,8 +479,8 @@ namespace internal numbers::invalid_dof_index); } - dof_handler.mg_faces = std_cxx14::make_unique< - internal::DoFHandlerImplementation::DoFFaces<2>>(); + dof_handler.mg_faces = + std::make_unique>(); dof_handler.mg_faces->lines.dofs = std::vector( tria.n_raw_lines() * fe.dofs_per_line, numbers::invalid_dof_index); @@ -544,7 +544,7 @@ namespace internal for (unsigned int i = 0; i < n_levels; ++i) { dof_handler.mg_levels.emplace_back( - std_cxx14::make_unique< + std::make_unique< internal::DoFHandlerImplementation::DoFLevel<3>>()); dof_handler.mg_levels.back()->dof_object.dofs = std::vector(tria.n_raw_hexs(i) * @@ -552,8 +552,8 @@ namespace internal numbers::invalid_dof_index); } - dof_handler.mg_faces = std_cxx14::make_unique< - internal::DoFHandlerImplementation::DoFFaces<3>>(); + dof_handler.mg_faces = + std::make_unique>(); dof_handler.mg_faces->lines.dofs = std::vector( tria.n_raw_lines() * fe.dofs_per_line, numbers::invalid_dof_index); dof_handler.mg_faces->quads.dofs = std::vector( @@ -843,20 +843,18 @@ DoFHandler::DoFHandler(const Triangulation &tria) if (dynamic_cast *>( &tria) != nullptr) policy = - std_cxx14::make_unique>>( - *this); + std::make_unique>>(*this); else if (dynamic_cast< const parallel::DistributedTriangulationBase *>( &tria) == nullptr) policy = - std_cxx14::make_unique>>(*this); + std::make_unique>>(*this); else policy = - std_cxx14::make_unique>>( - *this); + std::make_unique>>(*this); } @@ -895,20 +893,18 @@ DoFHandler::initialize(const Triangulation &t, if (dynamic_cast *>( &t) != nullptr) policy = - std_cxx14::make_unique>>( - *this); + std::make_unique>>(*this); else if (dynamic_cast< const parallel::DistributedTriangulationBase *>( &t) != nullptr) policy = - std_cxx14::make_unique>>( - *this); + std::make_unique>>(*this); else policy = - std_cxx14::make_unique>>(*this); + std::make_unique>>(*this); distribute_dofs(fe); } @@ -1581,7 +1577,7 @@ DoFHandler::MGVertexDoFs::init( const unsigned int n_levels = finest_level - coarsest_level + 1; const unsigned int n_indices = n_levels * dofs_per_vertex; - indices = std_cxx14::make_unique(n_indices); + indices = std::make_unique(n_indices); std::fill(indices.get(), indices.get() + n_indices, numbers::invalid_dof_index); diff --git a/source/dofs/dof_handler_policy.cc b/source/dofs/dof_handler_policy.cc index 272afee9c7..1ff9c22043 100644 --- a/source/dofs/dof_handler_policy.cc +++ b/source/dofs/dof_handler_policy.cc @@ -175,21 +175,21 @@ namespace internal { case 0: { - identities = std_cxx14::make_unique( + identities = std::make_unique( fe1.hp_vertex_dof_identities(fe2)); break; } case 1: { - identities = std_cxx14::make_unique( + identities = std::make_unique( fe1.hp_line_dof_identities(fe2)); break; } case 2: { - identities = std_cxx14::make_unique( + identities = std::make_unique( fe1.hp_quad_dof_identities(fe2)); break; } diff --git a/source/dofs/dof_tools_constraints.cc b/source/dofs/dof_tools_constraints.cc index b2835c83f3..54e3df06ac 100644 --- a/source/dofs/dof_tools_constraints.cc +++ b/source/dofs/dof_tools_constraints.cc @@ -309,7 +309,7 @@ namespace DoFTools if (master_dof_mask == nullptr) { master_dof_mask = - std_cxx14::make_unique>(fe1.dofs_per_face); + std::make_unique>(fe1.dofs_per_face); select_master_dofs_for_face_restriction(fe1, fe2, face_interpolation_matrix, @@ -333,9 +333,8 @@ namespace DoFTools { if (matrix == nullptr) { - matrix = - std_cxx14::make_unique>(fe2.dofs_per_face, - fe1.dofs_per_face); + matrix = std::make_unique>(fe2.dofs_per_face, + fe1.dofs_per_face); fe1.get_face_interpolation_matrix(fe2, *matrix); } } @@ -355,9 +354,8 @@ namespace DoFTools { if (matrix == nullptr) { - matrix = - std_cxx14::make_unique>(fe2.dofs_per_face, - fe1.dofs_per_face); + matrix = std::make_unique>(fe2.dofs_per_face, + fe1.dofs_per_face); fe1.get_subface_interpolation_matrix(fe2, subface, *matrix); } } @@ -385,7 +383,7 @@ namespace DoFTools if (split_matrix == nullptr) { - split_matrix = std_cxx14::make_unique< + split_matrix = std::make_unique< std::pair, FullMatrix>>(); const unsigned int n_master_dofs = face_interpolation_matrix.n(); diff --git a/source/fe/fe_abf.cc b/source/fe/fe_abf.cc index e2fc86f4ef..cfb693bc81 100644 --- a/source/fe/fe_abf.cc +++ b/source/fe/fe_abf.cc @@ -135,7 +135,7 @@ template std::unique_ptr> FE_ABF::clone() const { - return std_cxx14::make_unique>(rt_order); + return std::make_unique>(rt_order); } diff --git a/source/fe/fe_bdm.cc b/source/fe/fe_bdm.cc index 97988fb081..93588bf04a 100644 --- a/source/fe/fe_bdm.cc +++ b/source/fe/fe_bdm.cc @@ -124,7 +124,7 @@ template std::unique_ptr> FE_BDM::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/fe/fe_bernardi_raugel.cc b/source/fe/fe_bernardi_raugel.cc index ffdb3cc956..60ea30e96c 100644 --- a/source/fe/fe_bernardi_raugel.cc +++ b/source/fe/fe_bernardi_raugel.cc @@ -82,7 +82,7 @@ template std::unique_ptr> FE_BernardiRaugel::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/fe/fe_bernstein.cc b/source/fe/fe_bernstein.cc index 60fe4045d8..245f8c6846 100644 --- a/source/fe/fe_bernstein.cc +++ b/source/fe/fe_bernstein.cc @@ -342,7 +342,7 @@ template std::unique_ptr> FE_Bernstein::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/fe/fe_dgp.cc b/source/fe/fe_dgp.cc index 04fe320a73..f11b4fbb62 100644 --- a/source/fe/fe_dgp.cc +++ b/source/fe/fe_dgp.cc @@ -75,7 +75,7 @@ template std::unique_ptr> FE_DGP::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/fe/fe_dgp_monomial.cc b/source/fe/fe_dgp_monomial.cc index 61477873f3..e1d2eadd7d 100644 --- a/source/fe/fe_dgp_monomial.cc +++ b/source/fe/fe_dgp_monomial.cc @@ -184,7 +184,7 @@ template std::unique_ptr> FE_DGPMonomial::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/fe/fe_dgp_nonparametric.cc b/source/fe/fe_dgp_nonparametric.cc index 6b534e1612..c915a44f7a 100644 --- a/source/fe/fe_dgp_nonparametric.cc +++ b/source/fe/fe_dgp_nonparametric.cc @@ -127,7 +127,7 @@ template std::unique_ptr> FE_DGPNonparametric::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } @@ -283,8 +283,8 @@ FE_DGPNonparametric::get_data( & /*output_data*/) const { // generate a new data object - auto data_ptr = std_cxx14::make_unique< - typename FiniteElement::InternalDataBase>(); + auto data_ptr = + std::make_unique::InternalDataBase>(); data_ptr->update_each = requires_update_flags(update_flags); // other than that, there is nothing we can add here as discussed diff --git a/source/fe/fe_dgq.cc b/source/fe/fe_dgq.cc index c9deeb1ed5..14b0f9cad6 100644 --- a/source/fe/fe_dgq.cc +++ b/source/fe/fe_dgq.cc @@ -163,7 +163,7 @@ template std::unique_ptr> FE_DGQ::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } @@ -958,8 +958,7 @@ FE_DGQArbitraryNodes::clone() const qpoints[i] = Point<1>(this->unit_support_points[lexicographic[i]][0]); Quadrature<1> pquadrature(qpoints); - return std_cxx14::make_unique>( - pquadrature); + return std::make_unique>(pquadrature); } @@ -1002,7 +1001,7 @@ template std::unique_ptr> FE_DGQLegendre::clone() const { - return std_cxx14::make_unique>(this->degree); + return std::make_unique>(this->degree); } @@ -1031,7 +1030,7 @@ template std::unique_ptr> FE_DGQHermite::clone() const { - return std_cxx14::make_unique>(this->degree); + return std::make_unique>(this->degree); } diff --git a/source/fe/fe_enriched.cc b/source/fe/fe_enriched.cc index f958d3b41f..d62b4ebf56 100644 --- a/source/fe/fe_enriched.cc +++ b/source/fe/fe_enriched.cc @@ -190,8 +190,7 @@ FE_Enriched::FE_Enriched( false)) , enrichments(functions) , is_enriched(internal::FE_Enriched::check_if_enriched(fes)) - , fe_system( - std_cxx14::make_unique>(fes, multiplicities)) + , fe_system(std::make_unique>(fes, multiplicities)) { // descriptive error are thrown within the function. Assert(internal::FE_Enriched::consistency_check(fes, @@ -332,7 +331,7 @@ FE_Enriched::setup_data( // that fes_data points to, to the new InternalData object. auto update_each_flags = fes_data->update_each; std::unique_ptr::InternalDataBase> - data_ptr = std_cxx14::make_unique(std::move(fes_data)); + data_ptr = std::make_unique(std::move(fes_data)); auto &data = dynamic_cast(*data_ptr); // copy update_each from FESystem data: diff --git a/source/fe/fe_face.cc b/source/fe/fe_face.cc index 5c1506b4b0..08b5409881 100644 --- a/source/fe/fe_face.cc +++ b/source/fe/fe_face.cc @@ -121,7 +121,7 @@ template std::unique_ptr> FE_FaceQ::clone() const { - return std_cxx14::make_unique>(this->degree); + return std::make_unique>(this->degree); } @@ -527,7 +527,7 @@ template std::unique_ptr> FE_FaceQ<1, spacedim>::clone() const { - return std_cxx14::make_unique>(this->degree); + return std::make_unique>(this->degree); } @@ -761,7 +761,7 @@ template std::unique_ptr> FE_FaceP::clone() const { - return std_cxx14::make_unique>(this->degree); + return std::make_unique>(this->degree); } diff --git a/source/fe/fe_nedelec.cc b/source/fe/fe_nedelec.cc index dc77242fec..b9e57456f4 100644 --- a/source/fe/fe_nedelec.cc +++ b/source/fe/fe_nedelec.cc @@ -224,7 +224,7 @@ template std::unique_ptr> FE_Nedelec::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } //--------------------------------------------------------------------------- diff --git a/source/fe/fe_nedelec_sz.cc b/source/fe/fe_nedelec_sz.cc index 4ca5a952e5..de789f16fb 100644 --- a/source/fe/fe_nedelec_sz.cc +++ b/source/fe/fe_nedelec_sz.cc @@ -134,7 +134,7 @@ FE_NedelecSZ::get_data( { std::unique_ptr< typename dealii::FiniteElement::InternalDataBase> - data_ptr = std_cxx14::make_unique(); + data_ptr = std::make_unique(); auto &data = dynamic_cast(*data_ptr); data.update_each = requires_update_flags(update_flags); @@ -2221,7 +2221,7 @@ template std::unique_ptr> FE_NedelecSZ::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/fe/fe_nothing.cc b/source/fe/fe_nothing.cc index 1777528ed6..c436565cf2 100644 --- a/source/fe/fe_nothing.cc +++ b/source/fe/fe_nothing.cc @@ -45,7 +45,7 @@ template std::unique_ptr> FE_Nothing::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } @@ -103,7 +103,7 @@ FE_Nothing::get_data( // Create a default data object. Normally we would then // need to resize things to hold the appropriate numbers // of dofs, but in this case all data fields are empty. - return std_cxx14::make_unique< + return std::make_unique< typename FiniteElement::InternalDataBase>(); } diff --git a/source/fe/fe_p1nc.cc b/source/fe/fe_p1nc.cc index 0c6f85d7f0..9ecdd170c1 100644 --- a/source/fe/fe_p1nc.cc +++ b/source/fe/fe_p1nc.cc @@ -68,7 +68,7 @@ FE_P1NC::requires_update_flags(const UpdateFlags flags) const std::unique_ptr> FE_P1NC::clone() const { - return std_cxx14::make_unique(*this); + return std::make_unique(*this); } @@ -140,8 +140,7 @@ FE_P1NC::get_data( dealii::internal::FEValuesImplementation::FiniteElementRelatedData<2, 2> &output_data) const { - auto data_ptr = - std_cxx14::make_unique::InternalDataBase>(); + auto data_ptr = std::make_unique::InternalDataBase>(); data_ptr->update_each = requires_update_flags(update_flags); @@ -165,8 +164,7 @@ FE_P1NC::get_face_data( dealii::internal::FEValuesImplementation::FiniteElementRelatedData<2, 2> &output_data) const { - auto data_ptr = - std_cxx14::make_unique::InternalDataBase>(); + auto data_ptr = std::make_unique::InternalDataBase>(); data_ptr->update_each = requires_update_flags(update_flags); @@ -190,8 +188,7 @@ FE_P1NC::get_subface_data( dealii::internal::FEValuesImplementation::FiniteElementRelatedData<2, 2> &output_data) const { - auto data_ptr = - std_cxx14::make_unique::InternalDataBase>(); + auto data_ptr = std::make_unique::InternalDataBase>(); data_ptr->update_each = requires_update_flags(update_flags); diff --git a/source/fe/fe_q.cc b/source/fe/fe_q.cc index db825ba22d..13345b26c6 100644 --- a/source/fe/fe_q.cc +++ b/source/fe/fe_q.cc @@ -171,7 +171,7 @@ template std::unique_ptr> FE_Q::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/fe/fe_q_bubbles.cc b/source/fe/fe_q_bubbles.cc index 8d28cce37d..f7f9438b7e 100644 --- a/source/fe/fe_q_bubbles.cc +++ b/source/fe/fe_q_bubbles.cc @@ -64,23 +64,28 @@ namespace internal { case 1: if (spacedim == 1) - q_fine = std_cxx14::make_unique>(degree + 1); + q_fine = std::make_unique>(degree + 1); else if (spacedim == 2) - q_fine = std_cxx14::make_unique>( - QGauss<1>(degree + 1), q_dummy); + q_fine = + std::make_unique>(QGauss<1>(degree + 1), + q_dummy); else - q_fine = std_cxx14::make_unique>( - QGauss<1>(degree + 1), q_dummy, q_dummy); + q_fine = + std::make_unique>(QGauss<1>(degree + 1), + q_dummy, + q_dummy); break; case 2: if (spacedim == 2) - q_fine = std_cxx14::make_unique>(degree + 1); + q_fine = std::make_unique>(degree + 1); else - q_fine = std_cxx14::make_unique>( - QGauss<1>(degree + 1), QGauss<1>(degree + 1), q_dummy); + q_fine = + std::make_unique>(QGauss<1>(degree + 1), + QGauss<1>(degree + 1), + q_dummy); break; case 3: - q_fine = std_cxx14::make_unique>(degree + 1); + q_fine = std::make_unique>(degree + 1); break; default: Assert(false, ExcInternalError()); @@ -343,7 +348,7 @@ template std::unique_ptr> FE_Q_Bubbles::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/fe/fe_q_dg0.cc b/source/fe/fe_q_dg0.cc index be261bedc2..e8c6fabea7 100644 --- a/source/fe/fe_q_dg0.cc +++ b/source/fe/fe_q_dg0.cc @@ -173,7 +173,7 @@ template std::unique_ptr> FE_Q_DG0::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/fe/fe_q_hierarchical.cc b/source/fe/fe_q_hierarchical.cc index 4a385705eb..8b7da34c2e 100644 --- a/source/fe/fe_q_hierarchical.cc +++ b/source/fe/fe_q_hierarchical.cc @@ -141,7 +141,7 @@ template std::unique_ptr> FE_Q_Hierarchical::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/fe/fe_q_iso_q1.cc b/source/fe/fe_q_iso_q1.cc index 654968a917..a8b7f40c1f 100644 --- a/source/fe/fe_q_iso_q1.cc +++ b/source/fe/fe_q_iso_q1.cc @@ -100,7 +100,7 @@ template std::unique_ptr> FE_Q_iso_Q1::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/fe/fe_rannacher_turek.cc b/source/fe/fe_rannacher_turek.cc index 78186941fb..e2a34f7e5c 100644 --- a/source/fe/fe_rannacher_turek.cc +++ b/source/fe/fe_rannacher_turek.cc @@ -78,8 +78,8 @@ template std::unique_ptr> FE_RannacherTurek::clone() const { - return std_cxx14::make_unique>( - this->order, this->n_face_support_points); + return std::make_unique>(this->order, + this->n_face_support_points); } diff --git a/source/fe/fe_raviart_thomas.cc b/source/fe/fe_raviart_thomas.cc index 5d085016e9..ce0790ffed 100644 --- a/source/fe/fe_raviart_thomas.cc +++ b/source/fe/fe_raviart_thomas.cc @@ -136,7 +136,7 @@ template std::unique_ptr> FE_RaviartThomas::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } @@ -215,8 +215,7 @@ FE_RaviartThomas::initialize_support_points(const unsigned int deg) poly[d] = Polynomials::Legendre::generate_complete_basis(deg); poly[dd] = Polynomials::Legendre::generate_complete_basis(deg - 1); - polynomials[dd] = - std_cxx14::make_unique>(poly); + polynomials[dd] = std::make_unique>(poly); } interior_weights.reinit( @@ -351,8 +350,7 @@ FE_RaviartThomas::initialize_restriction() poly[dd] = Polynomials::Legendre::generate_complete_basis(this->degree - 2); - polynomials[dd] = - std_cxx14::make_unique>(poly); + polynomials[dd] = std::make_unique>(poly); } QGauss q_cell(this->degree); diff --git a/source/fe/fe_raviart_thomas_nodal.cc b/source/fe/fe_raviart_thomas_nodal.cc index 344207af95..f5c170e56c 100644 --- a/source/fe/fe_raviart_thomas_nodal.cc +++ b/source/fe/fe_raviart_thomas_nodal.cc @@ -133,7 +133,7 @@ template std::unique_ptr> FE_RaviartThomasNodal::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } @@ -191,18 +191,18 @@ FE_RaviartThomasNodal::initialize_support_points(const unsigned int deg) switch (dim) { case 1: - quadrature = std_cxx14::make_unique>(high); + quadrature = std::make_unique>(high); break; case 2: - quadrature = std_cxx14::make_unique>( - ((d == 0) ? low : high), ((d == 1) ? low : high)); + quadrature = + std::make_unique>(((d == 0) ? low : high), + ((d == 1) ? low : high)); break; case 3: quadrature = - std_cxx14::make_unique>(((d == 0) ? low : high), - ((d == 1) ? low : high), - ((d == 2) ? low : - high)); + std::make_unique>(((d == 0) ? low : high), + ((d == 1) ? low : high), + ((d == 2) ? low : high)); break; default: Assert(false, ExcNotImplemented()); diff --git a/source/fe/fe_rt_bubbles.cc b/source/fe/fe_rt_bubbles.cc index ec657d0a6c..86f4727951 100644 --- a/source/fe/fe_rt_bubbles.cc +++ b/source/fe/fe_rt_bubbles.cc @@ -117,7 +117,7 @@ template std::unique_ptr> FE_RT_Bubbles::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } @@ -177,18 +177,18 @@ FE_RT_Bubbles::initialize_support_points(const unsigned int deg) switch (dim) { case 1: - quadrature = std_cxx14::make_unique>(high); + quadrature = std::make_unique>(high); break; case 2: - quadrature = std_cxx14::make_unique>( - ((d == 0) ? low : high), ((d == 1) ? low : high)); + quadrature = + std::make_unique>(((d == 0) ? low : high), + ((d == 1) ? low : high)); break; case 3: quadrature = - std_cxx14::make_unique>(((d == 0) ? low : high), - ((d == 1) ? low : high), - ((d == 2) ? low : - high)); + std::make_unique>(((d == 0) ? low : high), + ((d == 1) ? low : high), + ((d == 2) ? low : high)); break; default: Assert(false, ExcNotImplemented()); diff --git a/source/fe/fe_system.cc b/source/fe/fe_system.cc index a26233678f..77a61770ff 100644 --- a/source/fe/fe_system.cc +++ b/source/fe/fe_system.cc @@ -347,7 +347,7 @@ FESystem::clone() const fes.push_back(&base_element(i)); multiplicities.push_back(this->element_multiplicity(i)); } - return std_cxx14::make_unique>(fes, multiplicities); + return std::make_unique>(fes, multiplicities); } @@ -923,8 +923,8 @@ FESystem::get_data( // correct in case the current FESystem is a base element for another, // higher-level FESystem itself. std::unique_ptr::InternalDataBase> - data_ptr = std_cxx14::make_unique(this->n_base_elements()); - auto &data = dynamic_cast(*data_ptr); + data_ptr = std::make_unique(this->n_base_elements()); + auto &data = dynamic_cast(*data_ptr); data.update_each = requires_update_flags(flags); // get data objects from each of the base elements and store @@ -986,8 +986,8 @@ FESystem::get_face_data( // correct in case the current FESystem is a base element for another, // higher-level FESystem itself. std::unique_ptr::InternalDataBase> - data_ptr = std_cxx14::make_unique(this->n_base_elements()); - auto &data = dynamic_cast(*data_ptr); + data_ptr = std::make_unique(this->n_base_elements()); + auto &data = dynamic_cast(*data_ptr); data.update_each = requires_update_flags(flags); // get data objects from each of the base elements and store @@ -1049,7 +1049,7 @@ FESystem::get_subface_data( // correct in case the current FESystem is a base element for another, // higher-level FESystem itself. std::unique_ptr::InternalDataBase> - data_ptr = std_cxx14::make_unique(this->n_base_elements()); + data_ptr = std::make_unique(this->n_base_elements()); auto &data = dynamic_cast(*data_ptr); data.update_each = requires_update_flags(flags); diff --git a/source/fe/fe_trace.cc b/source/fe/fe_trace.cc index 23e88178e8..c1145ebde2 100644 --- a/source/fe/fe_trace.cc +++ b/source/fe/fe_trace.cc @@ -73,7 +73,7 @@ template std::unique_ptr> FE_TraceQ::clone() const { - return std_cxx14::make_unique>(this->degree); + return std::make_unique>(this->degree); } diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index a677e6b7f2..f002d3ddda 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -4468,8 +4468,8 @@ FEValues::initialize(const UpdateFlags update_flags) if (flags & update_mapping) this->mapping_data = std::move(mapping_get_data.return_value()); else - this->mapping_data = std_cxx14::make_unique< - typename Mapping::InternalDataBase>(); + this->mapping_data = + std::make_unique::InternalDataBase>(); } @@ -4499,7 +4499,7 @@ namespace } else // if the types don't match, there is nothing we can do here - present_cell = std_cxx14::make_unique(new_cell); + present_cell = std::make_unique(new_cell); } } // namespace @@ -4728,8 +4728,8 @@ FEFaceValues::initialize(const UpdateFlags update_flags) if (flags & update_mapping) this->mapping_data = std::move(mapping_get_data.return_value()); else - this->mapping_data = std_cxx14::make_unique< - typename Mapping::InternalDataBase>(); + this->mapping_data = + std::make_unique::InternalDataBase>(); } @@ -4929,8 +4929,8 @@ FESubfaceValues::initialize(const UpdateFlags update_flags) if (flags & update_mapping) this->mapping_data = std::move(mapping_get_data.return_value()); else - this->mapping_data = std_cxx14::make_unique< - typename Mapping::InternalDataBase>(); + this->mapping_data = + std::make_unique::InternalDataBase>(); } diff --git a/source/fe/mapping_c1.cc b/source/fe/mapping_c1.cc index 5d185b034c..8493ab4d6b 100644 --- a/source/fe/mapping_c1.cc +++ b/source/fe/mapping_c1.cc @@ -222,7 +222,7 @@ template std::unique_ptr> MappingC1::clone() const { - return std_cxx14::make_unique>(); + return std::make_unique>(); } diff --git a/source/fe/mapping_cartesian.cc b/source/fe/mapping_cartesian.cc index f26f1b1aff..504023b7ee 100644 --- a/source/fe/mapping_cartesian.cc +++ b/source/fe/mapping_cartesian.cc @@ -95,7 +95,7 @@ MappingCartesian::get_data(const UpdateFlags update_flags, const Quadrature &q) const { std::unique_ptr::InternalDataBase> data_ptr = - std_cxx14::make_unique(q); + std::make_unique(q); auto &data = dynamic_cast(*data_ptr); // store the flags in the internal data object so we can access them @@ -115,7 +115,7 @@ MappingCartesian::get_face_data( const Quadrature &quadrature) const { std::unique_ptr::InternalDataBase> data_ptr = - std_cxx14::make_unique( + std::make_unique( QProjector::project_to_all_faces(quadrature)); auto &data = dynamic_cast(*data_ptr); @@ -140,7 +140,7 @@ MappingCartesian::get_subface_data( const Quadrature &quadrature) const { std::unique_ptr::InternalDataBase> data_ptr = - std_cxx14::make_unique( + std::make_unique( QProjector::project_to_all_subfaces(quadrature)); auto &data = dynamic_cast(*data_ptr); @@ -1061,7 +1061,7 @@ template std::unique_ptr> MappingCartesian::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/fe/mapping_fe_field.cc b/source/fe/mapping_fe_field.cc index 7949dd065a..20773943a6 100644 --- a/source/fe/mapping_fe_field.cc +++ b/source/fe/mapping_fe_field.cc @@ -610,7 +610,7 @@ MappingFEField::get_data( const Quadrature &quadrature) const { std::unique_ptr::InternalDataBase> data_ptr = - std_cxx14::make_unique(euler_dof_handler->get_fe(), fe_mask); + std::make_unique(euler_dof_handler->get_fe(), fe_mask); auto &data = dynamic_cast(*data_ptr); this->compute_data(update_flags, quadrature, quadrature.size(), data); @@ -626,7 +626,7 @@ MappingFEField::get_face_data( const Quadrature &quadrature) const { std::unique_ptr::InternalDataBase> data_ptr = - std_cxx14::make_unique(euler_dof_handler->get_fe(), fe_mask); + std::make_unique(euler_dof_handler->get_fe(), fe_mask); auto & data = dynamic_cast(*data_ptr); const Quadrature q(QProjector::project_to_all_faces(quadrature)); this->compute_face_data(update_flags, q, quadrature.size(), data); @@ -642,7 +642,7 @@ MappingFEField::get_subface_data( const Quadrature &quadrature) const { std::unique_ptr::InternalDataBase> data_ptr = - std_cxx14::make_unique(euler_dof_handler->get_fe(), fe_mask); + std::make_unique(euler_dof_handler->get_fe(), fe_mask); auto & data = dynamic_cast(*data_ptr); const Quadrature q(QProjector::project_to_all_subfaces(quadrature)); this->compute_face_data(update_flags, q, quadrature.size(), data); @@ -2308,7 +2308,7 @@ template std::unique_ptr> MappingFEField::clone() const { - return std_cxx14::make_unique< + return std::make_unique< MappingFEField>(*this); } diff --git a/source/fe/mapping_manifold.cc b/source/fe/mapping_manifold.cc index a11ee168ed..e1223e1343 100644 --- a/source/fe/mapping_manifold.cc +++ b/source/fe/mapping_manifold.cc @@ -152,7 +152,7 @@ template std::unique_ptr> MappingManifold::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } @@ -271,7 +271,7 @@ MappingManifold::get_data(const UpdateFlags update_flags, const Quadrature &q) const { std::unique_ptr::InternalDataBase> data_ptr = - std_cxx14::make_unique(); + std::make_unique(); auto &data = dynamic_cast(*data_ptr); data.initialize(this->requires_update_flags(update_flags), q, q.size()); @@ -287,7 +287,7 @@ MappingManifold::get_face_data( const Quadrature &quadrature) const { std::unique_ptr::InternalDataBase> data_ptr = - std_cxx14::make_unique(); + std::make_unique(); auto &data = dynamic_cast(*data_ptr); data.initialize_face(this->requires_update_flags(update_flags), QProjector::project_to_all_faces(quadrature), @@ -305,7 +305,7 @@ MappingManifold::get_subface_data( const Quadrature &quadrature) const { std::unique_ptr::InternalDataBase> data_ptr = - std_cxx14::make_unique(); + std::make_unique(); auto &data = dynamic_cast(*data_ptr); data.initialize_face(this->requires_update_flags(update_flags), QProjector::project_to_all_subfaces(quadrature), diff --git a/source/fe/mapping_q.cc b/source/fe/mapping_q.cc index 1cc552679a..a685222489 100644 --- a/source/fe/mapping_q.cc +++ b/source/fe/mapping_q.cc @@ -152,7 +152,7 @@ MappingQ::get_data(const UpdateFlags update_flags, const Quadrature &quadrature) const { std::unique_ptr::InternalDataBase> data_ptr = - std_cxx14::make_unique(); + std::make_unique(); auto &data = dynamic_cast(*data_ptr); // build the Q1 and Qp internal data objects in parallel @@ -184,7 +184,7 @@ MappingQ::get_face_data( const Quadrature &quadrature) const { std::unique_ptr::InternalDataBase> data_ptr = - std_cxx14::make_unique(); + std::make_unique(); auto &data = dynamic_cast(*data_ptr); // build the Q1 and Qp internal data objects in parallel @@ -217,7 +217,7 @@ MappingQ::get_subface_data( const Quadrature &quadrature) const { std::unique_ptr::InternalDataBase> data_ptr = - std_cxx14::make_unique(); + std::make_unique(); auto &data = dynamic_cast(*data_ptr); // build the Q1 and Qp internal data objects in parallel @@ -535,7 +535,7 @@ template std::unique_ptr> MappingQ::clone() const { - return std_cxx14::make_unique>( + return std::make_unique>( this->polynomial_degree, this->use_mapping_q_on_all_cells); } diff --git a/source/fe/mapping_q1.cc b/source/fe/mapping_q1.cc index 698bfcfafc..0a1f22f81c 100644 --- a/source/fe/mapping_q1.cc +++ b/source/fe/mapping_q1.cc @@ -55,7 +55,7 @@ template std::unique_ptr> MappingQ1::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } //--------------------------------------------------------------------------- diff --git a/source/fe/mapping_q1_eulerian.cc b/source/fe/mapping_q1_eulerian.cc index 4dee93228b..057923f07c 100644 --- a/source/fe/mapping_q1_eulerian.cc +++ b/source/fe/mapping_q1_eulerian.cc @@ -121,8 +121,7 @@ template std::unique_ptr> MappingQ1Eulerian::clone() const { - return std_cxx14::make_unique>( - *this); + return std::make_unique>(*this); } diff --git a/source/fe/mapping_q_cache.cc b/source/fe/mapping_q_cache.cc index 9f95efb1c6..8af4eb2b07 100644 --- a/source/fe/mapping_q_cache.cc +++ b/source/fe/mapping_q_cache.cc @@ -56,7 +56,7 @@ template std::unique_ptr> MappingQCache::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } diff --git a/source/fe/mapping_q_eulerian.cc b/source/fe/mapping_q_eulerian.cc index fc3cd64486..e8fae5a850 100644 --- a/source/fe/mapping_q_eulerian.cc +++ b/source/fe/mapping_q_eulerian.cc @@ -86,7 +86,7 @@ template std::unique_ptr> MappingQEulerian::clone() const { - return std_cxx14::make_unique>( + return std::make_unique>( this->get_degree(), *euler_dof_handler, *euler_vector); } diff --git a/source/fe/mapping_q_generic.cc b/source/fe/mapping_q_generic.cc index 83e77c5752..5130c9d986 100644 --- a/source/fe/mapping_q_generic.cc +++ b/source/fe/mapping_q_generic.cc @@ -2248,7 +2248,7 @@ template std::unique_ptr> MappingQGeneric::clone() const { - return std_cxx14::make_unique>(*this); + return std::make_unique>(*this); } @@ -2675,7 +2675,7 @@ MappingQGeneric::get_data(const UpdateFlags update_flags, const Quadrature &q) const { std::unique_ptr::InternalDataBase> data_ptr = - std_cxx14::make_unique(polynomial_degree); + std::make_unique(polynomial_degree); auto &data = dynamic_cast(*data_ptr); data.initialize(this->requires_update_flags(update_flags), q, q.size()); @@ -2691,7 +2691,7 @@ MappingQGeneric::get_face_data( const Quadrature &quadrature) const { std::unique_ptr::InternalDataBase> data_ptr = - std_cxx14::make_unique(polynomial_degree); + std::make_unique(polynomial_degree); auto &data = dynamic_cast(*data_ptr); data.initialize_face(this->requires_update_flags(update_flags), QProjector::project_to_all_faces(quadrature), @@ -2709,7 +2709,7 @@ MappingQGeneric::get_subface_data( const Quadrature &quadrature) const { std::unique_ptr::InternalDataBase> data_ptr = - std_cxx14::make_unique(polynomial_degree); + std::make_unique(polynomial_degree); auto &data = dynamic_cast(*data_ptr); data.initialize_face(this->requires_update_flags(update_flags), QProjector::project_to_all_subfaces(quadrature), diff --git a/source/grid/manifold.cc b/source/grid/manifold.cc index f3876fa67b..4d59dc6c3a 100644 --- a/source/grid/manifold.cc +++ b/source/grid/manifold.cc @@ -527,8 +527,7 @@ template std::unique_ptr> FlatManifold::clone() const { - return std_cxx14::make_unique>(periodicity, - tolerance); + return std::make_unique>(periodicity, tolerance); } diff --git a/source/grid/manifold_lib.cc b/source/grid/manifold_lib.cc index aeda26cef0..5076258859 100644 --- a/source/grid/manifold_lib.cc +++ b/source/grid/manifold_lib.cc @@ -131,7 +131,7 @@ template std::unique_ptr> PolarManifold::clone() const { - return std_cxx14::make_unique>(center); + return std::make_unique>(center); } @@ -362,7 +362,7 @@ template std::unique_ptr> SphericalManifold::clone() const { - return std_cxx14::make_unique>(center); + return std::make_unique>(center); } @@ -1072,8 +1072,9 @@ template std::unique_ptr> CylindricalManifold::clone() const { - return std_cxx14::make_unique>( - direction, point_on_axis, tolerance); + return std::make_unique>(direction, + point_on_axis, + tolerance); } @@ -1231,8 +1232,9 @@ std::unique_ptr> EllipticalManifold::clone() const { const double eccentricity = 1.0 / cosh_u; - return std_cxx14::make_unique>( - center, direction, eccentricity); + return std::make_unique>(center, + direction, + eccentricity); } @@ -1461,7 +1463,7 @@ FunctionManifold::clone() const // used to construct this class. if (!(push_forward_expression.empty() && pull_back_expression.empty())) { - return std_cxx14::make_unique>( + return std::make_unique>( push_forward_expression, pull_back_expression, this->get_periodicity(), @@ -1473,7 +1475,7 @@ FunctionManifold::clone() const } else { - return std_cxx14::make_unique>( + return std::make_unique>( *push_forward_function, *pull_back_function, this->get_periodicity(), @@ -1596,7 +1598,7 @@ template std::unique_ptr> TorusManifold::clone() const { - return std_cxx14::make_unique>(R, r); + return std::make_unique>(R, r); } diff --git a/source/grid/tria.cc b/source/grid/tria.cc index fcd430def4..bdb18e7535 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -1765,7 +1765,7 @@ namespace internal // reserve enough space triangulation.levels.push_back( - std_cxx14::make_unique< + std::make_unique< internal::TriangulationImplementation::TriaLevel>()); triangulation.levels[0]->reserve_space(cells.size(), dim, spacedim); triangulation.levels[0]->cells.reserve_space(0, cells.size()); @@ -2035,9 +2035,9 @@ namespace internal // reserve enough space triangulation.levels.push_back( - std_cxx14::make_unique< + std::make_unique< internal::TriangulationImplementation::TriaLevel>()); - triangulation.faces = std_cxx14::make_unique< + triangulation.faces = std::make_unique< internal::TriangulationImplementation::TriaFaces>(); triangulation.levels[0]->reserve_space(cells.size(), dim, spacedim); triangulation.faces->lines.reserve_space(0, needed_lines.size()); @@ -2415,9 +2415,9 @@ namespace internal // for the lines // reserve enough space triangulation.levels.push_back( - std_cxx14::make_unique< + std::make_unique< internal::TriangulationImplementation::TriaLevel>()); - triangulation.faces = std_cxx14::make_unique< + triangulation.faces = std::make_unique< internal::TriangulationImplementation::TriaFaces>(); triangulation.levels[0]->reserve_space(cells.size(), dim, spacedim); triangulation.faces->lines.reserve_space(0, needed_lines.size()); @@ -4652,7 +4652,7 @@ namespace internal if (cell->refine_flag_set()) { triangulation.levels.push_back( - std_cxx14::make_unique< + std::make_unique< internal::TriangulationImplementation::TriaLevel>()); break; } @@ -4896,7 +4896,7 @@ namespace internal if (cell->refine_flag_set()) { triangulation.levels.push_back( - std_cxx14::make_unique< + std::make_unique< internal::TriangulationImplementation::TriaLevel>()); break; } @@ -5227,7 +5227,7 @@ namespace internal if (cell->refine_flag_set()) { triangulation.levels.push_back( - std_cxx14::make_unique< + std::make_unique< internal::TriangulationImplementation::TriaLevel>()); break; } @@ -10065,9 +10065,9 @@ Triangulation::Triangulation( if (dim == 1) { vertex_to_boundary_id_map_1d = - std_cxx14::make_unique>(); + std::make_unique>(); vertex_to_manifold_id_map_1d = - std_cxx14::make_unique>(); + std::make_unique>(); } // connect the any_change signal to the other top level signals @@ -10409,8 +10409,9 @@ Triangulation::copy_triangulation( smooth_grid = other_tria.smooth_grid; if (dim > 1) - faces = std_cxx14::make_unique< - internal::TriangulationImplementation::TriaFaces>(*other_tria.faces); + faces = + std::make_unique>( + *other_tria.faces); auto bdry_iterator = other_tria.manifold.begin(); for (; bdry_iterator != other_tria.manifold.end(); ++bdry_iterator) @@ -10419,20 +10420,20 @@ Triangulation::copy_triangulation( levels.reserve(other_tria.levels.size()); for (unsigned int level = 0; level < other_tria.levels.size(); ++level) - levels.push_back(std_cxx14::make_unique< - internal::TriangulationImplementation::TriaLevel>( - *other_tria.levels[level])); + levels.push_back( + std::make_unique>( + *other_tria.levels[level])); number_cache = other_tria.number_cache; if (dim == 1) { vertex_to_boundary_id_map_1d = - std_cxx14::make_unique>( + std::make_unique>( *other_tria.vertex_to_boundary_id_map_1d); vertex_to_manifold_id_map_1d = - std_cxx14::make_unique>( + std::make_unique>( *other_tria.vertex_to_manifold_id_map_1d); } diff --git a/source/hp/dof_handler.cc b/source/hp/dof_handler.cc index 16046cb174..b39f72195f 100644 --- a/source/hp/dof_handler.cc +++ b/source/hp/dof_handler.cc @@ -145,7 +145,7 @@ namespace internal if (dim > 1) dof_handler.faces = - std_cxx14::make_unique>(); + std::make_unique>(); } } @@ -1721,9 +1721,10 @@ namespace hp if (dynamic_cast *>(&this->get_triangulation())) { - policy = std_cxx14::make_unique< - internal::DoFHandlerImplementation::Policy::ParallelDistributed< - DoFHandler>>(*this); + policy = + std::make_unique>>( + *this); // repartitioning signals tria_listeners.push_back( @@ -1756,9 +1757,8 @@ namespace hp *>(&this->get_triangulation()) != nullptr) { policy = - std_cxx14::make_unique>>( - *this); + std::make_unique>>(*this); // partitioning signals tria_listeners.push_back( @@ -1776,9 +1776,8 @@ namespace hp else { policy = - std_cxx14::make_unique>>( - *this); + std::make_unique>>(*this); // refinement signals tria_listeners.push_back(this->tria->signals.pre_refinement.connect( @@ -2011,8 +2010,7 @@ namespace hp { Assert(active_fe_index_transfer == nullptr, ExcInternalError()); - active_fe_index_transfer = - std_cxx14::make_unique(); + active_fe_index_transfer = std::make_unique(); dealii::internal::hp::DoFHandlerImplementation::Implementation:: collect_fe_indices_on_cells_to_be_refined(*this); @@ -2044,8 +2042,7 @@ namespace hp { Assert(active_fe_index_transfer == nullptr, ExcInternalError()); - active_fe_index_transfer = - std_cxx14::make_unique(); + active_fe_index_transfer = std::make_unique(); // If we work on a p::d::Triangulation, we have to transfer all // active_fe_indices since ownership of cells may change. We will @@ -2068,7 +2065,7 @@ namespace hp const parallel::distributed::Triangulation *>( &this->get_triangulation()); - active_fe_index_transfer->cell_data_transfer = std_cxx14::make_unique< + active_fe_index_transfer->cell_data_transfer = std::make_unique< parallel::distributed:: CellDataTransfer>>( *distributed_tria, @@ -2188,15 +2185,14 @@ namespace hp { Assert(active_fe_index_transfer == nullptr, ExcInternalError()); - active_fe_index_transfer = - std_cxx14::make_unique(); + active_fe_index_transfer = std::make_unique(); // Create transfer object and attach to it. const auto *distributed_tria = dynamic_cast< const parallel::distributed::Triangulation *>( &this->get_triangulation()); - active_fe_index_transfer->cell_data_transfer = std_cxx14::make_unique< + active_fe_index_transfer->cell_data_transfer = std::make_unique< parallel::distributed:: CellDataTransfer>>( *distributed_tria, @@ -2281,15 +2277,14 @@ namespace hp { Assert(active_fe_index_transfer == nullptr, ExcInternalError()); - active_fe_index_transfer = - std_cxx14::make_unique(); + active_fe_index_transfer = std::make_unique(); // Create transfer object and attach to it. const auto *distributed_tria = dynamic_cast< const parallel::distributed::Triangulation *>( &this->get_triangulation()); - active_fe_index_transfer->cell_data_transfer = std_cxx14::make_unique< + active_fe_index_transfer->cell_data_transfer = std::make_unique< parallel::distributed:: CellDataTransfer>>( *distributed_tria, diff --git a/source/hp/fe_values.cc b/source/hp/fe_values.cc index ec227e87b0..edf8241c37 100644 --- a/source/hp/fe_values.cc +++ b/source/hp/fe_values.cc @@ -90,11 +90,10 @@ namespace hp nullptr) task_group += Threads::new_task([&, fe_index, m_index, q_index]() { fe_values_table[fe_index][m_index][q_index] = - std_cxx14::make_unique( - (*mapping_collection)[m_index], - (*fe_collection)[fe_index], - q_collection[q_index], - update_flags); + std::make_unique((*mapping_collection)[m_index], + (*fe_collection)[fe_index], + q_collection[q_index], + update_flags); }); task_group.join_all(); @@ -124,11 +123,10 @@ namespace hp // of indices if (fe_values_table(present_fe_values_index).get() == nullptr) fe_values_table(present_fe_values_index) = - std_cxx14::make_unique( - (*mapping_collection)[mapping_index], - (*fe_collection)[fe_index], - q_collection[q_index], - update_flags); + std::make_unique((*mapping_collection)[mapping_index], + (*fe_collection)[fe_index], + q_collection[q_index], + update_flags); // now there definitely is one! return *fe_values_table(present_fe_values_index); @@ -160,7 +158,7 @@ namespace hp task_group += Threads::new_task([&, fe_index, mapping_index, q_index]() { fe_values_table(TableIndices<3>(fe_index, mapping_index, q_index)) = - std_cxx14::make_unique( + std::make_unique( (*mapping_collection)[mapping_index], (*fe_collection)[fe_index], q_collection[q_index], diff --git a/source/lac/lapack_full_matrix.cc b/source/lac/lapack_full_matrix.cc index 0b0f5ec828..19f2a6982e 100644 --- a/source/lac/lapack_full_matrix.cc +++ b/source/lac/lapack_full_matrix.cc @@ -1584,8 +1584,8 @@ LAPACKFullMatrix::compute_svd() std::fill(wr.begin(), wr.end(), 0.); ipiv.resize(8 * mm); - svd_u = std_cxx14::make_unique>(mm, mm); - svd_vt = std_cxx14::make_unique>(nn, nn); + svd_u = std::make_unique>(mm, mm); + svd_vt = std::make_unique>(nn, nn); types::blas_int info = 0; // First determine optimal workspace size diff --git a/source/lac/petsc_solver.cc b/source/lac/petsc_solver.cc index 8ef6624eeb..f154976e40 100644 --- a/source/lac/petsc_solver.cc +++ b/source/lac/petsc_solver.cc @@ -72,7 +72,7 @@ namespace PETScWrappers // is necessary if (solver_data.get() == nullptr) { - solver_data = std_cxx14::make_unique(); + solver_data = std::make_unique(); PetscErrorCode ierr = KSPCreate(mpi_communicator, &solver_data->ksp); AssertThrow(ierr == 0, ExcPETScError(ierr)); @@ -214,7 +214,7 @@ namespace PETScWrappers { PetscErrorCode ierr; - solver_data = std_cxx14::make_unique(); + solver_data = std::make_unique(); ierr = KSPCreate(mpi_communicator, &solver_data->ksp); AssertThrow(ierr == 0, ExcPETScError(ierr)); @@ -698,7 +698,7 @@ namespace PETScWrappers */ if (solver_data == nullptr) { - solver_data = std_cxx14::make_unique(); + solver_data = std::make_unique(); /** * creates the default KSP context and puts it in the location diff --git a/source/lac/scalapack.cc b/source/lac/scalapack.cc index 4b729718a0..dabab61574 100644 --- a/source/lac/scalapack.cc +++ b/source/lac/scalapack.cc @@ -1501,10 +1501,10 @@ ScaLAPACKMatrix::eigenpairs_symmetric( // distributed matrix std::unique_ptr> eigenvectors = compute_eigenvectors ? - std_cxx14::make_unique>(n_rows, - grid, - row_block_size) : - std_cxx14::make_unique>( + std::make_unique>(n_rows, + grid, + row_block_size) : + std::make_unique>( grid->n_process_rows, grid->n_process_columns, grid, 1, 1); eigenvectors->property = property; @@ -1832,10 +1832,10 @@ ScaLAPACKMatrix::eigenpairs_symmetric_MRRR( // distributed matrix. std::unique_ptr> eigenvectors = compute_eigenvectors ? - std_cxx14::make_unique>(n_rows, - grid, - row_block_size) : - std_cxx14::make_unique>( + std::make_unique>(n_rows, + grid, + row_block_size) : + std::make_unique>( grid->n_process_rows, grid->n_process_columns, grid, 1, 1); eigenvectors->property = property; diff --git a/source/lac/sparsity_pattern.cc b/source/lac/sparsity_pattern.cc index 4e4d148655..e86646d201 100644 --- a/source/lac/sparsity_pattern.cc +++ b/source/lac/sparsity_pattern.cc @@ -275,7 +275,7 @@ SparsityPattern::reinit(const size_type m, { vec_len = 1; max_vec_len = vec_len; - colnums = std_cxx14::make_unique(max_vec_len); + colnums = std::make_unique(max_vec_len); } max_row_length = @@ -297,14 +297,14 @@ SparsityPattern::reinit(const size_type m, if (rows > max_dim) { max_dim = rows; - rowstart = std_cxx14::make_unique(max_dim + 1); + rowstart = std::make_unique(max_dim + 1); } // allocate memory for the column numbers if necessary if (vec_len > max_vec_len) { max_vec_len = vec_len; - colnums = std_cxx14::make_unique(max_vec_len); + colnums = std::make_unique(max_vec_len); } // set the rowstart array @@ -1007,8 +1007,8 @@ SparsityPattern::block_read(std::istream &in) AssertThrow(c == '[', ExcIO()); // reallocate space - rowstart = std_cxx14::make_unique(max_dim + 1); - colnums = std_cxx14::make_unique(max_vec_len); + rowstart = std::make_unique(max_dim + 1); + colnums = std::make_unique(max_vec_len); // then read data in.read(reinterpret_cast(rowstart.get()), diff --git a/source/lac/sparsity_tools.cc b/source/lac/sparsity_tools.cc index a9ec4270bd..646a61f7bf 100644 --- a/source/lac/sparsity_tools.cc +++ b/source/lac/sparsity_tools.cc @@ -311,8 +311,7 @@ namespace SparsityTools (void)cell_weights; // MPI environment must have been initialized by this point. - std::unique_ptr zz = - std_cxx14::make_unique(MPI_COMM_SELF); + std::unique_ptr zz = std::make_unique(MPI_COMM_SELF); // General parameters // DEBUG_LEVEL call must precede the call to LB_METHOD @@ -465,7 +464,7 @@ namespace SparsityTools return 0; #else // coloring algorithm is run in serial by each processor. - std::unique_ptr zz = std_cxx14::make_unique(MPI_COMM_SELF); + std::unique_ptr zz = std::make_unique(MPI_COMM_SELF); // Coloring parameters // DEBUG_LEVEL must precede all other calls diff --git a/source/lac/trilinos_epetra_communication_pattern.cc b/source/lac/trilinos_epetra_communication_pattern.cc index e24e1fe5e2..ac160b08b1 100644 --- a/source/lac/trilinos_epetra_communication_pattern.cc +++ b/source/lac/trilinos_epetra_communication_pattern.cc @@ -63,8 +63,8 @@ namespace LinearAlgebra // Target map is read_write_vector_map // Source map is vector_space_vector_map. This map must have uniquely // owned GID. - import = std_cxx14::make_unique(read_write_vector_map, - vector_space_vector_map); + import = std::make_unique(read_write_vector_map, + vector_space_vector_map); } diff --git a/source/lac/trilinos_epetra_vector.cc b/source/lac/trilinos_epetra_vector.cc index d786c08aec..580c7e9d3c 100644 --- a/source/lac/trilinos_epetra_vector.cc +++ b/source/lac/trilinos_epetra_vector.cc @@ -72,7 +72,7 @@ namespace LinearAlgebra Epetra_Map input_map = parallel_partitioner.make_trilinos_map(communicator, false); if (vector->Map().SameAs(input_map) == false) - vector = std_cxx14::make_unique(input_map); + vector = std::make_unique(input_map); else if (omit_zeroing_entries == false) { const int ierr = vector->PutScalar(0.); @@ -123,8 +123,7 @@ namespace LinearAlgebra (void)ierr; } else - vector = - std_cxx14::make_unique(V.trilinos_vector()); + vector = std::make_unique(V.trilinos_vector()); } return *this; diff --git a/source/lac/trilinos_precondition_ml.cc b/source/lac/trilinos_precondition_ml.cc index 80d5fa4368..9020a44208 100644 --- a/source/lac/trilinos_precondition_ml.cc +++ b/source/lac/trilinos_precondition_ml.cc @@ -132,7 +132,7 @@ namespace TrilinosWrappers const Epetra_Map &domain_map = matrix.OperatorDomainMap(); const size_type constant_modes_dimension = constant_modes.size(); - ptr_distributed_constant_modes = std_cxx14::make_unique( + ptr_distributed_constant_modes = std::make_unique( domain_map, constant_modes_dimension > 0 ? constant_modes_dimension : 1); Assert(ptr_distributed_constant_modes, ExcNotInitialized()); Epetra_MultiVector &distributed_constant_modes = diff --git a/source/lac/trilinos_solver.cc b/source/lac/trilinos_solver.cc index b04542484f..990841cf86 100644 --- a/source/lac/trilinos_solver.cc +++ b/source/lac/trilinos_solver.cc @@ -80,7 +80,7 @@ namespace TrilinosWrappers { // We need an Epetra_LinearProblem object to let the AztecOO solver know // about the matrix and vectors. - linear_problem = std_cxx14::make_unique( + linear_problem = std::make_unique( const_cast(&A.trilinos_matrix()), &x.trilinos_vector(), const_cast(&b.trilinos_vector())); @@ -100,10 +100,11 @@ namespace TrilinosWrappers { // We need an Epetra_LinearProblem object to let the AztecOO solver know // about the matrix and vectors. - linear_problem = std_cxx14::make_unique( - const_cast(&A), - &x.trilinos_vector(), - const_cast(&b.trilinos_vector())); + linear_problem = + std::make_unique(const_cast(&A), + &x.trilinos_vector(), + const_cast( + &b.trilinos_vector())); do_solve(preconditioner); } @@ -120,10 +121,11 @@ namespace TrilinosWrappers { // We need an Epetra_LinearProblem object to let the AztecOO solver know // about the matrix and vectors. - linear_problem = std_cxx14::make_unique( - const_cast(&A), - &x.trilinos_vector(), - const_cast(&b.trilinos_vector())); + linear_problem = + std::make_unique(const_cast(&A), + &x.trilinos_vector(), + const_cast( + &b.trilinos_vector())); do_solve(preconditioner); } @@ -140,10 +142,11 @@ namespace TrilinosWrappers { // We need an Epetra_LinearProblem object to let the AztecOO solver know // about the matrix and vectors. - linear_problem = std_cxx14::make_unique( - const_cast(&A), - &x, - const_cast(&b)); + linear_problem = + std::make_unique(const_cast(&A), + &x, + const_cast( + &b)); do_solve(preconditioner); } @@ -160,10 +163,11 @@ namespace TrilinosWrappers { // We need an Epetra_LinearProblem object to let the AztecOO solver know // about the matrix and vectors. - linear_problem = std_cxx14::make_unique( - const_cast(&A), - &x, - const_cast(&b)); + linear_problem = + std::make_unique(const_cast(&A), + &x, + const_cast( + &b)); do_solve(preconditioner); } @@ -192,7 +196,7 @@ namespace TrilinosWrappers // We need an Epetra_LinearProblem object to let the AztecOO solver know // about the matrix and vectors. - linear_problem = std_cxx14::make_unique( + linear_problem = std::make_unique( const_cast(&A.trilinos_matrix()), &ep_x, &ep_b); do_solve(preconditioner); @@ -213,8 +217,7 @@ namespace TrilinosWrappers // We need an Epetra_LinearProblem object to let the AztecOO solver know // about the matrix and vectors. - linear_problem = - std_cxx14::make_unique(&A, &ep_x, &ep_b); + linear_problem = std::make_unique(&A, &ep_x, &ep_b); do_solve(preconditioner); } @@ -241,7 +244,7 @@ namespace TrilinosWrappers // We need an Epetra_LinearProblem object to let the AztecOO solver know // about the matrix and vectors. - linear_problem = std_cxx14::make_unique( + linear_problem = std::make_unique( const_cast(&A.trilinos_matrix()), &ep_x, &ep_b); do_solve(preconditioner); @@ -265,8 +268,7 @@ namespace TrilinosWrappers // We need an Epetra_LinearProblem object to let the AztecOO solver know // about the matrix and vectors. - linear_problem = - std_cxx14::make_unique(&A, &ep_x, &ep_b); + linear_problem = std::make_unique(&A, &ep_x, &ep_b); do_solve(preconditioner); } @@ -366,21 +368,20 @@ namespace TrilinosWrappers , current_residual(std::numeric_limits::max()) // Consider linear problem converged if any of the collection of // criterion are met - , status_test_collection( - std_cxx14::make_unique( - AztecOO_StatusTestCombo::OR)) + , status_test_collection(std::make_unique( + AztecOO_StatusTestCombo::OR)) { // Maximum number of iterations Assert(max_steps >= 0, ExcInternalError()); status_test_max_steps = - std_cxx14::make_unique(max_steps); + std::make_unique(max_steps); status_test_collection->AddStatusTest(*status_test_max_steps); Assert(linear_problem.GetRHS()->NumVectors() == 1, ExcMessage("RHS multivector holds more than one vector")); // Residual norm is below some absolute value - status_test_abs_tol = std_cxx14::make_unique( + status_test_abs_tol = std::make_unique( *linear_problem.GetOperator(), *(linear_problem.GetLHS()->operator()(0)), *(linear_problem.GetRHS()->operator()(0)), @@ -392,7 +393,7 @@ namespace TrilinosWrappers status_test_collection->AddStatusTest(*status_test_abs_tol); // Residual norm, scaled by some initial value, is below some threshold - status_test_rel_tol = std_cxx14::make_unique( + status_test_rel_tol = std::make_unique( *linear_problem.GetOperator(), *(linear_problem.GetLHS()->operator()(0)), *(linear_problem.GetRHS()->operator()(0)), @@ -469,12 +470,11 @@ namespace TrilinosWrappers if (const ReductionControl *const reduction_control = dynamic_cast(&solver_control)) { - status_test = - std_cxx14::make_unique( - reduction_control->max_steps(), - reduction_control->tolerance(), - reduction_control->reduction(), - *linear_problem); + status_test = std::make_unique( + reduction_control->max_steps(), + reduction_control->tolerance(), + reduction_control->reduction(), + *linear_problem); solver.SetStatusTest(status_test.get()); } } @@ -703,7 +703,7 @@ namespace TrilinosWrappers { // We need an Epetra_LinearProblem object to let the Amesos solver know // about the matrix and vectors. - linear_problem = std_cxx14::make_unique(); + linear_problem = std::make_unique(); // Assign the matrix operator to the Epetra_LinearProblem object linear_problem->SetOperator( @@ -864,7 +864,7 @@ namespace TrilinosWrappers { // We need an Epetra_LinearProblem object to let the Amesos solver know // about the matrix and vectors. - linear_problem = std_cxx14::make_unique( + linear_problem = std::make_unique( const_cast(&A.trilinos_matrix()), &x.trilinos_vector(), const_cast(&b.trilinos_vector())); @@ -892,7 +892,7 @@ namespace TrilinosWrappers // We need an Epetra_LinearProblem object to let the Amesos solver know // about the matrix and vectors. - linear_problem = std_cxx14::make_unique( + linear_problem = std::make_unique( const_cast(&A.trilinos_matrix()), &ep_x, &ep_b); do_solve(); @@ -917,7 +917,7 @@ namespace TrilinosWrappers // We need an Epetra_LinearProblem object to let the Amesos solver know // about the matrix and vectors. - linear_problem = std_cxx14::make_unique( + linear_problem = std::make_unique( const_cast(&A.trilinos_matrix()), &ep_x, &ep_b); do_solve(); diff --git a/source/lac/trilinos_sparse_matrix.cc b/source/lac/trilinos_sparse_matrix.cc index f8592dce67..e4b3d3279e 100644 --- a/source/lac/trilinos_sparse_matrix.cc +++ b/source/lac/trilinos_sparse_matrix.cc @@ -429,18 +429,17 @@ namespace TrilinosWrappers if (needs_deep_copy) { column_space_map = - std_cxx14::make_unique(rhs.trilinos_matrix().DomainMap()); + std::make_unique(rhs.trilinos_matrix().DomainMap()); // release memory before reallocation - matrix = std_cxx14::make_unique(*rhs.matrix); + matrix = std::make_unique(*rhs.matrix); matrix->FillComplete(*column_space_map, matrix->RowMap()); } if (rhs.nonlocal_matrix.get() != nullptr) nonlocal_matrix = - std_cxx14::make_unique(Copy, - rhs.nonlocal_matrix->Graph()); + std::make_unique(Copy, rhs.nonlocal_matrix->Graph()); } @@ -466,7 +465,7 @@ namespace TrilinosWrappers nonlocal_matrix.reset(); nonlocal_matrix_exporter.reset(); - column_space_map = std_cxx14::make_unique( + column_space_map = std::make_unique( column_parallel_partitioning.make_trilinos_map(communicator, false)); if (column_space_map->Comm().MyPID() == 0) @@ -492,7 +491,7 @@ namespace TrilinosWrappers sparsity_pattern, communicator, exchange_data); - matrix = std_cxx14::make_unique( + matrix = std::make_unique( Copy, trilinos_sparsity.trilinos_sparsity_pattern(), false); return; @@ -522,11 +521,12 @@ namespace TrilinosWrappers // columns as well. Compare this with bug # 4123 in the Sandia Bugzilla. std::unique_ptr graph; if (row_space_map.Comm().NumProc() > 1) - graph = std_cxx14::make_unique( - Copy, row_space_map, n_entries_per_row.data(), true); + graph = std::make_unique(Copy, + row_space_map, + n_entries_per_row.data(), + true); else - graph = - std_cxx14::make_unique(Copy, + graph = std::make_unique(Copy, row_space_map, *column_space_map, n_entries_per_row.data(), @@ -570,7 +570,7 @@ namespace TrilinosWrappers (void)n_global_cols; // And now finally generate the matrix. - matrix = std_cxx14::make_unique(Copy, *graph, false); + matrix = std::make_unique(Copy, *graph, false); } @@ -617,7 +617,7 @@ namespace TrilinosWrappers nonlocal_matrix.reset(); nonlocal_matrix_exporter.reset(); - column_space_map = std_cxx14::make_unique( + column_space_map = std::make_unique( column_parallel_partitioning.make_trilinos_map(communicator, false)); AssertDimension(sparsity_pattern.n_rows(), @@ -692,23 +692,26 @@ namespace TrilinosWrappers std::unique_ptr nonlocal_graph; if (row_space_map.Comm().NumProc() > 1) { - graph = std_cxx14::make_unique( - Copy, - row_space_map, - (n_entries_per_row.size() > 0) ? (n_entries_per_row.data()) : - nullptr, - exchange_data ? false : true); + graph = + std::make_unique(Copy, + row_space_map, + (n_entries_per_row.size() > 0) ? + (n_entries_per_row.data()) : + nullptr, + exchange_data ? false : true); if (have_ghost_rows == true) - nonlocal_graph = std_cxx14::make_unique( + nonlocal_graph = std::make_unique( off_processor_map, n_entries_per_ghost_row.data()); } else - graph = std_cxx14::make_unique( - Copy, - row_space_map, - *column_space_map, - (n_entries_per_row.size() > 0) ? (n_entries_per_row.data()) : nullptr, - true); + graph = + std::make_unique(Copy, + row_space_map, + *column_space_map, + (n_entries_per_row.size() > 0) ? + (n_entries_per_row.data()) : + nullptr, + true); // now insert the indices, select between the right matrix std::vector row_indices; @@ -761,7 +764,7 @@ namespace TrilinosWrappers } nonlocal_matrix = - std_cxx14::make_unique(Copy, *nonlocal_graph); + std::make_unique(Copy, *nonlocal_graph); } graph->FillComplete(*column_space_map, row_space_map); @@ -770,7 +773,7 @@ namespace TrilinosWrappers AssertDimension(sparsity_pattern.n_cols(), TrilinosWrappers::n_global_cols(*graph)); - matrix = std_cxx14::make_unique(Copy, *graph, false); + matrix = std::make_unique(Copy, *graph, false); } } // namespace @@ -829,13 +832,14 @@ namespace TrilinosWrappers // reinit with a (parallel) Trilinos sparsity pattern. column_space_map = - std_cxx14::make_unique(sparsity_pattern.domain_partitioner()); - matrix = std_cxx14::make_unique( + std::make_unique(sparsity_pattern.domain_partitioner()); + matrix = std::make_unique( Copy, sparsity_pattern.trilinos_sparsity_pattern(), false); if (sparsity_pattern.nonlocal_graph.get() != nullptr) - nonlocal_matrix = std_cxx14::make_unique( - Copy, *sparsity_pattern.nonlocal_graph); + nonlocal_matrix = + std::make_unique(Copy, + *sparsity_pattern.nonlocal_graph); else nonlocal_matrix.reset(); @@ -851,15 +855,15 @@ namespace TrilinosWrappers if (this == &sparse_matrix) return; - column_space_map = std_cxx14::make_unique( - sparse_matrix.trilinos_matrix().DomainMap()); + column_space_map = + std::make_unique(sparse_matrix.trilinos_matrix().DomainMap()); matrix.reset(); nonlocal_matrix_exporter.reset(); - matrix = std_cxx14::make_unique( + matrix = std::make_unique( Copy, sparse_matrix.trilinos_sparsity_pattern(), false); if (sparse_matrix.nonlocal_matrix != nullptr) - nonlocal_matrix = std_cxx14::make_unique( + nonlocal_matrix = std::make_unique( Copy, sparse_matrix.nonlocal_matrix->Graph()); else nonlocal_matrix.reset(); @@ -1008,15 +1012,14 @@ namespace TrilinosWrappers Assert(input_matrix.Filled() == true, ExcMessage("Input CrsMatrix has not called FillComplete()!")); - column_space_map = - std_cxx14::make_unique(input_matrix.DomainMap()); + column_space_map = std::make_unique(input_matrix.DomainMap()); const Epetra_CrsGraph *graph = &input_matrix.Graph(); nonlocal_matrix.reset(); nonlocal_matrix_exporter.reset(); matrix.reset(); - matrix = std_cxx14::make_unique(Copy, *graph, false); + matrix = std::make_unique(Copy, *graph, false); matrix->FillComplete(*column_space_map, input_matrix.RangeMap(), true); @@ -1071,8 +1074,8 @@ namespace TrilinosWrappers nonlocal_matrix->FillComplete(*column_space_map, matrix->RowMap()); if (nonlocal_matrix_exporter.get() == nullptr) nonlocal_matrix_exporter = - std_cxx14::make_unique(nonlocal_matrix->RowMap(), - matrix->RowMap()); + std::make_unique(nonlocal_matrix->RowMap(), + matrix->RowMap()); ierr = matrix->Export(*nonlocal_matrix, *nonlocal_matrix_exporter, mode); AssertThrow(ierr == 0, ExcTrilinosError(ierr)); @@ -1102,11 +1105,8 @@ namespace TrilinosWrappers // the pointer and generate an // empty matrix. column_space_map = - std_cxx14::make_unique(0, - 0, - Utilities::Trilinos::comm_self()); - matrix = - std_cxx14::make_unique(View, *column_space_map, 0); + std::make_unique(0, 0, Utilities::Trilinos::comm_self()); + matrix = std::make_unique(View, *column_space_map, 0); nonlocal_matrix.reset(); nonlocal_matrix_exporter.reset(); diff --git a/source/lac/trilinos_sparsity_pattern.cc b/source/lac/trilinos_sparsity_pattern.cc index f1faa15f15..719978f904 100644 --- a/source/lac/trilinos_sparsity_pattern.cc +++ b/source/lac/trilinos_sparsity_pattern.cc @@ -83,13 +83,13 @@ namespace TrilinosWrappers SparsityPattern::SparsityPattern() { column_space_map = - std_cxx14::make_unique(TrilinosWrappers::types::int_type(0), - TrilinosWrappers::types::int_type(0), - Utilities::Trilinos::comm_self()); - graph = std_cxx14::make_unique(View, - *column_space_map, - *column_space_map, - 0); + std::make_unique(TrilinosWrappers::types::int_type(0), + TrilinosWrappers::types::int_type(0), + Utilities::Trilinos::comm_self()); + graph = std::make_unique(View, + *column_space_map, + *column_space_map, + 0); graph->FillComplete(); } @@ -255,7 +255,7 @@ namespace TrilinosWrappers nonlocal_graph.reset(); graph.reset(); - column_space_map = std_cxx14::make_unique(col_map); + column_space_map = std::make_unique(col_map); // for more than one processor, need to specify only row map first and // let the matrix entries decide about the column map (which says which @@ -266,7 +266,7 @@ namespace TrilinosWrappers // require building a non-local graph which gives us thread-safe // initialization. if (row_map.Comm().NumProc() > 1) - graph = std_cxx14::make_unique( + graph = std::make_unique( Copy, row_map, n_entries_per_row, false // TODO: Check which new Trilinos version supports this... // Remember to change tests/trilinos/assemble_matrix_parallel_07, too. @@ -275,7 +275,7 @@ namespace TrilinosWrappers //#endif ); else - graph = std_cxx14::make_unique( + graph = std::make_unique( Copy, row_map, col_map, n_entries_per_row, false); } @@ -302,7 +302,7 @@ namespace TrilinosWrappers AssertDimension(n_entries_per_row.size(), TrilinosWrappers::n_global_elements(row_map)); - column_space_map = std_cxx14::make_unique(col_map); + column_space_map = std::make_unique(col_map); std::vector local_entries_per_row( TrilinosWrappers::max_my_gid(row_map) - TrilinosWrappers::min_my_gid(row_map)); @@ -311,7 +311,7 @@ namespace TrilinosWrappers n_entries_per_row[TrilinosWrappers::min_my_gid(row_map) + i]; if (row_map.Comm().NumProc() > 1) - graph = std_cxx14::make_unique( + graph = std::make_unique( Copy, row_map, local_entries_per_row.data(), false // TODO: Check which new Trilinos version supports this... // Remember to change tests/trilinos/assemble_matrix_parallel_07, too. @@ -320,7 +320,7 @@ namespace TrilinosWrappers //#endif ); else - graph = std_cxx14::make_unique( + graph = std::make_unique( Copy, row_map, col_map, local_entries_per_row.data(), false); } @@ -344,7 +344,7 @@ namespace TrilinosWrappers AssertDimension(sp.n_cols(), TrilinosWrappers::n_global_elements(col_map)); - column_space_map = std_cxx14::make_unique(col_map); + column_space_map = std::make_unique(col_map); Assert(row_map.LinearMap() == true, ExcMessage( @@ -361,10 +361,12 @@ namespace TrilinosWrappers static_cast(sp.row_length(row)); if (row_map.Comm().NumProc() > 1) - graph = std_cxx14::make_unique( - Copy, row_map, n_entries_per_row.data(), false); + graph = std::make_unique(Copy, + row_map, + n_entries_per_row.data(), + false); else - graph = std_cxx14::make_unique( + graph = std::make_unique( Copy, row_map, col_map, n_entries_per_row.data(), false); AssertDimension(sp.n_rows(), n_global_rows(*graph)); @@ -539,7 +541,7 @@ namespace TrilinosWrappers Epetra_Map nonlocal_map = nonlocal_partitioner.make_trilinos_map(communicator, true); nonlocal_graph = - std_cxx14::make_unique(Copy, nonlocal_map, 0); + std::make_unique(Copy, nonlocal_map, 0); } else Assert(nonlocal_partitioner.n_elements() == 0, ExcInternalError()); @@ -604,12 +606,11 @@ namespace TrilinosWrappers void SparsityPattern::copy_from(const SparsityPattern &sp) { - column_space_map = std_cxx14::make_unique(*sp.column_space_map); - graph = std_cxx14::make_unique(*sp.graph); + column_space_map = std::make_unique(*sp.column_space_map); + graph = std::make_unique(*sp.graph); if (sp.nonlocal_graph.get() != nullptr) - nonlocal_graph = - std_cxx14::make_unique(*sp.nonlocal_graph); + nonlocal_graph = std::make_unique(*sp.nonlocal_graph); else nonlocal_graph.reset(); } @@ -640,13 +641,13 @@ namespace TrilinosWrappers // the pointer and generate an // empty sparsity pattern. column_space_map = - std_cxx14::make_unique(TrilinosWrappers::types::int_type(0), - TrilinosWrappers::types::int_type(0), - Utilities::Trilinos::comm_self()); - graph = std_cxx14::make_unique(View, - *column_space_map, - *column_space_map, - 0); + std::make_unique(TrilinosWrappers::types::int_type(0), + TrilinosWrappers::types::int_type(0), + Utilities::Trilinos::comm_self()); + graph = std::make_unique(View, + *column_space_map, + *column_space_map, + 0); graph->FillComplete(); nonlocal_graph.reset(); diff --git a/source/lac/trilinos_tpetra_communication_pattern.cc b/source/lac/trilinos_tpetra_communication_pattern.cc index 8f9b498aca..042a93145e 100644 --- a/source/lac/trilinos_tpetra_communication_pattern.cc +++ b/source/lac/trilinos_tpetra_communication_pattern.cc @@ -66,10 +66,10 @@ namespace LinearAlgebra // Source map is vector_space_vector_map. This map must have uniquely // owned GID. tpetra_import = - std_cxx14::make_unique>( + std::make_unique>( read_write_vector_map, vector_space_vector_map); tpetra_export = - std_cxx14::make_unique>( + std::make_unique>( read_write_vector_map, vector_space_vector_map); } diff --git a/source/lac/trilinos_vector.cc b/source/lac/trilinos_vector.cc index 83e7133891..7db15b70fa 100644 --- a/source/lac/trilinos_vector.cc +++ b/source/lac/trilinos_vector.cc @@ -91,7 +91,7 @@ namespace TrilinosWrappers : Vector() { has_ghosts = v.has_ghosts; - vector = std_cxx14::make_unique(*v.vector); + vector = std::make_unique(*v.vector); owned_elements = v.owned_elements; } @@ -118,7 +118,7 @@ namespace TrilinosWrappers TrilinosWrappers::n_global_elements( v.vector->Map()))); - vector = std_cxx14::make_unique( + vector = std::make_unique( parallel_partitioner.make_trilinos_map(communicator, true)); reinit(v, false, true); } @@ -147,7 +147,7 @@ namespace TrilinosWrappers # endif has_ghosts = false; - vector = std_cxx14::make_unique(map); + vector = std::make_unique(map); last_action = Zero; } @@ -166,7 +166,7 @@ namespace TrilinosWrappers Epetra_Map map = parallel_partitioner.make_trilinos_map(communicator, overlapping); - vector = std_cxx14::make_unique(map); + vector = std::make_unique(map); has_ghosts = vector->Map().UniqueGIDs() == false; @@ -224,9 +224,9 @@ namespace TrilinosWrappers if (!same_communicators || vector->Map().SameAs(v.vector->Map()) == false) { - vector = std_cxx14::make_unique(v.vector->Map()); - has_ghosts = v.has_ghosts; - last_action = Zero; + vector = std::make_unique(v.vector->Map()); + has_ghosts = v.has_ghosts; + last_action = Zero; owned_elements = v.owned_elements; } else if (omit_zeroing_entries == false) @@ -317,7 +317,7 @@ namespace TrilinosWrappers 0, v.block(0).trilinos_partitioner().Comm()); - auto actual_vec = std_cxx14::make_unique(new_map); + auto actual_vec = std::make_unique(new_map); TrilinosScalar *entries = (*actual_vec)[0]; for (size_type block = 0; block < v.n_blocks(); ++block) @@ -370,7 +370,7 @@ namespace TrilinosWrappers parallel_partitioner.add_indices(ghost_entries); Epetra_Map map = parallel_partitioner.make_trilinos_map(communicator, true); - vector = std_cxx14::make_unique(map); + vector = std::make_unique(map); } else { @@ -381,7 +381,7 @@ namespace TrilinosWrappers "its parallel partitioning")); if (vector->Map().SameAs(map) == false) - vector = std_cxx14::make_unique(map); + vector = std::make_unique(map); else { const int ierr = vector->PutScalar(0.); @@ -396,7 +396,7 @@ namespace TrilinosWrappers Epetra_Map nonlocal_map = nonlocal_entries.make_trilinos_map(communicator, true); nonlocal_vector = - std_cxx14::make_unique(nonlocal_map, 1); + std::make_unique(nonlocal_map, 1); } } @@ -462,8 +462,8 @@ namespace TrilinosWrappers { *vector = *v.vector; if (v.nonlocal_vector.get() != nullptr) - nonlocal_vector = std_cxx14::make_unique( - v.nonlocal_vector->Map(), 1); + nonlocal_vector = + std::make_unique(v.nonlocal_vector->Map(), 1); last_action = Zero; } // Second case: vectors have the same global @@ -479,7 +479,7 @@ namespace TrilinosWrappers // size. else { - vector = std_cxx14::make_unique(*v.vector); + vector = std::make_unique(*v.vector); last_action = Zero; has_ghosts = v.has_ghosts; owned_elements = v.owned_elements; @@ -487,8 +487,7 @@ namespace TrilinosWrappers if (v.nonlocal_vector.get() != nullptr) nonlocal_vector = - std_cxx14::make_unique(v.nonlocal_vector->Map(), - 1); + std::make_unique(v.nonlocal_vector->Map(), 1); return *this; } @@ -537,7 +536,7 @@ namespace TrilinosWrappers if (vector->Map().SameAs(m.trilinos_matrix().ColMap()) == false) vector = - std_cxx14::make_unique(m.trilinos_matrix().ColMap()); + std::make_unique(m.trilinos_matrix().ColMap()); Epetra_Import data_exchange(vector->Map(), v.vector->Map()); const int ierr = vector->Import(*v.vector, data_exchange, Insert); diff --git a/source/meshworker/scratch_data.cc b/source/meshworker/scratch_data.cc index 46056b89ba..eca2d02dce 100644 --- a/source/meshworker/scratch_data.cc +++ b/source/meshworker/scratch_data.cc @@ -130,8 +130,10 @@ namespace MeshWorker const typename DoFHandler::active_cell_iterator &cell) { if (!fe_values) - fe_values = std_cxx14::make_unique>( - *mapping, *fe, cell_quadrature, cell_update_flags); + fe_values = std::make_unique>(*mapping, + *fe, + cell_quadrature, + cell_update_flags); fe_values->reinit(cell); cell->get_dof_indices(local_dof_indices); @@ -148,7 +150,7 @@ namespace MeshWorker const unsigned int face_no) { if (!fe_face_values) - fe_face_values = std_cxx14::make_unique>( + fe_face_values = std::make_unique>( *mapping, *fe, face_quadrature, face_update_flags); fe_face_values->reinit(cell, face_no); @@ -169,9 +171,8 @@ namespace MeshWorker if (subface_no != numbers::invalid_unsigned_int) { if (!fe_subface_values) - fe_subface_values = - std_cxx14::make_unique>( - *mapping, *fe, face_quadrature, face_update_flags); + fe_subface_values = std::make_unique>( + *mapping, *fe, face_quadrature, face_update_flags); fe_subface_values->reinit(cell, face_no, subface_no); cell->get_dof_indices(local_dof_indices); @@ -190,7 +191,7 @@ namespace MeshWorker const typename DoFHandler::active_cell_iterator &cell) { if (!neighbor_fe_values) - neighbor_fe_values = std_cxx14::make_unique>( + neighbor_fe_values = std::make_unique>( *mapping, *fe, cell_quadrature, neighbor_cell_update_flags); neighbor_fe_values->reinit(cell); @@ -208,9 +209,8 @@ namespace MeshWorker const unsigned int face_no) { if (!neighbor_fe_face_values) - neighbor_fe_face_values = - std_cxx14::make_unique>( - *mapping, *fe, face_quadrature, neighbor_face_update_flags); + neighbor_fe_face_values = std::make_unique>( + *mapping, *fe, face_quadrature, neighbor_face_update_flags); neighbor_fe_face_values->reinit(cell, face_no); cell->get_dof_indices(neighbor_dof_indices); current_neighbor_fe_values = neighbor_fe_face_values.get(); @@ -230,7 +230,7 @@ namespace MeshWorker { if (!neighbor_fe_subface_values) neighbor_fe_subface_values = - std_cxx14::make_unique>( + std::make_unique>( *mapping, *fe, face_quadrature, neighbor_face_update_flags); neighbor_fe_subface_values->reinit(cell, face_no, subface_no); cell->get_dof_indices(neighbor_dof_indices); diff --git a/source/numerics/kdtree.cc b/source/numerics/kdtree.cc index 68dcf8897b..88a1a0090a 100644 --- a/source/numerics/kdtree.cc +++ b/source/numerics/kdtree.cc @@ -101,8 +101,8 @@ void KDTree::set_points(const std::vector> &pts) { Assert(pts.size() > 0, ExcMessage("Expecting a non zero set of points.")); - adaptor = std_cxx14::make_unique(pts); - kdtree = std_cxx14::make_unique( + adaptor = std::make_unique(pts); + kdtree = std::make_unique( dim, *adaptor, nanoflann::KDTreeSingleIndexAdaptorParams(max_leaf_size)); kdtree->buildIndex(); } diff --git a/source/particles/particle_handler.cc b/source/particles/particle_handler.cc index 502522e950..075925f3f4 100644 --- a/source/particles/particle_handler.cc +++ b/source/particles/particle_handler.cc @@ -121,8 +121,7 @@ namespace Particles , handle(numbers::invalid_unsigned_int) { triangulation_cache = - std_cxx14::make_unique>(triangulation, - mapping); + std::make_unique>(triangulation, mapping); } @@ -138,13 +137,13 @@ namespace Particles mapping = &new_mapping; // Create the memory pool that will store all particle properties - property_pool = std_cxx14::make_unique(n_properties); + property_pool = std::make_unique(n_properties); // Create the grid cache to cache the information about the triangulation // that is used to locate the particles into subdomains and cells triangulation_cache = - std_cxx14::make_unique>(new_triangulation, - new_mapping); + std::make_unique>(new_triangulation, + new_mapping); } diff --git a/tests/base/dynamic_unique_cast.cc b/tests/base/dynamic_unique_cast.cc index 473a3ea1f6..30ac72c3a9 100644 --- a/tests/base/dynamic_unique_cast.cc +++ b/tests/base/dynamic_unique_cast.cc @@ -33,7 +33,7 @@ void test() { // Create a pointer to D - std::unique_ptr d = std_cxx14::make_unique(); + std::unique_ptr d = std::make_unique(); // See that we can successfully downcast to B std::unique_ptr b = Utilities::dynamic_unique_cast(std::move(d)); @@ -58,7 +58,7 @@ void invalid_test() { // Create a pointer to B - std::unique_ptr b = std_cxx14::make_unique(); + std::unique_ptr b = std::make_unique(); // Check that we can indeed not upcast to D: try diff --git a/tests/base/stdcxx14_constexpr_min_max.cc b/tests/base/stdcxx14_constexpr_min_max.cc index b15ca2b1f6..5205916e22 100644 --- a/tests/base/stdcxx14_constexpr_min_max.cc +++ b/tests/base/stdcxx14_constexpr_min_max.cc @@ -35,14 +35,14 @@ main() { initlog(); - constexpr int max_1 = std_cxx14::max(0, 1); + constexpr int max_1 = std::max(0, 1); deallog << max_1 << std::endl; - constexpr int max_2 = std_cxx14::max(3, 2, comp); + constexpr int max_2 = std::max(3, 2, comp); deallog << max_2 << std::endl; - constexpr int min_1 = std_cxx14::min(1, 2); + constexpr int min_1 = std::min(1, 2); deallog << min_1 << std::endl; - constexpr int min_2 = std_cxx14::min(1, 2, comp); + constexpr int min_2 = std::min(1, 2, comp); deallog << min_2 << std::endl; deallog << "OK" << std::endl; diff --git a/tests/hp/laplace_mitchell2014_04_peak.cc b/tests/hp/laplace_mitchell2014_04_peak.cc index 2b16cfdd8c..c80228940d 100644 --- a/tests/hp/laplace_mitchell2014_04_peak.cc +++ b/tests/hp/laplace_mitchell2014_04_peak.cc @@ -141,7 +141,7 @@ Problem4::Problem4(const Function &force_function, // after the FECollection has been generated, create a corresponding legendre // series expansion object - legendre = std_cxx14::make_unique>( + legendre = std::make_unique>( SmoothnessEstimator::Legendre::default_fe_series(Laplace::fe)); } diff --git a/tests/hp/step-27.cc b/tests/hp/step-27.cc index 6fbe477f99..55de1360e2 100644 --- a/tests/hp/step-27.cc +++ b/tests/hp/step-27.cc @@ -155,8 +155,10 @@ namespace Step27 const std::vector n_coefficients_per_direction( fe_collection.size(), max_degree); - fourier = std_cxx14::make_unique>( - n_coefficients_per_direction, fe_collection, fourier_q_collection); + fourier = + std::make_unique>(n_coefficients_per_direction, + fe_collection, + fourier_q_collection); } diff --git a/tests/manifold/projection_manifold_01.cc b/tests/manifold/projection_manifold_01.cc index e9ad11b28a..9188983792 100644 --- a/tests/manifold/projection_manifold_01.cc +++ b/tests/manifold/projection_manifold_01.cc @@ -46,7 +46,7 @@ public: std::unique_ptr> clone() const override { - return std_cxx14::make_unique>(); + return std::make_unique>(); } }; diff --git a/tests/manifold/transfinite_manifold_10.cc b/tests/manifold/transfinite_manifold_10.cc index bb1242c9db..b410e60f14 100644 --- a/tests/manifold/transfinite_manifold_10.cc +++ b/tests/manifold/transfinite_manifold_10.cc @@ -38,7 +38,7 @@ public: virtual std::unique_ptr> clone() const override { - return std_cxx14::make_unique(); + return std::make_unique(); } virtual Point diff --git a/tests/mappings/mapping_q_convergence.cc b/tests/mappings/mapping_q_convergence.cc index 3c6950990a..9b7b98fb42 100644 --- a/tests/mappings/mapping_q_convergence.cc +++ b/tests/mappings/mapping_q_convergence.cc @@ -155,7 +155,7 @@ template std::unique_ptr> Geometry::clone() const { - return std_cxx14::make_unique>(); + return std::make_unique>(); } diff --git a/tests/mappings/mapping_q_manifold_01.cc b/tests/mappings/mapping_q_manifold_01.cc index c9336bcb84..54691eabc7 100644 --- a/tests/mappings/mapping_q_manifold_01.cc +++ b/tests/mappings/mapping_q_manifold_01.cc @@ -106,7 +106,7 @@ template std::unique_ptr> Geometry::clone() const { - return std_cxx14::make_unique>(); + return std::make_unique>(); } template diff --git a/tests/matrix_free/compress_mapping.cc b/tests/matrix_free/compress_mapping.cc index bdfd332837..33627cfe17 100644 --- a/tests/matrix_free/compress_mapping.cc +++ b/tests/matrix_free/compress_mapping.cc @@ -186,7 +186,7 @@ public: virtual std::unique_ptr> clone() const { - return std_cxx14::make_unique>(); + return std::make_unique>(); } virtual Point diff --git a/tests/matrix_free/matrix_vector_faces_12.cc b/tests/matrix_free/matrix_vector_faces_12.cc index 65a093b787..bffa100a31 100644 --- a/tests/matrix_free/matrix_vector_faces_12.cc +++ b/tests/matrix_free/matrix_vector_faces_12.cc @@ -106,7 +106,7 @@ public: virtual std::unique_ptr> clone() const override { - return std_cxx14::make_unique>(); + return std::make_unique>(); } virtual Point diff --git a/tests/matrix_free/parallel_multigrid_adaptive_07.cc b/tests/matrix_free/parallel_multigrid_adaptive_07.cc index 1cfbc1f07f..73f40b5e33 100644 --- a/tests/matrix_free/parallel_multigrid_adaptive_07.cc +++ b/tests/matrix_free/parallel_multigrid_adaptive_07.cc @@ -260,7 +260,7 @@ do_test(const std::vector *> &dof) constraints_ptrs[i] = &constraints[i]; } QGauss<1> quad(n_q_points_1d); - constexpr int max_degree = std_cxx14::max(fe_degree_1, fe_degree_2); + constexpr int max_degree = std::max(fe_degree_1, fe_degree_2); MappingQ mapping(max_degree); typename MatrixFree::AdditionalData fine_level_additional_data; @@ -431,7 +431,7 @@ test() parallel::distributed::Triangulation::construct_multigrid_hierarchy); GridGenerator::hyper_cube(tria); tria.refine_global(6 - dim); - constexpr int max_degree = std_cxx14::max(fe_degree_1, fe_degree_2); + constexpr int max_degree = std::max(fe_degree_1, fe_degree_2); const unsigned int n_runs = max_degree == 1 ? 6 - dim : 5 - dim; for (unsigned int i = 0; i < n_runs; ++i) { @@ -457,8 +457,7 @@ test() std::vector *> dh_ptrs{&dof_1, &dof_2}; - constexpr int n_q_points_1d = - std_cxx14::max(fe_degree_1, fe_degree_2) + 1; + constexpr int n_q_points_1d = std::max(fe_degree_1, fe_degree_2) + 1; do_test(dh_ptrs); } } diff --git a/tests/mpi/petsc_step-27.cc b/tests/mpi/petsc_step-27.cc index 8698ae9707..5d2cd950ff 100644 --- a/tests/mpi/petsc_step-27.cc +++ b/tests/mpi/petsc_step-27.cc @@ -188,8 +188,10 @@ namespace Step27 const std::vector n_coefficients_per_direction( fe_collection.size(), max_degree); - fourier = std_cxx14::make_unique>( - n_coefficients_per_direction, fe_collection, fourier_q_collection); + fourier = + std::make_unique>(n_coefficients_per_direction, + fe_collection, + fourier_q_collection); } diff --git a/tests/mpi/trilinos_step-27.cc b/tests/mpi/trilinos_step-27.cc index 555936712a..dffb6ba20b 100644 --- a/tests/mpi/trilinos_step-27.cc +++ b/tests/mpi/trilinos_step-27.cc @@ -188,8 +188,10 @@ namespace Step27 const std::vector n_coefficients_per_direction( fe_collection.size(), max_degree); - fourier = std_cxx14::make_unique>( - n_coefficients_per_direction, fe_collection, fourier_q_collection); + fourier = + std::make_unique>(n_coefficients_per_direction, + fe_collection, + fourier_q_collection); } diff --git a/tests/multigrid/renumbering_06.cc b/tests/multigrid/renumbering_06.cc index 33ddc10da3..8184842e70 100644 --- a/tests/multigrid/renumbering_06.cc +++ b/tests/multigrid/renumbering_06.cc @@ -87,8 +87,8 @@ check() tr.execute_coarsening_and_refinement(); */ - auto fe_scalar = std_cxx14::make_unique>(1); - auto fe = std_cxx14::make_unique>(*fe_scalar, 1); + auto fe_scalar = std::make_unique>(1); + auto fe = std::make_unique>(*fe_scalar, 1); dealii::DoFHandler dofhandler(tria); dofhandler.distribute_dofs(*fe); diff --git a/tests/multigrid/renumbering_07.cc b/tests/multigrid/renumbering_07.cc index 2059bcecd5..9cc221904f 100644 --- a/tests/multigrid/renumbering_07.cc +++ b/tests/multigrid/renumbering_07.cc @@ -87,8 +87,8 @@ check() tr.execute_coarsening_and_refinement(); */ - auto fe_scalar = std_cxx14::make_unique>(1); - auto fe = std_cxx14::make_unique>(*fe_scalar, dim); + auto fe_scalar = std::make_unique>(1); + auto fe = std::make_unique>(*fe_scalar, dim); dealii::DoFHandler dofhandler(tria); dofhandler.distribute_dofs(*fe); diff --git a/tests/parameter_handler/patterns_08.cc b/tests/parameter_handler/patterns_08.cc index cd92ea47b2..0251faa8c8 100644 --- a/tests/parameter_handler/patterns_08.cc +++ b/tests/parameter_handler/patterns_08.cc @@ -29,9 +29,9 @@ main() // create a pattern and let it // output its description std::vector> ps; - ps.push_back(std_cxx14::make_unique()); - ps.push_back(std_cxx14::make_unique()); - ps.push_back(std_cxx14::make_unique()); + ps.push_back(std::make_unique()); + ps.push_back(std::make_unique()); + ps.push_back(std::make_unique()); Patterns::Tuple pattern(ps, ";"); const std::string desc = pattern.description(); diff --git a/tests/parameter_handler/patterns_09.cc b/tests/parameter_handler/patterns_09.cc index f30d81d1bb..b2ecf2fda0 100644 --- a/tests/parameter_handler/patterns_09.cc +++ b/tests/parameter_handler/patterns_09.cc @@ -28,9 +28,9 @@ main() // create a pattern and match a string std::vector> ps; - ps.push_back(std_cxx14::make_unique()); - ps.push_back(std_cxx14::make_unique()); - ps.push_back(std_cxx14::make_unique()); + ps.push_back(std::make_unique()); + ps.push_back(std::make_unique()); + ps.push_back(std::make_unique()); Patterns::Tuple pattern(ps, ";"); const std::string desc = pattern.description(); diff --git a/tests/sparsity/sparsity_pattern_13.cc b/tests/sparsity/sparsity_pattern_13.cc index 3d1308cad6..7d1a542f53 100644 --- a/tests/sparsity/sparsity_pattern_13.cc +++ b/tests/sparsity/sparsity_pattern_13.cc @@ -75,7 +75,7 @@ public: { vec_len = 1; max_vec_len = vec_len; - colnums = std_cxx14::make_unique(max_vec_len); + colnums = std::make_unique(max_vec_len); } max_row_length = @@ -94,14 +94,14 @@ public: if (rows > max_dim) { max_dim = rows; - rowstart = std_cxx14::make_unique(max_dim + 1); + rowstart = std::make_unique(max_dim + 1); } // allocate memory for the column numbers if necessary if (vec_len > max_vec_len) { max_vec_len = vec_len; - colnums = std_cxx14::make_unique(max_vec_len); + colnums = std::make_unique(max_vec_len); } // set the rowstart array