mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Removed unused code
This commit is contained in:
parent
5f3b2e00ec
commit
186867a831
@ -383,104 +383,3 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
/// Creates and assigns a ternary saturation color for all four vertices of a quad representing a cell face
|
|
||||||
///
|
|
||||||
/// Loads ternary saturation results SOIL, SWAT and SGAS
|
|
||||||
/// If any of these are not present, the values for a missing component is set to 0.0
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RivTransmissibilityColorMapper::updateTernarySaturationColorArray(size_t timeStepIndex, RimResultSlot* cellResultSlot,
|
|
||||||
const RigGridBase* grid, cvf::Color3ubArray* colorArray,
|
|
||||||
const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper)
|
|
||||||
{
|
|
||||||
RimReservoirCellResultsStorage* gridCellResults = cellResultSlot->currentGridCellResults();
|
|
||||||
if (!gridCellResults) return;
|
|
||||||
|
|
||||||
RigCaseData* eclipseCase = cellResultSlot->reservoirView()->eclipseCase()->reservoirData();
|
|
||||||
if (!eclipseCase) return;
|
|
||||||
|
|
||||||
size_t soilScalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::DYNAMIC_NATIVE, "SOIL");
|
|
||||||
size_t sgasScalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::DYNAMIC_NATIVE, "SGAS");
|
|
||||||
size_t swatScalarSetIndex = gridCellResults->findOrLoadScalarResult(RimDefines::DYNAMIC_NATIVE, "SWAT");
|
|
||||||
|
|
||||||
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultSlot->porosityModel());
|
|
||||||
|
|
||||||
double soilMin = 0.0;
|
|
||||||
double soilMax = 1.0;
|
|
||||||
double sgasMin = 0.0;
|
|
||||||
double sgasMax = 1.0;
|
|
||||||
double swatMin = 0.0;
|
|
||||||
double swatMax = 1.0;
|
|
||||||
|
|
||||||
cellResultSlot->ternaryLegendConfig()->ternaryRanges(soilMin, soilMax, sgasMin, sgasMax, swatMin, swatMax);
|
|
||||||
|
|
||||||
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObjectSoil = eclipseCase->TO_BE_DELETED_resultAccessor(grid, porosityModel, timeStepIndex, soilScalarSetIndex);
|
|
||||||
if (dataAccessObjectSoil.isNull())
|
|
||||||
{
|
|
||||||
dataAccessObjectSoil = new ScalarDataAccessZeroForAllCells;
|
|
||||||
}
|
|
||||||
|
|
||||||
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObjectSgas = eclipseCase->TO_BE_DELETED_resultAccessor(grid, porosityModel, timeStepIndex, sgasScalarSetIndex);
|
|
||||||
if (dataAccessObjectSgas.isNull())
|
|
||||||
{
|
|
||||||
dataAccessObjectSgas = new ScalarDataAccessZeroForAllCells;
|
|
||||||
}
|
|
||||||
|
|
||||||
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObjectSwat = eclipseCase->TO_BE_DELETED_resultAccessor(grid, porosityModel, timeStepIndex, swatScalarSetIndex);
|
|
||||||
if (dataAccessObjectSwat.isNull())
|
|
||||||
{
|
|
||||||
dataAccessObjectSwat = new ScalarDataAccessZeroForAllCells;
|
|
||||||
}
|
|
||||||
|
|
||||||
double soilRange = soilMax - soilMin;
|
|
||||||
double soilFactor = 255.0 / soilRange;
|
|
||||||
|
|
||||||
double sgasRange = sgasMax - sgasMin;
|
|
||||||
double sgasFactor = 255.0 / sgasRange;
|
|
||||||
|
|
||||||
double swatRange = swatMax - swatMin;
|
|
||||||
double swatFactor = 255.0 / swatRange;
|
|
||||||
|
|
||||||
size_t numVertices = quadToCellFaceMapper->quadCount()*4;
|
|
||||||
|
|
||||||
colorArray->resize(numVertices);
|
|
||||||
|
|
||||||
cvf::Color3ub ternaryColorByte;
|
|
||||||
double v, vNormalized;
|
|
||||||
|
|
||||||
#pragma omp parallel for private(ternaryColorByte, v, vNormalized)
|
|
||||||
for (int quadIdx = 0; quadIdx < static_cast<int>(quadToCellFaceMapper->quadCount()); quadIdx++)
|
|
||||||
{
|
|
||||||
size_t gridCellIndex = quadToCellFaceMapper->cellIndex(quadIdx);
|
|
||||||
|
|
||||||
{
|
|
||||||
v = dataAccessObjectSgas->cellScalar(gridCellIndex);
|
|
||||||
vNormalized = (v - sgasMin) * sgasFactor;
|
|
||||||
|
|
||||||
vNormalized = cvf::Math::clamp(vNormalized, 0.0, 255.0);
|
|
||||||
ternaryColorByte.r() = vNormalized;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
v = dataAccessObjectSoil->cellScalar(gridCellIndex);
|
|
||||||
vNormalized = (v - soilMin) * soilFactor;
|
|
||||||
|
|
||||||
vNormalized = cvf::Math::clamp(vNormalized, 0.0, 255.0);
|
|
||||||
ternaryColorByte.g() = vNormalized;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
v = dataAccessObjectSwat->cellScalar(gridCellIndex);
|
|
||||||
vNormalized = (v - swatMin) * swatFactor;
|
|
||||||
|
|
||||||
vNormalized = cvf::Math::clamp(vNormalized, 0.0, 255.0);
|
|
||||||
ternaryColorByte.b() = vNormalized;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t j;
|
|
||||||
for (j = 0; j < 4; j++)
|
|
||||||
{
|
|
||||||
colorArray->set(quadIdx*4 + j, ternaryColorByte);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -37,24 +37,6 @@ class RimCellEdgeResultSlot;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//==================================================================================================
|
|
||||||
///
|
|
||||||
///
|
|
||||||
//==================================================================================================
|
|
||||||
class RivTransmissibilityColorMapper
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
static void updateTernarySaturationColorArray(
|
|
||||||
size_t timeStepIndex,
|
|
||||||
RimResultSlot* cellResultSlot,
|
|
||||||
const RigGridBase* grid,
|
|
||||||
cvf::Color3ubArray* colorArray,
|
|
||||||
const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
/// RivGridGeometry: Class to handle visualization structures that embodies a specific grid at a specific time step.
|
/// RivGridGeometry: Class to handle visualization structures that embodies a specific grid at a specific time step.
|
||||||
|
Loading…
Reference in New Issue
Block a user