mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
pre-proto - Rename (and adding todo-s for further work)
This commit is contained in:
parent
97cdf836cd
commit
63e975f6ff
@ -91,7 +91,7 @@ void RivWellFracturesPartMgr::appendFracturePartsToModel(std::vector<RimFracture
|
|||||||
if (fracture->hasValidGeometry())
|
if (fracture->hasValidGeometry())
|
||||||
{
|
{
|
||||||
const std::vector<cvf::Vec3f>& nodeCoords = fracture->nodeCoords();
|
const std::vector<cvf::Vec3f>& nodeCoords = fracture->nodeCoords();
|
||||||
const std::vector<cvf::uint>& polygonIndices = fracture->polygonIndices();
|
const std::vector<cvf::uint>& triangleIndices = fracture->triangleIndices();
|
||||||
std::vector<cvf::Vec3f> displayCoords;
|
std::vector<cvf::Vec3f> displayCoords;
|
||||||
|
|
||||||
for (int i = 0; i < nodeCoords.size(); i++)
|
for (int i = 0; i < nodeCoords.size(); i++)
|
||||||
@ -101,7 +101,7 @@ void RivWellFracturesPartMgr::appendFracturePartsToModel(std::vector<RimFracture
|
|||||||
displayCoords.push_back(static_cast<cvf::Vec3f>(displayCoordsDouble));
|
displayCoords.push_back(static_cast<cvf::Vec3f>(displayCoordsDouble));
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::ref<cvf::DrawableGeo> geo = createGeo(polygonIndices, displayCoords);
|
cvf::ref<cvf::DrawableGeo> geo = createGeo(triangleIndices, displayCoords);
|
||||||
|
|
||||||
cvf::ref<cvf::Part> part = new cvf::Part;
|
cvf::ref<cvf::Part> part = new cvf::Part;
|
||||||
part->setDrawable(geo.p());
|
part->setDrawable(geo.p());
|
||||||
|
@ -56,9 +56,9 @@ RimFracture::~RimFracture()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
const std::vector<cvf::uint>& RimFracture::polygonIndices() const
|
const std::vector<cvf::uint>& RimFracture::triangleIndices() const
|
||||||
{
|
{
|
||||||
return m_rigFracture->polygonIndices();
|
return m_rigFracture->triangleIndices();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -117,6 +117,8 @@ void RimFracture::computeGeometry()
|
|||||||
cvf::Mat4f m = azimuthRotation * rotationFromTesselator;
|
cvf::Mat4f m = azimuthRotation * rotationFromTesselator;
|
||||||
m.setTranslation(cvf::Vec3f(center));
|
m.setTranslation(cvf::Vec3f(center));
|
||||||
|
|
||||||
|
//Denne matrisa bør ut i egen funksjon for å brukes andre steder også...
|
||||||
|
|
||||||
for (cvf::Vec3f& v : nodeCoords)
|
for (cvf::Vec3f& v : nodeCoords)
|
||||||
{
|
{
|
||||||
v.transformPoint(m);
|
v.transformPoint(m);
|
||||||
@ -134,6 +136,8 @@ void RimFracture::computeTransmissibility()
|
|||||||
{
|
{
|
||||||
std::vector<RigFractureData> fracDataVec;
|
std::vector<RigFractureData> fracDataVec;
|
||||||
|
|
||||||
|
//TODO: Use global cell index instead of pair of grid, cell index
|
||||||
|
//TODO: use RigMainGrid - findIntersectingCells / boundingbox
|
||||||
std::vector<std::pair<size_t, size_t>> fracCells = getFracturedCells();
|
std::vector<std::pair<size_t, size_t>> fracCells = getFracturedCells();
|
||||||
|
|
||||||
for (auto fracCell : fracCells)
|
for (auto fracCell : fracCells)
|
||||||
@ -219,6 +223,6 @@ bool RimFracture::hasValidGeometry() const
|
|||||||
{
|
{
|
||||||
if (m_recomputeGeometry) return false;
|
if (m_recomputeGeometry) return false;
|
||||||
|
|
||||||
return (nodeCoords().size() > 0 && polygonIndices().size() > 0);
|
return (nodeCoords().size() > 0 && triangleIndices().size() > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ public:
|
|||||||
caf::PdmField<double> azimuth;
|
caf::PdmField<double> azimuth;
|
||||||
|
|
||||||
virtual cvf::Vec3d centerPointForFracture() = 0;
|
virtual cvf::Vec3d centerPointForFracture() = 0;
|
||||||
|
virtual cvf::Mat4d transformMatrix() = 0;
|
||||||
virtual RimFractureDefinition* attachedFractureDefinition() = 0;
|
virtual RimFractureDefinition* attachedFractureDefinition() = 0;
|
||||||
cvf::ref<RigFracture> attachedRigFracture();
|
cvf::ref<RigFracture> attachedRigFracture();
|
||||||
|
|
||||||
@ -52,7 +53,7 @@ public:
|
|||||||
void computeGeometry();
|
void computeGeometry();
|
||||||
void setRecomputeGeometryFlag();
|
void setRecomputeGeometryFlag();
|
||||||
|
|
||||||
const std::vector<cvf::uint>& polygonIndices() const;
|
const std::vector<cvf::uint>& triangleIndices() const;
|
||||||
const std::vector<cvf::Vec3f>& nodeCoords() const;
|
const std::vector<cvf::Vec3f>& nodeCoords() const;
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
///
|
///
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
class RimFractureDefinition : public caf::PdmObject
|
class RimFractureDefinition : public caf::PdmObject //TODO: Rename to RimFractureEllipseDefinition
|
||||||
{
|
{
|
||||||
CAF_PDM_HEADER_INIT;
|
CAF_PDM_HEADER_INIT;
|
||||||
|
|
||||||
@ -40,8 +40,8 @@ public:
|
|||||||
|
|
||||||
caf::PdmField<float> halfLength;
|
caf::PdmField<float> halfLength;
|
||||||
caf::PdmField<float> height;
|
caf::PdmField<float> height;
|
||||||
caf::PdmField<float> width;
|
|
||||||
|
|
||||||
|
caf::PdmField<float> width;
|
||||||
caf::PdmField<float> skinFactor;
|
caf::PdmField<float> skinFactor;
|
||||||
caf::PdmField<float> permeability;
|
caf::PdmField<float> permeability;
|
||||||
|
|
||||||
@ -56,8 +56,13 @@ public:
|
|||||||
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
||||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||||
|
|
||||||
|
|
||||||
double effectiveKh();
|
double effectiveKh();
|
||||||
|
|
||||||
|
//TODO: Method to get 2D geometry. Returning indexed triangles
|
||||||
|
|
||||||
|
//TODO: Method to return a polygon from indexed triangles.
|
||||||
|
//clipper execute method, union
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
||||||
|
@ -39,15 +39,15 @@ RigFracture::RigFracture()
|
|||||||
void RigFracture::setGeometry(const std::vector<cvf::uint>& polygonIndices, const std::vector<cvf::Vec3f>& nodeCoords)
|
void RigFracture::setGeometry(const std::vector<cvf::uint>& polygonIndices, const std::vector<cvf::Vec3f>& nodeCoords)
|
||||||
{
|
{
|
||||||
m_nodeCoords = nodeCoords;
|
m_nodeCoords = nodeCoords;
|
||||||
m_polygonIndices = polygonIndices;
|
m_triangleIndices = polygonIndices;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
const std::vector<cvf::uint>& RigFracture::polygonIndices() const
|
const std::vector<cvf::uint>& RigFracture::triangleIndices() const
|
||||||
{
|
{
|
||||||
return m_polygonIndices;
|
return m_triangleIndices;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -47,14 +47,14 @@ public:
|
|||||||
|
|
||||||
void setGeometry(const std::vector<cvf::uint>& polygonIndices, const std::vector<cvf::Vec3f>& nodeCoords);
|
void setGeometry(const std::vector<cvf::uint>& polygonIndices, const std::vector<cvf::Vec3f>& nodeCoords);
|
||||||
|
|
||||||
const std::vector<cvf::uint>& polygonIndices() const;
|
const std::vector<cvf::uint>& triangleIndices() const;
|
||||||
const std::vector<cvf::Vec3f>& nodeCoords() const;
|
const std::vector<cvf::Vec3f>& nodeCoords() const;
|
||||||
|
|
||||||
void setFractureData(const std::vector<RigFractureData>& data);
|
void setFractureData(const std::vector<RigFractureData>& data);
|
||||||
const std::vector<RigFractureData>& fractureData() const; //Access frac data
|
const std::vector<RigFractureData>& fractureData() const; //Access frac data
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<cvf::uint> m_polygonIndices;
|
std::vector<cvf::uint> m_triangleIndices;
|
||||||
std::vector<cvf::Vec3f> m_nodeCoords;
|
std::vector<cvf::Vec3f> m_nodeCoords;
|
||||||
std::vector<RigFractureData> m_fractureData;
|
std::vector<RigFractureData> m_fractureData;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user