NNC: Added som diagnostics output

This commit is contained in:
Jacob Støren 2013-12-16 14:25:27 +01:00
parent 880ab554f9
commit 2a31035fb4
3 changed files with 30 additions and 6 deletions

View File

@ -433,6 +433,7 @@ void RifReaderEclipseOutput::transferNNCData( const ecl_grid_type * mainEclGrid
ecl_nnc_export( mainEclGrid , init_file , eclNNCData);
// Transform to our own datastructures
cvf::Trace::show("Reading NNC. Count: " + cvf::String(numNNC));
mainGrid->nncData()->connections().resize(numNNC);
for (int nIdx = 0; nIdx < numNNC; ++nIdx)

View File

@ -236,7 +236,7 @@ void RigMainGrid::calculateFaults()
size_t neighborGlobalCellIdx;
size_t neighborGridCellIdx;
size_t i, j, k;
RigGridBase* hostGrid; ;
RigGridBase* hostGrid = NULL;
bool firstNO_FAULTFaceForCell = true;
for (char faceIdx = 0; faceIdx < 6; ++faceIdx)
@ -320,16 +320,29 @@ void RigMainGrid::calculateFaults()
const RigConnection& conn = nncs[nncIdx];
int fIdx1 = faultsPrCellAcc->faultIdx(conn.m_c1GlobIdx, conn.m_c1Face);
int fIdx2 = faultsPrCellAcc->faultIdx(conn.m_c2GlobIdx, StructGridInterface::oppositeFace(conn.m_c1Face));
if (fIdx1 < 0 && fIdx2 < 0)
{
cvf::String lgrString ("Same Grid");
if (m_cells[conn.m_c1GlobIdx].hostGrid() != m_cells[conn.m_c2GlobIdx].hostGrid() )
{
lgrString = "Different Grid";
}
//cvf::Trace::show("NNC: No Fault for NNC C1: " + cvf::String((int)conn.m_c1GlobIdx) + " C2: " + cvf::String((int)conn.m_c2GlobIdx) + " Grid: " + lgrString);
}
if (fIdx1 >= 0)
{
// Add the connection to both, if they are different.
m_faults[fIdx1]->connectionIndices().push_back(nncIdx);
if (fIdx2 != fIdx1)
}
if (fIdx2 != fIdx1)
{
if (fIdx2 >= 0)
{
if (fIdx2 >= 0)
{
m_faults[fIdx2]->connectionIndices().push_back(nncIdx);
}
m_faults[fIdx2]->connectionIndices().push_back(nncIdx);
}
}
}

View File

@ -35,6 +35,7 @@ RigNNCData::RigNNCData()
//--------------------------------------------------------------------------------------------------
void RigNNCData::processConnections(const RigMainGrid& mainGrid)
{
cvf::Trace::show("NNC: Total number: " + cvf::String((int)m_connections.size()));
for (size_t cnIdx = 0; cnIdx < m_connections.size(); ++cnIdx)
{
@ -79,6 +80,7 @@ void RigNNCData::processConnections(const RigMainGrid& mainGrid)
//m_cellIdxToFaceToConnectionIdxMap[m_connections[cnIdx].m_c1GlobIdx][cvf::StructGridInterface::NO_FACE].push_back(cnIdx);
//m_cellIdxToFaceToConnectionIdxMap[m_connections[cnIdx].m_c2GlobIdx][cvf::StructGridInterface::NO_FACE].push_back(cnIdx);
cvf::Trace::show("NNC: No direct neighbors : C1: " + cvf::String((int)m_connections[cnIdx].m_c1GlobIdx) + "C2: " + cvf::String((int)m_connections[cnIdx].m_c2GlobIdx));
continue; // to next connection
}
}
@ -103,6 +105,8 @@ void RigNNCData::processConnections(const RigMainGrid& mainGrid)
}
}
bool foundAnyOverlap = false;
for (char fIdx = 0; fIdx < 6; ++fIdx)
{
if (!isPossibleNeighborInDirection[fIdx])
@ -130,6 +134,7 @@ void RigNNCData::processConnections(const RigMainGrid& mainGrid)
if (foundOverlap)
{
foundAnyOverlap = true;
// Found an overlap polygon. Store data about connection
m_connections[cnIdx].m_c1Face = (cvf::StructGridInterface::FaceType)fIdx;
@ -148,6 +153,11 @@ void RigNNCData::processConnections(const RigMainGrid& mainGrid)
break; // The connection face is found. Stop looping over the cell faces. Jump to next connection
}
}
if (!foundAnyOverlap)
{
cvf::Trace::show("NNC: No overlap found for : C1: " + cvf::String((int)m_connections[cnIdx].m_c1GlobIdx) + "C2: " + cvf::String((int)m_connections[cnIdx].m_c2GlobIdx));
}
}
}
/*