mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3512 System : Remove unused functions
This commit is contained in:
@@ -393,34 +393,6 @@ double RigCompletionData::secondOrderingValue() const
|
||||
return m_secondOrderingValue;
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
bool RigCompletionData::onlyOneIsDefaulted(double first, double second)
|
||||
{
|
||||
if (first == std::numeric_limits<double>::infinity())
|
||||
{
|
||||
if (second == std::numeric_limits<double>::infinity())
|
||||
{
|
||||
// Both have default values
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// First has default value, second does not
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (second == std::numeric_limits<double>::infinity())
|
||||
{
|
||||
// Second has default value, first does not
|
||||
return true;
|
||||
}
|
||||
|
||||
// Neither has default values
|
||||
return false;
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
|
||||
@@ -157,6 +157,5 @@ private:
|
||||
double m_secondOrderingValue;
|
||||
|
||||
private:
|
||||
static bool onlyOneIsDefaulted(double first, double second);
|
||||
static void copy(RigCompletionData& target, const RigCompletionData& from);
|
||||
};
|
||||
|
||||
@@ -472,17 +472,6 @@ std::vector<QDateTime> RigCaseCellResultsData::allTimeStepDatesFromEclipseReader
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QDateTime RigCaseCellResultsData::timeStepDate(size_t scalarResultIndex, size_t timeStepIndex) const
|
||||
{
|
||||
if (scalarResultIndex < m_resultInfos.size() && m_resultInfos[scalarResultIndex].timeStepInfos().size() > timeStepIndex)
|
||||
return m_resultInfos[scalarResultIndex].timeStepInfos()[timeStepIndex].m_date;
|
||||
else
|
||||
return QDateTime();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -544,17 +533,6 @@ int RigCaseCellResultsData::reportStepNumber(size_t scalarResultIndex, size_t ti
|
||||
return -1;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<int> RigCaseCellResultsData::reportStepNumbers(size_t scalarResultIndex) const
|
||||
{
|
||||
if (scalarResultIndex < m_resultInfos.size() )
|
||||
return m_resultInfos[scalarResultIndex].reportNumbers();
|
||||
else
|
||||
return std::vector<int>();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -81,12 +81,10 @@ public:
|
||||
|
||||
std::vector<QDateTime> allTimeStepDatesFromEclipseReader() const;
|
||||
std::vector<QDateTime> timeStepDates() const;
|
||||
QDateTime timeStepDate(size_t scalarResultIndex, size_t timeStepIndex) const;
|
||||
std::vector<QDateTime> timeStepDates(size_t scalarResultIndex) const;
|
||||
std::vector<double> daysSinceSimulationStart() const;
|
||||
std::vector<double> daysSinceSimulationStart(size_t scalarResultIndex) const;
|
||||
int reportStepNumber(size_t scalarResultIndex, size_t timeStepIndex) const;
|
||||
std::vector<int> reportStepNumbers(size_t scalarResultIndex) const;
|
||||
|
||||
std::vector<RigEclipseTimeStepInfo> timeStepInfos(size_t scalarResultIndex) const;
|
||||
void setTimeStepInfos(size_t scalarResultIndex, const std::vector<RigEclipseTimeStepInfo>& timeStepInfos);
|
||||
|
||||
@@ -42,21 +42,6 @@ double RigGeoMechBoreHoleStressCalculator::solveStassiDalia(double* thetaOut)
|
||||
return solveSecant(fn, thetaOut);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3d RigGeoMechBoreHoleStressCalculator::principleStressesAtWall(double pw, double theta) const
|
||||
{
|
||||
cvf::Vec4d stressComponentsForAngle = calculateStressComponentsForSegmentAngle(theta);
|
||||
double sigma_theta = stressComponentsForAngle[1] - pw;
|
||||
const double& sigma_z = stressComponentsForAngle[2];
|
||||
double tauSqrx4 = std::pow(stressComponentsForAngle[3], 2) * 4.0;
|
||||
|
||||
double sigmaComponent1 = sigma_z + sigma_theta;
|
||||
double sigmaComponent2 = std::sqrt(std::pow(sigma_z - sigma_theta, 2) + tauSqrx4);
|
||||
return cvf::Vec3d(pw - m_porePressure, 0.5 * (sigmaComponent1 + sigmaComponent2) - m_porePressure, 0.5 * (sigmaComponent1 - sigmaComponent2) - m_porePressure);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Bi-section root finding method: https://en.wikipedia.org/wiki/Bisection_method
|
||||
/// Used as fall-back in case the secant method doesn't converge.
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
RigGeoMechBoreHoleStressCalculator(const caf::Ten3d& tensor, double porePressure, double poissonRatio, double uniaxialCompressiveStrength, int nThetaSubSamples);
|
||||
double solveFractureGradient(double* thetaOut = nullptr);
|
||||
double solveStassiDalia(double* thetaOut = nullptr);
|
||||
cvf::Vec3d principleStressesAtWall(double pw, double theta) const;
|
||||
|
||||
private:
|
||||
typedef double (RigGeoMechBoreHoleStressCalculator::*MemberFunc)(double pw, double* thetaOut) const;
|
||||
double solveBisection(double minPw, double maxPw, MemberFunc fn, double* thetaOut);
|
||||
|
||||
@@ -429,27 +429,6 @@ void RigSimulationWellCenterLineCalculator::addCellCenterPoints(const RigEclipse
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigSimulationWellCenterLineCalculator::hasAnyResultCells(const std::vector<RigWellResultBranch> &resBranches)
|
||||
{
|
||||
bool hasResultCells = false;
|
||||
if ( resBranches.size() )
|
||||
{
|
||||
for ( size_t i = 0 ; i < resBranches.size(); ++i )
|
||||
{
|
||||
if ( resBranches[i].m_branchResultPoints.size() != 0 )
|
||||
{
|
||||
hasResultCells = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return hasResultCells;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -46,7 +46,6 @@ public:
|
||||
std::vector<std::vector<RigWellResultPoint>>& pipeBranchesCellIds);
|
||||
|
||||
private:
|
||||
static bool hasAnyResultCells(const std::vector<RigWellResultBranch> &resBranches);
|
||||
static bool hasAnyValidDataCells(const RigWellResultBranch& branch);
|
||||
static void finishPipeCenterLine( std::vector< std::vector<cvf::Vec3d> > &pipeBranchesCLCoords, const cvf::Vec3d& lastCellCenter ) ;
|
||||
|
||||
|
||||
@@ -489,35 +489,6 @@ void RigStimPlanFractureDefinition::createFractureTriangleGeometry(double wellPa
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void sortPolygon(std::vector<cvf::Vec3f> &polygon)
|
||||
{
|
||||
if (polygon.empty()) return;
|
||||
|
||||
for (int i = 1; i < static_cast<int>(polygon.size()) - 1; i++)
|
||||
{
|
||||
cvf::Vec3f lastNode = polygon[i - 1];
|
||||
cvf::Vec3f node = polygon[i];
|
||||
cvf::Vec3f nextNode = polygon[i + 1];
|
||||
|
||||
if (node.y() == nextNode.y())
|
||||
{
|
||||
if (lastNode.x() < node.x() && node.x() > nextNode.x())
|
||||
{
|
||||
polygon[i] = nextNode;
|
||||
polygon[i + 1] = node;
|
||||
}
|
||||
else if (lastNode.x() > node.x() && node.x() < nextNode.x())
|
||||
{
|
||||
polygon[i] = nextNode;
|
||||
polygon[i + 1] = node;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user