From 86dc0fdbbfbb6ebefc89c50c3d43afe6568ca41c Mon Sep 17 00:00:00 2001 From: heister Date: Mon, 18 Mar 2013 20:48:12 +0000 Subject: [PATCH] update step-42 to not need std::unique_ptr git-svn-id: https://svn.dealii.org/trunk@28933 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-42/CMakeLists.txt | 8 -------- deal.II/examples/step-42/step-42.cc | 12 ++++++------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/deal.II/examples/step-42/CMakeLists.txt b/deal.II/examples/step-42/CMakeLists.txt index 32525e40db..dc468213e4 100644 --- a/deal.II/examples/step-42/CMakeLists.txt +++ b/deal.II/examples/step-42/CMakeLists.txt @@ -50,12 +50,4 @@ ENDIF() DEAL_II_INITIALIZE_CACHED_VARIABLES() PROJECT(${TARGET}) -# -# Workaround: Enable -std=c++0x for Clang as std::unique_ptr is not -# standardized in C++03 -# -IF(CMAKE_CXX_COMPILER_ID MATCHES Clang) - SET(CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}") -ENDIF() - DEAL_II_INVOKE_AUTOPILOT() diff --git a/deal.II/examples/step-42/step-42.cc b/deal.II/examples/step-42/step-42.cc index 501dac8dd1..6cbd4fadbb 100644 --- a/deal.II/examples/step-42/step-42.cc +++ b/deal.II/examples/step-42/step-42.cc @@ -460,9 +460,9 @@ namespace Step42 class Obstacle : public Function { public: - Obstacle (std::unique_ptr > const &_input) : + Obstacle (std_cxx1x::shared_ptr > const &_input) : Function(dim), - input_obstacle_copy(std::move (_input)) {}; + input_obstacle_copy(_input) {}; virtual double value (const Point &p, const unsigned int component = 0) const; @@ -471,7 +471,7 @@ namespace Step42 Vector &values) const; private: - std::unique_ptr > const &input_obstacle_copy; + std_cxx1x::shared_ptr > const &input_obstacle_copy; }; template @@ -549,7 +549,7 @@ namespace Step42 FESystem fe; DoFHandler dof_handler; - std::unique_ptr > soltrans; + std_cxx1x::shared_ptr > soltrans; IndexSet locally_owned_dofs; IndexSet locally_relevant_dofs; @@ -574,8 +574,8 @@ namespace Step42 TrilinosWrappers::PreconditionAMG::AdditionalData additional_data; TrilinosWrappers::PreconditionAMG preconditioner_u; - std::unique_ptr > input_obstacle; - std::unique_ptr > plast_lin_hard; + std_cxx1x::shared_ptr > input_obstacle; + std_cxx1x::shared_ptr > plast_lin_hard; double sigma_0; // Yield stress double gamma; // Parameter for the linear isotropic hardening -- 2.39.5