///////////////////////////////////////////////////////////////////////////////// // // 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 "cvfObject.h" #include "cvfVector3.h" #include #include #include class RigFemPartCollection; //================================================================================================== // // Data interface base class // //================================================================================================== class RifGeoMechReaderInterface : public cvf::Object { public: RifGeoMechReaderInterface(); ~RifGeoMechReaderInterface() override; virtual bool openFile( const std::string& fileName, std::string* errorMessage ) = 0; virtual bool isOpen() const = 0; virtual bool readFemParts( RigFemPartCollection* geoMechCase ) = 0; virtual std::vector allStepNames() const = 0; virtual std::vector filteredStepNames() const = 0; virtual std::vector frameTimes( int stepIndex ) const = 0; virtual std::vector elementSetNames( int partIndex ) = 0; virtual std::vector elementSet( int partIndex, int setIndex ) = 0; virtual std::map> scalarNodeFieldAndComponentNames() = 0; virtual std::map> scalarElementNodeFieldAndComponentNames() = 0; virtual std::map> scalarIntegrationPointFieldAndComponentNames() = 0; virtual void readDisplacements( int partIndex, int stepIndex, int frameIndex, std::vector* displacements ) = 0; virtual void readNodeField( const std::string& fieldName, int partIndex, int stepIndex, int frameIndex, std::vector*>* resultValues ) = 0; virtual void readElementNodeField( const std::string& fieldName, int partIndex, int stepIndex, int frameIndex, std::vector*>* resultValues ) = 0; virtual void readIntegrationPointField( const std::string& fieldName, int partIndex, int stepIndex, int frameIndex, std::vector*>* resultValues ) = 0; void setTimeStepFilter( const std::vector& fileTimeStepIndices ); bool isTimeStepIncludedByFilter( int timeStepIndex ) const; int timeStepIndexOnFile( int timeStepIndex ) const; private: std::vector m_fileTimeStepIndices; };