From: heister Date: Mon, 18 Mar 2013 20:48:12 +0000 (+0000) Subject: update step-42 to not need std::unique_ptr X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86dc0fdbbfbb6ebefc89c50c3d43afe6568ca41c;p=dealii-svn.git update step-42 to not need std::unique_ptr git-svn-id: https://svn.dealii.org/trunk@28933 0785d39b-7218-0410-832d-ea1e28bc413d --- 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