mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Preparing for result visualization
Calculated mapping vx to node nad elmnode reults
This commit is contained in:
@@ -170,7 +170,7 @@ void RivFemPartGeometryGenerator::computeArrays()
|
||||
for (int lfIdx = 0; lfIdx < faceCount; ++lfIdx)
|
||||
{
|
||||
int faceNodeCount = 0;
|
||||
const int* elmLocalFaceIndices = RigFemTypes::elementLocalFaceIndices(eType, lfIdx, &faceNodeCount);
|
||||
const int* localElmNodeIndicesForFace = RigFemTypes::localElmNodeIndicesForFace(eType, lfIdx, &faceNodeCount);
|
||||
if (faceNodeCount == 4)
|
||||
{
|
||||
#if 0
|
||||
@@ -183,10 +183,20 @@ void RivFemPartGeometryGenerator::computeArrays()
|
||||
#endif
|
||||
// Needs to get rid of opposite faces
|
||||
|
||||
vertices.push_back(nodeCoordinates[ elmNodeIndices[elmLocalFaceIndices[0]] ]);
|
||||
vertices.push_back(nodeCoordinates[ elmNodeIndices[elmLocalFaceIndices[1]] ]);
|
||||
vertices.push_back(nodeCoordinates[ elmNodeIndices[elmLocalFaceIndices[2]] ]);
|
||||
vertices.push_back(nodeCoordinates[ elmNodeIndices[elmLocalFaceIndices[3]] ]);
|
||||
vertices.push_back(nodeCoordinates[ elmNodeIndices[localElmNodeIndicesForFace[0]] ]);
|
||||
vertices.push_back(nodeCoordinates[ elmNodeIndices[localElmNodeIndicesForFace[1]] ]);
|
||||
vertices.push_back(nodeCoordinates[ elmNodeIndices[localElmNodeIndicesForFace[2]] ]);
|
||||
vertices.push_back(nodeCoordinates[ elmNodeIndices[localElmNodeIndicesForFace[3]] ]);
|
||||
|
||||
m_quadVerticesToNodeIdx.push_back(elmNodeIndices[localElmNodeIndicesForFace[0]]);
|
||||
m_quadVerticesToNodeIdx.push_back(elmNodeIndices[localElmNodeIndicesForFace[1]]);
|
||||
m_quadVerticesToNodeIdx.push_back(elmNodeIndices[localElmNodeIndicesForFace[2]]);
|
||||
m_quadVerticesToNodeIdx.push_back(elmNodeIndices[localElmNodeIndicesForFace[3]]);
|
||||
|
||||
m_quadVerticesToGlobalElmNodeIdx.push_back(m_part->elementNodeResultIdx(elmIdx, localElmNodeIndicesForFace[0]));
|
||||
m_quadVerticesToGlobalElmNodeIdx.push_back(m_part->elementNodeResultIdx(elmIdx, localElmNodeIndicesForFace[1]));
|
||||
m_quadVerticesToGlobalElmNodeIdx.push_back(m_part->elementNodeResultIdx(elmIdx, localElmNodeIndicesForFace[2]));
|
||||
m_quadVerticesToGlobalElmNodeIdx.push_back(m_part->elementNodeResultIdx(elmIdx, localElmNodeIndicesForFace[3]));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -204,15 +214,6 @@ void RivFemPartGeometryGenerator::computeArrays()
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Calculates the texture coordinates in a "nearly" one dimentional texture.
|
||||
/// Undefined values are coded with a y-texturecoordinate value of 1.0 instead of the normal 0.5
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivFemPartGeometryGenerator::textureCoordinates(Vec2fArray* textureCoords, const RigFemPartScalarDataAccess* resultAccessor, const ScalarMapper* mapper) const
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -37,8 +37,6 @@ public:
|
||||
|
||||
const RigFemPart* activePart() { return m_part.p(); }
|
||||
|
||||
void textureCoordinates(cvf::Vec2fArray* textureCoords, const RigFemPartScalarDataAccess* resultAccessor, const cvf::ScalarMapper* mapper) const;
|
||||
|
||||
// Generated geometry
|
||||
cvf::ref<cvf::DrawableGeo> generateSurface();
|
||||
cvf::ref<cvf::DrawableGeo> createMeshDrawable();
|
||||
@@ -57,6 +55,8 @@ private:
|
||||
// Created arrays
|
||||
cvf::ref<cvf::Vec3fArray> m_quadVertices;
|
||||
//cvf::ref<cvf::Vec3fArray> m_triangleVertices; // If needed, we will do it like this, I think
|
||||
std::vector<size_t> m_quadVerticesToNodeIdx;
|
||||
std::vector<size_t> m_quadVerticesToGlobalElmNodeIdx;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user