///////////////////////////////////////////////////////////////////////////////// // // 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 // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include "RigFemResultAddress.h" #include "cvfCollection.h" #include "cvfObject.h" #include #include class RifGeoMechReaderInterface; class RigFemScalarResultFrames; class RigFemPartResultsCollection; class RigFemPartResults; class RigStatisticsDataCache; class RigFemPartCollection; class RigFemPartResultsCollection: public cvf::Object { public: RigFemPartResultsCollection(RifGeoMechReaderInterface* readerInterface, const RigFemPartCollection * femPartCollection); ~RigFemPartResultsCollection(); std::map > scalarFieldAndComponentNames(RigFemResultPosEnum resPos); std::vector stepNames(); bool assertResultsLoaded(const RigFemResultAddress& resVarAddr); const std::vector& resultValues(const RigFemResultAddress& resVarAddr, int partIndex, int frameIndex); int frameCount(); void minMaxScalarValues (const RigFemResultAddress& resVarAddr, int frameIndex, double* localMin, double* localMax); void posNegClosestToZero(const RigFemResultAddress& resVarAddr, int frameIndex, double* localPosClosestToZero, double* localNegClosestToZero); void minMaxScalarValues (const RigFemResultAddress& resVarAddr, double* globalMin, double* globalMax); void posNegClosestToZero(const RigFemResultAddress& resVarAddr, double* globalPosClosestToZero, double* globalNegClosestToZero); void meanScalarValue(const RigFemResultAddress& resVarAddr, double* meanValue); void p10p90ScalarValues(const RigFemResultAddress& resVarAddr, double* p10, double* p90); const std::vector& scalarValuesHistogram(const RigFemResultAddress& resVarAddr); private: RigFemScalarResultFrames* findOrLoadScalarResult(int partIndex, const RigFemResultAddress& resVarAddr); RigFemScalarResultFrames* calculateDerivedResult(int partIndex, const RigFemResultAddress& resVarAddr); friend class RigFemNativeStatCalc; cvf::Collection m_femPartResults; cvf::ref m_readerInterface; cvf::cref m_femParts; RigStatisticsDataCache* statistics(const RigFemResultAddress& resVarAddr); std::vector< RigFemResultAddress> getResAddrToComponentsToRead(const RigFemResultAddress& resVarAddr); std::map > m_resultStatistics; };