mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #469 from atgeirr/silence-warnings
Silence some more warnings.
This commit is contained in:
commit
d43b259886
@ -388,6 +388,7 @@ namespace Opm
|
|||||||
|
|
||||||
static AutoDiffMatrix addSI(const AutoDiffMatrix& lhs, const AutoDiffMatrix& rhs)
|
static AutoDiffMatrix addSI(const AutoDiffMatrix& lhs, const AutoDiffMatrix& rhs)
|
||||||
{
|
{
|
||||||
|
static_cast<void>(rhs); // Silence release-mode warning.
|
||||||
assert(lhs.type_ == S);
|
assert(lhs.type_ == S);
|
||||||
assert(rhs.type_ == I);
|
assert(rhs.type_ == I);
|
||||||
AutoDiffMatrix retval = lhs;
|
AutoDiffMatrix retval = lhs;
|
||||||
|
@ -57,8 +57,8 @@ namespace Opm
|
|||||||
const UnstructuredGrid& grid,
|
const UnstructuredGrid& grid,
|
||||||
const bool init_rock)
|
const bool init_rock)
|
||||||
{
|
{
|
||||||
init(deck, eclState, materialLawManager, grid.number_of_cells, grid.global_cell, grid.cartdims,
|
init(deck, eclState, materialLawManager, grid.number_of_cells, grid.global_cell, grid.cartdims,
|
||||||
grid.cell_centroids, grid.dimensions, init_rock);
|
init_rock);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_DUNE_CORNERPOINT
|
||||||
@ -77,7 +77,7 @@ namespace Opm
|
|||||||
materialLawManager->initFromDeck(deck, eclState, compressedToCartesianIdx);
|
materialLawManager->initFromDeck(deck, eclState, compressedToCartesianIdx);
|
||||||
init(deck, eclState, materialLawManager, grid.numCells(), static_cast<const int*>(&grid.globalCell()[0]),
|
init(deck, eclState, materialLawManager, grid.numCells(), static_cast<const int*>(&grid.globalCell()[0]),
|
||||||
static_cast<const int*>(&grid.logicalCartesianSize()[0]),
|
static_cast<const int*>(&grid.logicalCartesianSize()[0]),
|
||||||
grid.beginCellCentroids(), Dune::CpGrid::dimension, init_rock);
|
init_rock);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
auto materialLawManager = std::make_shared<MaterialLawManager>();
|
auto materialLawManager = std::make_shared<MaterialLawManager>();
|
||||||
std::vector<int> compressedToCartesianIdx(grid.number_of_cells);
|
std::vector<int> compressedToCartesianIdx(grid.number_of_cells);
|
||||||
for (unsigned cellIdx = 0; cellIdx < grid.number_of_cells; ++cellIdx) {
|
for (int cellIdx = 0; cellIdx < grid.number_of_cells; ++cellIdx) {
|
||||||
if (grid.global_cell) {
|
if (grid.global_cell) {
|
||||||
compressedToCartesianIdx[cellIdx] = grid.global_cell[cellIdx];
|
compressedToCartesianIdx[cellIdx] = grid.global_cell[cellIdx];
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
materialLawManager->initFromDeck(deck, eclState, compressedToCartesianIdx);
|
materialLawManager->initFromDeck(deck, eclState, compressedToCartesianIdx);
|
||||||
init(deck, eclState, materialLawManager, grid.number_of_cells, grid.global_cell, grid.cartdims,
|
init(deck, eclState, materialLawManager, grid.number_of_cells, grid.global_cell, grid.cartdims,
|
||||||
grid.cell_centroids, grid.dimensions, init_rock);
|
init_rock);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_DUNE_CORNERPOINT
|
#ifdef HAVE_DUNE_CORNERPOINT
|
||||||
@ -112,7 +112,7 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
init(deck, eclState, materialLawManager, grid.numCells(), static_cast<const int*>(&grid.globalCell()[0]),
|
init(deck, eclState, materialLawManager, grid.numCells(), static_cast<const int*>(&grid.globalCell()[0]),
|
||||||
static_cast<const int*>(&grid.logicalCartesianSize()[0]),
|
static_cast<const int*>(&grid.logicalCartesianSize()[0]),
|
||||||
grid.beginCellCentroids(), Dune::CpGrid::dimension, init_rock);
|
init_rock);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -145,15 +145,12 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Initializes the properties.
|
/// Initializes the properties.
|
||||||
template <class CentroidIterator>
|
|
||||||
void BlackoilPropsAdFromDeck::init(Opm::DeckConstPtr deck,
|
void BlackoilPropsAdFromDeck::init(Opm::DeckConstPtr deck,
|
||||||
Opm::EclipseStateConstPtr eclState,
|
Opm::EclipseStateConstPtr eclState,
|
||||||
std::shared_ptr<MaterialLawManager> materialLawManager,
|
std::shared_ptr<MaterialLawManager> materialLawManager,
|
||||||
int number_of_cells,
|
int number_of_cells,
|
||||||
const int* global_cell,
|
const int* global_cell,
|
||||||
const int* cart_dims,
|
const int* cart_dims,
|
||||||
const CentroidIterator& begin_cell_centroids,
|
|
||||||
int dimension,
|
|
||||||
const bool init_rock)
|
const bool init_rock)
|
||||||
{
|
{
|
||||||
materialLawManager_ = materialLawManager;
|
materialLawManager_ = materialLawManager;
|
||||||
|
@ -358,15 +358,12 @@ namespace Opm
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
/// Initializes the properties.
|
/// Initializes the properties.
|
||||||
template <class CentroidIterator>
|
|
||||||
void init(Opm::DeckConstPtr deck,
|
void init(Opm::DeckConstPtr deck,
|
||||||
Opm::EclipseStateConstPtr eclState,
|
Opm::EclipseStateConstPtr eclState,
|
||||||
std::shared_ptr<MaterialLawManager> materialLawManager,
|
std::shared_ptr<MaterialLawManager> materialLawManager,
|
||||||
int number_of_cells,
|
int number_of_cells,
|
||||||
const int* global_cell,
|
const int* global_cell,
|
||||||
const int* cart_dims,
|
const int* cart_dims,
|
||||||
const CentroidIterator& begin_cell_centroids,
|
|
||||||
int dimension,
|
|
||||||
const bool init_rock);
|
const bool init_rock);
|
||||||
|
|
||||||
/// Correction to rs/rv according to kw VAPPARS
|
/// Correction to rs/rv according to kw VAPPARS
|
||||||
|
@ -482,7 +482,9 @@ namespace Opm
|
|||||||
well_controls_add_new(BHP, bhp_limit,
|
well_controls_add_new(BHP, bhp_limit,
|
||||||
invalid_alq, invalid_vfp,
|
invalid_alq, invalid_vfp,
|
||||||
NULL, ctrl);
|
NULL, ctrl);
|
||||||
assert(ok_bhp != 0);
|
if (!ok_bhp) {
|
||||||
|
OPM_THROW(std::runtime_error, "Failed to add well control.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ void createGlobalCellArray(const Grid &grid, std::vector<int>& dest)
|
|||||||
dest.resize(numCells);
|
dest.resize(numCells);
|
||||||
const auto& globalCell = Opm::UgGridHelpers::globalCell(grid);
|
const auto& globalCell = Opm::UgGridHelpers::globalCell(grid);
|
||||||
std::vector<int> compressedToCartesianIdx(numCells);
|
std::vector<int> compressedToCartesianIdx(numCells);
|
||||||
for (unsigned cellIdx = 0; cellIdx < numCells; ++cellIdx) {
|
for (int cellIdx = 0; cellIdx < numCells; ++cellIdx) {
|
||||||
if (globalCell) {
|
if (globalCell) {
|
||||||
dest[cellIdx] = globalCell[cellIdx];
|
dest[cellIdx] = globalCell[cellIdx];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user