mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5318 Surface Intersection geometry with results
This commit is contained in:
@@ -190,21 +190,27 @@ void RivIntersectionResultsColoringTools::calculateNodeOrElementNodeBasedGeoMech
|
||||
#pragma omp parallel for schedule( dynamic )
|
||||
for ( int triangleVxIdx = 0; triangleVxIdx < vxCount; ++triangleVxIdx )
|
||||
{
|
||||
float resValue = 0;
|
||||
int weightCount = vertexWeights[triangleVxIdx].size();
|
||||
for ( int wIdx = 0; wIdx < weightCount; ++wIdx )
|
||||
{
|
||||
size_t resIdx;
|
||||
if ( isElementNodalResult )
|
||||
{
|
||||
resIdx = vertexWeights[triangleVxIdx].vxId( wIdx );
|
||||
}
|
||||
else
|
||||
{
|
||||
resIdx = femPart->nodeIdxFromElementNodeResultIdx( vertexWeights[triangleVxIdx].vxId( wIdx ) );
|
||||
}
|
||||
float resValue = HUGE_VAL;
|
||||
|
||||
resValue += resultValues[resIdx] * vertexWeights[triangleVxIdx].weight( wIdx );
|
||||
int weightCount = vertexWeights[triangleVxIdx].size();
|
||||
if ( weightCount )
|
||||
{
|
||||
resValue = 0;
|
||||
|
||||
for ( int wIdx = 0; wIdx < weightCount; ++wIdx )
|
||||
{
|
||||
size_t resIdx;
|
||||
if ( isElementNodalResult )
|
||||
{
|
||||
resIdx = vertexWeights[triangleVxIdx].vxId( wIdx );
|
||||
}
|
||||
else
|
||||
{
|
||||
resIdx = femPart->nodeIdxFromElementNodeResultIdx( vertexWeights[triangleVxIdx].vxId( wIdx ) );
|
||||
}
|
||||
|
||||
resValue += resultValues[resIdx] * vertexWeights[triangleVxIdx].weight( wIdx );
|
||||
}
|
||||
}
|
||||
|
||||
if ( resValue == HUGE_VAL || resValue != resValue ) // a != a is true for NAN's
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
|
||||
Where the k's are normalized distances along the edge, from the edge start vertex .
|
||||
|
||||
This is the interpolation sceme:
|
||||
This is the interpolation scheme:
|
||||
|
||||
v = (1 - k )* v1 + k *v2;
|
||||
|
||||
@@ -205,6 +205,13 @@ public:
|
||||
m_weights[1] = ( (float)( normDistFromE1V1 ) );
|
||||
}
|
||||
|
||||
explicit RivIntersectionVertexWeights( const std::array<size_t, 8> vxIds, const std::array<double, 8> explicitWeights )
|
||||
: m_count( 8 )
|
||||
, m_vxIds( vxIds )
|
||||
{
|
||||
std::copy( explicitWeights.begin(), explicitWeights.end(), m_weights.begin() );
|
||||
}
|
||||
|
||||
int size() const
|
||||
{
|
||||
return m_count;
|
||||
|
||||
Reference in New Issue
Block a user