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:
jonjenssen
2021-10-15 16:57:18 +02:00
committed by GitHub
parent afadaf27d5
commit b169900c41
44 changed files with 741 additions and 397 deletions

View File

@@ -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() );
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------