mirror of
https://github.com/OPM/opm-upscaling.git
synced 2026-08-26 13:07:11 -05:00
Chase CpGrid CPG Processing API Change
The processing functions have a new 'edge_conformal' flag. Pass 'false' for this as we don't need edge conformal grids for our use case.
This commit is contained in:
committed by
Bård Skaflestad
parent
256da22706
commit
0e1adcde76
@@ -72,7 +72,7 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
void build_grid(const Opm::Deck& deck,
|
||||
void build_grid(const Opm::Deck& deck,
|
||||
Dune::CpGrid& grid,
|
||||
std::array<int,3>& cartDims)
|
||||
{
|
||||
@@ -90,14 +90,18 @@ namespace
|
||||
|
||||
if (deck.hasKeyword("ACTNUM")) {
|
||||
g.actnum = &deck["ACTNUM"].back().getIntData()[0];
|
||||
grid.processEclipseFormat(g, false, false);
|
||||
grid.processEclipseFormat(g, /* remove_ij_boundary = */ false,
|
||||
/* turn_normals = */ false,
|
||||
/* edge_conformal = */ false);
|
||||
}
|
||||
else {
|
||||
const auto dflt_actnum =
|
||||
std::vector<int>(g.dims[0] * g.dims[1] * g.dims[2], 1);
|
||||
|
||||
g.actnum = dflt_actnum.data();
|
||||
grid.processEclipseFormat(g, false, false);
|
||||
grid.processEclipseFormat(g, /* remove_ij_boundary = */ false,
|
||||
/* turn_normals = */ false,
|
||||
/* edge_conformal = */ false);
|
||||
}
|
||||
}
|
||||
} // namespace anonymous
|
||||
|
||||
@@ -88,7 +88,12 @@ namespace Opm
|
||||
bool turn_normals = param.getDefault<bool>("turn_normals", false);
|
||||
{
|
||||
Opm::EclipseGrid inputGrid(deck);
|
||||
grid.processEclipseFormat(&inputGrid, nullptr, periodic_extension, turn_normals, clip_z, true);
|
||||
grid.processEclipseFormat(&inputGrid, /* ecl_state = */ nullptr,
|
||||
periodic_extension,
|
||||
turn_normals,
|
||||
clip_z,
|
||||
/* pinchActive = */ true,
|
||||
/* edge_conformal = */ false);
|
||||
}
|
||||
// Save EGRID file in case we are writing ECL output.
|
||||
if (param.getDefault("output_ecl", false)) {
|
||||
@@ -157,10 +162,18 @@ namespace Opm
|
||||
Dune::CpGrid& grid,
|
||||
ResProp<3>& res_prop)
|
||||
{
|
||||
Opm::EclipseGrid eg(deck);
|
||||
const Opm::EclipseGrid eg(deck);
|
||||
const std::string* rl_ptr = (rock_list == "no_list") ? 0 : &rock_list;
|
||||
grid.processEclipseFormat(&eg, nullptr, periodic_extension, turn_normals, clip_z, true);
|
||||
|
||||
grid.processEclipseFormat(&eg, /* ecl_state = */ nullptr,
|
||||
periodic_extension,
|
||||
turn_normals,
|
||||
clip_z,
|
||||
/* pinchActive = */ true,
|
||||
/* edge_conformal = */ false);
|
||||
|
||||
res_prop.init(deck, grid.globalCell(), perm_threshold, rl_ptr, use_jfunction_scaling, sigma, theta);
|
||||
|
||||
if (unique_bids) {
|
||||
grid.setUniqueBoundaryIds(true);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,13 @@ void Opm::initCPGrid(Dune::CpGrid& grid, const Opm::ParameterGroup& param) {
|
||||
Opm::Parser parser;
|
||||
auto deck = parser.parseFile(filename);
|
||||
Opm::EclipseGrid inputGrid(deck);
|
||||
grid.processEclipseFormat(&inputGrid, nullptr, periodic_extension , turn_normals, false, true );
|
||||
grid.processEclipseFormat(&inputGrid,
|
||||
/* ecl_state = */ nullptr,
|
||||
periodic_extension,
|
||||
turn_normals,
|
||||
/* clip_z = */ false,
|
||||
/* pinchActive = */ true,
|
||||
/* edge_conformal = */ false);
|
||||
} else if (fileformat == "cartesian") {
|
||||
std::array<int, 3> dims = {{ param.getDefault<int>("nx", 1),
|
||||
param.getDefault<int>("ny", 1),
|
||||
|
||||
Reference in New Issue
Block a user