2015-04-23 13:24:15 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2015-04-23 13:24:15 +02:00
|
|
|
// 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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2015-04-23 13:24:15 +02:00
|
|
|
// 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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2015-04-23 13:24:15 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "cvfObject.h"
|
2015-04-30 09:31:33 +02:00
|
|
|
#include "cvfVector3.h"
|
|
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
#include <string>
|
2019-09-06 10:40:57 +02:00
|
|
|
#include <vector>
|
2015-04-23 13:24:15 +02:00
|
|
|
|
2015-04-27 10:25:04 +02:00
|
|
|
class RigFemPartCollection;
|
2015-04-23 13:24:15 +02:00
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
//
|
|
|
|
|
// Data interface base class
|
|
|
|
|
//
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
class RifGeoMechReaderInterface : public cvf::Object
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
RifGeoMechReaderInterface();
|
2019-01-10 22:12:11 +01:00
|
|
|
~RifGeoMechReaderInterface() override;
|
2015-04-23 13:24:15 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
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<std::string> allStepNames() const = 0;
|
|
|
|
|
virtual std::vector<std::string> filteredStepNames() const = 0;
|
|
|
|
|
virtual std::vector<double> frameTimes( int stepIndex ) const = 0;
|
2023-01-18 14:42:33 +01:00
|
|
|
virtual int frameCount( int stepIndex ) const = 0;
|
2019-09-06 10:40:57 +02:00
|
|
|
|
2023-09-04 15:48:08 +02:00
|
|
|
virtual std::vector<std::string> elementSetNames( int partIndex, std::string partName ) = 0;
|
|
|
|
|
virtual std::vector<size_t> elementSet( int partIndex, std::string partName, int setIndex ) = 0;
|
2019-09-06 10:40:57 +02:00
|
|
|
|
|
|
|
|
virtual std::map<std::string, std::vector<std::string>> scalarNodeFieldAndComponentNames() = 0;
|
|
|
|
|
virtual std::map<std::string, std::vector<std::string>> scalarElementNodeFieldAndComponentNames() = 0;
|
|
|
|
|
virtual std::map<std::string, std::vector<std::string>> scalarIntegrationPointFieldAndComponentNames() = 0;
|
2015-04-30 13:59:34 +02:00
|
|
|
|
2023-02-26 10:48:40 +01:00
|
|
|
virtual void readDisplacements( int partIndex, int stepIndex, int frameIndex, std::vector<cvf::Vec3f>* displacements ) = 0;
|
2015-04-30 13:59:34 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
virtual void readNodeField( const std::string& fieldName,
|
|
|
|
|
int partIndex,
|
|
|
|
|
int stepIndex,
|
|
|
|
|
int frameIndex,
|
|
|
|
|
std::vector<std::vector<float>*>* resultValues ) = 0;
|
|
|
|
|
virtual void readElementNodeField( const std::string& fieldName,
|
|
|
|
|
int partIndex,
|
|
|
|
|
int stepIndex,
|
|
|
|
|
int frameIndex,
|
|
|
|
|
std::vector<std::vector<float>*>* resultValues ) = 0;
|
|
|
|
|
virtual void readIntegrationPointField( const std::string& fieldName,
|
|
|
|
|
int partIndex,
|
|
|
|
|
int stepIndex,
|
|
|
|
|
int frameIndex,
|
|
|
|
|
std::vector<std::vector<float>*>* resultValues ) = 0;
|
2015-06-15 09:21:26 +02:00
|
|
|
|
2023-01-24 18:30:30 +01:00
|
|
|
void setTimeStepFilter( const std::vector<size_t>& fileTimeStepIndices, bool readOnlyLastFrame );
|
2019-09-06 10:40:57 +02:00
|
|
|
bool isTimeStepIncludedByFilter( int timeStepIndex ) const;
|
|
|
|
|
int timeStepIndexOnFile( int timeStepIndex ) const;
|
2023-01-24 18:30:30 +01:00
|
|
|
int frameIndexOnFile( int frameIndex ) const;
|
|
|
|
|
|
|
|
|
|
bool shouldReadOnlyLastFrame() const;
|
2015-04-24 15:53:50 +02:00
|
|
|
|
2015-04-23 13:24:15 +02:00
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
std::vector<int> m_fileTimeStepIndices;
|
2023-01-24 18:30:30 +01:00
|
|
|
bool m_readOnlyLastFrame;
|
2015-04-23 13:24:15 +02:00
|
|
|
};
|