mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Moved compressedToCartesian() to its own file.
This commit is contained in:
parent
8d9bdb8d47
commit
827da9baa3
@ -21,31 +21,13 @@
|
|||||||
#include <opm/core/props/BlackoilPropertiesFromDeck.hpp>
|
#include <opm/core/props/BlackoilPropertiesFromDeck.hpp>
|
||||||
#include <opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp>
|
#include <opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp>
|
||||||
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||||
|
#include <opm/core/utility/compressedToCartesian.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
// Construct explicit mapping from active/compressed to logical cartesian
|
|
||||||
// indices, either as given in global_cell or as { 0, 1, 2, ....} if null.
|
|
||||||
std::vector<int> compressedToCartesian(const int num_cells,
|
|
||||||
const int* global_cell)
|
|
||||||
{
|
|
||||||
std::vector<int> retval;
|
|
||||||
if (global_cell) {
|
|
||||||
retval.assign(global_cell, global_cell + num_cells);
|
|
||||||
} else {
|
|
||||||
retval.resize(num_cells);
|
|
||||||
std::iota(retval.begin(), retval.end(), 0);
|
|
||||||
}
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
} // anonymous namespace
|
|
||||||
|
|
||||||
|
|
||||||
BlackoilPropertiesFromDeck::BlackoilPropertiesFromDeck(Opm::DeckConstPtr deck,
|
BlackoilPropertiesFromDeck::BlackoilPropertiesFromDeck(Opm::DeckConstPtr deck,
|
||||||
Opm::EclipseStateConstPtr eclState,
|
Opm::EclipseStateConstPtr eclState,
|
||||||
const UnstructuredGrid& grid,
|
const UnstructuredGrid& grid,
|
||||||
|
Loading…
Reference in New Issue
Block a user