mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1441 Add skin factor and rename UI
This commit is contained in:
parent
f326d5e2a3
commit
2d4e4b47b3
@ -24,8 +24,6 @@
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <ctime>
|
||||
#include <cstdlib>
|
||||
|
||||
|
||||
@ -238,9 +236,7 @@ void RimFishbonesMultipleSubs::fieldChangedByUi(const caf::PdmFieldHandle* chang
|
||||
changedField == &m_locationOfSubs ||
|
||||
changedField == &m_subsOrientationMode)
|
||||
{
|
||||
m_installationRotationAngles.v().clear();
|
||||
|
||||
recomputeIntallationRotationAngles();
|
||||
computeRotationAngles();
|
||||
}
|
||||
|
||||
RimProject* proj;
|
||||
@ -360,20 +356,20 @@ void RimFishbonesMultipleSubs::initAfterRead()
|
||||
{
|
||||
if (m_locationOfSubs().size() != m_installationRotationAngles().size())
|
||||
{
|
||||
recomputeIntallationRotationAngles();
|
||||
computeRotationAngles();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishbonesMultipleSubs::recomputeIntallationRotationAngles()
|
||||
void RimFishbonesMultipleSubs::computeRotationAngles()
|
||||
{
|
||||
std::vector<double> vals;
|
||||
|
||||
for (size_t i = 0; i < m_locationOfSubs().size(); i++)
|
||||
{
|
||||
vals.push_back(RimFishbonesMultipleSubs::randomValue(0, 360));
|
||||
vals.push_back(RimFishbonesMultipleSubs::randomValueFromRange(0, 360));
|
||||
}
|
||||
|
||||
m_installationRotationAngles = vals;
|
||||
@ -397,7 +393,7 @@ std::vector<double> RimFishbonesMultipleSubs::locationsFromStartSpacingAndCount(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RimFishbonesMultipleSubs::randomValue(int min, int max)
|
||||
int RimFishbonesMultipleSubs::randomValueFromRange(int min, int max)
|
||||
{
|
||||
int range = abs(max - min);
|
||||
int random_integer = min + int(range*rand() / (RAND_MAX + 1.0));
|
||||
|
@ -20,8 +20,6 @@
|
||||
|
||||
#include "RimCheckableNamedObject.h"
|
||||
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
@ -58,17 +56,16 @@ public:
|
||||
double lateralCountPerSub() const;
|
||||
std::vector<double> lateralLengths() const;
|
||||
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
virtual void initAfterRead() override;
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
virtual void initAfterRead() override;
|
||||
|
||||
private:
|
||||
void recomputeIntallationRotationAngles();
|
||||
void computeRotationAngles();
|
||||
|
||||
static std::vector<double> locationsFromStartSpacingAndCount(double start, double spacing, size_t count);
|
||||
static int randomValue(int min, int max);
|
||||
static int randomValueFromRange(int min, int max);
|
||||
|
||||
private:
|
||||
caf::PdmField<size_t> m_lateralCountPerSub;
|
||||
@ -99,10 +96,8 @@ private:
|
||||
|
||||
caf::PdmField<caf::AppEnum<LateralsOrientationType> > m_subsOrientationMode;
|
||||
|
||||
|
||||
caf::PdmField<std::vector<double>> m_locationOfSubs; // Given in measured depth
|
||||
|
||||
caf::PdmField<std::vector<double>> m_installationRotationAngles;
|
||||
caf::PdmField<double> m_fixedInstallationRotationAngle;
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user