Faults: Fixed bug introduced by 76d6304

This commit is contained in:
Jacob Støren 2014-08-26 17:23:22 +02:00
parent 0c1588435a
commit 781d008f07
2 changed files with 14 additions and 1 deletions

View File

@ -844,6 +844,18 @@ bool RifEclipseInputFileTools::readFaultsAndParseIncludeStatementsRecursively(QF
return true;
}
cvf::StructGridInterface::FaceEnum RifEclipseInputFileTools::faceEnumFromText(const QString& faceString)
{
if (faceString == "X" ) return cvf::StructGridInterface::POS_I;
if (faceString == "X-") return cvf::StructGridInterface::NEG_I;
if (faceString == "Y" ) return cvf::StructGridInterface::POS_J;
if (faceString == "Y-") return cvf::StructGridInterface::NEG_J;
if (faceString == "Z" ) return cvf::StructGridInterface::POS_K;
if (faceString == "Z-") return cvf::StructGridInterface::NEG_K;
return cvf::StructGridInterface::NO_FACE;
}
//--------------------------------------------------------------------------------------------------
/// The file pointer is pointing at the line following the FAULTS keyword.
/// Parse content of this keyword until end of file or
@ -910,7 +922,7 @@ void RifEclipseInputFileTools::readFaults(QFile &data, qint64 filePos, cvf::Coll
QString faceString = entries[7];
faceString.remove("'");
cvf::StructGridInterface::FaceEnum cellFaceEnum = cvf::StructGridInterface::FaceEnum::fromText(faceString);
cvf::StructGridInterface::FaceEnum cellFaceEnum = RifEclipseInputFileTools::faceEnumFromText(faceString);
// Adjust from 1-based to 0-based cell indices
// Guard against invalid cell ranges by limiting lowest possible range value to zero

View File

@ -82,4 +82,5 @@ private:
static qint64 findKeyword(const QString& keyword, QFile& file, qint64 startPos);
static cvf::StructGridInterface::FaceEnum faceEnumFromText(const QString& faceString);
};