mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 08:25:03 -05:00
Performance: Cellcount functions are used in many loops, and must be as fast as possible
cellCountIJK was computed based on the value of griPointDimensions. These converstion turned up during profiling. Change implementation to have cellcount as a member variable instead of being computed every time.
This commit is contained in:
1 parent
663c3f31b9
commit
833a0e8584
8 files changed
+92
-97
No files matched your search
@@ -271,7 +271,7 @@ QList<caf::PdmOptionItemInfo> RimGeoMechResultDefinition::calculateValueOptions(
|
||||
{
|
||||
if ( m_geomCase->geoMechData() )
|
||||
{
|
||||
size_t kCount = m_geomCase->geoMechData()->femParts()->part( 0 )->getOrCreateStructGrid()->gridPointCountK() - 1;
|
||||
size_t kCount = m_geomCase->geoMechData()->femParts()->part( 0 )->getOrCreateStructGrid()->cellCountK();
|
||||
for ( size_t layerIdx = 0; layerIdx < kCount; ++layerIdx )
|
||||
{
|
||||
options.push_back( caf::PdmOptionItemInfo( QString::number( layerIdx + 1 ), (int)layerIdx ) );
|
||||
|
||||
Reference in new issue
Block a user