mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
replace all boost::
smart pointers by their std::
equivalents
The std variants are part of c++-2011 and it's 2014 now. (they are also available in GCC 4.4.)
This commit is contained in:
@@ -51,9 +51,9 @@
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
@@ -93,9 +93,9 @@ try
|
||||
OPM_THROW(std::runtime_error, "This simulator cannot run without a deck with wells. Use deck_filename to specify deck.");
|
||||
}
|
||||
Opm::DeckConstPtr deck;
|
||||
boost::scoped_ptr<GridManager> grid;
|
||||
boost::scoped_ptr<BlackoilPropertiesInterface> props;
|
||||
boost::scoped_ptr<RockCompressibility> rock_comp;
|
||||
std::unique_ptr<GridManager> grid;
|
||||
std::unique_ptr<BlackoilPropertiesInterface> props;
|
||||
std::unique_ptr<RockCompressibility> rock_comp;
|
||||
EclipseStateConstPtr eclipseState;
|
||||
BlackoilState state;
|
||||
// bool check_well_controls = false;
|
||||
|
@@ -49,9 +49,9 @@
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
@@ -101,9 +101,9 @@ try
|
||||
bool use_deck = param.has("deck_filename");
|
||||
Opm::ParserPtr parser(new Opm::Parser());
|
||||
Opm::DeckConstPtr deck;
|
||||
boost::scoped_ptr<GridManager> grid;
|
||||
boost::scoped_ptr<IncompPropertiesInterface> props;
|
||||
boost::scoped_ptr<RockCompressibility> rock_comp;
|
||||
std::unique_ptr<GridManager> grid;
|
||||
std::unique_ptr<IncompPropertiesInterface> props;
|
||||
std::unique_ptr<RockCompressibility> rock_comp;
|
||||
EclipseStateConstPtr eclipseState;
|
||||
TwophaseState state;
|
||||
// bool check_well_controls = false;
|
||||
|
@@ -41,17 +41,16 @@
|
||||
#include <opm/core/simulator/BlackoilState.hpp>
|
||||
#include <opm/core/simulator/initState.hpp>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
namespace {
|
||||
boost::shared_ptr<Wells>
|
||||
std::shared_ptr<Wells>
|
||||
createWellConfig()
|
||||
{
|
||||
boost::shared_ptr<Wells> wells(create_wells(2, 2, 2),
|
||||
std::shared_ptr<Wells> wells(create_wells(2, 2, 2),
|
||||
destroy_wells);
|
||||
|
||||
const double inj_frac[] = { 1.0, 0.0 };
|
||||
@@ -98,7 +97,7 @@ try
|
||||
const Opm::BlackoilPropertiesBasic props0(param, 2, nc);
|
||||
const Opm::BlackoilPropsAd props(props0);
|
||||
|
||||
boost::shared_ptr<Wells> wells = createWellConfig();
|
||||
std::shared_ptr<Wells> wells = createWellConfig();
|
||||
|
||||
double grav[] = { 0.0, 0.0 };
|
||||
Opm::DerivedGeology geo(*g, props, grav);
|
||||
|
@@ -348,7 +348,7 @@ namespace Opm
|
||||
RockFromDeck rock_;
|
||||
std::unique_ptr<SaturationPropsInterface> satprops_;
|
||||
PhaseUsage phase_usage_;
|
||||
std::vector<boost::shared_ptr<SinglePvtInterface> > props_;
|
||||
std::vector<std::shared_ptr<SinglePvtInterface> > props_;
|
||||
double densities_[BlackoilPhases::MaxNumPhases];
|
||||
};
|
||||
|
||||
|
@@ -51,9 +51,9 @@
|
||||
#include <opm/core/transport/reorder/TransportSolverCompressibleTwophaseReorder.hpp>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <numeric>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#ifndef OPM_SIMULATORCOMPRESSIBLEAD_HEADER_INCLUDED
|
||||
#define OPM_SIMULATORCOMPRESSIBLEAD_HEADER_INCLUDED
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
struct UnstructuredGrid;
|
||||
@@ -87,7 +87,7 @@ namespace Opm
|
||||
private:
|
||||
class Impl;
|
||||
// Using shared_ptr instead of scoped_ptr since scoped_ptr requires complete type for Impl.
|
||||
boost::shared_ptr<Impl> pimpl_;
|
||||
std::shared_ptr<Impl> pimpl_;
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#ifndef OPM_SIMULATORFULLYIMPLICITBLACKOIL_HEADER_INCLUDED
|
||||
#define OPM_SIMULATORFULLYIMPLICITBLACKOIL_HEADER_INCLUDED
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
struct UnstructuredGrid;
|
||||
@@ -90,7 +90,7 @@ namespace Opm
|
||||
private:
|
||||
class Impl;
|
||||
// Using shared_ptr instead of scoped_ptr since scoped_ptr requires complete type for Impl.
|
||||
boost::shared_ptr<Impl> pimpl_;
|
||||
std::shared_ptr<Impl> pimpl_;
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
@@ -46,9 +46,9 @@
|
||||
#include <opm/core/transport/reorder/TransportSolverCompressibleTwophaseReorder.hpp>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <numeric>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
@@ -51,9 +51,9 @@
|
||||
#include <opm/core/transport/implicit/TransportSolverTwophaseImplicit.hpp>
|
||||
#include <opm/autodiff/TransportSolverTwophaseAd.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <numeric>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
@@ -103,7 +103,7 @@ namespace Opm
|
||||
const FlowBoundaryConditions* bcs_;
|
||||
// Solvers
|
||||
IncompTpfa psolver_;
|
||||
boost::scoped_ptr<TransportSolverTwophaseInterface> tsolver_;
|
||||
std::unique_ptr<TransportSolverTwophaseInterface> tsolver_;
|
||||
// Misc. data
|
||||
std::vector<int> allcells_;
|
||||
};
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#ifndef OPM_SIMULATORINCOMPTWOPHASEAD_HEADER_INCLUDED
|
||||
#define OPM_SIMULATORINCOMPTWOPHASEAD_HEADER_INCLUDED
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
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<Impl> pimpl_;
|
||||
std::shared_ptr<Impl> pimpl_;
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
Reference in New Issue
Block a user