mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Prep for Gromech range filters:
* Generalized RangeFilter vs view * Added stub implememntation of a StructGridInterface implementation for Fem parts
This commit is contained in:
@@ -46,7 +46,7 @@ void RigFemPart::preAllocateElementStorage(int elementCount)
|
||||
m_elementTypes.reserve(elementCount);
|
||||
m_elementConnectivityStartIndices.reserve(elementCount);
|
||||
|
||||
m_allAlementConnectivities.reserve(elementCount*8);
|
||||
m_allAlementConnectivities.reserve(elementCount*8);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -64,3 +64,176 @@ void RigFemPart::appendElement(RigElementType elmType, int id, const int* connec
|
||||
m_allAlementConnectivities.push_back(connectivities[lnIdx]);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigFemPartGrid* RigFemPart::structGrid()
|
||||
{
|
||||
if (m_structGrid.isNull())
|
||||
{
|
||||
m_structGrid = new RigFemPartGrid(this);
|
||||
}
|
||||
|
||||
return m_structGrid.p();
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigFemPartGrid::RigFemPartGrid(RigFemPart* femPart)
|
||||
{
|
||||
m_femPart = femPart;
|
||||
generateStructGridData();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigFemPartGrid::~RigFemPartGrid()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigFemPartGrid::generateStructGridData()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RigFemPartGrid::gridPointCountI() const
|
||||
{
|
||||
CVF_ASSERT(false);
|
||||
return cvf::UNDEFINED_SIZE_T;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RigFemPartGrid::gridPointCountJ() const
|
||||
{
|
||||
CVF_ASSERT(false);
|
||||
return cvf::UNDEFINED_SIZE_T;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RigFemPartGrid::gridPointCountK() const
|
||||
{
|
||||
CVF_ASSERT(false);
|
||||
return cvf::UNDEFINED_SIZE_T;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigFemPartGrid::isCellValid(size_t i, size_t j, size_t k) const
|
||||
{
|
||||
CVF_ASSERT(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3d RigFemPartGrid::minCoordinate() const
|
||||
{
|
||||
CVF_ASSERT(false);
|
||||
return cvf::Vec3d::ZERO;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3d RigFemPartGrid::maxCoordinate() const
|
||||
{
|
||||
CVF_ASSERT(false);
|
||||
return cvf::Vec3d::ZERO;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigFemPartGrid::cellIJKNeighbor(size_t i, size_t j, size_t k, FaceType face, size_t* neighborCellIndex) const
|
||||
{
|
||||
CVF_ASSERT(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RigFemPartGrid::cellIndexFromIJK(size_t i, size_t j, size_t k) const
|
||||
{
|
||||
CVF_ASSERT(false);
|
||||
return cvf::UNDEFINED_SIZE_T;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigFemPartGrid::ijkFromCellIndex(size_t cellIndex, size_t* i, size_t* j, size_t* k) const
|
||||
{
|
||||
CVF_ASSERT(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigFemPartGrid::cellIJKFromCoordinate(const cvf::Vec3d& coord, size_t* i, size_t* j, size_t* k) const
|
||||
{
|
||||
CVF_ASSERT(false);
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigFemPartGrid::cellCornerVertices(size_t cellIndex, cvf::Vec3d vertices[8]) const
|
||||
{
|
||||
CVF_ASSERT(false);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3d RigFemPartGrid::cellCentroid(size_t cellIndex) const
|
||||
{
|
||||
CVF_ASSERT(false);
|
||||
return cvf::Vec3d::ZERO;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigFemPartGrid::cellMinMaxCordinates(size_t cellIndex, cvf::Vec3d* minCoordinate, cvf::Vec3d* maxCoordinate) const
|
||||
{
|
||||
CVF_ASSERT(false);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RigFemPartGrid::gridPointIndexFromIJK(size_t i, size_t j, size_t k) const
|
||||
{
|
||||
CVF_ASSERT(false);
|
||||
return cvf::UNDEFINED_SIZE_T;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3d RigFemPartGrid::gridPointCoordinate(size_t i, size_t j, size_t k) const
|
||||
{
|
||||
CVF_ASSERT(false);
|
||||
return cvf::Vec3d::ZERO;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "cvfVector3.h"
|
||||
#include <vector>
|
||||
|
||||
class RigFemPartGrid;
|
||||
|
||||
class RigFemPartNodes
|
||||
{
|
||||
public:
|
||||
@@ -56,6 +58,8 @@ public:
|
||||
|
||||
RigFemPartNodes& nodes() {return m_nodes;}
|
||||
const RigFemPartNodes& nodes() const {return m_nodes;}
|
||||
|
||||
const RigFemPartGrid* structGrid();
|
||||
|
||||
private:
|
||||
int m_elementPartId;
|
||||
@@ -66,4 +70,38 @@ private:
|
||||
|
||||
RigFemPartNodes m_nodes;
|
||||
|
||||
cvf::ref<RigFemPartGrid> m_structGrid;
|
||||
};
|
||||
|
||||
#include "cvfStructGrid.h"
|
||||
|
||||
class RigFemPartGrid : public cvf::StructGridInterface
|
||||
{
|
||||
public:
|
||||
RigFemPartGrid(RigFemPart* femPart);
|
||||
virtual ~RigFemPartGrid();
|
||||
|
||||
virtual size_t gridPointCountI() const;
|
||||
virtual size_t gridPointCountJ() const;
|
||||
virtual size_t gridPointCountK() const;
|
||||
|
||||
virtual bool isCellValid(size_t i, size_t j, size_t k) const;
|
||||
virtual cvf::Vec3d minCoordinate() const;
|
||||
virtual cvf::Vec3d maxCoordinate() const;
|
||||
virtual bool cellIJKNeighbor(size_t i, size_t j, size_t k, FaceType face, size_t* neighborCellIndex) const;
|
||||
virtual size_t cellIndexFromIJK(size_t i, size_t j, size_t k) const;
|
||||
virtual bool ijkFromCellIndex(size_t cellIndex, size_t* i, size_t* j, size_t* k) const;
|
||||
virtual bool cellIJKFromCoordinate(const cvf::Vec3d& coord, size_t* i, size_t* j, size_t* k) const;
|
||||
virtual void cellCornerVertices(size_t cellIndex, cvf::Vec3d vertices[8]) const;
|
||||
virtual cvf::Vec3d cellCentroid(size_t cellIndex) const;
|
||||
virtual void cellMinMaxCordinates(size_t cellIndex, cvf::Vec3d* minCoordinate, cvf::Vec3d* maxCoordinate) const;
|
||||
virtual size_t gridPointIndexFromIJK(size_t i, size_t j, size_t k) const;
|
||||
virtual cvf::Vec3d gridPointCoordinate(size_t i, size_t j, size_t k) const;
|
||||
|
||||
|
||||
private:
|
||||
void generateStructGridData();
|
||||
|
||||
|
||||
RigFemPart* m_femPart;
|
||||
};
|
||||
Reference in New Issue
Block a user