Added changes to improve handling of ICON
This commit is contained in:
parent
3fb7149226
commit
0e1e4e08e7
@ -54,11 +54,11 @@ namespace {
|
||||
{
|
||||
// make seqIndex to Connection map
|
||||
std::map <std::size_t, const Opm::Connection*> seqIndConnMap;
|
||||
//std::cout << "mapSeqIndexToConnection(" << std::endl;
|
||||
std::cout << "mapSeqIndexToConnection(" << std::endl;
|
||||
for (const auto & conn : conns) {
|
||||
std::size_t sI = conn.getSeqIndex();
|
||||
seqIndConnMap.insert(std::make_pair(sI, &conn));
|
||||
//std::cout << "mCSSITC sI: " << sI << " conn.getI,J,K" << conn.getI() << " , " << conn.getJ() << " , " << conn.getK() << std::endl;
|
||||
std::cout << "mCSSITC sI: " << sI << " conn.getI,J,K" << conn.getI() << " , " << conn.getJ() << " , " << conn.getK() << std::endl;
|
||||
}
|
||||
return seqIndConnMap;
|
||||
}
|
||||
@ -67,11 +67,11 @@ namespace {
|
||||
{
|
||||
// make CompSegSeqIndex to Connection map
|
||||
std::map <std::size_t, const Opm::Connection*> cs_seqIndConnMap;
|
||||
//std::cout << "mapCompSegSeqIndexToConnection" << std::endl;
|
||||
std::cout << "mapCompSegSeqIndexToConnection" << std::endl;
|
||||
for (const auto & conn : conns) {
|
||||
std::size_t sI = conn.getCompSegSeqIndex();
|
||||
cs_seqIndConnMap.insert(std::make_pair(sI, &conn));
|
||||
//std::cout << "mCSSITC sI: " << sI << " conn.getI,J,K" << conn.getI() << " , " << conn.getJ() << " , " << conn.getK() << std::endl;
|
||||
std::cout << "mCSSITC sI: " << sI << " conn.getI,J,K" << conn.getI() << " , " << conn.getJ() << " , " << conn.getK() << std::endl;
|
||||
}
|
||||
return cs_seqIndConnMap;
|
||||
}
|
||||
@ -104,13 +104,13 @@ namespace {
|
||||
sIToConn = mapSeqIndexToConnection(conns);
|
||||
}
|
||||
std::vector<const Opm::Connection*> connSI;
|
||||
int niSI = well->getConnections(sim_step).size();
|
||||
//std::cout << "ConnOP - well" << well->name() << " niSI: " << niSI << std::endl;
|
||||
int niSI = well->getActiveConnections(sim_step).size();
|
||||
std::cout << "ConnOP - well" << well->name() << " niSI: " << niSI << std::endl;
|
||||
for (int iSI = 0; iSI < niSI; iSI++) {
|
||||
const auto searchSI = sIToConn.find(static_cast<std::size_t>(iSI));
|
||||
if (searchSI != sIToConn.end()) {
|
||||
connSI.push_back(searchSI->second);
|
||||
//std::cout << "ConnOP - iSI " << iSI << " searchSI->second.getI,J,K" << searchSI->second->getI() << " , " << searchSI->second->getJ() << " , " << searchSI->second->getK() << std::endl;
|
||||
std::cout << "ConnOP - iSI " << iSI << " searchSI->second.getI,J,K" << searchSI->second->getI() << " , " << searchSI->second->getJ() << " , " << searchSI->second->getK() << std::endl;
|
||||
}
|
||||
}
|
||||
for (auto nConn = connSI.size(), connID = 0*nConn;
|
||||
|
@ -285,10 +285,11 @@ namespace {
|
||||
this->m_connections.end(),
|
||||
same_ijk );
|
||||
// Only add connection for active grid cells
|
||||
if (prev == this->m_connections.end()) {
|
||||
if (grid.cellActive(I, J, k)) {
|
||||
std::size_t noConn = this->m_connections.size();
|
||||
this->addConnection(I,J,k,
|
||||
if (grid.cellActive(I, J, k)) {
|
||||
if (prev == this->m_connections.end()) {
|
||||
std::size_t noConn = this->m_connections.size();
|
||||
std::cout << "WellConnections - WC - prev-end, I: " << I << " J: " << J << " k: " << k << " noConn: " << noConn << std::endl;
|
||||
this->addConnection(I,J,k,
|
||||
grid.getCellDepth( I,J,k ),
|
||||
state,
|
||||
CF,
|
||||
@ -298,12 +299,13 @@ namespace {
|
||||
direction,
|
||||
noConn, 0., 0., defaultSatTable);
|
||||
}
|
||||
} else {
|
||||
std::size_t noConn = prev->getSeqIndex();
|
||||
// The complnum value carries over; the rest of the state is fully specified by
|
||||
// the current COMPDAT keyword.
|
||||
int complnum = prev->complnum();
|
||||
*prev = Connection(I,J,k,
|
||||
else {
|
||||
std::size_t noConn = prev->getSeqIndex();
|
||||
std::cout << "WellConnections - WC - prev-exist, I: " << I << " J: " << J << " k: " << k << " noConn: " << noConn << std::endl;
|
||||
// The complnum value carries over; the rest of the state is fully specified by
|
||||
// the current COMPDAT keyword.
|
||||
int complnum = prev->complnum;
|
||||
*prev = Connection(I,J,k,
|
||||
complnum,
|
||||
grid.getCellDepth(I,J,k),
|
||||
state,
|
||||
@ -313,13 +315,13 @@ namespace {
|
||||
satTableId,
|
||||
direction,
|
||||
noConn, 0., 0., defaultSatTable);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
size_t WellConnections::size() const {
|
||||
return m_connections.size();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user