2015-06-04 05:35:22 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
|
|
|
//
|
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "RigFemResultAddress.h"
|
|
|
|
|
|
|
|
#include "cvfCollection.h"
|
|
|
|
#include "cvfObject.h"
|
|
|
|
#include <map>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class RifGeoMechReaderInterface;
|
|
|
|
class RigFemScalarResultFrames;
|
|
|
|
class RigFemPartResultsCollection;
|
|
|
|
class RigFemPartResults;
|
2015-06-04 09:10:02 -05:00
|
|
|
class RigStatisticsDataCache;
|
2015-06-15 05:15:00 -05:00
|
|
|
class RigFemPartCollection;
|
2016-09-06 03:27:30 -05:00
|
|
|
class RigFormationNames;
|
2015-06-04 05:35:22 -05:00
|
|
|
|
|
|
|
class RigFemPartResultsCollection: public cvf::Object
|
|
|
|
{
|
|
|
|
public:
|
2015-06-15 05:15:00 -05:00
|
|
|
RigFemPartResultsCollection(RifGeoMechReaderInterface* readerInterface, const RigFemPartCollection * femPartCollection);
|
2015-06-04 05:35:22 -05:00
|
|
|
~RigFemPartResultsCollection();
|
|
|
|
|
2016-09-06 03:27:30 -05:00
|
|
|
void setActiveFormationNames(RigFormationNames* activeFormationNames);
|
|
|
|
RigFormationNames* activeFormationNames();
|
|
|
|
|
2015-06-04 05:35:22 -05:00
|
|
|
std::map<std::string, std::vector<std::string> > scalarFieldAndComponentNames(RigFemResultPosEnum resPos);
|
2015-06-04 09:10:02 -05:00
|
|
|
std::vector<std::string> stepNames();
|
2015-06-09 09:18:11 -05:00
|
|
|
bool assertResultsLoaded(const RigFemResultAddress& resVarAddr);
|
2015-06-04 09:10:02 -05:00
|
|
|
const std::vector<float>& resultValues(const RigFemResultAddress& resVarAddr, int partIndex, int frameIndex);
|
2015-11-06 03:18:55 -06:00
|
|
|
int partCount() const;
|
2015-06-04 09:10:02 -05:00
|
|
|
int frameCount();
|
2015-06-04 05:35:22 -05:00
|
|
|
|
|
|
|
|
2015-06-04 09:10:02 -05:00
|
|
|
void minMaxScalarValues (const RigFemResultAddress& resVarAddr, int frameIndex, double* localMin, double* localMax);
|
|
|
|
void minMaxScalarValues (const RigFemResultAddress& resVarAddr, double* globalMin, double* globalMax);
|
2015-11-04 08:44:09 -06:00
|
|
|
void posNegClosestToZero(const RigFemResultAddress& resVarAddr, int frameIndex, double* localPosClosestToZero, double* localNegClosestToZero);
|
2015-06-04 09:10:02 -05:00
|
|
|
void posNegClosestToZero(const RigFemResultAddress& resVarAddr, double* globalPosClosestToZero, double* globalNegClosestToZero);
|
|
|
|
void meanScalarValue(const RigFemResultAddress& resVarAddr, double* meanValue);
|
2015-11-04 08:44:09 -06:00
|
|
|
void meanScalarValue(const RigFemResultAddress& resVarAddr, int frameIndex, double* meanValue);
|
2015-06-04 09:10:02 -05:00
|
|
|
void p10p90ScalarValues(const RigFemResultAddress& resVarAddr, double* p10, double* p90);
|
2015-11-04 08:44:09 -06:00
|
|
|
void p10p90ScalarValues(const RigFemResultAddress& resVarAddr, int frameIndex, double* p10, double* p90);
|
2016-08-04 07:15:59 -05:00
|
|
|
void sumScalarValue(const RigFemResultAddress& resVarAddr, double* sum);
|
|
|
|
void sumScalarValue(const RigFemResultAddress& resVarAddr, int frameIndex, double* sum);
|
2015-06-04 09:10:02 -05:00
|
|
|
const std::vector<size_t>& scalarValuesHistogram(const RigFemResultAddress& resVarAddr);
|
2015-11-04 08:44:09 -06:00
|
|
|
const std::vector<size_t>& scalarValuesHistogram(const RigFemResultAddress& resVarAddr, int frameIndex);
|
2015-06-09 09:18:11 -05:00
|
|
|
|
2015-06-04 05:35:22 -05:00
|
|
|
private:
|
2015-06-04 09:10:02 -05:00
|
|
|
RigFemScalarResultFrames* findOrLoadScalarResult(int partIndex,
|
|
|
|
const RigFemResultAddress& resVarAddr);
|
|
|
|
|
2015-06-12 11:41:47 -05:00
|
|
|
RigFemScalarResultFrames* calculateDerivedResult(int partIndex, const RigFemResultAddress& resVarAddr);
|
|
|
|
|
2015-09-26 02:38:29 -05:00
|
|
|
RigFemScalarResultFrames* calculateBarConvertedResult(int partIndex, const RigFemResultAddress &convertedResultAddr, const std::string fieldNameToConvert);
|
2015-09-28 00:39:57 -05:00
|
|
|
RigFemScalarResultFrames* calculateEnIpPorBarResult(int partIndex, const RigFemResultAddress &convertedResultAddr);
|
2016-10-10 09:09:54 -05:00
|
|
|
RigFemScalarResultFrames* calculateTimeLapseResult(int partIndex, const RigFemResultAddress& resVarAddr);
|
2016-10-11 05:12:10 -05:00
|
|
|
RigFemScalarResultFrames* calculateMeanStressSM(int partIndex, const RigFemResultAddress& resVarAddr);
|
2015-09-26 02:38:29 -05:00
|
|
|
|
2015-06-04 09:10:02 -05:00
|
|
|
cvf::Collection<RigFemPartResults> m_femPartResults;
|
|
|
|
cvf::ref<RifGeoMechReaderInterface> m_readerInterface;
|
2015-06-15 05:15:00 -05:00
|
|
|
cvf::cref<RigFemPartCollection> m_femParts;
|
2016-09-06 03:27:30 -05:00
|
|
|
cvf::ref<RigFormationNames> m_activeFormationNamesData;
|
2015-06-04 05:35:22 -05:00
|
|
|
|
2015-06-04 09:10:02 -05:00
|
|
|
RigStatisticsDataCache* statistics(const RigFemResultAddress& resVarAddr);
|
2015-06-12 11:41:47 -05:00
|
|
|
std::vector< RigFemResultAddress> getResAddrToComponentsToRead(const RigFemResultAddress& resVarAddr);
|
2015-06-04 09:10:02 -05:00
|
|
|
std::map<RigFemResultAddress, cvf::ref<RigStatisticsDataCache> > m_resultStatistics;
|
2015-06-04 05:35:22 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|