diff --git a/attic/test_agmg.cpp b/attic/test_agmg.cpp index f6489f7e..26358aef 100644 --- a/attic/test_agmg.cpp +++ b/attic/test_agmg.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include @@ -46,14 +46,14 @@ namespace { } - boost::shared_ptr + std::shared_ptr build_laplace_1d(const std::size_t m) { assert (m >= 2); const std::size_t nnz = compute_nnz(m); - boost::shared_ptr + std::shared_ptr A(csrmatrix_new_known_nnz(m, nnz), csrmatrix_delete); A->ia[ 0 ] = 0; @@ -97,7 +97,7 @@ int main() { const std::size_t m = 10; - boost::shared_ptr A = build_laplace_1d(m); + std::shared_ptr A = build_laplace_1d(m); // Form right-hand side [1, 0, 0, ...., 0, 1] std::vector b(m, 0.0); diff --git a/opm/core/io/eclipse/CornerpointChopper.hpp b/opm/core/io/eclipse/CornerpointChopper.hpp index 10f63638..416b35b7 100644 --- a/opm/core/io/eclipse/CornerpointChopper.hpp +++ b/opm/core/io/eclipse/CornerpointChopper.hpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include namespace Opm { @@ -253,7 +253,7 @@ namespace Opm } EclipseGridParser sp; - boost::shared_ptr sg(new SPECGRID); + std::shared_ptr sg(new SPECGRID); for (int dd = 0; dd < 3; ++dd) { sg->dimensions[dd] = new_dims_[dd]; } diff --git a/opm/core/io/eclipse/EclipseGridParser.cpp b/opm/core/io/eclipse/EclipseGridParser.cpp index 1bf9dcb6..caf912b0 100644 --- a/opm/core/io/eclipse/EclipseGridParser.cpp +++ b/opm/core/io/eclipse/EclipseGridParser.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -710,7 +711,7 @@ const std::vector& EclipseGridParser::getFloatingPointValue(const std::s //--------------------------------------------------------------------------- -const boost::shared_ptr EclipseGridParser::getSpecialValue(const std::string& keyword) const +const std::shared_ptr EclipseGridParser::getSpecialValue(const std::string& keyword) const //--------------------------------------------------------------------------- { SpecialMap::const_iterator it = special_field_by_epoch_[current_epoch_].find(keyword); @@ -722,13 +723,13 @@ const boost::shared_ptr EclipseGridParser::getSpecialValue(const st } //--------------------------------------------------------------------------- -boost::shared_ptr +std::shared_ptr EclipseGridParser::createSpecialField(std::istream& is, const std::string& fieldname) //--------------------------------------------------------------------------- { string ukey = upcase(fieldname); - boost::shared_ptr spec_ptr + std::shared_ptr spec_ptr = Factory::createObject(fieldname); is >> ignoreWhitespace; spec_ptr->read(is); @@ -736,13 +737,13 @@ EclipseGridParser::createSpecialField(std::istream& is, } //--------------------------------------------------------------------------- -boost::shared_ptr +std::shared_ptr EclipseGridParser::cloneSpecialField(const std::string& fieldname, - const boost::shared_ptr original) + const std::shared_ptr original) //--------------------------------------------------------------------------- { string ukey = upcase(fieldname); - boost::shared_ptr spec_ptr + std::shared_ptr spec_ptr = Factory::cloneObject(fieldname, original); return spec_ptr; } @@ -766,7 +767,7 @@ void EclipseGridParser::setFloatingPointField(const std::string& keyword, //--------------------------------------------------------------------------- void EclipseGridParser::setSpecialField(const std::string& keyword, - boost::shared_ptr field) + std::shared_ptr field) //--------------------------------------------------------------------------- { special_field_by_epoch_[current_epoch_][keyword] = field; diff --git a/opm/core/io/eclipse/EclipseGridParser.hpp b/opm/core/io/eclipse/EclipseGridParser.hpp index 82b969ab..44b0b054 100644 --- a/opm/core/io/eclipse/EclipseGridParser.hpp +++ b/opm/core/io/eclipse/EclipseGridParser.hpp @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include @@ -138,7 +138,7 @@ namespace Opm /// corresponding to the given floating-point keyword. const std::vector& getFloatingPointValue(const std::string& keyword) const; - typedef boost::shared_ptr SpecialFieldPtr; + typedef std::shared_ptr SpecialFieldPtr; /// Returns a reference to a vector containing pointers to the values /// corresponding to the given keyword when the values are not only integers @@ -245,7 +245,7 @@ private: SpecialFieldPtr createSpecialField(std::istream& is, const std::string& fieldname); SpecialFieldPtr cloneSpecialField(const std::string& fieldname, - const boost::shared_ptr original); + const std::shared_ptr original); void readImpl(std::istream& is); void getNumericErtFields(const std::string& filename); diff --git a/opm/core/linalg/LinearSolverFactory.hpp b/opm/core/linalg/LinearSolverFactory.hpp index 330f43a9..6cc2354b 100644 --- a/opm/core/linalg/LinearSolverFactory.hpp +++ b/opm/core/linalg/LinearSolverFactory.hpp @@ -22,7 +22,7 @@ #include -#include +#include namespace Opm { @@ -87,7 +87,7 @@ namespace Opm virtual double getTolerance() const; private: - boost::shared_ptr solver_; + std::shared_ptr solver_; }; diff --git a/opm/core/props/pvt/BlackoilPvtProperties.hpp b/opm/core/props/pvt/BlackoilPvtProperties.hpp index 5f74a926..4ab60921 100644 --- a/opm/core/props/pvt/BlackoilPvtProperties.hpp +++ b/opm/core/props/pvt/BlackoilPvtProperties.hpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include namespace Opm { @@ -116,7 +116,7 @@ namespace Opm int region_number_; - std::vector > props_; + std::vector > props_; double densities_[MaxNumPhases]; mutable std::vector data1_; diff --git a/opm/core/simulator/SimulatorCompressibleTwophase.hpp b/opm/core/simulator/SimulatorCompressibleTwophase.hpp index 944230e5..87027f7d 100644 --- a/opm/core/simulator/SimulatorCompressibleTwophase.hpp +++ b/opm/core/simulator/SimulatorCompressibleTwophase.hpp @@ -20,7 +20,7 @@ #ifndef OPM_SIMULATORCOMPRESSIBLETWOPHASE_HEADER_INCLUDED #define OPM_SIMULATORCOMPRESSIBLETWOPHASE_HEADER_INCLUDED -#include +#include #include struct UnstructuredGrid; @@ -91,7 +91,7 @@ namespace Opm private: class Impl; // Using shared_ptr instead of scoped_ptr since scoped_ptr requires complete type for Impl. - boost::shared_ptr pimpl_; + std::shared_ptr pimpl_; }; } // namespace Opm diff --git a/opm/core/simulator/SimulatorIncompTwophase.hpp b/opm/core/simulator/SimulatorIncompTwophase.hpp index d814c0f7..3b7e3ccf 100644 --- a/opm/core/simulator/SimulatorIncompTwophase.hpp +++ b/opm/core/simulator/SimulatorIncompTwophase.hpp @@ -20,7 +20,7 @@ #ifndef OPM_SIMULATORINCOMPTWOPHASE_HEADER_INCLUDED #define OPM_SIMULATORINCOMPTWOPHASE_HEADER_INCLUDED -#include +#include #include #include #include @@ -120,7 +120,7 @@ namespace Opm private: struct Impl; // Using shared_ptr instead of scoped_ptr since scoped_ptr requires complete type for Impl. - boost::shared_ptr pimpl_; + std::shared_ptr pimpl_; // implementation which is not templated, and can be in library void connect_timestep_impl (boost::function0 hook); diff --git a/opm/core/tof/TofDiscGalReorder.hpp b/opm/core/tof/TofDiscGalReorder.hpp index b13affac..2e8fa317 100644 --- a/opm/core/tof/TofDiscGalReorder.hpp +++ b/opm/core/tof/TofDiscGalReorder.hpp @@ -21,7 +21,7 @@ #define OPM_TOFDISCGALREORDER_HEADER_INCLUDED #include -#include +#include #include #include #include @@ -128,7 +128,7 @@ namespace Opm // Data members const UnstructuredGrid& grid_; - boost::shared_ptr velocity_interpolation_; + std::shared_ptr velocity_interpolation_; bool use_cvi_; bool use_limiter_; double limiter_relative_flux_threshold_; @@ -139,7 +139,7 @@ namespace Opm const double* darcyflux_; // one flux per grid face const double* porevolume_; // one volume per cell const double* source_; // one volumetric source term per cell - boost::shared_ptr basis_func_; + std::shared_ptr basis_func_; double* tof_coeff_; // For tracers. double* tracer_coeff_; diff --git a/opm/core/utility/Factory.hpp b/opm/core/utility/Factory.hpp index c031fe25..a65fc1e2 100644 --- a/opm/core/utility/Factory.hpp +++ b/opm/core/utility/Factory.hpp @@ -36,7 +36,7 @@ #define OPM_FACTORY_HEADER #include -#include +#include namespace Opm { @@ -52,7 +52,7 @@ namespace Opm { public: /// The type of pointer returned by createObject(). - typedef boost::shared_ptr ProductPtr; + typedef std::shared_ptr ProductPtr; /// Creates a new object of the class associated with the given type string, /// and returns a pointer to it. @@ -128,7 +128,7 @@ namespace Opm } }; - typedef boost::shared_ptr CreatorPtr; + typedef std::shared_ptr CreatorPtr; typedef std::map CreatorMap; // This map contains the whole factory, i.e. all the Creators. CreatorMap string_to_creator_; diff --git a/opm/core/utility/parameters/ParameterGroup.cpp b/opm/core/utility/parameters/ParameterGroup.cpp index 850fcbd4..a6d7837d 100644 --- a/opm/core/utility/parameters/ParameterGroup.cpp +++ b/opm/core/utility/parameters/ParameterGroup.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include @@ -173,7 +173,7 @@ namespace Opm { } void ParameterGroup::insert(const std::string& name, - const boost::shared_ptr& data) + const std::shared_ptr& data) { std::pair name_path = split(name); map_type::const_iterator it = map_.find(name_path.first); @@ -214,10 +214,10 @@ namespace Opm { map_type::const_iterator it = map_.find(name_path.first); if (it == map_.end()) { if (name_path.second == "") { - boost::shared_ptr data(new Parameter(value, ID_param_type__cmdline)); + std::shared_ptr data(new Parameter(value, ID_param_type__cmdline)); map_[name_path.first] = data; } else { - boost::shared_ptr data(new ParameterGroup(this->path() + ID_delimiter_path + name_path.first, + std::shared_ptr data(new ParameterGroup(this->path() + ID_delimiter_path + name_path.first, this)); ParameterGroup& child = dynamic_cast(*data); child.insertParameter(name_path.second, value); @@ -235,7 +235,7 @@ namespace Opm { << ID_xmltag__param << " element.\n"; } - boost::shared_ptr data(new Parameter(value, ID_param_type__cmdline)); + std::shared_ptr data(new Parameter(value, ID_param_type__cmdline)); map_[name_path.first] = data; } else { ParameterGroup& pg = dynamic_cast(*(*it).second); diff --git a/opm/core/utility/parameters/ParameterGroup.hpp b/opm/core/utility/parameters/ParameterGroup.hpp index 092e71ef..4521592f 100644 --- a/opm/core/utility/parameters/ParameterGroup.hpp +++ b/opm/core/utility/parameters/ParameterGroup.hpp @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include @@ -262,13 +262,13 @@ namespace Opm { /// Insert a new item into the group. void insert(const std::string& name, - const boost::shared_ptr& data); + const std::shared_ptr& data); /// Insert a new parameter item into the group. void insertParameter(const std::string& name, const std::string& value); private: - typedef boost::shared_ptr data_type; + typedef std::shared_ptr data_type; typedef std::pair pair_type; typedef std::map map_type; diff --git a/opm/core/utility/parameters/ParameterXML.cpp b/opm/core/utility/parameters/ParameterXML.cpp index bba74072..0e43b99a 100644 --- a/opm/core/utility/parameters/ParameterXML.cpp +++ b/opm/core/utility/parameters/ParameterXML.cpp @@ -43,14 +43,11 @@ #include #include #include +#include #include -#include - #include - - namespace Opm { namespace parameter { @@ -105,7 +102,7 @@ namespace Opm { continue; } std::string name = getProperty(ID_xmlatt__name, elem); - boost::shared_ptr data; + std::shared_ptr data; if (tag_name == ID_xmltag__param) { std::string value = getProperty(ID_xmlatt__value, elem); std::string type = getProperty(ID_xmlatt__type, elem); diff --git a/opm/core/wells/WellCollection.cpp b/opm/core/wells/WellCollection.cpp index 92f6a995..064d94a2 100644 --- a/opm/core/wells/WellCollection.cpp +++ b/opm/core/wells/WellCollection.cpp @@ -19,7 +19,7 @@ #include "config.h" #include -#include +#include namespace Opm { @@ -33,7 +33,7 @@ namespace Opm roots_.push_back(createWellsGroup(parent_name, deck)); parent = roots_[roots_.size() - 1].get(); } - boost::shared_ptr child; + std::shared_ptr child; for (size_t i = 0; i < roots_.size(); ++i) { if (roots_[i]->name() == child_name) { @@ -99,7 +99,7 @@ namespace Opm /// \param[in] child the child node /// \param[in] parent name of parent node - void WellCollection::addChild(boost::shared_ptr& child_node, + void WellCollection::addChild(std::shared_ptr& child_node, const std::string& parent_name) { WellsGroupInterface* parent = findNode(parent_name); @@ -116,7 +116,7 @@ namespace Opm /// Adds the node to the collection (as a root node) - void WellCollection::addChild(boost::shared_ptr& child_node) + void WellCollection::addChild(std::shared_ptr& child_node) { roots_.push_back(child_node); if (child_node->isLeafNode()) { diff --git a/opm/core/wells/WellCollection.hpp b/opm/core/wells/WellCollection.hpp index b317973f..9cdb9e7f 100644 --- a/opm/core/wells/WellCollection.hpp +++ b/opm/core/wells/WellCollection.hpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include namespace Opm { @@ -48,11 +48,11 @@ namespace Opm /// and appends it to parent's children. /// \param[in] child the child node /// \param[in] parent name of parent node - void addChild(boost::shared_ptr& child_node, + void addChild(std::shared_ptr& child_node, const std::string& parent); /// Adds the node to the collection (as a root node) - void addChild(boost::shared_ptr& child_node); + void addChild(std::shared_ptr& child_node); /// Checks if each condition is met, applies well controls where needed /// (that is, it either changes the active control of violating wells, or shuts @@ -113,7 +113,7 @@ namespace Opm private: // To account for the possibility of a forest - std::vector > roots_; + std::vector > roots_; // This will be used to traverse the bottom nodes. std::vector leaf_nodes_; diff --git a/opm/core/wells/WellsGroup.cpp b/opm/core/wells/WellsGroup.cpp index a1068387..347aefec 100644 --- a/opm/core/wells/WellsGroup.cpp +++ b/opm/core/wells/WellsGroup.cpp @@ -20,6 +20,7 @@ #include "config.h" #include #include +#include #include #include @@ -401,7 +402,7 @@ namespace Opm return true; } - void WellsGroup::addChild(boost::shared_ptr child) + void WellsGroup::addChild(std::shared_ptr child) { children_.push_back(child); } @@ -1041,12 +1042,12 @@ namespace Opm } } // anonymous namespace - boost::shared_ptr createWellsGroup(const std::string& name, + std::shared_ptr createWellsGroup(const std::string& name, const EclipseGridParser& deck) { PhaseUsage phase_usage = phaseUsageFromDeck(deck); - boost::shared_ptr return_value; + std::shared_ptr return_value; // First we need to determine whether it's a group or just a well: bool isWell = false; if (deck.hasField("WELSPECS")) { diff --git a/opm/core/wells/WellsGroup.hpp b/opm/core/wells/WellsGroup.hpp index 2d9a57c5..143da935 100644 --- a/opm/core/wells/WellsGroup.hpp +++ b/opm/core/wells/WellsGroup.hpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include namespace Opm { @@ -232,7 +232,7 @@ namespace Opm virtual WellsGroupInterface* findGroup(const std::string& name_of_node); - void addChild(boost::shared_ptr child); + void addChild(std::shared_ptr child); virtual bool conditionsMet(const std::vector& well_bhp, const std::vector& well_reservoirrates_phase, @@ -301,7 +301,7 @@ namespace Opm const std::vector& well_surfacerates_phase); private: - std::vector > children_; + std::vector > children_; }; @@ -402,7 +402,7 @@ namespace Opm /// Creates the WellsGroupInterface for the given name /// \param[in] name the name of the wells group. /// \param[in] deck the deck from which to fetch information. - boost::shared_ptr createWellsGroup(const std::string& name, + std::shared_ptr createWellsGroup(const std::string& name, const EclipseGridParser& deck); diff --git a/tests/test_blackoilfluid.cpp b/tests/test_blackoilfluid.cpp index 16581af3..59e4a7f6 100644 --- a/tests/test_blackoilfluid.cpp +++ b/tests/test_blackoilfluid.cpp @@ -19,7 +19,7 @@ #define BOOST_TEST_MODULE BlackoilFluidTest #define BOOST_TEST_MAIN #include -#include +#include #include #include #include @@ -38,7 +38,7 @@ BOOST_AUTO_TEST_CASE(test_blackoilfluid) const EclipseGridParser deck (filename); // setup pvt interface - std::vector > props_; + std::vector > props_; PhaseUsage phase_usage_ = phaseUsageFromDeck(deck); enum PhaseIndex { Aqua = 0, Liquid = 1, Vapour = 2 }; int samples = 0; diff --git a/tests/test_wells.cpp b/tests/test_wells.cpp index b4dbf91c..b044c79f 100644 --- a/tests/test_wells.cpp +++ b/tests/test_wells.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include BOOST_AUTO_TEST_CASE(Construction) { @@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE(Construction) const int nwells = 2; const int nperfs = 2; - boost::shared_ptr W(create_wells(nphases, nwells, nperfs), + std::shared_ptr W(create_wells(nphases, nwells, nperfs), destroy_wells); if (W) { @@ -83,7 +83,7 @@ BOOST_AUTO_TEST_CASE(Controls) const int nwells = 1; const int nperfs = 2; - boost::shared_ptr W(create_wells(nphases, nwells, nperfs), + std::shared_ptr W(create_wells(nphases, nwells, nperfs), destroy_wells); if (W) { @@ -130,9 +130,9 @@ BOOST_AUTO_TEST_CASE(Copy) const int nwells = 2; const int nperfs = 2; - boost::shared_ptr W1(create_wells(nphases, nwells, nperfs), + std::shared_ptr W1(create_wells(nphases, nwells, nperfs), destroy_wells); - boost::shared_ptr W2; + std::shared_ptr W2; if (W1) { int cells[] = { 0, 9 }; diff --git a/tutorials/tutorial4.cpp b/tutorials/tutorial4.cpp index 93b4a837..90182608 100644 --- a/tutorials/tutorial4.cpp +++ b/tutorials/tutorial4.cpp @@ -264,8 +264,8 @@ int main () /// what the interface expects. The first argument is the (unique) name of the group. /// \snippet tutorial4.cpp injection specification /// \internal[injection specification] - boost::shared_ptr well_group(new WellsGroup("group", well_group_prod_spec, InjectionSpecification(), - phase_usage)); + std::shared_ptr well_group(new WellsGroup("group", well_group_prod_spec, InjectionSpecification(), + phase_usage)); /// \internal[injection specification] /// \endinternal @@ -289,8 +289,8 @@ int main () well_name << "well" << i; ProductionSpecification production_specification; production_specification.control_mode_ = ProductionSpecification::GRUP; - boost::shared_ptr well_leaf_node(new WellNode(well_name.str(), production_specification, InjectionSpecification(), - phase_usage)); + std::shared_ptr well_leaf_node(new WellNode(well_name.str(), production_specification, InjectionSpecification(), + phase_usage)); well_collection.addChild(well_leaf_node, "group"); }