mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-20 11:48:25 -06:00
Merge pull request #4837 from bska/remove-unused-code
Remove Unused Functions
This commit is contained in:
commit
87b9dd3ec2
@ -41,7 +41,6 @@ list (APPEND MAIN_SOURCE_FILES
|
|||||||
opm/core/props/satfunc/RelpermDiagnostics.cpp
|
opm/core/props/satfunc/RelpermDiagnostics.cpp
|
||||||
opm/simulators/timestepping/SimulatorReport.cpp
|
opm/simulators/timestepping/SimulatorReport.cpp
|
||||||
opm/simulators/flow/Banners.cpp
|
opm/simulators/flow/Banners.cpp
|
||||||
opm/simulators/flow/countGlobalCells.cpp
|
|
||||||
opm/simulators/flow/ConvergenceOutputConfiguration.cpp
|
opm/simulators/flow/ConvergenceOutputConfiguration.cpp
|
||||||
opm/simulators/flow/EclActionHandler.cpp
|
opm/simulators/flow/EclActionHandler.cpp
|
||||||
opm/simulators/flow/EclInterRegFlows.cpp
|
opm/simulators/flow/EclInterRegFlows.cpp
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2013, 2015 SINTEF ICT, Applied Mathematics.
|
|
||||||
Copyright 2014, 2015 Dr. Blatt - HPC-Simulation-Software & Services
|
|
||||||
Copyright 2014, 2015 Statoil ASA.
|
|
||||||
Copyright 2015 NTNU
|
|
||||||
Copyright 2015 IRIS AS
|
|
||||||
|
|
||||||
This file is part of the Open Porous Media project (OPM).
|
|
||||||
|
|
||||||
OPM is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OPM is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#include "countGlobalCells.hpp"
|
|
||||||
|
|
||||||
#include <cassert>
|
|
||||||
#include <numeric>
|
|
||||||
|
|
||||||
namespace Opm {
|
|
||||||
namespace detail {
|
|
||||||
|
|
||||||
std::vector<int> buildAllCells(const int nc) {
|
|
||||||
std::vector<int> all_cells(nc);
|
|
||||||
std::iota(all_cells.begin(), all_cells.end(), 0);
|
|
||||||
return all_cells;
|
|
||||||
}
|
|
||||||
|
|
||||||
double getGravity(const double* g, const int dim) {
|
|
||||||
double grav = 0.0;
|
|
||||||
if (g) {
|
|
||||||
// Guard against gravity in anything but last dimension.
|
|
||||||
for (int dd = 0; dd < dim - 1; ++dd) {
|
|
||||||
assert(g[dd] == 0.0);
|
|
||||||
}
|
|
||||||
grav = g[dim - 1];
|
|
||||||
}
|
|
||||||
return grav;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace detail
|
|
||||||
} // namespace Opm
|
|
@ -34,47 +34,6 @@
|
|||||||
namespace Opm {
|
namespace Opm {
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
|
||||||
|
|
||||||
std::vector<int> buildAllCells(const int nc);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <class PU>
|
|
||||||
std::vector<bool>
|
|
||||||
activePhases(const PU& pu)
|
|
||||||
{
|
|
||||||
const int maxnp = BlackoilPhases::MaxNumPhases;
|
|
||||||
std::vector<bool> active(maxnp, false);
|
|
||||||
|
|
||||||
for (int p = 0; p < pu.MaxNumPhases; ++p) {
|
|
||||||
active[ p ] = pu.phase_used[ p ] != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return active;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <class PU>
|
|
||||||
std::vector<int>
|
|
||||||
active2Canonical(const PU& pu)
|
|
||||||
{
|
|
||||||
const int maxnp = BlackoilPhases::MaxNumPhases;
|
|
||||||
std::vector<int> act2can(maxnp, -1);
|
|
||||||
|
|
||||||
for (int phase = 0; phase < maxnp; ++phase) {
|
|
||||||
if (pu.phase_used[ phase ]) {
|
|
||||||
act2can[ pu.phase_pos[ phase ] ] = phase;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return act2can;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
double getGravity(const double* g, const int dim);
|
|
||||||
|
|
||||||
/// \brief Get the number of local interior cells in a grid.
|
/// \brief Get the number of local interior cells in a grid.
|
||||||
/// \tparam The type of the DUNE grid.
|
/// \tparam The type of the DUNE grid.
|
||||||
/// \param grid The grid which cells we count
|
/// \param grid The grid which cells we count
|
||||||
|
Loading…
Reference in New Issue
Block a user