mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-20 11:48:25 -06:00
replace boost::array by std::array
GCC 4.4 supports std::array, so there is not much point in keeping compatibility with ancient compilers...
This commit is contained in:
parent
c077912466
commit
5893b9324e
@ -22,7 +22,7 @@
|
||||
|
||||
|
||||
#include <opm/core/io/eclipse/EclipseGridParser.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@ -64,9 +64,9 @@ namespace Opm
|
||||
const double* viscosity() const;
|
||||
|
||||
private:
|
||||
boost::array<double, 2> surface_density_;
|
||||
boost::array<double, 2> reservoir_density_;
|
||||
boost::array<double, 2> viscosity_;
|
||||
std::array<double, 2> surface_density_;
|
||||
std::array<double, 2> reservoir_density_;
|
||||
std::array<double, 2> viscosity_;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "config.h"
|
||||
#include <opm/core/props/rock/RockFromDeck.hpp>
|
||||
#include <opm/core/grid.h>
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@ -32,11 +32,11 @@ namespace Opm
|
||||
enum PermeabilityKind { ScalarPerm, DiagonalPerm, TensorPerm, None, Invalid };
|
||||
|
||||
PermeabilityKind classifyPermeability(const EclipseGridParser& parser);
|
||||
void setScalarPermIfNeeded(boost::array<int,9>& kmap,
|
||||
void setScalarPermIfNeeded(std::array<int,9>& kmap,
|
||||
int i, int j, int k);
|
||||
PermeabilityKind fillTensor(const EclipseGridParser& parser,
|
||||
std::vector<const std::vector<double>*>& tensor,
|
||||
boost::array<int,9>& kmap);
|
||||
std::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);
|
||||
|
||||
boost::array<int,9> kmap;
|
||||
std::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(boost::array<int,9>& kmap,
|
||||
void setScalarPermIfNeeded(std::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,
|
||||
boost::array<int,9>& kmap)
|
||||
std::array<int,9>& kmap)
|
||||
{
|
||||
PermeabilityKind kind = classifyPermeability(parser);
|
||||
if (kind == Invalid) {
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <opm/core/wells/WellCollection.hpp>
|
||||
#include <opm/core/props/phaseUsageFromDeck.hpp>
|
||||
|
||||
#include <boost/array.hpp>
|
||||
#include <array>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
@ -141,10 +141,10 @@ namespace
|
||||
} // namespace InjectionControl
|
||||
|
||||
|
||||
boost::array<double, 3> getCubeDim(const UnstructuredGrid& grid, int cell)
|
||||
std::array<double, 3> getCubeDim(const UnstructuredGrid& grid, int cell)
|
||||
{
|
||||
using namespace std;
|
||||
boost::array<double, 3> cube;
|
||||
std::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 boost::array<double, 3>& cubical,
|
||||
const std::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);
|
||||
}
|
||||
boost::array<double, 3> cubical = getCubeDim(grid, cell);
|
||||
std::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