mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5469 Move POR and ST/SE differentials to a new category "Differentials".
This commit is contained in:
@@ -355,9 +355,6 @@ std::map<std::string, std::vector<std::string>>
|
||||
{
|
||||
fieldCompNames = m_readerInterface->scalarNodeFieldAndComponentNames();
|
||||
fieldCompNames["POR-Bar"];
|
||||
fieldCompNames["POR_GRADIENTS"].push_back( "X" );
|
||||
fieldCompNames["POR_GRADIENTS"].push_back( "Y" );
|
||||
fieldCompNames["POR_GRADIENTS"].push_back( "Z" );
|
||||
fieldCompNames[FIELD_NAME_COMPACTION];
|
||||
}
|
||||
else if ( resPos == RIG_ELEMENT_NODAL )
|
||||
@@ -381,11 +378,6 @@ std::map<std::string, std::vector<std::string>>
|
||||
fieldCompNames["SE"].push_back( "S3inc" );
|
||||
fieldCompNames["SE"].push_back( "S3azi" );
|
||||
|
||||
for ( auto& s : stressGradientComponentNames )
|
||||
{
|
||||
fieldCompNames["SE_GRADIENTS"].push_back( s );
|
||||
}
|
||||
|
||||
fieldCompNames["ST"].push_back( "STM" );
|
||||
fieldCompNames["ST"].push_back( "Q" );
|
||||
|
||||
@@ -401,11 +393,6 @@ std::map<std::string, std::vector<std::string>>
|
||||
fieldCompNames["ST"].push_back( "S3inc" );
|
||||
fieldCompNames["ST"].push_back( "S3azi" );
|
||||
|
||||
for ( auto& s : stressGradientComponentNames )
|
||||
{
|
||||
fieldCompNames["ST_GRADIENTS"].push_back( s );
|
||||
}
|
||||
|
||||
fieldCompNames["Gamma"].push_back( "Gamma1" );
|
||||
fieldCompNames["Gamma"].push_back( "Gamma2" );
|
||||
fieldCompNames["Gamma"].push_back( "Gamma3" );
|
||||
@@ -536,6 +523,23 @@ std::map<std::string, std::vector<std::string>>
|
||||
fieldCompNames[parameter.name().toStdString()];
|
||||
}
|
||||
}
|
||||
else if ( resPos == RIG_DIFFERENTIALS )
|
||||
{
|
||||
fieldCompNames["POR-Bar"];
|
||||
fieldCompNames["POR-Bar"].push_back( "X" );
|
||||
fieldCompNames["POR-Bar"].push_back( "Y" );
|
||||
fieldCompNames["POR-Bar"].push_back( "Z" );
|
||||
|
||||
for ( auto& s : stressGradientComponentNames )
|
||||
{
|
||||
fieldCompNames["SE"].push_back( s );
|
||||
}
|
||||
|
||||
for ( auto& s : stressGradientComponentNames )
|
||||
{
|
||||
fieldCompNames["ST"].push_back( s );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return fieldCompNames;
|
||||
@@ -991,23 +995,22 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateMeanStressSTM( i
|
||||
RigFemScalarResultFrames* RigFemPartResultsCollection::calculateStressGradients( int partIndex,
|
||||
const RigFemResultAddress& resVarAddr )
|
||||
{
|
||||
CVF_ASSERT( resVarAddr.fieldName == "ST_GRADIENTS" || resVarAddr.fieldName == "SE_GRADIENTS" );
|
||||
CVF_ASSERT( resVarAddr.fieldName == "ST" || resVarAddr.fieldName == "SE" );
|
||||
|
||||
caf::ProgressInfo frameCountProgress( this->frameCount() * 2, "" );
|
||||
frameCountProgress.setProgressDescription(
|
||||
"Calculating gradient: " + QString::fromStdString( resVarAddr.fieldName + ": " + resVarAddr.componentName ) );
|
||||
frameCountProgress.setNextProgressIncrement( this->frameCount() );
|
||||
|
||||
QString origFieldName = QString::fromStdString( resVarAddr.fieldName );
|
||||
// Strip away "_GRADIENTS" to underlying field data
|
||||
QString underlyingFieldName = origFieldName.left( origFieldName.lastIndexOf( QChar( '_' ) ) );
|
||||
QString origComponentName = QString::fromStdString( resVarAddr.componentName );
|
||||
QString componentName = origComponentName.left( origComponentName.lastIndexOf( QChar( '-' ) ) );
|
||||
QString origFieldName = QString::fromStdString( resVarAddr.fieldName );
|
||||
QString origComponentName = QString::fromStdString( resVarAddr.componentName );
|
||||
// Split out the direction of the component name: SE-X => SE
|
||||
QString componentName = origComponentName.left( origComponentName.lastIndexOf( QChar( '-' ) ) );
|
||||
|
||||
RigFemScalarResultFrames* inputResultFrames =
|
||||
this->findOrLoadScalarResult( partIndex,
|
||||
RigFemResultAddress( resVarAddr.resultPosType,
|
||||
underlyingFieldName.toStdString(),
|
||||
resVarAddr.fieldName,
|
||||
componentName.toStdString() ) );
|
||||
|
||||
RigFemScalarResultFrames* dataFramesX = m_femPartResults[partIndex]->createScalarResult(
|
||||
@@ -1085,7 +1088,7 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateStressGradients(
|
||||
RigFemScalarResultFrames* RigFemPartResultsCollection::calculateNodalGradients( int partIndex,
|
||||
const RigFemResultAddress& resVarAddr )
|
||||
{
|
||||
CVF_ASSERT( resVarAddr.fieldName == "POR_GRADIENTS" );
|
||||
CVF_ASSERT( resVarAddr.fieldName == "POR-Bar" );
|
||||
CVF_ASSERT( resVarAddr.componentName == "X" || resVarAddr.componentName == "Y" || resVarAddr.componentName == "Z" );
|
||||
|
||||
caf::ProgressInfo frameCountProgress( this->frameCount() * 5, "" );
|
||||
@@ -2381,7 +2384,7 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDerivedResult( i
|
||||
return calculateMeanStressSTM( partIndex, resVarAddr );
|
||||
}
|
||||
|
||||
if ( resVarAddr.fieldName == "ST_GRADIENTS" || resVarAddr.fieldName == "SE_GRADIENTS" )
|
||||
if ( resVarAddr.fieldName == "ST" || resVarAddr.fieldName == "SE" )
|
||||
{
|
||||
const std::vector<std::string> allowedComponentNames = getStressGradientComponentNames();
|
||||
|
||||
@@ -2407,17 +2410,20 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDerivedResult( i
|
||||
if ( resVarAddr.fieldName == "POR-Bar" )
|
||||
{
|
||||
if ( resVarAddr.resultPosType == RIG_NODAL )
|
||||
return calculateBarConvertedResult( partIndex, resVarAddr, "POR" );
|
||||
{
|
||||
if ( resVarAddr.componentName == "X" || resVarAddr.componentName == "Y" || resVarAddr.componentName == "Z" )
|
||||
{
|
||||
return calculateNodalGradients( partIndex, resVarAddr );
|
||||
}
|
||||
else
|
||||
{
|
||||
return calculateBarConvertedResult( partIndex, resVarAddr, "POR" );
|
||||
}
|
||||
}
|
||||
else
|
||||
return calculateEnIpPorBarResult( partIndex, resVarAddr );
|
||||
}
|
||||
|
||||
if ( resVarAddr.fieldName == "POR_GRADIENTS" &&
|
||||
( resVarAddr.componentName == "X" || resVarAddr.componentName == "Y" || resVarAddr.componentName == "Z" ) )
|
||||
{
|
||||
return calculateNodalGradients( partIndex, resVarAddr );
|
||||
}
|
||||
|
||||
if ( ( resVarAddr.fieldName == "NE" ) && ( resVarAddr.componentName == "E11" || resVarAddr.componentName == "E22" ||
|
||||
resVarAddr.componentName == "E33" || resVarAddr.componentName == "E12" ||
|
||||
resVarAddr.componentName == "E13" || resVarAddr.componentName == "E23" ) )
|
||||
|
||||
@@ -83,7 +83,8 @@ public:
|
||||
{
|
||||
bool isTypeValid = resultPosType == RIG_NODAL || resultPosType == RIG_ELEMENT_NODAL ||
|
||||
resultPosType == RIG_INTEGRATION_POINT || resultPosType == RIG_ELEMENT_NODAL_FACE ||
|
||||
resultPosType == RIG_FORMATION_NAMES || resultPosType == RIG_ELEMENT;
|
||||
resultPosType == RIG_FORMATION_NAMES || resultPosType == RIG_ELEMENT ||
|
||||
resultPosType == RIG_DIFFERENTIALS;
|
||||
bool isFieldValid = fieldName != "";
|
||||
|
||||
return isTypeValid && isFieldValid;
|
||||
|
||||
@@ -27,5 +27,6 @@ enum RigFemResultPosEnum
|
||||
RIG_ELEMENT_NODAL_FACE,
|
||||
RIG_FORMATION_NAMES,
|
||||
RIG_ELEMENT,
|
||||
RIG_WELLPATH_DERIVED
|
||||
RIG_WELLPATH_DERIVED,
|
||||
RIG_DIFFERENTIALS
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user