Improve MSW export including multi lateral wells

Based on branch https://github.com/OPM/ResInsight/tree/system-msw-refactor

- Move completion settings to property of well path
- Rename to RimFishbones
- Export implicit COMPSEGS for fishbones main bore
- Add valve for each branch
- Increase version number to be able to handle import of legacy project files
This commit is contained in:
Magne Sjaastad
2021-02-26 14:27:59 +01:00
parent 5415a8c42d
commit 8bab748fa6
104 changed files with 3250 additions and 3203 deletions

View File

@@ -28,8 +28,8 @@ bool RiaProjectFileVersionTools::isCandidateVersionNewerThanOther( const QString
{
int candidateMajorVersion = 0;
int candidateMinorVersion = 0;
int candidatePatchNumber = 0;
int candidateDevelopmentId = 0;
int candidatePatchNumber = -1;
int candidateDevelopmentId = -1;
RiaProjectFileVersionTools::decodeVersionString( candidateProjectFileVersion,
&candidateMajorVersion,
@@ -39,8 +39,8 @@ bool RiaProjectFileVersionTools::isCandidateVersionNewerThanOther( const QString
int majorVersion = 0;
int minorVersion = 0;
int patchNumber = 0;
int developmentId = 0;
int patchNumber = -1;
int developmentId = -1;
RiaProjectFileVersionTools::decodeVersionString( projectFileVersion,
&majorVersion,
@@ -120,11 +120,17 @@ bool RiaProjectFileVersionTools::isCandidateNewerThanOther( int candidateMajorVe
return ( candidateMinorVersion > otherMinorVersion );
}
// Early exit if a patch number is undefined
if ( candidatePatchNumber == -1 || otherPatchNumber == -1 ) return false;
if ( candidatePatchNumber != otherPatchNumber )
{
return ( candidatePatchNumber > otherPatchNumber );
}
// Early exit if a development number is undefined
if ( candidateDevelopmentId == -1 && otherDevelopmentId == -1 ) return false;
if ( candidateDevelopmentId != otherDevelopmentId )
{
return ( candidateDevelopmentId > otherDevelopmentId );

View File

@@ -86,6 +86,37 @@ QString RiaTextStringTools::commonRoot( const QStringList& stringList )
return root;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaTextStringTools::commonSuffix( const QStringList& stringList )
{
QString suffix;
if ( !stringList.isEmpty() )
{
suffix = stringList.back();
for ( const auto& item : stringList )
{
if ( suffix.length() > item.length() )
{
suffix = suffix.right( item.length() );
}
for ( int i = 0; i < suffix.length(); i++ )
{
int suffixIndex = suffix.length() - i - 1;
int itemIndex = item.length() - i - 1;
if ( suffix[suffixIndex] != item[itemIndex] )
{
suffix = suffix.right( i );
break;
}
}
}
}
return suffix;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -29,5 +29,6 @@ namespace RiaTextStringTools
bool compare( const QString& expected, const QString& actual );
QString trimAndRemoveDoubleSpaces( const QString& s );
QString commonRoot( const QStringList& stringList );
QString commonSuffix( const QStringList& stringList );
QString trimNonAlphaNumericCharacters( const QString& s );
} // namespace RiaTextStringTools

View File

@@ -81,7 +81,7 @@ void RiaPolyArcLineSampler::sampleSegment( cvf::Vec3d t1, cvf::Vec3d p1, cvf::Ve
CVF_ASSERT( p1p2.lengthSquared() > 1e-20 );
if ( cvf::GeometryTools::getAngle( t1, p1p2 ) < 1e-5 )
if ( cvf::GeometryTools::getAngle( t1, p1p2 ) < 1e-5 || p1p2.length() < m_maxSamplingsInterval )
{
sampleLine( p1, p2, endTangent );
}