From 5893b9324e0b2a772eda23bfa6e4110d808ae75d Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Tue, 30 Jul 2013 17:46:32 +0200 Subject: [PATCH] replace boost::array by std::array GCC 4.4 supports std::array, so there is not much point in keeping compatibility with ancient compilers... --- opm/core/props/pvt/PvtPropertiesIncompFromDeck.hpp | 8 ++++---- opm/core/props/rock/RockFromDeck.cpp | 12 ++++++------ opm/core/wells/WellsManager.cpp | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/opm/core/props/pvt/PvtPropertiesIncompFromDeck.hpp b/opm/core/props/pvt/PvtPropertiesIncompFromDeck.hpp index 4e8a2ed5e..9bc75e8e5 100644 --- a/opm/core/props/pvt/PvtPropertiesIncompFromDeck.hpp +++ b/opm/core/props/pvt/PvtPropertiesIncompFromDeck.hpp @@ -22,7 +22,7 @@ #include -#include +#include namespace Opm { @@ -64,9 +64,9 @@ namespace Opm const double* viscosity() const; private: - boost::array surface_density_; - boost::array reservoir_density_; - boost::array viscosity_; + std::array surface_density_; + std::array reservoir_density_; + std::array viscosity_; }; } diff --git a/opm/core/props/rock/RockFromDeck.cpp b/opm/core/props/rock/RockFromDeck.cpp index 53a5f42d7..e8d65ea64 100644 --- a/opm/core/props/rock/RockFromDeck.cpp +++ b/opm/core/props/rock/RockFromDeck.cpp @@ -21,7 +21,7 @@ #include "config.h" #include #include -#include +#include namespace Opm { @@ -32,11 +32,11 @@ namespace Opm enum PermeabilityKind { ScalarPerm, DiagonalPerm, TensorPerm, None, Invalid }; PermeabilityKind classifyPermeability(const EclipseGridParser& parser); - void setScalarPermIfNeeded(boost::array& kmap, + void setScalarPermIfNeeded(std::array& kmap, int i, int j, int k); PermeabilityKind fillTensor(const EclipseGridParser& parser, std::vector*>& tensor, - boost::array& kmap); + std::array& kmap); } // anonymous namespace @@ -99,7 +99,7 @@ namespace Opm const std::vector zero(num_global_cells, 0.0); tensor.push_back(&zero); - boost::array kmap; + std::array 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& kmap, + void setScalarPermIfNeeded(std::array& 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*>& tensor, - boost::array& kmap) + std::array& kmap) { PermeabilityKind kind = classifyPermeability(parser); if (kind == Invalid) { diff --git a/opm/core/wells/WellsManager.cpp b/opm/core/wells/WellsManager.cpp index 5ed9d1114..fe2d7c706 100644 --- a/opm/core/wells/WellsManager.cpp +++ b/opm/core/wells/WellsManager.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include @@ -141,10 +141,10 @@ namespace } // namespace InjectionControl - boost::array getCubeDim(const UnstructuredGrid& grid, int cell) + std::array getCubeDim(const UnstructuredGrid& grid, int cell) { using namespace std; - boost::array cube; + std::array cube; int num_local_faces = grid.cell_facepos[cell + 1] - grid.cell_facepos[cell]; vector x(num_local_faces); vector 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& cubical, + const std::array& 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 cubical = getCubeDim(grid, cell); + std::array 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_);