mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #274 from blattms/non-tr1
Changed std::tr1 occurences to boost.
This commit is contained in:
commit
f99377ceec
@ -22,7 +22,7 @@
|
||||
|
||||
|
||||
#include <opm/core/linalg/LinearSolverInterface.hpp>
|
||||
#include <tr1/memory>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@ -87,7 +87,7 @@ namespace Opm
|
||||
virtual double getTolerance() const;
|
||||
|
||||
private:
|
||||
std::tr1::shared_ptr<LinearSolverInterface> solver_;
|
||||
boost::shared_ptr<LinearSolverInterface> solver_;
|
||||
};
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
|
||||
#include <opm/core/io/eclipse/EclipseGridParser.hpp>
|
||||
#include <tr1/array>
|
||||
#include <boost/array.hpp>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@ -64,9 +64,9 @@ namespace Opm
|
||||
const double* viscosity() const;
|
||||
|
||||
private:
|
||||
std::tr1::array<double, 2> surface_density_;
|
||||
std::tr1::array<double, 2> reservoir_density_;
|
||||
std::tr1::array<double, 2> viscosity_;
|
||||
boost::array<double, 2> surface_density_;
|
||||
boost::array<double, 2> reservoir_density_;
|
||||
boost::array<double, 2> viscosity_;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "config.h"
|
||||
#include <opm/core/props/rock/RockFromDeck.hpp>
|
||||
#include <opm/core/grid.h>
|
||||
#include <tr1/array>
|
||||
#include <boost/array.hpp>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@ -32,11 +32,11 @@ namespace Opm
|
||||
enum PermeabilityKind { ScalarPerm, DiagonalPerm, TensorPerm, None, Invalid };
|
||||
|
||||
PermeabilityKind classifyPermeability(const EclipseGridParser& parser);
|
||||
void setScalarPermIfNeeded(std::tr1::array<int,9>& kmap,
|
||||
void setScalarPermIfNeeded(boost::array<int,9>& kmap,
|
||||
int i, int j, int k);
|
||||
PermeabilityKind fillTensor(const EclipseGridParser& parser,
|
||||
std::vector<const std::vector<double>*>& tensor,
|
||||
std::tr1::array<int,9>& kmap);
|
||||
boost::array<int,9>& kmap);
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ namespace Opm
|
||||
const std::vector<double> zero(num_global_cells, 0.0);
|
||||
tensor.push_back(&zero);
|
||||
|
||||
std::tr1::array<int,9> kmap;
|
||||
boost::array<int,9> kmap;
|
||||
PermeabilityKind pkind = fillTensor(parser, tensor, kmap);
|
||||
if (pkind == Invalid) {
|
||||
THROW("Invalid permeability field.");
|
||||
@ -225,7 +225,7 @@ namespace Opm
|
||||
/// @param [in] i
|
||||
/// @param [in] j
|
||||
/// @param [in] k
|
||||
void setScalarPermIfNeeded(std::tr1::array<int,9>& kmap,
|
||||
void setScalarPermIfNeeded(boost::array<int,9>& kmap,
|
||||
int i, int j, int k)
|
||||
{
|
||||
if (kmap[j] == 0) { kmap[j] = kmap[i]; }
|
||||
@ -267,7 +267,7 @@ namespace Opm
|
||||
/// @param [out] kmap
|
||||
PermeabilityKind fillTensor(const EclipseGridParser& parser,
|
||||
std::vector<const std::vector<double>*>& tensor,
|
||||
std::tr1::array<int,9>& kmap)
|
||||
boost::array<int,9>& kmap)
|
||||
{
|
||||
PermeabilityKind kind = classifyPermeability(parser);
|
||||
if (kind == Invalid) {
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include <opm/core/wells/WellCollection.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@ -32,7 +33,7 @@ namespace Opm
|
||||
roots_.push_back(createWellsGroup(parent_name, deck));
|
||||
parent = roots_[roots_.size() - 1].get();
|
||||
}
|
||||
std::tr1::shared_ptr<WellsGroupInterface> child;
|
||||
boost::shared_ptr<WellsGroupInterface> child;
|
||||
|
||||
for (size_t i = 0; i < roots_.size(); ++i) {
|
||||
if (roots_[i]->name() == child_name) {
|
||||
@ -98,7 +99,7 @@ namespace Opm
|
||||
/// \param[in] child the child node
|
||||
/// \param[in] parent name of parent node
|
||||
|
||||
void WellCollection::addChild(std::tr1::shared_ptr<WellsGroupInterface>& child_node,
|
||||
void WellCollection::addChild(boost::shared_ptr<WellsGroupInterface>& child_node,
|
||||
const std::string& parent_name)
|
||||
{
|
||||
WellsGroupInterface* parent = findNode(parent_name);
|
||||
@ -115,7 +116,7 @@ namespace Opm
|
||||
|
||||
/// Adds the node to the collection (as a root node)
|
||||
|
||||
void WellCollection::addChild(std::tr1::shared_ptr<WellsGroupInterface>& child_node)
|
||||
void WellCollection::addChild(boost::shared_ptr<WellsGroupInterface>& child_node)
|
||||
{
|
||||
roots_.push_back(child_node);
|
||||
if (child_node->isLeafNode()) {
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <opm/core/wells/WellsGroup.hpp>
|
||||
#include <opm/core/grid.h>
|
||||
#include <opm/core/io/eclipse/EclipseGridParser.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@ -47,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(std::tr1::shared_ptr<WellsGroupInterface>& child_node,
|
||||
void addChild(boost::shared_ptr<WellsGroupInterface>& child_node,
|
||||
const std::string& parent);
|
||||
|
||||
/// Adds the node to the collection (as a root node)
|
||||
void addChild(std::tr1::shared_ptr<WellsGroupInterface>& child_node);
|
||||
void addChild(boost::shared_ptr<WellsGroupInterface>& 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
|
||||
@ -112,7 +113,7 @@ namespace Opm
|
||||
|
||||
private:
|
||||
// To account for the possibility of a forest
|
||||
std::vector<std::tr1::shared_ptr<WellsGroupInterface> > roots_;
|
||||
std::vector<boost::shared_ptr<WellsGroupInterface> > roots_;
|
||||
|
||||
// This will be used to traverse the bottom nodes.
|
||||
std::vector<WellNode*> leaf_nodes_;
|
||||
|
@ -401,7 +401,7 @@ namespace Opm
|
||||
return true;
|
||||
}
|
||||
|
||||
void WellsGroup::addChild(std::tr1::shared_ptr<WellsGroupInterface> child)
|
||||
void WellsGroup::addChild(boost::shared_ptr<WellsGroupInterface> child)
|
||||
{
|
||||
children_.push_back(child);
|
||||
}
|
||||
@ -1041,12 +1041,12 @@ namespace Opm
|
||||
}
|
||||
} // anonymous namespace
|
||||
|
||||
std::tr1::shared_ptr<WellsGroupInterface> createWellsGroup(const std::string& name,
|
||||
boost::shared_ptr<WellsGroupInterface> createWellsGroup(const std::string& name,
|
||||
const EclipseGridParser& deck)
|
||||
{
|
||||
PhaseUsage phase_usage = phaseUsageFromDeck(deck);
|
||||
|
||||
std::tr1::shared_ptr<WellsGroupInterface> return_value;
|
||||
boost::shared_ptr<WellsGroupInterface> return_value;
|
||||
// First we need to determine whether it's a group or just a well:
|
||||
bool isWell = false;
|
||||
if (deck.hasField("WELSPECS")) {
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <opm/core/grid.h>
|
||||
#include <opm/core/props/BlackoilPhases.hpp>
|
||||
#include <string>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@ -232,7 +232,7 @@ namespace Opm
|
||||
|
||||
virtual WellsGroupInterface* findGroup(const std::string& name_of_node);
|
||||
|
||||
void addChild(std::tr1::shared_ptr<WellsGroupInterface> child);
|
||||
void addChild(boost::shared_ptr<WellsGroupInterface> child);
|
||||
|
||||
virtual bool conditionsMet(const std::vector<double>& well_bhp,
|
||||
const std::vector<double>& well_reservoirrates_phase,
|
||||
@ -301,7 +301,7 @@ namespace Opm
|
||||
const std::vector<double>& well_surfacerates_phase);
|
||||
|
||||
private:
|
||||
std::vector<std::tr1::shared_ptr<WellsGroupInterface> > children_;
|
||||
std::vector<boost::shared_ptr<WellsGroupInterface> > 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.
|
||||
std::tr1::shared_ptr<WellsGroupInterface> createWellsGroup(const std::string& name,
|
||||
boost::shared_ptr<WellsGroupInterface> createWellsGroup(const std::string& name,
|
||||
const EclipseGridParser& deck);
|
||||
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <opm/core/wells/WellCollection.hpp>
|
||||
#include <opm/core/props/phaseUsageFromDeck.hpp>
|
||||
|
||||
#include <tr1/array>
|
||||
#include <boost/array.hpp>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
@ -141,10 +141,10 @@ namespace
|
||||
} // namespace InjectionControl
|
||||
|
||||
|
||||
std::tr1::array<double, 3> getCubeDim(const UnstructuredGrid& grid, int cell)
|
||||
boost::array<double, 3> getCubeDim(const UnstructuredGrid& grid, int cell)
|
||||
{
|
||||
using namespace std;
|
||||
tr1::array<double, 3> cube;
|
||||
boost::array<double, 3> cube;
|
||||
int num_local_faces = grid.cell_facepos[cell + 1] - grid.cell_facepos[cell];
|
||||
vector<double> x(num_local_faces);
|
||||
vector<double> y(num_local_faces);
|
||||
@ -169,7 +169,7 @@ namespace
|
||||
// cell_permeability is the permeability tensor of the given cell.
|
||||
// returns the well index of the cell.
|
||||
double computeWellIndex(const double radius,
|
||||
const std::tr1::array<double, 3>& cubical,
|
||||
const boost::array<double, 3>& cubical,
|
||||
const double* cell_permeability,
|
||||
const double skin_factor)
|
||||
{
|
||||
@ -386,7 +386,7 @@ namespace Opm
|
||||
radius = 0.5*unit::feet;
|
||||
MESSAGE("**** Warning: Well bore internal radius set to " << radius);
|
||||
}
|
||||
std::tr1::array<double, 3> cubical = getCubeDim(grid, cell);
|
||||
boost::array<double, 3> cubical = getCubeDim(grid, cell);
|
||||
const double* cell_perm = &permeability[grid.dimensions*grid.dimensions*cell];
|
||||
pd.well_index = computeWellIndex(radius, cubical, cell_perm,
|
||||
compdat.compdat[kw].skin_factor_);
|
||||
|
Loading…
Reference in New Issue
Block a user