mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1968 Readability : Whitespace changes
This commit is contained in:
parent
76e6ec3aef
commit
68c21e117b
@ -1,17 +1,17 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Copyright (C) 2017 Statoil ASA
|
// Copyright (C) 2017 Statoil ASA
|
||||||
//
|
//
|
||||||
// ResInsight is free software: you can redistribute it and/or modify
|
// ResInsight is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
//
|
//
|
||||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
//
|
//
|
||||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||||
// for more details.
|
// for more details.
|
||||||
//
|
//
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
@ -26,38 +26,35 @@
|
|||||||
|
|
||||||
#include <cmath> // Needed for HUGE_VAL on Linux
|
#include <cmath> // Needed for HUGE_VAL on Linux
|
||||||
|
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
RigCompletionData::RigCompletionData(const QString wellName, const RigCompletionDataGridCell& cellIndex)
|
RigCompletionData::RigCompletionData(const QString wellName, const RigCompletionDataGridCell& cellIndex)
|
||||||
: m_wellName(wellName),
|
: m_wellName(wellName)
|
||||||
m_cellIndex(cellIndex),
|
, m_cellIndex(cellIndex)
|
||||||
m_saturation(HUGE_VAL),
|
, m_saturation(HUGE_VAL)
|
||||||
m_transmissibility(HUGE_VAL),
|
, m_transmissibility(HUGE_VAL)
|
||||||
m_diameter(HUGE_VAL),
|
, m_diameter(HUGE_VAL)
|
||||||
m_kh(HUGE_VAL),
|
, m_kh(HUGE_VAL)
|
||||||
m_skinFactor(HUGE_VAL),
|
, m_skinFactor(HUGE_VAL)
|
||||||
m_dFactor(HUGE_VAL),
|
, m_dFactor(HUGE_VAL)
|
||||||
m_direction(DIR_UNDEF),
|
, m_direction(DIR_UNDEF)
|
||||||
m_connectionState(OPEN),
|
, m_connectionState(OPEN)
|
||||||
m_count(1),
|
, m_count(1)
|
||||||
m_wpimult(HUGE_VAL),
|
, m_wpimult(HUGE_VAL)
|
||||||
m_isMainBore(false),
|
, m_isMainBore(false)
|
||||||
m_readyForExport(false),
|
, m_readyForExport(false)
|
||||||
m_completionType(CT_UNDEFINED)
|
, m_completionType(CT_UNDEFINED)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
RigCompletionData::~RigCompletionData()
|
RigCompletionData::~RigCompletionData() {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
RigCompletionData::RigCompletionData(const RigCompletionData& other)
|
RigCompletionData::RigCompletionData(const RigCompletionData& other)
|
||||||
{
|
{
|
||||||
@ -65,12 +62,12 @@ RigCompletionData::RigCompletionData(const RigCompletionData& other)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
bool RigCompletionData::operator<(const RigCompletionData& other) const
|
bool RigCompletionData::operator<(const RigCompletionData& other) const
|
||||||
{
|
{
|
||||||
if (m_wellName != other.m_wellName)
|
if (m_wellName != other.m_wellName)
|
||||||
{
|
{
|
||||||
return (m_wellName < other.m_wellName);
|
return (m_wellName < other.m_wellName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +75,7 @@ bool RigCompletionData::operator<(const RigCompletionData& other) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
RigCompletionData& RigCompletionData::operator=(const RigCompletionData& other)
|
RigCompletionData& RigCompletionData::operator=(const RigCompletionData& other)
|
||||||
{
|
{
|
||||||
@ -90,78 +87,77 @@ RigCompletionData& RigCompletionData::operator=(const RigCompletionData& other)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
void RigCompletionData::setFromFracture(double transmissibility, double skinFactor)
|
void RigCompletionData::setFromFracture(double transmissibility, double skinFactor)
|
||||||
{
|
{
|
||||||
m_completionType = FRACTURE;
|
m_completionType = FRACTURE;
|
||||||
m_transmissibility = transmissibility;
|
m_transmissibility = transmissibility;
|
||||||
m_skinFactor = skinFactor;
|
m_skinFactor = skinFactor;
|
||||||
}
|
}
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
void RigCompletionData::setTransAndWPImultBackgroundDataFromFishbone(double transmissibility,
|
void RigCompletionData::setTransAndWPImultBackgroundDataFromFishbone(double transmissibility,
|
||||||
double skinFactor,
|
double skinFactor,
|
||||||
double diameter,
|
double diameter,
|
||||||
CellDirection direction,
|
CellDirection direction,
|
||||||
bool isMainBore)
|
bool isMainBore)
|
||||||
{
|
{
|
||||||
m_completionType = FISHBONES;
|
m_completionType = FISHBONES;
|
||||||
m_transmissibility = transmissibility;
|
m_transmissibility = transmissibility;
|
||||||
m_skinFactor = skinFactor;
|
m_skinFactor = skinFactor;
|
||||||
m_diameter = diameter;
|
m_diameter = diameter;
|
||||||
m_direction = direction;
|
m_direction = direction;
|
||||||
m_isMainBore = isMainBore;
|
m_isMainBore = isMainBore;
|
||||||
}
|
}
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
void RigCompletionData::setTransAndWPImultBackgroundDataFromPerforation(double transmissibility,
|
void RigCompletionData::setTransAndWPImultBackgroundDataFromPerforation(double transmissibility,
|
||||||
double skinFactor,
|
double skinFactor,
|
||||||
double diameter,
|
double diameter,
|
||||||
CellDirection direction)
|
CellDirection direction)
|
||||||
{
|
{
|
||||||
m_completionType = PERFORATION;
|
m_completionType = PERFORATION;
|
||||||
m_transmissibility = transmissibility;
|
m_transmissibility = transmissibility;
|
||||||
m_skinFactor = skinFactor;
|
m_skinFactor = skinFactor;
|
||||||
m_diameter = diameter;
|
m_diameter = diameter;
|
||||||
m_direction = direction;
|
m_direction = direction;
|
||||||
m_isMainBore = true;
|
m_isMainBore = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
void RigCompletionData::setCombinedValuesExplicitTrans(double transmissibility,
|
void RigCompletionData::setCombinedValuesExplicitTrans(double transmissibility, CompletionType completionType)
|
||||||
CompletionType completionType)
|
|
||||||
{
|
{
|
||||||
m_completionType = completionType;
|
m_completionType = completionType;
|
||||||
m_transmissibility = transmissibility;
|
m_transmissibility = transmissibility;
|
||||||
m_readyForExport = true;
|
m_readyForExport = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
void RigCompletionData::setCombinedValuesImplicitTransWPImult(double wpimult,
|
void RigCompletionData::setCombinedValuesImplicitTransWPImult(double wpimult,
|
||||||
CellDirection celldirection,
|
CellDirection celldirection,
|
||||||
double skinFactor,
|
double skinFactor,
|
||||||
double wellDiameter,
|
double wellDiameter,
|
||||||
CompletionType completionType)
|
CompletionType completionType)
|
||||||
{
|
{
|
||||||
m_wpimult = wpimult;
|
m_wpimult = wpimult;
|
||||||
m_direction = celldirection;
|
m_direction = celldirection;
|
||||||
m_completionType = completionType;
|
m_completionType = completionType;
|
||||||
m_skinFactor = skinFactor;
|
m_skinFactor = skinFactor;
|
||||||
m_diameter = wellDiameter;
|
m_diameter = wellDiameter;
|
||||||
m_readyForExport = true;
|
m_readyForExport = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
void RigCompletionData::addMetadata(const QString& name, const QString& comment)
|
void RigCompletionData::addMetadata(const QString& name, const QString& comment)
|
||||||
{
|
{
|
||||||
@ -169,7 +165,7 @@ void RigCompletionData::addMetadata(const QString& name, const QString& comment)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
bool RigCompletionData::isDefaultValue(double val)
|
bool RigCompletionData::isDefaultValue(double val)
|
||||||
{
|
{
|
||||||
@ -177,7 +173,7 @@ bool RigCompletionData::isDefaultValue(double val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
const std::vector<RigCompletionMetaData>& RigCompletionData::metadata() const
|
const std::vector<RigCompletionMetaData>& RigCompletionData::metadata() const
|
||||||
{
|
{
|
||||||
@ -185,7 +181,7 @@ const std::vector<RigCompletionMetaData>& RigCompletionData::metadata() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
const QString& RigCompletionData::wellName() const
|
const QString& RigCompletionData::wellName() const
|
||||||
{
|
{
|
||||||
@ -193,7 +189,7 @@ const QString& RigCompletionData::wellName() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
const RigCompletionDataGridCell& RigCompletionData::completionDataGridCell() const
|
const RigCompletionDataGridCell& RigCompletionData::completionDataGridCell() const
|
||||||
{
|
{
|
||||||
@ -201,7 +197,7 @@ const RigCompletionDataGridCell& RigCompletionData::completionDataGridCell() con
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
WellConnectionState RigCompletionData::connectionState() const
|
WellConnectionState RigCompletionData::connectionState() const
|
||||||
{
|
{
|
||||||
@ -209,7 +205,7 @@ WellConnectionState RigCompletionData::connectionState() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
double RigCompletionData::saturation() const
|
double RigCompletionData::saturation() const
|
||||||
{
|
{
|
||||||
@ -217,7 +213,7 @@ double RigCompletionData::saturation() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
double RigCompletionData::transmissibility() const
|
double RigCompletionData::transmissibility() const
|
||||||
{
|
{
|
||||||
@ -225,7 +221,7 @@ double RigCompletionData::transmissibility() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
double RigCompletionData::diameter() const
|
double RigCompletionData::diameter() const
|
||||||
{
|
{
|
||||||
@ -233,7 +229,7 @@ double RigCompletionData::diameter() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
double RigCompletionData::kh() const
|
double RigCompletionData::kh() const
|
||||||
{
|
{
|
||||||
@ -241,7 +237,7 @@ double RigCompletionData::kh() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
double RigCompletionData::skinFactor() const
|
double RigCompletionData::skinFactor() const
|
||||||
{
|
{
|
||||||
@ -249,7 +245,7 @@ double RigCompletionData::skinFactor() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
double RigCompletionData::dFactor() const
|
double RigCompletionData::dFactor() const
|
||||||
{
|
{
|
||||||
@ -257,7 +253,7 @@ double RigCompletionData::dFactor() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
CellDirection RigCompletionData::direction() const
|
CellDirection RigCompletionData::direction() const
|
||||||
{
|
{
|
||||||
@ -265,7 +261,7 @@ CellDirection RigCompletionData::direction() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
size_t RigCompletionData::count() const
|
size_t RigCompletionData::count() const
|
||||||
{
|
{
|
||||||
@ -273,7 +269,7 @@ size_t RigCompletionData::count() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
double RigCompletionData::wpimult() const
|
double RigCompletionData::wpimult() const
|
||||||
{
|
{
|
||||||
@ -281,7 +277,7 @@ double RigCompletionData::wpimult() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigCompletionData::CompletionType RigCompletionData::completionType() const
|
RigCompletionData::CompletionType RigCompletionData::completionType() const
|
||||||
{
|
{
|
||||||
@ -289,7 +285,7 @@ RigCompletionData::CompletionType RigCompletionData::completionType() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RigCompletionData::isMainBore() const
|
bool RigCompletionData::isMainBore() const
|
||||||
{
|
{
|
||||||
@ -297,7 +293,7 @@ bool RigCompletionData::isMainBore() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RigCompletionData::readyForExport() const
|
bool RigCompletionData::readyForExport() const
|
||||||
{
|
{
|
||||||
@ -305,7 +301,7 @@ bool RigCompletionData::readyForExport() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
bool RigCompletionData::onlyOneIsDefaulted(double first, double second)
|
bool RigCompletionData::onlyOneIsDefaulted(double first, double second)
|
||||||
{
|
{
|
||||||
@ -327,31 +323,30 @@ bool RigCompletionData::onlyOneIsDefaulted(double first, double second)
|
|||||||
// Second has default value, first does not
|
// Second has default value, first does not
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Neither has default values
|
// Neither has default values
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
void RigCompletionData::copy(RigCompletionData& target, const RigCompletionData& from)
|
void RigCompletionData::copy(RigCompletionData& target, const RigCompletionData& from)
|
||||||
{
|
{
|
||||||
target.m_metadata = from.m_metadata;
|
target.m_metadata = from.m_metadata;
|
||||||
target.m_wellName = from.m_wellName;
|
target.m_wellName = from.m_wellName;
|
||||||
target.m_cellIndex = from.m_cellIndex;
|
target.m_cellIndex = from.m_cellIndex;
|
||||||
target.m_connectionState = from.m_connectionState;
|
target.m_connectionState = from.m_connectionState;
|
||||||
target.m_saturation = from.m_saturation;
|
target.m_saturation = from.m_saturation;
|
||||||
target.m_transmissibility = from.m_transmissibility;
|
target.m_transmissibility = from.m_transmissibility;
|
||||||
target.m_diameter = from.m_diameter;
|
target.m_diameter = from.m_diameter;
|
||||||
target.m_kh = from.m_kh;
|
target.m_kh = from.m_kh;
|
||||||
target.m_skinFactor = from.m_skinFactor;
|
target.m_skinFactor = from.m_skinFactor;
|
||||||
target.m_dFactor = from.m_dFactor;
|
target.m_dFactor = from.m_dFactor;
|
||||||
target.m_direction = from.m_direction;
|
target.m_direction = from.m_direction;
|
||||||
target.m_isMainBore = from.m_isMainBore;
|
target.m_isMainBore = from.m_isMainBore;
|
||||||
target.m_readyForExport = from.m_readyForExport;
|
target.m_readyForExport = from.m_readyForExport;
|
||||||
target.m_count = from.m_count;
|
target.m_count = from.m_count;
|
||||||
target.m_wpimult = from.m_wpimult;
|
target.m_wpimult = from.m_wpimult;
|
||||||
target.m_completionType = from.m_completionType;
|
target.m_completionType = from.m_completionType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user