Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2020- Equinor ASA
|
|
|
|
//
|
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "RigFemPartResultCalculatorNormalST.h"
|
|
|
|
|
|
|
|
#include "RigFemPart.h"
|
|
|
|
#include "RigFemPartCollection.h"
|
|
|
|
#include "RigFemPartResultsCollection.h"
|
|
|
|
#include "RigFemResultAddress.h"
|
|
|
|
#include "RigFemScalarResultFrames.h"
|
|
|
|
|
|
|
|
#include "cafProgressInfo.h"
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RigFemPartResultCalculatorNormalST::RigFemPartResultCalculatorNormalST( RigFemPartResultsCollection& collection )
|
|
|
|
: RigFemPartResultCalculator( collection )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RigFemPartResultCalculatorNormalST::~RigFemPartResultCalculatorNormalST()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
bool RigFemPartResultCalculatorNormalST::isMatching( const RigFemResultAddress& resVarAddr ) const
|
|
|
|
{
|
2023-02-26 03:48:40 -06:00
|
|
|
return ( ( resVarAddr.fieldName == "ST" ) &&
|
|
|
|
( resVarAddr.componentName == "S11" || resVarAddr.componentName == "S22" || resVarAddr.componentName == "S33" ) );
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2023-02-26 03:48:40 -06:00
|
|
|
RigFemScalarResultFrames* RigFemPartResultCalculatorNormalST::calculate( int partIndex, const RigFemResultAddress& resVarAddr )
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
{
|
2023-01-18 07:42:33 -06:00
|
|
|
caf::ProgressInfo stepCountProgress( m_resultCollection->timeStepCount() * 3, "" );
|
2023-02-26 03:48:40 -06:00
|
|
|
stepCountProgress.setProgressDescription( "Calculating " +
|
|
|
|
QString::fromStdString( resVarAddr.fieldName + ": " + resVarAddr.componentName ) );
|
2023-01-18 07:42:33 -06:00
|
|
|
stepCountProgress.setNextProgressIncrement( m_resultCollection->timeStepCount() );
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
|
|
|
|
RigFemScalarResultFrames* srcSDataFrames =
|
|
|
|
m_resultCollection->findOrLoadScalarResult( partIndex,
|
2023-02-26 03:48:40 -06:00
|
|
|
RigFemResultAddress( resVarAddr.resultPosType, "S-Bar", resVarAddr.componentName ) );
|
2023-01-18 07:42:33 -06:00
|
|
|
stepCountProgress.incrementProgress();
|
|
|
|
stepCountProgress.setNextProgressIncrement( m_resultCollection->timeStepCount() );
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
|
|
|
|
RigFemScalarResultFrames* srcPORDataFrames =
|
|
|
|
m_resultCollection->findOrLoadScalarResult( partIndex, RigFemResultAddress( RIG_NODAL, "POR-Bar", "" ) );
|
|
|
|
|
|
|
|
RigFemScalarResultFrames* dstDataFrames = m_resultCollection->createScalarResult( partIndex, resVarAddr );
|
|
|
|
const RigFemPart* femPart = m_resultCollection->parts()->part( partIndex );
|
|
|
|
|
2023-01-18 07:42:33 -06:00
|
|
|
stepCountProgress.incrementProgress();
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
|
2023-01-18 07:42:33 -06:00
|
|
|
constexpr float inf = std::numeric_limits<float>::infinity();
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
|
2023-01-19 07:17:39 -06:00
|
|
|
const int timeSteps = srcSDataFrames->timeStepCount();
|
2023-01-18 07:42:33 -06:00
|
|
|
for ( int stepIdx = 0; stepIdx < timeSteps; stepIdx++ )
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
{
|
2023-01-19 07:17:39 -06:00
|
|
|
const int frameCount = srcSDataFrames->frameCount( stepIdx );
|
2023-01-18 07:42:33 -06:00
|
|
|
for ( int fIdx = 0; fIdx < frameCount; fIdx++ )
|
|
|
|
{
|
|
|
|
const std::vector<float>& srcSFrameData = srcSDataFrames->frameData( stepIdx, fIdx );
|
|
|
|
const std::vector<float>& srcPORFrameData = srcPORDataFrames->frameData( stepIdx, fIdx );
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
|
2023-01-18 07:42:33 -06:00
|
|
|
int elementCount = femPart->elementCount();
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
|
2023-01-18 07:42:33 -06:00
|
|
|
std::vector<float>& dstFrameData = dstDataFrames->frameData( stepIdx, fIdx );
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
|
2023-01-18 07:42:33 -06:00
|
|
|
size_t valCount = srcSFrameData.size();
|
|
|
|
dstFrameData.resize( valCount );
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
|
|
|
|
#pragma omp parallel for
|
2023-01-18 07:42:33 -06:00
|
|
|
for ( int elmIdx = 0; elmIdx < elementCount; ++elmIdx )
|
|
|
|
{
|
|
|
|
RigElementType elmType = femPart->elementType( elmIdx );
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
|
2023-01-18 07:42:33 -06:00
|
|
|
int elmNodeCount = RigFemTypes::elementNodeCount( femPart->elementType( elmIdx ) );
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
|
2023-01-18 07:42:33 -06:00
|
|
|
if ( elmType == HEX8P )
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
{
|
2023-01-18 07:42:33 -06:00
|
|
|
for ( int elmNodIdx = 0; elmNodIdx < elmNodeCount; ++elmNodIdx )
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
{
|
2023-04-19 00:16:13 -05:00
|
|
|
const size_t elmNodResIdx = femPart->elementNodeResultIdx( elmIdx, elmNodIdx );
|
|
|
|
const int nodeIdx = femPart->nodeIdxFromElementNodeResultIdx( elmNodResIdx );
|
|
|
|
float por = 0.0f;
|
2023-05-11 01:37:58 -05:00
|
|
|
if ( nodeIdx < static_cast<int>( srcPORFrameData.size() ) )
|
2023-01-18 07:42:33 -06:00
|
|
|
{
|
2023-04-19 00:16:13 -05:00
|
|
|
por = srcPORFrameData[nodeIdx];
|
2023-01-18 07:42:33 -06:00
|
|
|
if ( por == inf ) por = 0.0f;
|
2023-04-19 00:16:13 -05:00
|
|
|
}
|
2023-01-18 07:42:33 -06:00
|
|
|
|
2023-04-19 00:16:13 -05:00
|
|
|
if ( elmNodResIdx < srcSFrameData.size() )
|
|
|
|
{
|
2023-01-18 07:42:33 -06:00
|
|
|
// ST = SE_abacus + porePressure
|
|
|
|
// porePressure is POR-Bar.
|
|
|
|
double SE_abacus = -srcSFrameData[elmNodResIdx];
|
|
|
|
dstFrameData[elmNodResIdx] = SE_abacus + por;
|
|
|
|
}
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
}
|
|
|
|
}
|
2023-01-18 07:42:33 -06:00
|
|
|
else
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
{
|
2023-01-18 07:42:33 -06:00
|
|
|
for ( int elmNodIdx = 0; elmNodIdx < elmNodeCount; ++elmNodIdx )
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
{
|
2023-01-18 07:42:33 -06:00
|
|
|
size_t elmNodResIdx = femPart->elementNodeResultIdx( elmIdx, elmNodIdx );
|
|
|
|
if ( elmNodResIdx < srcSFrameData.size() )
|
|
|
|
{
|
|
|
|
dstFrameData[elmNodResIdx] = -srcSFrameData[elmNodResIdx];
|
|
|
|
}
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-01-18 07:42:33 -06:00
|
|
|
stepCountProgress.incrementProgress();
|
Split fem part results collection 5785 (#5871)
* #5785 Extract RigFemClosestResultIndexCalculator class to separate file.
* #5785 Move method implementation of RigFemClosestResutIndexCalculator to cpp file.
Also improve const correctness.
* #5785 Extract method for calculating normal SE, ie. SE:11/22/33.
* #5785 Extract method for calculating shear SE, ie. SE:12/13/23.
* #5785 Create a list of result calculators.
* #5785 Extract method for calculating timelapse, normalized, and gamma results.
* #5785 Extract method for calculating normal ST, ie. ST:11/22/33.
* #5785 Extract method for calculating shear ST, ie. ST:12/13/23.
* #5785 Extract method for calculating surface angles and aligned stress.
* #5785 Extract method for calculating principal strain and stress.
* #5785 Extract method for calculating FOS, SFI and DSM for SE.
* #5785 Extract method for calculating NE.EV, NE.ED, ST.Q and ST.STM.
* #5785 Extract method for calculating compaction.
* #5785 Extract method for calculating stress gradients.
* #5785 Extract method for calculating SE.SEM.
* #5785 Extract method for calculating NE.
* #5785 Extract method for calculating formation indices.
* #5785 Extract method for calculating nodal graidents, bar conversions, and EnIpPorBar.
* #5785 Use std::unique_ptr to calculators.
* Use std::vector<unique_ptr>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
2020-05-09 01:57:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return dstDataFrames;
|
|
|
|
}
|