mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
GeoMech Intersection updates: support multiple parts (#8160)
* Rearrange intersection classes, split single file into one-per-class * Support multi-part geomech case intersections
This commit is contained in:
@@ -1043,6 +1043,54 @@ const std::vector<float>&
|
||||
return scalarResults->frameData( frameIndex );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigFemPartResultsCollection::globalResultValues( const RigFemResultAddress& resVarAddr,
|
||||
int timeStepIndex,
|
||||
std::vector<float>& resultValues )
|
||||
{
|
||||
CVF_ASSERT( resVarAddr.isValid() );
|
||||
|
||||
for ( int i = 0; i < partCount(); i++ )
|
||||
{
|
||||
const std::vector<float>& partResults = this->resultValues( resVarAddr, i, (int)timeStepIndex );
|
||||
if ( partResults.empty() )
|
||||
{
|
||||
size_t expectedSize = 0;
|
||||
|
||||
switch ( resVarAddr.resultPosType )
|
||||
{
|
||||
case RIG_NODAL:
|
||||
expectedSize = m_femParts->part( i )->nodes().nodeIds.size();
|
||||
break;
|
||||
|
||||
case RIG_ELEMENT_NODAL:
|
||||
case RIG_INTEGRATION_POINT:
|
||||
expectedSize = m_femParts->part( i )->elementNodeResultCount();
|
||||
break;
|
||||
|
||||
case RIG_ELEMENT_NODAL_FACE:
|
||||
expectedSize = m_femParts->part( i )->elementCount() * 6;
|
||||
break;
|
||||
|
||||
case RIG_ELEMENT:
|
||||
expectedSize = m_femParts->part( i )->elementCount();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
resultValues.resize( resultValues.size() + expectedSize, NAN );
|
||||
}
|
||||
else
|
||||
{
|
||||
resultValues.insert( resultValues.end(), partResults.begin(), partResults.end() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user