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:
Andreas Lauser 2013-07-30 17:46:32 +02:00
parent c077912466
commit 5893b9324e
3 changed files with 15 additions and 15 deletions

View File

@ -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_;
};
}

View File

@ -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) {

View File

@ -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_);