assignPermeability(): Don't build an Inspector to count global cells.
Thus, assingPermeability() is applicable to simulation decks that aren't based on corner-point descriptions (e.g., the (DXV,DYV,DZV) grid type).
This commit is contained in:
@@ -35,6 +35,8 @@ namespace Opm
|
|||||||
PermeabilityKind fillTensor(const EclipseGridParser& parser,
|
PermeabilityKind fillTensor(const EclipseGridParser& parser,
|
||||||
std::vector<const std::vector<double>*>& tensor,
|
std::vector<const std::vector<double>*>& tensor,
|
||||||
std::tr1::array<int,9>& kmap);
|
std::tr1::array<int,9>& kmap);
|
||||||
|
|
||||||
|
int numGlobalCells(const EclipseGridParser& parser);
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
|
|
||||||
@@ -83,9 +85,7 @@ namespace Opm
|
|||||||
double perm_threshold)
|
double perm_threshold)
|
||||||
{
|
{
|
||||||
const int dim = 3;
|
const int dim = 3;
|
||||||
EclipseGridInspector insp(parser);
|
const int num_global_cells = numGlobalCells(parser);
|
||||||
std::tr1::array<int, 3> dims = insp.gridSize();
|
|
||||||
int num_global_cells = dims[0]*dims[1]*dims[2];
|
|
||||||
ASSERT (num_global_cells > 0);
|
ASSERT (num_global_cells > 0);
|
||||||
|
|
||||||
permeability_.assign(dim * dim * global_cell.size(), 0.0);
|
permeability_.assign(dim * dim * global_cell.size(), 0.0);
|
||||||
@@ -330,6 +330,26 @@ namespace Opm
|
|||||||
return kind;
|
return kind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int numGlobalCells(const EclipseGridParser& parser)
|
||||||
|
{
|
||||||
|
int ngc = -1;
|
||||||
|
|
||||||
|
if (parser.hasField("DIMENS")) {
|
||||||
|
const std::vector<int>&
|
||||||
|
dims = parser.getIntegerValue("DIMENS");
|
||||||
|
|
||||||
|
ngc = dims[0] * dims[1] * dims[2];
|
||||||
|
}
|
||||||
|
else if (parser.hasField("SPECGRID")) {
|
||||||
|
const SPECGRID& sgr = parser.getSPECGRID();
|
||||||
|
|
||||||
|
ngc = sgr.dimensions[ 0 ];
|
||||||
|
ngc *= sgr.dimensions[ 1 ];
|
||||||
|
ngc *= sgr.dimensions[ 2 ];
|
||||||
|
}
|
||||||
|
|
||||||
|
return ngc;
|
||||||
|
}
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|||||||
Reference in New Issue
Block a user