mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-26 00:06:49 -06:00
Fixed indentation issues
Renamed and added asserts p4#: 20846
This commit is contained in:
parent
086262a4b6
commit
61e8115141
@ -25,21 +25,23 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigStatistics::addNamedResult(RigReservoirCellResults* cellResults, RimDefines::ResultCatType resultType, const QString& resultName, size_t activeCellCount)
|
||||
void RigStatistics::addNamedResult(RigReservoirCellResults* destinationCellResults, RimDefines::ResultCatType resultType, const QString& resultName, size_t activeUnionCellCount)
|
||||
{
|
||||
// Use time step dates from first result in first source case
|
||||
CVF_ASSERT(m_sourceCases.size() > 0);
|
||||
QList<QDateTime> timeStepDates = m_sourceCases[0]->results(RifReaderInterface::MATRIX_RESULTS)->timeStepDates(0);
|
||||
|
||||
size_t resultIndexMin = cellResults->addEmptyScalarResult(resultType, resultName);
|
||||
cellResults->setTimeStepDates(resultIndexMin, timeStepDates);
|
||||
QList<QDateTime> sourceTimeStepDates = m_sourceCases[0]->results(RifReaderInterface::MATRIX_RESULTS)->timeStepDates(0);
|
||||
size_t destinationScalarResultIndex = destinationCellResults->addEmptyScalarResult(resultType, resultName);
|
||||
CVF_ASSERT(destinationScalarResultIndex != cvf::UNDEFINED_SIZE_T);
|
||||
|
||||
std::vector< std::vector<double> >& dataValues = cellResults->cellScalarResults(resultIndexMin);
|
||||
dataValues.resize(timeStepDates.size());
|
||||
destinationCellResults->setTimeStepDates(destinationScalarResultIndex, sourceTimeStepDates);
|
||||
std::vector< std::vector<double> >& dataValues = destinationCellResults->cellScalarResults(destinationScalarResultIndex);
|
||||
dataValues.resize(sourceTimeStepDates.size());
|
||||
|
||||
for (int i = 0; i < timeStepDates.size(); i++)
|
||||
// Initializes the size of the destination dataset to active union cell count
|
||||
for (int i = 0; i < sourceTimeStepDates.size(); i++)
|
||||
{
|
||||
dataValues[i].resize(activeCellCount, HUGE_VAL);
|
||||
dataValues[i].resize(activeUnionCellCount, HUGE_VAL);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user