#273 Added some comments

This commit is contained in:
Jacob Støren
2016-08-22 10:48:40 +02:00
parent 5d0c0cdc67
commit 37099929d6
2 changed files with 6 additions and 3 deletions

View File

@@ -228,11 +228,14 @@ void RigMainGrid::calculateFaults()
m_faults[fIdx]->accumulateFaultsPrCell(m_faultsPrCellAcc.p(), static_cast<int>(fIdx)); m_faults[fIdx]->accumulateFaultsPrCell(m_faultsPrCellAcc.p(), static_cast<int>(fIdx));
} }
// Find the geometrical faults that is in addition // Find the geometrical faults that is in addition: Has no user defined (eclipse) fault assigned.
// Separate the grid faults that has an inactive cell as member
RigFault * unNamedFault = new RigFault; RigFault * unNamedFault = new RigFault;
int unNamedFaultIdx = static_cast<int>(m_faults.size()); int unNamedFaultIdx = static_cast<int>(m_faults.size());
const std::vector<cvf::Vec3d>& vxs = m_mainGrid->nodes();
for (int gcIdx = 0 ; gcIdx < static_cast<int>(m_cells.size()); ++gcIdx) for (int gcIdx = 0 ; gcIdx < static_cast<int>(m_cells.size()); ++gcIdx)
{ {
if ( m_cells[gcIdx].isInvalid()) if ( m_cells[gcIdx].isInvalid())
@@ -250,6 +253,8 @@ void RigMainGrid::calculateFaults()
{ {
cvf::StructGridInterface::FaceType face = cvf::StructGridInterface::FaceType(faceIdx); cvf::StructGridInterface::FaceType face = cvf::StructGridInterface::FaceType(faceIdx);
// For faces that has no used defined Fault assigned:
if (m_faultsPrCellAcc->faultIdx(gcIdx, face) == RigFaultsPrCellAccumulator::NO_FAULT) if (m_faultsPrCellAcc->faultIdx(gcIdx, face) == RigFaultsPrCellAccumulator::NO_FAULT)
{ {
// Find neighbor cell // Find neighbor cell
@@ -279,7 +284,6 @@ void RigMainGrid::calculateFaults()
caf::SizeTArray4 nbFaceIdxs; caf::SizeTArray4 nbFaceIdxs;
m_cells[neighborReservoirCellIdx].faceIndices(StructGridInterface::oppositeFace(face), &nbFaceIdxs); m_cells[neighborReservoirCellIdx].faceIndices(StructGridInterface::oppositeFace(face), &nbFaceIdxs);
const std::vector<cvf::Vec3d>& vxs = m_mainGrid->nodes();
bool sharedFaceVertices = true; bool sharedFaceVertices = true;
if (sharedFaceVertices && vxs[faceIdxs[0]].pointDistance(vxs[nbFaceIdxs[0]]) > tolerance ) sharedFaceVertices = false; if (sharedFaceVertices && vxs[faceIdxs[0]].pointDistance(vxs[nbFaceIdxs[0]]) > tolerance ) sharedFaceVertices = false;

View File

@@ -74,7 +74,6 @@ public:
private: private:
void initAllSubGridsParentGridPointer(); void initAllSubGridsParentGridPointer();
void initAllSubCellsMainGridCellIndex(); void initAllSubCellsMainGridCellIndex();
void computeActiveAndValidCellRanges();
void buildCellSearchTree(); void buildCellSearchTree();
private: private: