mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1645 Load dynamic NNC results from restart file
This commit is contained in:
@@ -145,14 +145,26 @@ void RivNNCGeometryGenerator::computeArrays()
|
||||
/// Calculates the texture coordinates in a "nearly" one dimensional texture.
|
||||
/// Undefined values are coded with a y-texture coordinate value of 1.0 instead of the normal 0.5
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivNNCGeometryGenerator::textureCoordinates(cvf::Vec2fArray* textureCoords, const cvf::ScalarMapper* mapper, size_t scalarResultIndex) const
|
||||
void RivNNCGeometryGenerator::textureCoordinates(cvf::Vec2fArray* textureCoords,
|
||||
const cvf::ScalarMapper* mapper,
|
||||
RimDefines::ResultCatType resultType,
|
||||
size_t scalarResultIndex,
|
||||
size_t timeStepIndex) const
|
||||
{
|
||||
size_t numVertices = m_vertices->size();
|
||||
|
||||
textureCoords->resize(numVertices);
|
||||
cvf::Vec2f* rawPtr = textureCoords->ptr();
|
||||
|
||||
const std::vector<double>* nncResultVals = m_nncData->connectionScalarResult(scalarResultIndex);
|
||||
const std::vector<double>* nncResultVals;
|
||||
if (resultType == RimDefines::STATIC_NATIVE)
|
||||
{
|
||||
nncResultVals = m_nncData->staticConnectionScalarResult(scalarResultIndex);
|
||||
}
|
||||
else if (resultType == RimDefines::DYNAMIC_NATIVE)
|
||||
{
|
||||
nncResultVals = m_nncData->dynamicConnectionScalarResult(scalarResultIndex, timeStepIndex);
|
||||
}
|
||||
|
||||
if (!nncResultVals)
|
||||
{
|
||||
textureCoords->setAll(cvf::Vec2f(0.0f, 1.0f));
|
||||
|
||||
Reference in New Issue
Block a user