mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3100 Well Path Import : Improve test of valid values before adding well path point
This commit is contained in:
parent
ede6ebef90
commit
bb91a79515
@ -210,17 +210,8 @@ void RifWellPathImporter::readAllAsciiWellData(const QString& filePath)
|
|||||||
if (stream.good()) // If we can, assume this line is a well point entry
|
if (stream.good()) // If we can, assume this line is a well point entry
|
||||||
{
|
{
|
||||||
stream >> y >> tvd >> md;
|
stream >> y >> tvd >> md;
|
||||||
if (!stream.eof() && !stream.good())
|
|
||||||
{
|
|
||||||
// -999 or otherwise to few numbers before some word
|
|
||||||
if (x != -999)
|
|
||||||
{
|
|
||||||
// Error in file: missing numbers at this line
|
|
||||||
|
|
||||||
}
|
if (x != HUGE_VAL && y != HUGE_VAL && tvd != HUGE_VAL && md != HUGE_VAL)
|
||||||
stream.clear();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if (!fileWellDataArray.size())
|
if (!fileWellDataArray.size())
|
||||||
{
|
{
|
||||||
@ -234,6 +225,17 @@ void RifWellPathImporter::readAllAsciiWellData(const QString& filePath)
|
|||||||
|
|
||||||
hasReadWellPointInCurrentWell = true;
|
hasReadWellPointInCurrentWell = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!stream.good())
|
||||||
|
{
|
||||||
|
// -999 or otherwise to few numbers before some word
|
||||||
|
if (x != -999)
|
||||||
|
{
|
||||||
|
// Error in file: missing numbers at this line
|
||||||
|
|
||||||
|
}
|
||||||
|
stream.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user