mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Removed obsolete code and added comments
This commit is contained in:
@@ -164,7 +164,9 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read active cell info from all source cases
|
// Action A : Read active cell info
|
||||||
|
// Read active cell info from all source cases. The file access is optimized for this purpose, and result meta data
|
||||||
|
// is copied from main case to all other cases (see "Action B")
|
||||||
|
|
||||||
caf::ProgressInfo info(caseCollection()->reservoirs.size(), "Case group - Reading Active Cell data");
|
caf::ProgressInfo info(caseCollection()->reservoirs.size(), "Case group - Reading Active Cell data");
|
||||||
for (size_t i = 1; i < caseCollection()->reservoirs.size(); i++)
|
for (size_t i = 1; i < caseCollection()->reservoirs.size(); i++)
|
||||||
@@ -204,7 +206,10 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
|
|||||||
computeUnionOfActiveCells();
|
computeUnionOfActiveCells();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Propagate result meta data to all cases
|
// Action B : Copy result meta data from main case to all other cases in grid case group
|
||||||
|
|
||||||
|
// This code was originally part of RimStatisticsCaseEvaluator, but moved here to be a general solution
|
||||||
|
// for all cases
|
||||||
|
|
||||||
{
|
{
|
||||||
RifReaderInterface::PorosityModelResultType poroModel = RifReaderInterface::MATRIX_RESULTS;
|
RifReaderInterface::PorosityModelResultType poroModel = RifReaderInterface::MATRIX_RESULTS;
|
||||||
|
|||||||
@@ -67,30 +67,6 @@ QString createResultNameRange(const QString& resultName) { return resultName +
|
|||||||
QString createResultNamePVal(const QString& resultName, double pValPos) { return resultName + "_P_" + QString::number(pValPos); }
|
QString createResultNamePVal(const QString& resultName, double pValPos) { return resultName + "_P_" + QString::number(pValPos); }
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RimStatisticsCaseEvaluator::buildSourceMetaData(RifReaderInterface::PorosityModelResultType poroModel, RimDefines::ResultCatType resultType, const QString& resultName)
|
|
||||||
{
|
|
||||||
if (m_sourceCases.size() == 0) return;
|
|
||||||
|
|
||||||
std::vector<QDateTime> timeStepDates = m_sourceCases[0]->results(poroModel)->cellResults()->timeStepDates(0);
|
|
||||||
|
|
||||||
for (size_t caseIdx = 1; caseIdx < m_sourceCases.size(); caseIdx++)
|
|
||||||
{
|
|
||||||
RimReservoirCellResultsStorage* cellResultsStorage = m_sourceCases[caseIdx]->results(poroModel);
|
|
||||||
size_t scalarResultIndex = cellResultsStorage->cellResults()->findScalarResultIndex(resultType, resultName);
|
|
||||||
if (scalarResultIndex == cvf::UNDEFINED_SIZE_T)
|
|
||||||
{
|
|
||||||
size_t scalarResultIndex = cellResultsStorage->cellResults()->addEmptyScalarResult(resultType, resultName, false);
|
|
||||||
cellResultsStorage->cellResults()->setTimeStepDates(scalarResultIndex, timeStepDates);
|
|
||||||
|
|
||||||
std::vector< std::vector<double> >& dataValues = cellResultsStorage->cellResults()->cellScalarResults(scalarResultIndex);
|
|
||||||
dataValues.resize(timeStepDates.size());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -109,28 +85,9 @@ void RimStatisticsCaseEvaluator::evaluateForResults(const QList<ResSpec>& result
|
|||||||
size_t activeCellCount = m_destinationCase->activeCellInfo(poroModel)->reservoirActiveCellCount();
|
size_t activeCellCount = m_destinationCase->activeCellInfo(poroModel)->reservoirActiveCellCount();
|
||||||
RigCaseCellResultsData* destCellResultsData = m_destinationCase->results(poroModel);
|
RigCaseCellResultsData* destCellResultsData = m_destinationCase->results(poroModel);
|
||||||
|
|
||||||
// // Special handling if SOIL is asked for
|
// Placeholder data used to be created here,
|
||||||
// // Build SGAS/SWAT meta data, SOIL is automatically generated as part of RigCaseCellResultsData::findOrLoadScalarResultForTimeStep
|
// this is now moved to RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
|
||||||
// if (resultName.toUpper() == "SOIL")
|
|
||||||
// {
|
|
||||||
// size_t swatIndex = m_sourceCases.at(0)->results(poroModel)->cellResults()->findScalarResultIndex(resultType, "SWAT");
|
|
||||||
// if (swatIndex != cvf::UNDEFINED_SIZE_T)
|
|
||||||
// {
|
|
||||||
// buildSourceMetaData(poroModel, resultType, "SWAT");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// size_t sgasIndex = m_sourceCases.at(0)->results(poroModel)->cellResults()->findScalarResultIndex(resultType, "SGAS");
|
|
||||||
// if (sgasIndex != cvf::UNDEFINED_SIZE_T)
|
|
||||||
// {
|
|
||||||
// buildSourceMetaData(poroModel, resultType, "SGAS");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// // Meta info is loaded from disk for first case only
|
|
||||||
// // Build metadata for all other source cases
|
|
||||||
// buildSourceMetaData(poroModel, resultType, resultName);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Create new result data structures to contain the statistical values
|
// Create new result data structures to contain the statistical values
|
||||||
std::vector<QString> statisticalResultNames;
|
std::vector<QString> statisticalResultNames;
|
||||||
|
|||||||
Reference in New Issue
Block a user