#9099 Thermal Fracture Import: include perimter nodes.

This commit is contained in:
Kristian Bendiksen
2022-07-06 10:42:35 +02:00
parent 6f623e9320
commit 44c469c12c
8 changed files with 218 additions and 59 deletions

View File

@@ -0,0 +1,71 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2022 - 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 "RigThermalFractureResult.h"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigThermalFractureResult::RigThermalFractureResult( const QString& name, const QString& unit )
: m_name( name )
, m_unit( unit )
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RigThermalFractureResult::name() const
{
return m_name;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RigThermalFractureResult::unit() const
{
return m_unit;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigThermalFractureResult::appendValue( int nodeIndex, double value )
{
if ( nodeIndex >= static_cast<int>( m_parameterValues.size() ) )
m_parameterValues.push_back( { value } );
else
m_parameterValues[nodeIndex].push_back( value );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RigThermalFractureResult::getValue( int nodeIndex, int timeStepIndex ) const
{
return m_parameterValues[nodeIndex][timeStepIndex];
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RigThermalFractureResult::numNodes() const
{
return m_parameterValues.size();
}