mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixes by misspell-fixer
This commit is contained in:
parent
490dc1aa05
commit
674b764cb6
@ -153,7 +153,7 @@ void RiaImageCompareReporter::showInteractiveOnly()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
/// Retuns the names of the *.png files in a directory. The names are without path, but with extention
|
/// Retuns the names of the *.png files in a directory. The names are without path, but with extension
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
std::vector<std::string> RiaImageCompareReporter::getPngFilesInDirectory( const std::string& searchPath )
|
std::vector<std::string> RiaImageCompareReporter::getPngFilesInDirectory( const std::string& searchPath )
|
||||||
|
@ -39,7 +39,7 @@ private:
|
|||||||
void sampleArc( cvf::Vec3d t1, cvf::Vec3d p1, cvf::Vec3d p2, cvf::Vec3d* endTangent );
|
void sampleArc( cvf::Vec3d t1, cvf::Vec3d p1, cvf::Vec3d p2, cvf::Vec3d* endTangent );
|
||||||
void sampleSegment( cvf::Vec3d t1, cvf::Vec3d p1, cvf::Vec3d p2, cvf::Vec3d* endTangent );
|
void sampleSegment( cvf::Vec3d t1, cvf::Vec3d p1, cvf::Vec3d p2, cvf::Vec3d* endTangent );
|
||||||
|
|
||||||
std::vector<cvf::Vec3d>* m_points; // Internal temporary pointers to collections beeing filled.
|
std::vector<cvf::Vec3d>* m_points; // Internal temporary pointers to collections being filled.
|
||||||
std::vector<double>* m_meshDs;
|
std::vector<double>* m_meshDs;
|
||||||
|
|
||||||
double m_maxSamplingsInterval;
|
double m_maxSamplingsInterval;
|
||||||
|
@ -331,7 +331,7 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::appendMainWellBoreParts(
|
|||||||
double holeRadius,
|
double holeRadius,
|
||||||
double startMeasuredDepth,
|
double startMeasuredDepth,
|
||||||
double endMeasuredDepth,
|
double endMeasuredDepth,
|
||||||
const RimFishbonesMultipleSubs* fishbonesDefintions )
|
const RimFishbonesMultipleSubs* fishbonesDefinitions )
|
||||||
{
|
{
|
||||||
if ( !wellPath ) return;
|
if ( !wellPath ) return;
|
||||||
if ( !wellPath->wellPathGeometry() ) return;
|
if ( !wellPath->wellPathGeometry() ) return;
|
||||||
@ -358,7 +358,7 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::appendMainWellBoreParts(
|
|||||||
|
|
||||||
wellBorePart.intersectionWithWellMeasuredDepth = cellIntersectionInfo.startMD;
|
wellBorePart.intersectionWithWellMeasuredDepth = cellIntersectionInfo.startMD;
|
||||||
|
|
||||||
wellBorePart.setSourcePdmObject( fishbonesDefintions );
|
wellBorePart.setSourcePdmObject( fishbonesDefinitions );
|
||||||
wellBorePartsInCells[cellIntersectionInfo.globCellIndex].push_back( wellBorePart );
|
wellBorePartsInCells[cellIntersectionInfo.globCellIndex].push_back( wellBorePart );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,5 +60,5 @@ private:
|
|||||||
double holeRadius,
|
double holeRadius,
|
||||||
double startMeasuredDepth,
|
double startMeasuredDepth,
|
||||||
double endMeasuredDepth,
|
double endMeasuredDepth,
|
||||||
const RimFishbonesMultipleSubs* fishbonesDefintions );
|
const RimFishbonesMultipleSubs* fishbonesDefinitions );
|
||||||
};
|
};
|
||||||
|
@ -296,12 +296,12 @@ void RicRecursiveFileSearchDialog::updateFileListWidget()
|
|||||||
{
|
{
|
||||||
m_fileListWidget->clear();
|
m_fileListWidget->clear();
|
||||||
|
|
||||||
int rootSearchPathLenght = rootDirWithEndSeparator().size();
|
int rootSearchPathLength = rootDirWithEndSeparator().size();
|
||||||
|
|
||||||
for ( const auto& fileName : m_foundFiles )
|
for ( const auto& fileName : m_foundFiles )
|
||||||
{
|
{
|
||||||
QString itemText = fileName;
|
QString itemText = fileName;
|
||||||
itemText.remove( 0, rootSearchPathLenght );
|
itemText.remove( 0, rootSearchPathLength );
|
||||||
QListWidgetItem* item = new QListWidgetItem( QDir::toNativeSeparators( itemText ), m_fileListWidget );
|
QListWidgetItem* item = new QListWidgetItem( QDir::toNativeSeparators( itemText ), m_fileListWidget );
|
||||||
item->setFlags( item->flags() | Qt::ItemIsUserCheckable );
|
item->setFlags( item->flags() | Qt::ItemIsUserCheckable );
|
||||||
item->setCheckState( Qt::Checked );
|
item->setCheckState( Qt::Checked );
|
||||||
|
@ -573,7 +573,7 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
|
|||||||
sumPlotColl->updateConnectedEditors();
|
sumPlotColl->updateConnectedEditors();
|
||||||
|
|
||||||
RiuPlotMainWindow* mpw = RiaGuiApplication::instance()->mainPlotWindow();
|
RiuPlotMainWindow* mpw = RiaGuiApplication::instance()->mainPlotWindow();
|
||||||
// Needed to avoid unneccessary activation of sub windows (plots)
|
// Needed to avoid unnecessary activation of sub windows (plots)
|
||||||
// which results in population of property editor, and missing deleteLater because we are outside any event
|
// which results in population of property editor, and missing deleteLater because we are outside any event
|
||||||
// loop when switching object. Results in stray widgets.
|
// loop when switching object. Results in stray widgets.
|
||||||
mpw->setBlockViewSelectionOnSubWindowActivated( true );
|
mpw->setBlockViewSelectionOnSubWindowActivated( true );
|
||||||
|
@ -676,7 +676,7 @@ void RifEclipseOutputFileTools::createReportStepsMetaData( std::vector<ecl_file_
|
|||||||
reportStep.dateTime = reportDateTime;
|
reportStep.dateTime = reportDateTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find number of keywords withing this report step
|
// Find number of keywords within this report step
|
||||||
int numKeywords = ecl_file_get_num_distinct_kw( ecl_file );
|
int numKeywords = ecl_file_get_num_distinct_kw( ecl_file );
|
||||||
for ( int iKey = 0; iKey < numKeywords; iKey++ )
|
for ( int iKey = 0; iKey < numKeywords; iKey++ )
|
||||||
{
|
{
|
||||||
|
@ -51,18 +51,18 @@ void RifEclipseSummaryTools::findSummaryFiles( const QString& inputFile, QString
|
|||||||
|
|
||||||
char* myPath = nullptr;
|
char* myPath = nullptr;
|
||||||
char* myBase = nullptr;
|
char* myBase = nullptr;
|
||||||
char* myExtention = nullptr;
|
char* myExtension = nullptr;
|
||||||
|
|
||||||
util_alloc_file_components( RiaStringEncodingTools::toNativeEncoded( inputFile ).data(), &myPath, &myBase, &myExtention );
|
util_alloc_file_components( RiaStringEncodingTools::toNativeEncoded( inputFile ).data(), &myPath, &myBase, &myExtension );
|
||||||
|
|
||||||
QString path;
|
QString path;
|
||||||
if ( myPath ) path = RiaStringEncodingTools::fromNativeEncoded( myPath );
|
if ( myPath ) path = RiaStringEncodingTools::fromNativeEncoded( myPath );
|
||||||
QString base;
|
QString base;
|
||||||
if ( myBase ) base = RiaStringEncodingTools::fromNativeEncoded( myBase );
|
if ( myBase ) base = RiaStringEncodingTools::fromNativeEncoded( myBase );
|
||||||
std::string extention;
|
std::string extension;
|
||||||
if ( myExtention ) extention = myExtention;
|
if ( myExtension ) extension = myExtension;
|
||||||
|
|
||||||
free( myExtention );
|
free( myExtension );
|
||||||
free( myBase );
|
free( myBase );
|
||||||
free( myPath );
|
free( myPath );
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ void RifEclipseSummaryTools::findSummaryFiles( const QString& inputFile, QString
|
|||||||
|
|
||||||
ecl_util_alloc_summary_files( RiaStringEncodingTools::toNativeEncoded( path ).data(),
|
ecl_util_alloc_summary_files( RiaStringEncodingTools::toNativeEncoded( path ).data(),
|
||||||
RiaStringEncodingTools::toNativeEncoded( base ).data(),
|
RiaStringEncodingTools::toNativeEncoded( base ).data(),
|
||||||
extention.data(),
|
extension.data(),
|
||||||
&myHeaderFile,
|
&myHeaderFile,
|
||||||
summary_file_list );
|
summary_file_list );
|
||||||
if ( myHeaderFile )
|
if ( myHeaderFile )
|
||||||
|
@ -325,7 +325,7 @@ void RifWellPathImporter::readAllAsciiWellData( const QString& filePath )
|
|||||||
QString name = wellName.c_str();
|
QString name = wellName.c_str();
|
||||||
if ( !name.trimmed().isEmpty() )
|
if ( !name.trimmed().isEmpty() )
|
||||||
{
|
{
|
||||||
// Do not overwrite the name aquired from a line above, if this line is empty
|
// Do not overwrite the name acquired from a line above, if this line is empty
|
||||||
fileWellDataArray.back().m_name = name.trimmed();
|
fileWellDataArray.back().m_name = name.trimmed();
|
||||||
}
|
}
|
||||||
hasReadWellPointInCurrentWell = false;
|
hasReadWellPointInCurrentWell = false;
|
||||||
|
@ -37,15 +37,15 @@ RigFemClosestResultIndexCalculator::RigFemClosestResultIndexCalculator( RigFemPa
|
|||||||
if ( resultPosition != RIG_ELEMENT_NODAL_FACE || m_face == -1 )
|
if ( resultPosition != RIG_ELEMENT_NODAL_FACE || m_face == -1 )
|
||||||
{
|
{
|
||||||
RigElementType elmType = femPart->elementType( elementIndex );
|
RigElementType elmType = femPart->elementType( elementIndex );
|
||||||
const int* elmentConn = femPart->connectivities( elementIndex );
|
const int* elementConn = femPart->connectivities( elementIndex );
|
||||||
int elmNodeCount = RigFemTypes::elmentNodeCount( elmType );
|
int elmNodeCount = RigFemTypes::elementNodeCount( elmType );
|
||||||
|
|
||||||
// Find the closest node
|
// Find the closest node
|
||||||
int closestLocalNode = -1;
|
int closestLocalNode = -1;
|
||||||
float minDist = std::numeric_limits<float>::infinity();
|
float minDist = std::numeric_limits<float>::infinity();
|
||||||
for ( int lNodeIdx = 0; lNodeIdx < elmNodeCount; ++lNodeIdx )
|
for ( int lNodeIdx = 0; lNodeIdx < elmNodeCount; ++lNodeIdx )
|
||||||
{
|
{
|
||||||
int nodeIdx = elmentConn[lNodeIdx];
|
int nodeIdx = elementConn[lNodeIdx];
|
||||||
cvf::Vec3f nodePosInDomain = femPart->nodes().coordinates[nodeIdx];
|
cvf::Vec3f nodePosInDomain = femPart->nodes().coordinates[nodeIdx];
|
||||||
float dist = ( nodePosInDomain - cvf::Vec3f( intersectionPointInDomain ) ).lengthSquared();
|
float dist = ( nodePosInDomain - cvf::Vec3f( intersectionPointInDomain ) ).lengthSquared();
|
||||||
if ( dist < minDist )
|
if ( dist < minDist )
|
||||||
@ -57,7 +57,7 @@ RigFemClosestResultIndexCalculator::RigFemClosestResultIndexCalculator( RigFemPa
|
|||||||
|
|
||||||
if ( closestLocalNode >= 0 )
|
if ( closestLocalNode >= 0 )
|
||||||
{
|
{
|
||||||
int nodeIdx = elmentConn[closestLocalNode];
|
int nodeIdx = elementConn[closestLocalNode];
|
||||||
m_closestElementNodeResIdx =
|
m_closestElementNodeResIdx =
|
||||||
static_cast<int>( femPart->elementNodeResultIdx( elementIndex, closestLocalNode ) );
|
static_cast<int>( femPart->elementNodeResultIdx( elementIndex, closestLocalNode ) );
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ private:
|
|||||||
{
|
{
|
||||||
if ( !( *m_cellVisibilities )[elmIdx] ) continue;
|
if ( !( *m_cellVisibilities )[elmIdx] ) continue;
|
||||||
|
|
||||||
int elmNodeCount = RigFemTypes::elmentNodeCount( part->elementType( elmIdx ) );
|
int elmNodeCount = RigFemTypes::elementNodeCount( part->elementType( elmIdx ) );
|
||||||
for ( int elmLocIdx = 0; elmLocIdx < elmNodeCount; ++elmLocIdx )
|
for ( int elmLocIdx = 0; elmLocIdx < elmNodeCount; ++elmLocIdx )
|
||||||
{
|
{
|
||||||
size_t elmNodeResIdx = part->elementNodeResultIdx( elmIdx, elmLocIdx );
|
size_t elmNodeResIdx = part->elementNodeResultIdx( elmIdx, elmLocIdx );
|
||||||
@ -119,7 +119,7 @@ private:
|
|||||||
{
|
{
|
||||||
if ( !( *m_cellVisibilities )[elmIdx] ) continue;
|
if ( !( *m_cellVisibilities )[elmIdx] ) continue;
|
||||||
|
|
||||||
int elmNodeCount = RigFemTypes::elmentNodeCount( part->elementType( elmIdx ) );
|
int elmNodeCount = RigFemTypes::elementNodeCount( part->elementType( elmIdx ) );
|
||||||
for ( int elmLocIdx = 0; elmLocIdx < elmNodeCount; ++elmLocIdx )
|
for ( int elmLocIdx = 0; elmLocIdx < elmNodeCount; ++elmLocIdx )
|
||||||
{
|
{
|
||||||
size_t elmNodeResIdx = part->elementNodeResultIdx( elmIdx, elmLocIdx );
|
size_t elmNodeResIdx = part->elementNodeResultIdx( elmIdx, elmLocIdx );
|
||||||
|
@ -60,7 +60,7 @@ void RigFemPart::appendElement( RigElementType elmType, int id, const int* conne
|
|||||||
m_elementTypes.push_back( elmType );
|
m_elementTypes.push_back( elmType );
|
||||||
m_elementConnectivityStartIndices.push_back( m_allElementConnectivities.size() );
|
m_elementConnectivityStartIndices.push_back( m_allElementConnectivities.size() );
|
||||||
|
|
||||||
int nodeCount = RigFemTypes::elmentNodeCount( elmType );
|
int nodeCount = RigFemTypes::elementNodeCount( elmType );
|
||||||
for ( int lnIdx = 0; lnIdx < nodeCount; ++lnIdx )
|
for ( int lnIdx = 0; lnIdx < nodeCount; ++lnIdx )
|
||||||
{
|
{
|
||||||
m_allElementConnectivities.push_back( connectivities[lnIdx] );
|
m_allElementConnectivities.push_back( connectivities[lnIdx] );
|
||||||
@ -102,7 +102,7 @@ void RigFemPart::calculateNodeToElmRefs()
|
|||||||
|
|
||||||
for ( int eIdx = 0; eIdx < static_cast<int>( m_elementId.size() ); ++eIdx )
|
for ( int eIdx = 0; eIdx < static_cast<int>( m_elementId.size() ); ++eIdx )
|
||||||
{
|
{
|
||||||
int elmNodeCount = RigFemTypes::elmentNodeCount( elementType( eIdx ) );
|
int elmNodeCount = RigFemTypes::elementNodeCount( elementType( eIdx ) );
|
||||||
const int* elmNodes = connectivities( eIdx );
|
const int* elmNodes = connectivities( eIdx );
|
||||||
for ( int localIdx = 0; localIdx < elmNodeCount; ++localIdx )
|
for ( int localIdx = 0; localIdx < elmNodeCount; ++localIdx )
|
||||||
{
|
{
|
||||||
@ -158,7 +158,7 @@ void RigFemPart::calculateElmNeighbors()
|
|||||||
RigElementType elmType = this->elementType( eIdx );
|
RigElementType elmType = this->elementType( eIdx );
|
||||||
const int* elmNodes = this->connectivities( eIdx );
|
const int* elmNodes = this->connectivities( eIdx );
|
||||||
|
|
||||||
int faceCount = RigFemTypes::elmentFaceCount( elmType );
|
int faceCount = RigFemTypes::elementFaceCount( elmType );
|
||||||
int neighborCount = 0;
|
int neighborCount = 0;
|
||||||
for ( int faceIdx = 0; faceIdx < faceCount; ++faceIdx )
|
for ( int faceIdx = 0; faceIdx < faceCount; ++faceIdx )
|
||||||
{
|
{
|
||||||
@ -225,7 +225,7 @@ void RigFemPart::calculateElmNeighbors()
|
|||||||
RigElementType nbcElmType = this->elementType( nbcElmIdx );
|
RigElementType nbcElmType = this->elementType( nbcElmIdx );
|
||||||
const int* nbcElmNodes = this->connectivities( nbcElmIdx );
|
const int* nbcElmNodes = this->connectivities( nbcElmIdx );
|
||||||
|
|
||||||
int nbcFaceCount = RigFemTypes::elmentFaceCount( nbcElmType );
|
int nbcFaceCount = RigFemTypes::elementFaceCount( nbcElmType );
|
||||||
bool isNeighborFound = false;
|
bool isNeighborFound = false;
|
||||||
for ( int nbcFaceIdx = 0; nbcFaceIdx < nbcFaceCount; ++nbcFaceIdx )
|
for ( int nbcFaceIdx = 0; nbcFaceIdx < nbcFaceCount; ++nbcFaceIdx )
|
||||||
{
|
{
|
||||||
@ -307,11 +307,11 @@ float RigFemPart::characteristicElementSize() const
|
|||||||
|
|
||||||
if ( eType == HEX8P )
|
if ( eType == HEX8P )
|
||||||
{
|
{
|
||||||
const int* elmentConn = this->connectivities( elmIdx );
|
const int* elementConn = this->connectivities( elmIdx );
|
||||||
cvf::Vec3f nodePos0 = this->nodes().coordinates[elmentConn[0]];
|
cvf::Vec3f nodePos0 = this->nodes().coordinates[elementConn[0]];
|
||||||
cvf::Vec3f nodePos1 = this->nodes().coordinates[elmentConn[1]];
|
cvf::Vec3f nodePos1 = this->nodes().coordinates[elementConn[1]];
|
||||||
cvf::Vec3f nodePos3 = this->nodes().coordinates[elmentConn[3]];
|
cvf::Vec3f nodePos3 = this->nodes().coordinates[elementConn[3]];
|
||||||
cvf::Vec3f nodePos4 = this->nodes().coordinates[elmentConn[4]];
|
cvf::Vec3f nodePos4 = this->nodes().coordinates[elementConn[4]];
|
||||||
|
|
||||||
float l1 = ( nodePos1 - nodePos0 ).length();
|
float l1 = ( nodePos1 - nodePos0 ).length();
|
||||||
float l3 = ( nodePos3 - nodePos0 ).length();
|
float l3 = ( nodePos3 - nodePos0 ).length();
|
||||||
@ -407,7 +407,7 @@ size_t RigFemPart::elementNodeResultCount() const
|
|||||||
int lastElmIdx = this->elementCount() - 1;
|
int lastElmIdx = this->elementCount() - 1;
|
||||||
if ( lastElmIdx < 0 ) return 0;
|
if ( lastElmIdx < 0 ) return 0;
|
||||||
RigElementType elmType = this->elementType( lastElmIdx );
|
RigElementType elmType = this->elementType( lastElmIdx );
|
||||||
int elmNodeCount = RigFemTypes::elmentNodeCount( elmType );
|
int elmNodeCount = RigFemTypes::elementNodeCount( elmType );
|
||||||
size_t lastElmResultIdx = this->elementNodeResultIdx( lastElmIdx, elmNodeCount - 1 );
|
size_t lastElmResultIdx = this->elementNodeResultIdx( lastElmIdx, elmNodeCount - 1 );
|
||||||
|
|
||||||
return lastElmResultIdx + 1;
|
return lastElmResultIdx + 1;
|
||||||
|
@ -100,7 +100,7 @@ public:
|
|||||||
|
|
||||||
void ensureIntersectionSearchTreeIsBuilt() const;
|
void ensureIntersectionSearchTreeIsBuilt() const;
|
||||||
|
|
||||||
cvf::Vec3f faceNormal( int elmentIndex, int faceIndex ) const;
|
cvf::Vec3f faceNormal( int elementIndex, int faceIndex ) const;
|
||||||
|
|
||||||
const RigFemPartGrid* getOrCreateStructGrid() const;
|
const RigFemPartGrid* getOrCreateStructGrid() const;
|
||||||
const std::vector<int>& elementIdxToId() const { return m_elementId; }
|
const std::vector<int>& elementIdxToId() const { return m_elementId; }
|
||||||
|
@ -90,7 +90,7 @@ void RigFemPartGrid::generateStructGridData()
|
|||||||
int posJFaceIdx = ijkMainFaceIndices[1];
|
int posJFaceIdx = ijkMainFaceIndices[1];
|
||||||
int posKFaceIdx = ijkMainFaceIndices[2];
|
int posKFaceIdx = ijkMainFaceIndices[2];
|
||||||
|
|
||||||
m_elmentIJKCounts = cvf::Vec3st( 0, 0, 0 );
|
m_elementIJKCounts = cvf::Vec3st( 0, 0, 0 );
|
||||||
|
|
||||||
int elmIdxInK = elmIdxForIJK_000;
|
int elmIdxInK = elmIdxForIJK_000;
|
||||||
cvf::Vec3f posKNormal = m_femPart->faceNormal( elmIdxInK, posKFaceIdx );
|
cvf::Vec3f posKNormal = m_femPart->faceNormal( elmIdxInK, posKFaceIdx );
|
||||||
@ -131,7 +131,7 @@ void RigFemPartGrid::generateStructGridData()
|
|||||||
|
|
||||||
// Scoped to show that nothing bleeds further to K-loop
|
// Scoped to show that nothing bleeds further to K-loop
|
||||||
{
|
{
|
||||||
if ( iCoord > static_cast<int>( m_elmentIJKCounts[0] ) ) m_elmentIJKCounts[0] = iCoord;
|
if ( iCoord > static_cast<int>( m_elementIJKCounts[0] ) ) m_elementIJKCounts[0] = iCoord;
|
||||||
|
|
||||||
++jCoord;
|
++jCoord;
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ void RigFemPartGrid::generateStructGridData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
if ( jCoord > static_cast<int>( m_elmentIJKCounts[1] ) ) m_elmentIJKCounts[1] = jCoord;
|
if ( jCoord > static_cast<int>( m_elementIJKCounts[1] ) ) m_elementIJKCounts[1] = jCoord;
|
||||||
|
|
||||||
++kCoord;
|
++kCoord;
|
||||||
|
|
||||||
@ -177,10 +177,10 @@ void RigFemPartGrid::generateStructGridData()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( kCoord > static_cast<int>( m_elmentIJKCounts[2] ) ) m_elmentIJKCounts[2] = kCoord;
|
if ( kCoord > static_cast<int>( m_elementIJKCounts[2] ) ) m_elementIJKCounts[2] = kCoord;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_elmIdxPrIJK.resize( m_elmentIJKCounts[0], m_elmentIJKCounts[1], m_elmentIJKCounts[2] );
|
m_elmIdxPrIJK.resize( m_elementIJKCounts[0], m_elementIJKCounts[1], m_elementIJKCounts[2] );
|
||||||
|
|
||||||
for ( int elmIdx = 0; elmIdx < m_femPart->elementCount(); ++elmIdx )
|
for ( int elmIdx = 0; elmIdx < m_femPart->elementCount(); ++elmIdx )
|
||||||
{
|
{
|
||||||
@ -247,7 +247,7 @@ cvf::Vec3i RigFemPartGrid::findMainIJKFaces( int elementIndex ) const
|
|||||||
cvf::Vec3i ijkMainFaceIndices = cvf::Vec3i( -1, -1, -1 );
|
cvf::Vec3i ijkMainFaceIndices = cvf::Vec3i( -1, -1, -1 );
|
||||||
|
|
||||||
RigElementType eType = m_femPart->elementType( elementIndex );
|
RigElementType eType = m_femPart->elementType( elementIndex );
|
||||||
int faceCount = RigFemTypes::elmentFaceCount( eType );
|
int faceCount = RigFemTypes::elementFaceCount( eType );
|
||||||
std::vector<cvf::Vec3f> normals( faceCount );
|
std::vector<cvf::Vec3f> normals( faceCount );
|
||||||
for ( int faceIdx = 0; faceIdx < faceCount; ++faceIdx )
|
for ( int faceIdx = 0; faceIdx < faceCount; ++faceIdx )
|
||||||
{
|
{
|
||||||
@ -340,7 +340,7 @@ std::pair<cvf::Vec3st, cvf::Vec3st> RigFemPartGrid::reservoirIJKBoundingBox() co
|
|||||||
int RigFemPartGrid::perpendicularFaceInDirection( cvf::Vec3f direction, int perpFaceIdx, int elmIdx )
|
int RigFemPartGrid::perpendicularFaceInDirection( cvf::Vec3f direction, int perpFaceIdx, int elmIdx )
|
||||||
{
|
{
|
||||||
RigElementType eType = m_femPart->elementType( elmIdx );
|
RigElementType eType = m_femPart->elementType( elmIdx );
|
||||||
int faceCount = RigFemTypes::elmentFaceCount( eType );
|
int faceCount = RigFemTypes::elementFaceCount( eType );
|
||||||
|
|
||||||
int oppFace = RigFemTypes::oppositeFace( eType, perpFaceIdx );
|
int oppFace = RigFemTypes::oppositeFace( eType, perpFaceIdx );
|
||||||
|
|
||||||
@ -370,7 +370,7 @@ int RigFemPartGrid::perpendicularFaceInDirection( cvf::Vec3f direction, int perp
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
size_t RigFemPartGrid::gridPointCountI() const
|
size_t RigFemPartGrid::gridPointCountI() const
|
||||||
{
|
{
|
||||||
return m_elmentIJKCounts[0] + 1;
|
return m_elementIJKCounts[0] + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -378,7 +378,7 @@ size_t RigFemPartGrid::gridPointCountI() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
size_t RigFemPartGrid::gridPointCountJ() const
|
size_t RigFemPartGrid::gridPointCountJ() const
|
||||||
{
|
{
|
||||||
return m_elmentIJKCounts[1] + 1;
|
return m_elementIJKCounts[1] + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -386,7 +386,7 @@ size_t RigFemPartGrid::gridPointCountJ() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
size_t RigFemPartGrid::gridPointCountK() const
|
size_t RigFemPartGrid::gridPointCountK() const
|
||||||
{
|
{
|
||||||
return m_elmentIJKCounts[2] + 1;
|
return m_elementIJKCounts[2] + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -52,7 +52,7 @@ private:
|
|||||||
const RigFemPart* m_femPart;
|
const RigFemPart* m_femPart;
|
||||||
|
|
||||||
std::vector<cvf::Vec3i> m_ijkPrElement;
|
std::vector<cvf::Vec3i> m_ijkPrElement;
|
||||||
cvf::Vec3st m_elmentIJKCounts;
|
cvf::Vec3st m_elementIJKCounts;
|
||||||
|
|
||||||
private: // Unused, Not implemented
|
private: // Unused, Not implemented
|
||||||
bool isCellValid( size_t i, size_t j, size_t k ) const override;
|
bool isCellValid( size_t i, size_t j, size_t k ) const override;
|
||||||
|
@ -52,7 +52,7 @@ bool RigFemPartResultCalculatorEnIpPorBar::isMatching( const RigFemResultAddress
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
/// Convert POR NODAL result to POR-Bar Elment Nodal result
|
/// Convert POR NODAL result to POR-Bar Element Nodal result
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigFemScalarResultFrames* RigFemPartResultCalculatorEnIpPorBar::calculate( int partIndex,
|
RigFemScalarResultFrames* RigFemPartResultCalculatorEnIpPorBar::calculate( int partIndex,
|
||||||
const RigFemResultAddress& resVarAddr )
|
const RigFemResultAddress& resVarAddr )
|
||||||
@ -92,7 +92,7 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorEnIpPorBar::calculate( int
|
|||||||
|
|
||||||
if ( elmType == HEX8P )
|
if ( elmType == HEX8P )
|
||||||
{
|
{
|
||||||
int elmNodeCount = RigFemTypes::elmentNodeCount( elmType );
|
int elmNodeCount = RigFemTypes::elementNodeCount( elmType );
|
||||||
for ( int elmNodIdx = 0; elmNodIdx < elmNodeCount; ++elmNodIdx )
|
for ( int elmNodIdx = 0; elmNodIdx < elmNodeCount; ++elmNodIdx )
|
||||||
{
|
{
|
||||||
size_t elmNodResIdx = femPart->elementNodeResultIdx( elmIdx, elmNodIdx );
|
size_t elmNodResIdx = femPart->elementNodeResultIdx( elmIdx, elmNodIdx );
|
||||||
|
@ -88,7 +88,7 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorFormationIndices::calculate(
|
|||||||
for ( int elmIdx = 0; elmIdx < elementCount; ++elmIdx )
|
for ( int elmIdx = 0; elmIdx < elementCount; ++elmIdx )
|
||||||
{
|
{
|
||||||
RigElementType elmType = femPart->elementType( elmIdx );
|
RigElementType elmType = femPart->elementType( elmIdx );
|
||||||
int elmNodeCount = RigFemTypes::elmentNodeCount( elmType );
|
int elmNodeCount = RigFemTypes::elementNodeCount( elmType );
|
||||||
|
|
||||||
size_t i, j, k;
|
size_t i, j, k;
|
||||||
bool validIndex = structGrid->ijkFromCellIndex( elmIdx, &i, &j, &k );
|
bool validIndex = structGrid->ijkFromCellIndex( elmIdx, &i, &j, &k );
|
||||||
|
@ -135,7 +135,7 @@ void RigFemPartResultCalculatorGamma::calculateGammaFromFrames( int
|
|||||||
{
|
{
|
||||||
RigElementType elmType = femPart->elementType( elmIdx );
|
RigElementType elmType = femPart->elementType( elmIdx );
|
||||||
|
|
||||||
int elmNodeCount = RigFemTypes::elmentNodeCount( femPart->elementType( elmIdx ) );
|
int elmNodeCount = RigFemTypes::elementNodeCount( femPart->elementType( elmIdx ) );
|
||||||
|
|
||||||
if ( elmType == HEX8P )
|
if ( elmType == HEX8P )
|
||||||
{
|
{
|
||||||
|
@ -127,7 +127,7 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorNodalGradients::calculate( i
|
|||||||
std::array<cvf::Vec3d, 8> hexCorners;
|
std::array<cvf::Vec3d, 8> hexCorners;
|
||||||
std::array<double, 8> cornerValues;
|
std::array<double, 8> cornerValues;
|
||||||
|
|
||||||
int elmNodeCount = RigFemTypes::elmentNodeCount( elmType );
|
int elmNodeCount = RigFemTypes::elementNodeCount( elmType );
|
||||||
for ( int elmNodIdx = 0; elmNodIdx < elmNodeCount; ++elmNodIdx )
|
for ( int elmNodIdx = 0; elmNodIdx < elmNodeCount; ++elmNodIdx )
|
||||||
{
|
{
|
||||||
size_t elmNodResIdx = femPart->elementNodeResultIdx( elmIdx, elmNodIdx );
|
size_t elmNodResIdx = femPart->elementNodeResultIdx( elmIdx, elmNodIdx );
|
||||||
|
@ -120,7 +120,7 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorNormalSE::calculate( int
|
|||||||
{
|
{
|
||||||
RigElementType elmType = femPart->elementType( elmIdx );
|
RigElementType elmType = femPart->elementType( elmIdx );
|
||||||
|
|
||||||
int elmNodeCount = RigFemTypes::elmentNodeCount( femPart->elementType( elmIdx ) );
|
int elmNodeCount = RigFemTypes::elementNodeCount( femPart->elementType( elmIdx ) );
|
||||||
|
|
||||||
if ( elmType == HEX8P )
|
if ( elmType == HEX8P )
|
||||||
{
|
{
|
||||||
|
@ -122,7 +122,7 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorNormalST::calculate( int
|
|||||||
{
|
{
|
||||||
RigElementType elmType = femPart->elementType( elmIdx );
|
RigElementType elmType = femPart->elementType( elmIdx );
|
||||||
|
|
||||||
int elmNodeCount = RigFemTypes::elmentNodeCount( femPart->elementType( elmIdx ) );
|
int elmNodeCount = RigFemTypes::elementNodeCount( femPart->elementType( elmIdx ) );
|
||||||
|
|
||||||
if ( elmType == HEX8P )
|
if ( elmType == HEX8P )
|
||||||
{
|
{
|
||||||
|
@ -178,7 +178,7 @@ RigFemScalarResultFrames*
|
|||||||
{
|
{
|
||||||
RigElementType elmType = femPart->elementType( elmIdx );
|
RigElementType elmType = femPart->elementType( elmIdx );
|
||||||
|
|
||||||
int elmNodeCount = RigFemTypes::elmentNodeCount( femPart->elementType( elmIdx ) );
|
int elmNodeCount = RigFemTypes::elementNodeCount( femPart->elementType( elmIdx ) );
|
||||||
|
|
||||||
if ( elmType == HEX8P )
|
if ( elmType == HEX8P )
|
||||||
{
|
{
|
||||||
|
@ -92,7 +92,7 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorShearSE::calculate( int part
|
|||||||
{
|
{
|
||||||
RigElementType elmType = femPart->elementType( elmIdx );
|
RigElementType elmType = femPart->elementType( elmIdx );
|
||||||
|
|
||||||
int elmNodeCount = RigFemTypes::elmentNodeCount( femPart->elementType( elmIdx ) );
|
int elmNodeCount = RigFemTypes::elementNodeCount( femPart->elementType( elmIdx ) );
|
||||||
|
|
||||||
if ( elmType == HEX8P )
|
if ( elmType == HEX8P )
|
||||||
{
|
{
|
||||||
|
@ -142,7 +142,7 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorStressGradients::calculate(
|
|||||||
// Find the corresponding corner values for the element
|
// Find the corresponding corner values for the element
|
||||||
std::array<double, 8> cornerValues;
|
std::array<double, 8> cornerValues;
|
||||||
|
|
||||||
int elmNodeCount = RigFemTypes::elmentNodeCount( elmType );
|
int elmNodeCount = RigFemTypes::elementNodeCount( elmType );
|
||||||
for ( int elmNodIdx = 0; elmNodIdx < elmNodeCount; ++elmNodIdx )
|
for ( int elmNodIdx = 0; elmNodIdx < elmNodeCount; ++elmNodIdx )
|
||||||
{
|
{
|
||||||
size_t elmNodResIdx = femPart->elementNodeResultIdx( elmIdx, elmNodIdx );
|
size_t elmNodResIdx = femPart->elementNodeResultIdx( elmIdx, elmNodIdx );
|
||||||
|
@ -183,7 +183,7 @@ RigFemScalarResultFrames*
|
|||||||
for ( int elmIdx = 0; elmIdx < elementCount; ++elmIdx )
|
for ( int elmIdx = 0; elmIdx < elementCount; ++elmIdx )
|
||||||
{
|
{
|
||||||
RigElementType elmType = femPart->elementType( elmIdx );
|
RigElementType elmType = femPart->elementType( elmIdx );
|
||||||
int faceCount = RigFemTypes::elmentFaceCount( elmType );
|
int faceCount = RigFemTypes::elementFaceCount( elmType );
|
||||||
const int* elmNodeIndices = femPart->connectivities( elmIdx );
|
const int* elmNodeIndices = femPart->connectivities( elmIdx );
|
||||||
|
|
||||||
int elmNodFaceResIdxElmStart = elmIdx * 24; // HACK should get from part
|
int elmNodFaceResIdxElmStart = elmIdx * 24; // HACK should get from part
|
||||||
|
@ -97,7 +97,7 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorSurfaceAngles::calculate( in
|
|||||||
for ( int elmIdx = 0; elmIdx < elementCount; ++elmIdx )
|
for ( int elmIdx = 0; elmIdx < elementCount; ++elmIdx )
|
||||||
{
|
{
|
||||||
RigElementType elmType = femPart->elementType( elmIdx );
|
RigElementType elmType = femPart->elementType( elmIdx );
|
||||||
int faceCount = RigFemTypes::elmentFaceCount( elmType );
|
int faceCount = RigFemTypes::elementFaceCount( elmType );
|
||||||
const int* elmNodeIndices = femPart->connectivities( elmIdx );
|
const int* elmNodeIndices = femPart->connectivities( elmIdx );
|
||||||
|
|
||||||
int elmNodFaceResIdxElmStart = elmIdx * 24; // HACK should get from part
|
int elmNodFaceResIdxElmStart = elmIdx * 24; // HACK should get from part
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
int RigFemTypes::elmentNodeCount( RigElementType elmType )
|
int RigFemTypes::elementNodeCount( RigElementType elmType )
|
||||||
{
|
{
|
||||||
static int elementTypeCounts[3] = {8, 8, 4};
|
static int elementTypeCounts[3] = {8, 8, 4};
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ int RigFemTypes::elmentNodeCount( RigElementType elmType )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
int RigFemTypes::elmentFaceCount( RigElementType elmType )
|
int RigFemTypes::elementFaceCount( RigElementType elmType )
|
||||||
{
|
{
|
||||||
const static int elementFaceCounts[3] = {6, 6, 1};
|
const static int elementFaceCounts[3] = {6, 6, 1};
|
||||||
|
|
||||||
|
@ -32,8 +32,8 @@ enum RigElementType
|
|||||||
class RigFemTypes
|
class RigFemTypes
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static int elmentNodeCount( RigElementType elmType );
|
static int elementNodeCount( RigElementType elmType );
|
||||||
static int elmentFaceCount( RigElementType elmType );
|
static int elementFaceCount( RigElementType elmType );
|
||||||
static const int* localElmNodeIndicesForFace( RigElementType elmType, int faceIdx, int* faceNodeCount );
|
static const int* localElmNodeIndicesForFace( RigElementType elmType, int faceIdx, int* faceNodeCount );
|
||||||
static int oppositeFace( RigElementType elmType, int faceIdx );
|
static int oppositeFace( RigElementType elmType, int faceIdx );
|
||||||
static const int* localElmNodeToIntegrationPointMapping( RigElementType elmType );
|
static const int* localElmNodeToIntegrationPointMapping( RigElementType elmType );
|
||||||
|
@ -197,7 +197,7 @@ void RivFemElmVisibilityCalculator::computePropertyVisibility( cvf::UByteArray*
|
|||||||
if ( !( *cellVisibility )[cellIndex] ) continue;
|
if ( !( *cellVisibility )[cellIndex] ) continue;
|
||||||
|
|
||||||
RigElementType eType = grid->elementType( cellIndex );
|
RigElementType eType = grid->elementType( cellIndex );
|
||||||
int elmNodeCount = RigFemTypes::elmentNodeCount( eType );
|
int elmNodeCount = RigFemTypes::elementNodeCount( eType );
|
||||||
|
|
||||||
const int* elmNodeIndices = grid->connectivities( cellIndex );
|
const int* elmNodeIndices = grid->connectivities( cellIndex );
|
||||||
for ( int enIdx = 0; enIdx < elmNodeCount; ++enIdx )
|
for ( int enIdx = 0; enIdx < elmNodeCount; ++enIdx )
|
||||||
|
@ -188,7 +188,7 @@ void RivFemPartGeometryGenerator::computeArrays()
|
|||||||
if ( m_elmVisibility.isNull() || ( *m_elmVisibility )[elmIdx] )
|
if ( m_elmVisibility.isNull() || ( *m_elmVisibility )[elmIdx] )
|
||||||
{
|
{
|
||||||
RigElementType eType = m_part->elementType( elmIdx );
|
RigElementType eType = m_part->elementType( elmIdx );
|
||||||
int faceCount = RigFemTypes::elmentFaceCount( eType );
|
int faceCount = RigFemTypes::elementFaceCount( eType );
|
||||||
|
|
||||||
const int* elmNodeIndices = m_part->connectivities( elmIdx );
|
const int* elmNodeIndices = m_part->connectivities( elmIdx );
|
||||||
|
|
||||||
@ -300,7 +300,7 @@ cvf::ref<cvf::DrawableGeo>
|
|||||||
const std::vector<cvf::Vec3f>& nodeCoordinates = part->nodes().coordinates;
|
const std::vector<cvf::Vec3f>& nodeCoordinates = part->nodes().coordinates;
|
||||||
|
|
||||||
RigElementType eType = part->elementType( elmIdx );
|
RigElementType eType = part->elementType( elmIdx );
|
||||||
int faceCount = RigFemTypes::elmentFaceCount( eType );
|
int faceCount = RigFemTypes::elementFaceCount( eType );
|
||||||
|
|
||||||
const int* elmNodeIndices = part->connectivities( elmIdx );
|
const int* elmNodeIndices = part->connectivities( elmIdx );
|
||||||
|
|
||||||
|
@ -396,7 +396,7 @@ bool RifOdbReader::readFemParts( RigFemPartCollection* femParts )
|
|||||||
|
|
||||||
int nodeCount = 0;
|
int nodeCount = 0;
|
||||||
const int* idBasedConnectivities = odbElm.connectivity( nodeCount );
|
const int* idBasedConnectivities = odbElm.connectivity( nodeCount );
|
||||||
CVF_TIGHT_ASSERT( nodeCount == RigFemTypes::elmentNodeCount( elmType ) );
|
CVF_TIGHT_ASSERT( nodeCount == RigFemTypes::elementNodeCount( elmType ) );
|
||||||
|
|
||||||
indexBasedConnectivities.resize( nodeCount );
|
indexBasedConnectivities.resize( nodeCount );
|
||||||
for ( int lnIdx = 0; lnIdx < nodeCount; ++lnIdx )
|
for ( int lnIdx = 0; lnIdx < nodeCount; ++lnIdx )
|
||||||
|
@ -236,7 +236,7 @@ void RivTensorResultPartMgr::calculateElementTensors( const RigFemPart&
|
|||||||
|
|
||||||
for ( int elmIdx = 0; elmIdx < static_cast<int>( elmCount ); elmIdx++ )
|
for ( int elmIdx = 0; elmIdx < static_cast<int>( elmCount ); elmIdx++ )
|
||||||
{
|
{
|
||||||
if ( RigFemTypes::elmentNodeCount( part.elementType( elmIdx ) ) == 8 )
|
if ( RigFemTypes::elementNodeCount( part.elementType( elmIdx ) ) == 8 )
|
||||||
{
|
{
|
||||||
caf::Ten3f tensorSumOfElmNodes = vertexTensors[part.elementNodeResultIdx( elmIdx, 0 )];
|
caf::Ten3f tensorSumOfElmNodes = vertexTensors[part.elementNodeResultIdx( elmIdx, 0 )];
|
||||||
for ( int i = 1; i < 8; i++ )
|
for ( int i = 1; i < 8; i++ )
|
||||||
|
@ -290,7 +290,7 @@ void RivWellHeadPartMgr::buildWellHeadParts( size_t f
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Show labels for well heads only when well disks are disabled:
|
// Show labels for well heads only when well disks are disabled:
|
||||||
// well disk labels are prefered since they have more info.
|
// well disk labels are preferred since they have more info.
|
||||||
if ( well->showWellLabel() && !well->name().isEmpty() && !well->showWellDisks() )
|
if ( well->showWellLabel() && !well->name().isEmpty() && !well->showWellDisks() )
|
||||||
{
|
{
|
||||||
cvf::Font* font = RiaGuiApplication::instance()->defaultWellLabelFont();
|
cvf::Font* font = RiaGuiApplication::instance()->defaultWellLabelFont();
|
||||||
|
@ -426,13 +426,13 @@ void RimEllipseFractureTemplate::defineUiOrdering( QString uiConfigName, caf::Pd
|
|||||||
{
|
{
|
||||||
if ( fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
if ( fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
|
||||||
{
|
{
|
||||||
m_halfLength.uiCapability()->setUiName( "Halflenght X<sub>f</sub> [m]" );
|
m_halfLength.uiCapability()->setUiName( "Halflength X<sub>f</sub> [m]" );
|
||||||
m_height.uiCapability()->setUiName( "Height [m]" );
|
m_height.uiCapability()->setUiName( "Height [m]" );
|
||||||
m_width.uiCapability()->setUiName( "Width [m]" );
|
m_width.uiCapability()->setUiName( "Width [m]" );
|
||||||
}
|
}
|
||||||
else if ( fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
else if ( fractureTemplateUnit() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
|
||||||
{
|
{
|
||||||
m_halfLength.uiCapability()->setUiName( "Halflenght X<sub>f</sub> [ft]" );
|
m_halfLength.uiCapability()->setUiName( "Halflength X<sub>f</sub> [ft]" );
|
||||||
m_height.uiCapability()->setUiName( "Height [ft]" );
|
m_height.uiCapability()->setUiName( "Height [ft]" );
|
||||||
m_width.uiCapability()->setUiName( "Width [inches]" );
|
m_width.uiCapability()->setUiName( "Width [inches]" );
|
||||||
}
|
}
|
||||||
|
@ -335,7 +335,7 @@ cvf::Vec3d RimFractureModel::calculateTSTDirection() const
|
|||||||
|
|
||||||
if ( !cell.isInvalid() )
|
if ( !cell.isInvalid() )
|
||||||
{
|
{
|
||||||
direction += cell.faceNormalWithAreaLenght( cvf::StructGridInterface::NEG_K ).getNormalized();
|
direction += cell.faceNormalWithAreaLength( cvf::StructGridInterface::NEG_K ).getNormalized();
|
||||||
numContributingCells++;
|
numContributingCells++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ void RimMeasurement::removeAllPoints()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QString RimMeasurement::label() const
|
QString RimMeasurement::label() const
|
||||||
{
|
{
|
||||||
auto lengths = calculateLenghts();
|
auto lengths = calculateLengths();
|
||||||
|
|
||||||
QString text;
|
QString text;
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ QString RimMeasurement::label() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimMeasurement::Lengths RimMeasurement::calculateLenghts() const
|
RimMeasurement::Lengths RimMeasurement::calculateLengths() const
|
||||||
{
|
{
|
||||||
Lengths lengths;
|
Lengths lengths;
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ public:
|
|||||||
QString label() const;
|
QString label() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Lengths calculateLenghts() const;
|
Lengths calculateLengths() const;
|
||||||
|
|
||||||
void updateView() const;
|
void updateView() const;
|
||||||
|
|
||||||
|
@ -532,7 +532,7 @@ void Rim3dView::setCurrentTimeStep( int frameIndex )
|
|||||||
if ( m_currentTimeStep != oldTimeStep )
|
if ( m_currentTimeStep != oldTimeStep )
|
||||||
{
|
{
|
||||||
RiuTimeStepChangedHandler::instance()->handleTimeStepChanged( this );
|
RiuTimeStepChangedHandler::instance()->handleTimeStepChanged( this );
|
||||||
this->onClearReservoirCellVisibilitiesIfNeccessary();
|
this->onClearReservoirCellVisibilitiesIfNecessary();
|
||||||
}
|
}
|
||||||
|
|
||||||
this->hasUserRequestedAnimation = true;
|
this->hasUserRequestedAnimation = true;
|
||||||
|
@ -207,7 +207,7 @@ protected:
|
|||||||
virtual void onClampCurrentTimestep() = 0;
|
virtual void onClampCurrentTimestep() = 0;
|
||||||
virtual size_t onTimeStepCountRequested() = 0;
|
virtual size_t onTimeStepCountRequested() = 0;
|
||||||
|
|
||||||
virtual void onClearReservoirCellVisibilitiesIfNeccessary(){};
|
virtual void onClearReservoirCellVisibilitiesIfNecessary(){};
|
||||||
virtual bool isTimeStepDependentDataVisible() const = 0;
|
virtual bool isTimeStepDependentDataVisible() const = 0;
|
||||||
virtual void defineAxisLabels( cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel ) = 0;
|
virtual void defineAxisLabels( cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel ) = 0;
|
||||||
virtual void onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) = 0;
|
virtual void onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) = 0;
|
||||||
|
@ -469,7 +469,7 @@ void RimGridView::onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimGridView::onClearReservoirCellVisibilitiesIfNeccessary()
|
void RimGridView::onClearReservoirCellVisibilitiesIfNecessary()
|
||||||
{
|
{
|
||||||
if ( this->propertyFilterCollection() && this->propertyFilterCollection()->hasActiveDynamicFilters() )
|
if ( this->propertyFilterCollection() && this->propertyFilterCollection()->hasActiveDynamicFilters() )
|
||||||
{
|
{
|
||||||
|
@ -73,7 +73,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void updateViewFollowingRangeFilterUpdates();
|
virtual void updateViewFollowingRangeFilterUpdates();
|
||||||
void onClearReservoirCellVisibilitiesIfNeccessary() override;
|
void onClearReservoirCellVisibilitiesIfNecessary() override;
|
||||||
virtual void calculateCurrentTotalCellVisibility( cvf::UByteArray* totalVisibility, int timeStep ) = 0;
|
virtual void calculateCurrentTotalCellVisibility( cvf::UByteArray* totalVisibility, int timeStep ) = 0;
|
||||||
void selectOverlayInfoConfig() override;
|
void selectOverlayInfoConfig() override;
|
||||||
RimGridCollection* gridCollection() const;
|
RimGridCollection* gridCollection() const;
|
||||||
|
@ -348,12 +348,12 @@ bool RimSummaryCalculation::calculate()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
/// Find the last assignment using := and interpret the text before the := as LHS
|
/// Find the last assignment using := and interpret the text before the := as LHS
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QString RimSummaryCalculation::findLeftHandSide( const QString& expresion )
|
QString RimSummaryCalculation::findLeftHandSide( const QString& expression )
|
||||||
{
|
{
|
||||||
int index = expresion.lastIndexOf( ":=" );
|
int index = expression.lastIndexOf( ":=" );
|
||||||
if ( index > 0 )
|
if ( index > 0 )
|
||||||
{
|
{
|
||||||
QString s = expresion.left( index ).simplified();
|
QString s = expression.left( index ).simplified();
|
||||||
|
|
||||||
QStringList words = s.split( " " );
|
QStringList words = s.split( " " );
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public:
|
|||||||
|
|
||||||
caf::PdmFieldHandle* userDescriptionField() override;
|
caf::PdmFieldHandle* userDescriptionField() override;
|
||||||
|
|
||||||
static QString findLeftHandSide( const QString& expresion );
|
static QString findLeftHandSide( const QString& expression );
|
||||||
void attachToWidget();
|
void attachToWidget();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -33,8 +33,8 @@ RimSummaryCalculationCollection::RimSummaryCalculationCollection()
|
|||||||
{
|
{
|
||||||
CAF_PDM_InitObject( "Calculation Collection", ":/chain.png", "", "" );
|
CAF_PDM_InitObject( "Calculation Collection", ":/chain.png", "", "" );
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault( &m_calcuations, "Calculations", "Calculations", "", "", "" );
|
CAF_PDM_InitFieldNoDefault( &m_calculations, "Calculations", "Calculations", "", "", "" );
|
||||||
m_calcuations.uiCapability()->setUiEditorTypeName( caf::PdmUiTreeSelectionEditor::uiEditorTypeName() );
|
m_calculations.uiCapability()->setUiEditorTypeName( caf::PdmUiTreeSelectionEditor::uiEditorTypeName() );
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault( &m_calcuationSummaryCase, "CalculationsSummaryCase", "Calculations Summary Case", "", "", "" );
|
CAF_PDM_InitFieldNoDefault( &m_calcuationSummaryCase, "CalculationsSummaryCase", "Calculations Summary Case", "", "", "" );
|
||||||
m_calcuationSummaryCase.xmlCapability()->disableIO();
|
m_calcuationSummaryCase.xmlCapability()->disableIO();
|
||||||
@ -54,7 +54,7 @@ RimSummaryCalculation* RimSummaryCalculationCollection::addCalculation()
|
|||||||
calculation->setExpression( varName + " := x + y" );
|
calculation->setExpression( varName + " := x + y" );
|
||||||
calculation->parseExpression();
|
calculation->parseExpression();
|
||||||
|
|
||||||
m_calcuations.push_back( calculation );
|
m_calculations.push_back( calculation );
|
||||||
|
|
||||||
rebuildCaseMetaData();
|
rebuildCaseMetaData();
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ RimSummaryCalculation* RimSummaryCalculationCollection::addCalculationCopy( cons
|
|||||||
CVF_ASSERT( calcCopy );
|
CVF_ASSERT( calcCopy );
|
||||||
|
|
||||||
std::set<QString> calcNames;
|
std::set<QString> calcNames;
|
||||||
for ( const auto& calc : m_calcuations )
|
for ( const auto& calc : m_calculations )
|
||||||
{
|
{
|
||||||
calcNames.insert( calc->findLeftHandSide( calc->expression() ) );
|
calcNames.insert( calc->findLeftHandSide( calc->expression() ) );
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@ RimSummaryCalculation* RimSummaryCalculationCollection::addCalculationCopy( cons
|
|||||||
expression.replace( currVarName, newVarName );
|
expression.replace( currVarName, newVarName );
|
||||||
calcCopy->setExpression( expression );
|
calcCopy->setExpression( expression );
|
||||||
|
|
||||||
m_calcuations.push_back( calcCopy );
|
m_calculations.push_back( calcCopy );
|
||||||
|
|
||||||
calcCopy->resolveReferencesRecursively();
|
calcCopy->resolveReferencesRecursively();
|
||||||
rebuildCaseMetaData();
|
rebuildCaseMetaData();
|
||||||
@ -102,7 +102,7 @@ RimSummaryCalculation* RimSummaryCalculationCollection::addCalculationCopy( cons
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimSummaryCalculationCollection::deleteCalculation( RimSummaryCalculation* calculation )
|
void RimSummaryCalculationCollection::deleteCalculation( RimSummaryCalculation* calculation )
|
||||||
{
|
{
|
||||||
m_calcuations.removeChildObject( calculation );
|
m_calculations.removeChildObject( calculation );
|
||||||
|
|
||||||
rebuildCaseMetaData();
|
rebuildCaseMetaData();
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ void RimSummaryCalculationCollection::deleteCalculation( RimSummaryCalculation*
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<RimSummaryCalculation*> RimSummaryCalculationCollection::calculations() const
|
std::vector<RimSummaryCalculation*> RimSummaryCalculationCollection::calculations() const
|
||||||
{
|
{
|
||||||
return m_calcuations.childObjects();
|
return m_calculations.childObjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -122,7 +122,7 @@ std::vector<RimSummaryCalculation*> RimSummaryCalculationCollection::calculation
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimSummaryCalculation* RimSummaryCalculationCollection::findCalculationById( int id ) const
|
RimSummaryCalculation* RimSummaryCalculationCollection::findCalculationById( int id ) const
|
||||||
{
|
{
|
||||||
for ( RimSummaryCalculation* calc : m_calcuations )
|
for ( RimSummaryCalculation* calc : m_calculations )
|
||||||
{
|
{
|
||||||
if ( calc->id() == id )
|
if ( calc->id() == id )
|
||||||
{
|
{
|
||||||
@ -146,7 +146,7 @@ RimSummaryCase* RimSummaryCalculationCollection::calculationSummaryCase()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimSummaryCalculationCollection::deleteAllContainedObjects()
|
void RimSummaryCalculationCollection::deleteAllContainedObjects()
|
||||||
{
|
{
|
||||||
m_calcuations.deleteAllChildObjects();
|
m_calculations.deleteAllChildObjects();
|
||||||
|
|
||||||
rebuildCaseMetaData();
|
rebuildCaseMetaData();
|
||||||
}
|
}
|
||||||
@ -156,7 +156,7 @@ void RimSummaryCalculationCollection::deleteAllContainedObjects()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimSummaryCalculationCollection::rebuildCaseMetaData()
|
void RimSummaryCalculationCollection::rebuildCaseMetaData()
|
||||||
{
|
{
|
||||||
for ( RimSummaryCalculation* calculation : m_calcuations )
|
for ( RimSummaryCalculation* calculation : m_calculations )
|
||||||
{
|
{
|
||||||
if ( calculation->id() == -1 )
|
if ( calculation->id() == -1 )
|
||||||
{
|
{
|
||||||
|
@ -52,6 +52,6 @@ private:
|
|||||||
void initAfterRead() override;
|
void initAfterRead() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmChildArrayField<RimSummaryCalculation*> m_calcuations;
|
caf::PdmChildArrayField<RimSummaryCalculation*> m_calculations;
|
||||||
caf::PdmChildField<RimCalculatedSummaryCase*> m_calcuationSummaryCase;
|
caf::PdmChildField<RimCalculatedSummaryCase*> m_calcuationSummaryCase;
|
||||||
};
|
};
|
||||||
|
@ -1361,7 +1361,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu
|
|||||||
// Add one more result to result container
|
// Add one more result to result container
|
||||||
size_t timeStepCount = this->infoForEachResultIndex()[scalarResultIndex].timeStepInfos().size();
|
size_t timeStepCount = this->infoForEachResultIndex()[scalarResultIndex].timeStepInfos().size();
|
||||||
|
|
||||||
bool resultLoadingSucess = true;
|
bool resultLoadingSuccess = true;
|
||||||
|
|
||||||
size_t tempGridCellCount = m_ownerMainGrid->totalTemporaryGridCellCount();
|
size_t tempGridCellCount = m_ownerMainGrid->totalTemporaryGridCellCount();
|
||||||
|
|
||||||
@ -1375,7 +1375,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu
|
|||||||
std::vector<double>& values = m_cellScalarResults[scalarResultIndex][i];
|
std::vector<double>& values = m_cellScalarResults[scalarResultIndex][i];
|
||||||
if ( !m_readerInterface->dynamicResult( resultName, m_porosityModel, i, &values ) )
|
if ( !m_readerInterface->dynamicResult( resultName, m_porosityModel, i, &values ) )
|
||||||
{
|
{
|
||||||
resultLoadingSucess = false;
|
resultLoadingSuccess = false;
|
||||||
}
|
}
|
||||||
else if ( tempGridCellCount > 0 )
|
else if ( tempGridCellCount > 0 )
|
||||||
{
|
{
|
||||||
@ -1395,7 +1395,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu
|
|||||||
std::vector<double>& values = m_cellScalarResults[scalarResultIndex][0];
|
std::vector<double>& values = m_cellScalarResults[scalarResultIndex][0];
|
||||||
if ( !m_readerInterface->staticResult( resultName, m_porosityModel, &values ) )
|
if ( !m_readerInterface->staticResult( resultName, m_porosityModel, &values ) )
|
||||||
{
|
{
|
||||||
resultLoadingSucess = false;
|
resultLoadingSuccess = false;
|
||||||
}
|
}
|
||||||
else if ( tempGridCellCount > 0 )
|
else if ( tempGridCellCount > 0 )
|
||||||
{
|
{
|
||||||
@ -1408,7 +1408,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !resultLoadingSucess )
|
if ( !resultLoadingSuccess )
|
||||||
{
|
{
|
||||||
// Remove last scalar result because loading of result failed
|
// Remove last scalar result because loading of result failed
|
||||||
m_cellScalarResults[scalarResultIndex].clear();
|
m_cellScalarResults[scalarResultIndex].clear();
|
||||||
@ -1549,7 +1549,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig
|
|||||||
{
|
{
|
||||||
size_t timeStepCount = this->infoForEachResultIndex()[scalarResultIndex].timeStepInfos().size();
|
size_t timeStepCount = this->infoForEachResultIndex()[scalarResultIndex].timeStepInfos().size();
|
||||||
|
|
||||||
bool resultLoadingSucess = true;
|
bool resultLoadingSuccess = true;
|
||||||
|
|
||||||
if ( type == RiaDefines::ResultCatType::DYNAMIC_NATIVE && timeStepCount > 0 )
|
if ( type == RiaDefines::ResultCatType::DYNAMIC_NATIVE && timeStepCount > 0 )
|
||||||
{
|
{
|
||||||
@ -1560,7 +1560,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig
|
|||||||
{
|
{
|
||||||
if ( !m_readerInterface->dynamicResult( resultName, m_porosityModel, timeStepIndex, &values ) )
|
if ( !m_readerInterface->dynamicResult( resultName, m_porosityModel, timeStepIndex, &values ) )
|
||||||
{
|
{
|
||||||
resultLoadingSucess = false;
|
resultLoadingSuccess = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1571,11 +1571,11 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig
|
|||||||
std::vector<double>& values = m_cellScalarResults[scalarResultIndex][0];
|
std::vector<double>& values = m_cellScalarResults[scalarResultIndex][0];
|
||||||
if ( !m_readerInterface->staticResult( resultName, m_porosityModel, &values ) )
|
if ( !m_readerInterface->staticResult( resultName, m_porosityModel, &values ) )
|
||||||
{
|
{
|
||||||
resultLoadingSucess = false;
|
resultLoadingSuccess = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !resultLoadingSucess )
|
if ( !resultLoadingSuccess )
|
||||||
{
|
{
|
||||||
// Error logging
|
// Error logging
|
||||||
CVF_ASSERT( false );
|
CVF_ASSERT( false );
|
||||||
@ -2199,7 +2199,7 @@ void RigCaseCellResultsData::computeRiTransComponent( const QString& riTransComp
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
faceAreaVec = nativeCell.faceNormalWithAreaLenght( faceId );
|
faceAreaVec = nativeCell.faceNormalWithAreaLength( faceId );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !isFaceNormalsOutwards ) faceAreaVec = -faceAreaVec;
|
if ( !isFaceNormalsOutwards ) faceAreaVec = -faceAreaVec;
|
||||||
@ -2647,7 +2647,7 @@ void RigCaseCellResultsData::computeRiTRANSbyAreaComponent( const QString& riTra
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
faceAreaVec = nativeCell.faceNormalWithAreaLenght( faceId );
|
faceAreaVec = nativeCell.faceNormalWithAreaLength( faceId );
|
||||||
}
|
}
|
||||||
|
|
||||||
double areaOfOverlap = faceAreaVec.length();
|
double areaOfOverlap = faceAreaVec.length();
|
||||||
@ -3112,7 +3112,7 @@ void RigCaseCellResultsData::computeAllanResults( RigCaseCellResultsData* cellRe
|
|||||||
auto fnBinAllanResAddr = RigEclipseResultAddress( RiaDefines::ResultCatType::ALLAN_DIAGRAMS,
|
auto fnBinAllanResAddr = RigEclipseResultAddress( RiaDefines::ResultCatType::ALLAN_DIAGRAMS,
|
||||||
RiaDefines::formationBinaryAllanResultName() );
|
RiaDefines::formationBinaryAllanResultName() );
|
||||||
|
|
||||||
// Create and retreive nnc result arrays
|
// Create and retrieve nnc result arrays
|
||||||
|
|
||||||
std::vector<double>& fnAllanNncResults =
|
std::vector<double>& fnAllanNncResults =
|
||||||
mainGrid->nncData()->makeStaticConnectionScalarResult( RiaDefines::formationAllanResultName() );
|
mainGrid->nncData()->makeStaticConnectionScalarResult( RiaDefines::formationAllanResultName() );
|
||||||
|
@ -405,7 +405,7 @@ void RigCaseToCaseCellMapperTools::rotateCellTopologicallyToMatchBaseCell( const
|
|||||||
flipQuadWinding( femDeepestQuad );
|
flipQuadWinding( femDeepestQuad );
|
||||||
}
|
}
|
||||||
|
|
||||||
// We now need to rotate the fem quads to be alligned with the ecl quads
|
// We now need to rotate the fem quads to be aligned with the ecl quads
|
||||||
// Since the start point of the quad always is aligned with the opposite face-quad start
|
// Since the start point of the quad always is aligned with the opposite face-quad start
|
||||||
// we can find the rotation for the top, and apply it to both top and bottom
|
// we can find the rotation for the top, and apply it to both top and bottom
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ void RigCaseToCaseRangeFilterMapper::convertRangeFilter( const RimCellRangeFilte
|
|||||||
src.StartJ = srcFilter->startIndexJ() - 1;
|
src.StartJ = srcFilter->startIndexJ() - 1;
|
||||||
src.StartK = srcFilter->startIndexK() - 1;
|
src.StartK = srcFilter->startIndexK() - 1;
|
||||||
|
|
||||||
// Needs to subtract one more to have the end idx beeing
|
// Needs to subtract one more to have the end idx being
|
||||||
// the last cell in the selection, not the first outside
|
// the last cell in the selection, not the first outside
|
||||||
src.EndI = src.StartI + srcFilter->cellCountI() - 1;
|
src.EndI = src.StartI + srcFilter->cellCountI() - 1;
|
||||||
src.EndJ = src.StartJ + srcFilter->cellCountJ() - 1;
|
src.EndJ = src.StartJ + srcFilter->cellCountJ() - 1;
|
||||||
|
@ -207,19 +207,19 @@ bool RigCell::isLongPyramidCell( double maxHeightFactor, double nodeNearToleranc
|
|||||||
|
|
||||||
// Check the ratio of the length of opposite edges.
|
// Check the ratio of the length of opposite edges.
|
||||||
// both ratios have to be above threshold to detect a pyramid-ish cell
|
// both ratios have to be above threshold to detect a pyramid-ish cell
|
||||||
// Only test this if we have all nonzero edge lenghts.
|
// Only test this if we have all nonzero edge lengths.
|
||||||
else if ( zeroLengthEdgeCount == 0 ) // If the four first faces are ok, the two last must be as well
|
else if ( zeroLengthEdgeCount == 0 ) // If the four first faces are ok, the two last must be as well
|
||||||
{
|
{
|
||||||
double e0SquareLenght = ( c1 - c0 ).lengthSquared();
|
double e0SquareLength = ( c1 - c0 ).lengthSquared();
|
||||||
double e2SquareLenght = ( c3 - c2 ).lengthSquared();
|
double e2SquareLength = ( c3 - c2 ).lengthSquared();
|
||||||
if ( e0SquareLenght / e2SquareLenght > squaredMaxHeightFactor ||
|
if ( e0SquareLength / e2SquareLength > squaredMaxHeightFactor ||
|
||||||
e2SquareLenght / e0SquareLenght > squaredMaxHeightFactor )
|
e2SquareLength / e0SquareLength > squaredMaxHeightFactor )
|
||||||
{
|
{
|
||||||
double e1SquareLenght = ( c2 - c1 ).lengthSquared();
|
double e1SquareLength = ( c2 - c1 ).lengthSquared();
|
||||||
double e3SquareLenght = ( c0 - c3 ).lengthSquared();
|
double e3SquareLength = ( c0 - c3 ).lengthSquared();
|
||||||
|
|
||||||
if ( e1SquareLenght / e3SquareLenght > squaredMaxHeightFactor ||
|
if ( e1SquareLength / e3SquareLength > squaredMaxHeightFactor ||
|
||||||
e3SquareLenght / e1SquareLenght > squaredMaxHeightFactor )
|
e3SquareLength / e1SquareLength > squaredMaxHeightFactor )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -316,7 +316,7 @@ cvf::Vec3d RigCell::faceCenter( cvf::StructGridInterface::FaceType face ) const
|
|||||||
/// the corresponding plane.
|
/// the corresponding plane.
|
||||||
/// See http://geomalgorithms.com/a01-_area.html
|
/// See http://geomalgorithms.com/a01-_area.html
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
cvf::Vec3d RigCell::faceNormalWithAreaLenght( cvf::StructGridInterface::FaceType face ) const
|
cvf::Vec3d RigCell::faceNormalWithAreaLength( cvf::StructGridInterface::FaceType face ) const
|
||||||
{
|
{
|
||||||
cvf::ubyte faceVertexIndices[4];
|
cvf::ubyte faceVertexIndices[4];
|
||||||
cvf::StructGridInterface::cellFaceVertexIndices( face, faceVertexIndices );
|
cvf::StructGridInterface::cellFaceVertexIndices( face, faceVertexIndices );
|
||||||
|
@ -70,7 +70,7 @@ public:
|
|||||||
|
|
||||||
cvf::Vec3d center() const;
|
cvf::Vec3d center() const;
|
||||||
cvf::Vec3d faceCenter( cvf::StructGridInterface::FaceType face ) const;
|
cvf::Vec3d faceCenter( cvf::StructGridInterface::FaceType face ) const;
|
||||||
cvf::Vec3d faceNormalWithAreaLenght( cvf::StructGridInterface::FaceType face ) const;
|
cvf::Vec3d faceNormalWithAreaLength( cvf::StructGridInterface::FaceType face ) const;
|
||||||
double volume() const;
|
double volume() const;
|
||||||
|
|
||||||
int firstIntersectionPoint( const cvf::Ray& ray, cvf::Vec3d* intersectionPoint ) const;
|
int firstIntersectionPoint( const cvf::Ray& ray, cvf::Vec3d* intersectionPoint ) const;
|
||||||
|
@ -107,10 +107,10 @@ void RigFisbonesGeometry::computeLateralPositionAndOrientation( size_t subI
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
double intialRotationAngle = m_fishbonesSub->rotationAngle( subIndex );
|
double initialRotationAngle = m_fishbonesSub->rotationAngle( subIndex );
|
||||||
double lateralOffsetDegrees = 360.0 / m_fishbonesSub->lateralLengths().size();
|
double lateralOffsetDegrees = 360.0 / m_fishbonesSub->lateralLengths().size();
|
||||||
|
|
||||||
double lateralOffsetRadians = cvf::Math::toRadians( intialRotationAngle + lateralOffsetDegrees * lateralIndex );
|
double lateralOffsetRadians = cvf::Math::toRadians( initialRotationAngle + lateralOffsetDegrees * lateralIndex );
|
||||||
|
|
||||||
cvf::Mat4d lateralOffsetMatrix = cvf::Mat4d::fromRotation( alongWellPath, lateralOffsetRadians );
|
cvf::Mat4d lateralOffsetMatrix = cvf::Mat4d::fromRotation( alongWellPath, lateralOffsetRadians );
|
||||||
|
|
||||||
|
@ -1123,7 +1123,7 @@ cvf::Vec3f RigGeoMechWellLogExtractor::cellCentroid( size_t intersectionIdx ) co
|
|||||||
|
|
||||||
size_t elmIdx = m_intersectedCellsGlobIdx[intersectionIdx];
|
size_t elmIdx = m_intersectedCellsGlobIdx[intersectionIdx];
|
||||||
RigElementType elmType = femPart->elementType( elmIdx );
|
RigElementType elmType = femPart->elementType( elmIdx );
|
||||||
int elementNodeCount = RigFemTypes::elmentNodeCount( elmType );
|
int elementNodeCount = RigFemTypes::elementNodeCount( elmType );
|
||||||
|
|
||||||
const int* elmNodeIndices = femPart->connectivities( elmIdx );
|
const int* elmNodeIndices = femPart->connectivities( elmIdx );
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ void RigGridBase::initSubCellsMainGridCellIndex()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
/// For main grid, this will work with reservoirCellIndices retreiving the correct lgr cells as well.
|
/// For main grid, this will work with reservoirCellIndices retrieving the correct lgr cells as well.
|
||||||
/// the cell() call retreives correct cell, because main grid has offset of 0, and we access the global
|
/// the cell() call retreives correct cell, because main grid has offset of 0, and we access the global
|
||||||
/// cell array in main grid.
|
/// cell array in main grid.
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -643,7 +643,7 @@ bool RigMainGrid::isFaceNormalsOutwards() const
|
|||||||
{
|
{
|
||||||
cvf::Vec3d cellCenter = m_cells[gcIdx].center();
|
cvf::Vec3d cellCenter = m_cells[gcIdx].center();
|
||||||
cvf::Vec3d faceCenter = m_cells[gcIdx].faceCenter( StructGridInterface::POS_I );
|
cvf::Vec3d faceCenter = m_cells[gcIdx].faceCenter( StructGridInterface::POS_I );
|
||||||
cvf::Vec3d faceNormal = m_cells[gcIdx].faceNormalWithAreaLenght( StructGridInterface::POS_I );
|
cvf::Vec3d faceNormal = m_cells[gcIdx].faceNormalWithAreaLength( StructGridInterface::POS_I );
|
||||||
|
|
||||||
double typicalIJCellSize = characteristicIJCellSize();
|
double typicalIJCellSize = characteristicIJCellSize();
|
||||||
double dummy, dummy2, typicalKSize;
|
double dummy, dummy2, typicalKSize;
|
||||||
|
@ -223,7 +223,7 @@ void RigSimWellData::computeStaticWellCellPath() const
|
|||||||
// Now find all result cells in ranges between pairs in the static path
|
// Now find all result cells in ranges between pairs in the static path
|
||||||
// If the result has items that "compete" with those in the static path,
|
// If the result has items that "compete" with those in the static path,
|
||||||
// those items are inserted after the ones in the static path. This
|
// those items are inserted after the ones in the static path. This
|
||||||
// is not neccesarily correct. They could be in front, and also merged in
|
// is not necessarily correct. They could be in front, and also merged in
|
||||||
// strange ways. A geometric test could make this more robust, but we will
|
// strange ways. A geometric test could make this more robust, but we will
|
||||||
// not solve before we see that it actually ends up as a problem
|
// not solve before we see that it actually ends up as a problem
|
||||||
|
|
||||||
|
@ -114,15 +114,15 @@ void RigWellLogExtractor::insertIntersectionsInMap( const std::vector<HexInterse
|
|||||||
{
|
{
|
||||||
for ( size_t intIdx = 0; intIdx < intersections.size(); ++intIdx )
|
for ( size_t intIdx = 0; intIdx < intersections.size(); ++intIdx )
|
||||||
{
|
{
|
||||||
double lenghtAlongLineSegment1 = ( intersections[intIdx].m_intersectionPoint - p1 ).length();
|
double lengthAlongLineSegment1 = ( intersections[intIdx].m_intersectionPoint - p1 ).length();
|
||||||
double lenghtAlongLineSegment2 = ( p2 - intersections[intIdx].m_intersectionPoint ).length();
|
double lengthAlongLineSegment2 = ( p2 - intersections[intIdx].m_intersectionPoint ).length();
|
||||||
double measuredDepthDiff = md2 - md1;
|
double measuredDepthDiff = md2 - md1;
|
||||||
double lineLength = lenghtAlongLineSegment1 + lenghtAlongLineSegment2;
|
double lineLength = lengthAlongLineSegment1 + lengthAlongLineSegment2;
|
||||||
double measuredDepthOfPoint = 0.0;
|
double measuredDepthOfPoint = 0.0;
|
||||||
|
|
||||||
if ( lineLength > 0.00001 )
|
if ( lineLength > 0.00001 )
|
||||||
{
|
{
|
||||||
measuredDepthOfPoint = md1 + measuredDepthDiff * lenghtAlongLineSegment1 / ( lineLength );
|
measuredDepthOfPoint = md1 + measuredDepthDiff * lengthAlongLineSegment1 / ( lineLength );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -198,7 +198,7 @@ int ecl_file_get_num_kw( const ecl_file_type * ecl_fil );
|
|||||||
// Check if the keyword exists in the ecl_file structure
|
// Check if the keyword exists in the ecl_file structure
|
||||||
bool ecl_file_has_kw( const ecl_file_type * ecl_file , const char * kw);
|
bool ecl_file_has_kw( const ecl_file_type * ecl_file , const char * kw);
|
||||||
|
|
||||||
// Access the list of keyword names occuring in the ecl_file structure
|
// Access the list of keyword names occurring in the ecl_file structure
|
||||||
int ecl_file_get_num_distinct_kw( const ecl_file_type * ecl_file);
|
int ecl_file_get_num_distinct_kw( const ecl_file_type * ecl_file);
|
||||||
const char * ecl_file_iget_distinct_kw ( const ecl_file_type * ecl_file , int index);
|
const char * ecl_file_iget_distinct_kw ( const ecl_file_type * ecl_file , int index);
|
||||||
|
|
||||||
@ -206,10 +206,10 @@ const char * ecl_file_iget_distinct_kw ( const ecl_file_type * ecl_file , i
|
|||||||
const char * ecl_file_get_src_file( const ecl_file_type * ecl_file );
|
const char * ecl_file_get_src_file( const ecl_file_type * ecl_file );
|
||||||
|
|
||||||
// Get the keyword at "globKWIndex" and return the position it has among the other keywords with same name
|
// Get the keyword at "globKWIndex" and return the position it has among the other keywords with same name
|
||||||
int ecl_file_iget_occurence( const ecl_file_type * ecl_file , int globalKWindex);
|
int ecl_file_iget_occurrence( const ecl_file_type * ecl_file , int globalKWindex);
|
||||||
|
|
||||||
|
|
||||||
time_t ecl_file_iget_restart_sim_date( const ecl_file_type * restart_file , int occurence );
|
time_t ecl_file_iget_restart_sim_date( const ecl_file_type * restart_file , int occurrence );
|
||||||
ecl_version_enum ecl_file_get_ecl_version( const ecl_file_type * file );
|
ecl_version_enum ecl_file_get_ecl_version( const ecl_file_type * file );
|
||||||
|
|
||||||
int ecl_file_get_restart_index(const ecl_file_type * restart_file , time_t sim_time);
|
int ecl_file_get_restart_index(const ecl_file_type * restart_file , time_t sim_time);
|
||||||
@ -230,8 +230,8 @@ ecl_file_type * ecl_file_fread_alloc_summary_section(fortio_type * fortio);
|
|||||||
ecl_file_type * ecl_file_fread_alloc_RFT_section(fortio_type * fortio);
|
ecl_file_type * ecl_file_fread_alloc_RFT_section(fortio_type * fortio);
|
||||||
|
|
||||||
// Manage ecl_kw instances in the ecl_file structure "manually"
|
// Manage ecl_kw instances in the ecl_file structure "manually"
|
||||||
void ecl_file_delete_kw( ecl_file_type * ecl_file , const char * name , int occurence );
|
void ecl_file_delete_kw( ecl_file_type * ecl_file , const char * name , int occurrence );
|
||||||
void ecl_file_insert_kw( ecl_file_type * ecl_file , ecl_kw_type * ecl_kw , bool after , const char * neighbour_name , int neighbour_occurence );
|
void ecl_file_insert_kw( ecl_file_type * ecl_file , ecl_kw_type * ecl_kw , bool after , const char * neighbour_name , int neighbour_occurrence );
|
||||||
void ecl_file_replace_kw( ecl_file_type * ecl_file , ecl_kw_type * old_kw , const ecl_kw_type * new_kw , bool insert_copy);
|
void ecl_file_replace_kw( ecl_file_type * ecl_file , ecl_kw_type * old_kw , const ecl_kw_type * new_kw , bool insert_copy);
|
||||||
|
|
||||||
bool ecl_file_has_kw_ptr(const ecl_file_type * ecl_file , const ecl_kw_type * ecl_kw);
|
bool ecl_file_has_kw_ptr(const ecl_file_type * ecl_file , const ecl_kw_type * ecl_kw);
|
||||||
|
@ -133,7 +133,7 @@ public:
|
|||||||
{
|
{
|
||||||
server->showErrorMessage(
|
server->showErrorMessage(
|
||||||
RiaSocketServer::tr( "ResInsight SocketServer: riGetActiveCellProperty : \n" ) +
|
RiaSocketServer::tr( "ResInsight SocketServer: riGetActiveCellProperty : \n" ) +
|
||||||
RiaSocketServer::tr( "An error occured while interpreting the requested timesteps." ) );
|
RiaSocketServer::tr( "An error occurred while interpreting the requested timesteps." ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,7 +313,7 @@ public:
|
|||||||
{
|
{
|
||||||
server->showErrorMessage(
|
server->showErrorMessage(
|
||||||
RiaSocketServer::tr( "ResInsight SocketServer: riGetGridProperty : \n" ) +
|
RiaSocketServer::tr( "ResInsight SocketServer: riGetGridProperty : \n" ) +
|
||||||
RiaSocketServer::tr( "An error occured while interpreting the requested timesteps." ) );
|
RiaSocketServer::tr( "An error occurred while interpreting the requested timesteps." ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -505,7 +505,7 @@ public:
|
|||||||
{
|
{
|
||||||
server->showErrorMessage(
|
server->showErrorMessage(
|
||||||
RiaSocketServer::tr( "ResInsight SocketServer: riGetActiveCellProperty : \n" ) +
|
RiaSocketServer::tr( "ResInsight SocketServer: riGetActiveCellProperty : \n" ) +
|
||||||
RiaSocketServer::tr( "An error occured while interpreting the requested timesteps." ) );
|
RiaSocketServer::tr( "An error occurred while interpreting the requested timesteps." ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -580,7 +580,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure the size of the retreiving container is correct.
|
// Make sure the size of the retrieving container is correct.
|
||||||
// If it is, this is noops
|
// If it is, this is noops
|
||||||
{
|
{
|
||||||
size_t maxRequestedTimeStepIdx = cvf::UNDEFINED_SIZE_T;
|
size_t maxRequestedTimeStepIdx = cvf::UNDEFINED_SIZE_T;
|
||||||
@ -903,7 +903,7 @@ public:
|
|||||||
{
|
{
|
||||||
server->showErrorMessage(
|
server->showErrorMessage(
|
||||||
RiaSocketServer::tr( "ResInsight SocketServer: riGetActiveCellProperty : \n" ) +
|
RiaSocketServer::tr( "ResInsight SocketServer: riGetActiveCellProperty : \n" ) +
|
||||||
RiaSocketServer::tr( "An error occured while interpreting the requested timesteps." ) );
|
RiaSocketServer::tr( "An error occurred while interpreting the requested timesteps." ) );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ public:
|
|||||||
{
|
{
|
||||||
server->showErrorMessage(
|
server->showErrorMessage(
|
||||||
RiaSocketServer::tr( "ResInsight SocketServer: riGetGridProperty : \n" ) +
|
RiaSocketServer::tr( "ResInsight SocketServer: riGetGridProperty : \n" ) +
|
||||||
RiaSocketServer::tr( "An error occured while interpreting the requested timesteps." ) );
|
RiaSocketServer::tr( "An error occurred while interpreting the requested timesteps." ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ TEST( RicfCommands, ErrorMessages )
|
|||||||
// Errors should be:
|
// Errors should be:
|
||||||
// Line 1 : TesCommand1 does not exist
|
// Line 1 : TesCommand1 does not exist
|
||||||
// Line 2 : Unreadable value for argument IntArgument
|
// Line 2 : Unreadable value for argument IntArgument
|
||||||
// Line 3 : Can't find = after argument named TextA (space withing argument name)
|
// Line 3 : Can't find = after argument named TextA (space within argument name)
|
||||||
// Line 4 : Can't find = after argument named DoubleArgument
|
// Line 4 : Can't find = after argument named DoubleArgument
|
||||||
// Line 5 : Missing quotes around TextArgument value
|
// Line 5 : Missing quotes around TextArgument value
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#Units: meters
|
#Units: meters
|
||||||
#End:
|
#End:
|
||||||
#Information from grid
|
#Information from grid
|
||||||
#Grid_size: Not_avaiable
|
#Grid_size: Not_available
|
||||||
#Grid_space: Not_available
|
#Grid_space: Not_available
|
||||||
#Z_field: z
|
#Z_field: z
|
||||||
#Vertical_faults: Not_available
|
#Vertical_faults: Not_available
|
||||||
|
@ -283,14 +283,14 @@ void RiuFemResultTextBuilder::appendTextFromResultColors( RigGeoMechCaseData*
|
|||||||
{
|
{
|
||||||
RigFemPart* femPart = geomData->femParts()->part( gridIndex );
|
RigFemPart* femPart = geomData->femParts()->part( gridIndex );
|
||||||
RigElementType elmType = femPart->elementType( cellIndex );
|
RigElementType elmType = femPart->elementType( cellIndex );
|
||||||
const int* elmentConn = femPart->connectivities( cellIndex );
|
const int* elementConn = femPart->connectivities( cellIndex );
|
||||||
int elmNodeCount = RigFemTypes::elmentNodeCount( elmType );
|
int elmNodeCount = RigFemTypes::elementNodeCount( elmType );
|
||||||
const int* lElmNodeToIpMap = RigFemTypes::localElmNodeToIntegrationPointMapping( elmType );
|
const int* lElmNodeToIpMap = RigFemTypes::localElmNodeToIntegrationPointMapping( elmType );
|
||||||
|
|
||||||
for ( int lNodeIdx = 0; lNodeIdx < elmNodeCount; ++lNodeIdx )
|
for ( int lNodeIdx = 0; lNodeIdx < elmNodeCount; ++lNodeIdx )
|
||||||
{
|
{
|
||||||
float scalarValue = std::numeric_limits<float>::infinity();
|
float scalarValue = std::numeric_limits<float>::infinity();
|
||||||
int nodeIdx = elmentConn[lNodeIdx];
|
int nodeIdx = elementConn[lNodeIdx];
|
||||||
if ( resultDefinition->resultPositionType() == RIG_NODAL ||
|
if ( resultDefinition->resultPositionType() == RIG_NODAL ||
|
||||||
( resultDefinition->resultPositionType() == RIG_DIFFERENTIALS &&
|
( resultDefinition->resultPositionType() == RIG_DIFFERENTIALS &&
|
||||||
resultDefinition->resultFieldName() == "POR-Bar" ) )
|
resultDefinition->resultFieldName() == "POR-Bar" ) )
|
||||||
|
@ -474,8 +474,8 @@ void RiuMultiPlotBook::createPages()
|
|||||||
|
|
||||||
for ( int visibleIndex = 0; visibleIndex < plotWidgets.size(); ++visibleIndex )
|
for ( int visibleIndex = 0; visibleIndex < plotWidgets.size(); ++visibleIndex )
|
||||||
{
|
{
|
||||||
int expextedColSpan = static_cast<int>( plotWidgets[visibleIndex]->colSpan() );
|
int expectedColSpan = static_cast<int>( plotWidgets[visibleIndex]->colSpan() );
|
||||||
int colSpan = std::min( expextedColSpan, rowAndColumnCount.second );
|
int colSpan = std::min( expectedColSpan, rowAndColumnCount.second );
|
||||||
|
|
||||||
std::tie( row, column ) = page->findAvailableRowAndColumn( row, column, colSpan, rowAndColumnCount.second );
|
std::tie( row, column ) = page->findAvailableRowAndColumn( row, column, colSpan, rowAndColumnCount.second );
|
||||||
if ( row >= rowsPerPage )
|
if ( row >= rowsPerPage )
|
||||||
|
Loading…
Reference in New Issue
Block a user