mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Make check whether a connection exists work for distributed wells.
This commit is contained in:
@@ -1194,23 +1194,23 @@ namespace Opm
|
||||
|
||||
// COMPDAT handling
|
||||
const auto& connectionSet = well_ecl_.getConnections();
|
||||
CheckDistributedWellConnections checker(well_ecl_, parallel_well_info_);
|
||||
for (size_t c=0; c<connectionSet.size(); c++) {
|
||||
const auto& connection = connectionSet.get(c);
|
||||
const int i = connection.getI();
|
||||
const int j = connection.getJ();
|
||||
const int k = connection.getK();
|
||||
|
||||
const int* cpgdim = cart_dims;
|
||||
const int cart_grid_indx = i + cpgdim[0]*(j + cpgdim[1]*k);
|
||||
const int cell = cartesian_to_compressed[cart_grid_indx];
|
||||
if (connection.state() != Connection::State::OPEN || cell >= 0)
|
||||
{
|
||||
checker.connectionFound(c);
|
||||
}
|
||||
if (connection.state() == Connection::State::OPEN) {
|
||||
const int i = connection.getI();
|
||||
const int j = connection.getJ();
|
||||
const int k = connection.getK();
|
||||
|
||||
const int* cpgdim = cart_dims;
|
||||
const int cart_grid_indx = i + cpgdim[0]*(j + cpgdim[1]*k);
|
||||
const int cell = cartesian_to_compressed[cart_grid_indx];
|
||||
|
||||
if (cell < 0) {
|
||||
OPM_DEFLOG_THROW(std::runtime_error, "Cell with i,j,k indices " << i << ' ' << j << ' '
|
||||
<< k << " not found in grid (well = " << name() << ')', deferred_logger);
|
||||
}
|
||||
|
||||
{
|
||||
if (cell >= 0) {
|
||||
double radius = connection.rw();
|
||||
const std::array<double, 3> cubical =
|
||||
wellhelpers::getCubeDim<3>(cell_to_faces, begin_face_centroids, cell);
|
||||
@@ -1242,6 +1242,7 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
}
|
||||
checker.checkAllConnectionsFound();
|
||||
}
|
||||
|
||||
template<typename TypeTag>
|
||||
|
||||
Reference in New Issue
Block a user