Whitespace

This commit is contained in:
Magne Sjaastad 2018-10-19 15:43:29 +02:00
parent fa2d96ebcf
commit 4632fd7dff
8 changed files with 148 additions and 142 deletions

View File

@ -29,10 +29,8 @@
#include "RimProject.h"
#include "RimSimWellInView.h"
#include "cafPdmUiDoubleSliderEditor.h"
#include "RigWellPath.h"
#include "cafPdmUiDoubleSliderEditor.h"
CAF_PDM_SOURCE_INIT(RimSimWellFracture, "SimWellFracture");
@ -57,9 +55,7 @@ RimSimWellFracture::RimSimWellFracture(void)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSimWellFracture::~RimSimWellFracture()
{
}
RimSimWellFracture::~RimSimWellFracture() {}
//--------------------------------------------------------------------------------------------------
///
@ -84,8 +80,9 @@ void RimSimWellFracture::updateAzimuthBasedOnWellAzimuthAngle()
computeSimWellBranchesIfRequired();
if (!fractureTemplate()) return;
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH
|| fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH)
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH ||
fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH)
{
double simWellAzimuth = wellAzimuthAtFracturePosition();
@ -95,8 +92,10 @@ void RimSimWellFracture::updateAzimuthBasedOnWellAzimuthAngle()
}
else if (fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH)
{
if (simWellAzimuth + 90 < 360) m_azimuth = simWellAzimuth + 90;
else m_azimuth = simWellAzimuth - 90;
if (simWellAzimuth + 90 < 360)
m_azimuth = simWellAzimuth + 90;
else
m_azimuth = simWellAzimuth - 90;
}
}
}
@ -158,19 +157,21 @@ std::vector<cvf::Vec3d> RimSimWellFracture::perforationLengthCenterLineCoords()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
void RimSimWellFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue)
{
RimFracture::fieldChangedByUi(changedField, oldValue, newValue);
if ( changedField == &m_location
|| changedField == &m_branchIndex
)
if (changedField == &m_location || changedField == &m_branchIndex)
{
updateFracturePositionFromLocation();
RimFractureTemplate::FracOrientationEnum orientation;
if (fractureTemplate()) orientation = fractureTemplate()->orientationType();
else orientation = RimFractureTemplate::AZIMUTH;
if (fractureTemplate())
orientation = fractureTemplate()->orientationType();
else
orientation = RimFractureTemplate::AZIMUTH;
if (orientation != RimFractureTemplate::AZIMUTH)
{
@ -212,7 +213,6 @@ void RimSimWellFracture::updateFracturePositionFromLocation()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -248,7 +248,9 @@ void RimSimWellFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderi
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSimWellFracture::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute)
void RimSimWellFracture::defineEditorAttribute(const caf::PdmFieldHandle* field,
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute)
{
RimFracture::defineEditorAttribute(field, uiConfigName, attribute);
@ -275,7 +277,8 @@ void RimSimWellFracture::defineEditorAttribute(const caf::PdmFieldHandle* field,
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo> RimSimWellFracture::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
QList<caf::PdmOptionItemInfo> RimSimWellFracture::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly)
{
QList<caf::PdmOptionItemInfo> options = RimFracture::calculateValueOptions(fieldNeedingOptions, useOptionsOnly);
@ -340,8 +343,7 @@ void RimSimWellFracture::computeSimWellBranchCenterLines()
std::vector<std::vector<cvf::Vec3d>> pipeBranchesCLCoords;
std::vector<std::vector<RigWellResultPoint>> pipeBranchesCellIds;
rimWell->calculateWellPipeStaticCenterLine(pipeBranchesCLCoords,
pipeBranchesCellIds);
rimWell->calculateWellPipeStaticCenterLine(pipeBranchesCLCoords, pipeBranchesCellIds);
for (const auto& branch : pipeBranchesCLCoords)
{

View File

@ -23,7 +23,6 @@
#include "RigSimulationWellCoordsAndMD.h"
#include "RimEllipseFractureTemplate.h"
//==================================================================================================
///
///
@ -38,32 +37,40 @@ public:
void setClosestWellCoord(cvf::Vec3d& position, size_t branchIndex);
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
void recomputeWellCenterlineCoordinates();
void updateFracturePositionFromLocation();
void updateAzimuthBasedOnWellAzimuthAngle() override;
double wellAzimuthAtFracturePosition() const override;
double wellDipAtFracturePosition();
double fractureMD() const override { return m_location; }
double fractureMD() const override
{
return m_location;
}
int branchIndex() const { return m_branchIndex(); }
int branchIndex() const
{
return m_branchIndex();
}
void loadDataAndUpdate() override;
std::vector<cvf::Vec3d> perforationLengthCenterLineCoords() const override;
protected:
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
RigMainGrid* ownerCaseMainGrid() const;
void defineEditorAttribute(const caf::PdmFieldHandle* field,
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute) override;
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly) override;
private:
RigMainGrid* ownerCaseMainGrid() const;
void computeSimWellBranchesIfRequired();
void computeSimWellBranchCenterLines();
QString createOneBasedIJKText() const;
private:
caf::PdmField<float> m_location;
@ -71,6 +78,4 @@ private:
std::vector<RigSimulationWellCoordsAndMD> m_branchCenterLines;
caf::PdmProxyValueField<QString> m_displayIJK;
QString createOneBasedIJKText() const;
};

View File

@ -26,8 +26,6 @@
#include "cafPdmUiDoubleSliderEditor.h"
CAF_PDM_SOURCE_INIT(RimWellPathFracture, "WellPathFracture");
//--------------------------------------------------------------------------------------------------
@ -44,9 +42,7 @@ RimWellPathFracture::RimWellPathFracture(void)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellPathFracture::~RimWellPathFracture()
{
}
RimWellPathFracture::~RimWellPathFracture() {}
//--------------------------------------------------------------------------------------------------
///
@ -69,7 +65,9 @@ void RimWellPathFracture::setMeasuredDepth(double mdValue)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
void RimWellPathFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue)
{
RimFracture::fieldChangedByUi(changedField, oldValue, newValue);
@ -91,10 +89,9 @@ void RimWellPathFracture::updateAzimuthBasedOnWellAzimuthAngle()
{
if (!fractureTemplate()) return;
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH
|| fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH)
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH ||
fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH)
{
double wellPathAzimuth = wellAzimuthAtFracturePosition();
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH)
@ -103,8 +100,10 @@ void RimWellPathFracture::updateAzimuthBasedOnWellAzimuthAngle()
}
if (fractureTemplate()->orientationType() == RimFractureTemplate::TRANSVERSE_WELL_PATH)
{
if (wellPathAzimuth + 90 < 360) m_azimuth = wellPathAzimuth + 90;
else m_azimuth = wellPathAzimuth - 90;
if (wellPathAzimuth + 90 < 360)
m_azimuth = wellPathAzimuth + 90;
else
m_azimuth = wellPathAzimuth - 90;
}
}
}
@ -237,13 +236,14 @@ void RimWellPathFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrder
caf::PdmUiGroup* fractureCenterGroup = uiOrdering.addNewGroup("Fracture Center Info");
fractureCenterGroup->add(&m_uiAnchorPosition);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathFracture::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute)
void RimWellPathFracture::defineEditorAttribute(const caf::PdmFieldHandle* field,
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute)
{
RimFracture::defineEditorAttribute(field, uiConfigName, attribute);
@ -268,4 +268,3 @@ void RimWellPathFracture::defineEditorAttribute(const caf::PdmFieldHandle* field
}
}
}