mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Remove obsolete fault reactivation assessment feature
This commit is contained in:
@@ -61,8 +61,6 @@ set(SOURCE_GROUP_HEADER_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifStimPlanModelAsymmetricFrkExporter.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifThermalFractureTemplateSurfaceExporter.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifSurfaceExporter.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifFaultRAXmlWriter.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifFaultRAJsonWriter.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifParameterXmlReader.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifOpmCommonSummary.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifEnsembleFractureStatisticsExporter.h
|
||||
@@ -138,8 +136,6 @@ set(SOURCE_GROUP_SOURCE_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifStimPlanModelAsymmetricFrkExporter.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifThermalFractureTemplateSurfaceExporter.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifSurfaceExporter.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifFaultRAXmlWriter.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifFaultRAJsonWriter.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifParameterXmlReader.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifOpmCommonSummary.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RifEnsembleFractureStatisticsExporter.cpp
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2021 Equinor ASA
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RifFaultRAJsonWriter.h"
|
||||
|
||||
#include "RimFaultRAPostprocSettings.h"
|
||||
#include "RimFaultRAPreprocSettings.h"
|
||||
#include "RimGenericParameter.h"
|
||||
#include "RimParameterGroup.h"
|
||||
|
||||
#include "caf.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifFaultRAJSonWriter::writeToPreprocFile( RimFaultRAPreprocSettings& settings, QString& outErrorText )
|
||||
{
|
||||
QString filename = settings.preprocParameterFilename();
|
||||
|
||||
outErrorText = "Unable to write to file \"" + filename + "\" - ";
|
||||
|
||||
QFile file( filename );
|
||||
if ( file.open( QIODevice::ReadWrite | QIODevice::Truncate | QIODevice::Text ) )
|
||||
{
|
||||
QTextStream stream( &file );
|
||||
|
||||
stream << "{" << caf::endl;
|
||||
stream << "\"odb_path\": \"" + settings.geomechCaseFilename() + "\"," << caf::endl;
|
||||
stream << "\"time_start\": \"" + settings.startTimeStepGeoMech() + "\"," << caf::endl;
|
||||
stream << "\"time_end\": \"" + settings.endTimeStepGeoMech() + "\"," << caf::endl;
|
||||
stream << "\"out_path\": \"" + settings.outputAbaqusDirectory() + "\"" << caf::endl;
|
||||
stream << "}" << caf::endl;
|
||||
|
||||
file.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
outErrorText += "Could not open file.";
|
||||
return false;
|
||||
}
|
||||
|
||||
outErrorText = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifFaultRAJSonWriter::writeToPostprocFile( int faultID, RimFaultRAPostprocSettings* settings, QString& outErrorText )
|
||||
{
|
||||
QString filename = settings->postprocParameterFilename( faultID );
|
||||
|
||||
outErrorText = "Unable to write to file \"" + filename + "\" - ";
|
||||
|
||||
QFile file( filename );
|
||||
if ( file.open( QIODevice::ReadWrite | QIODevice::Truncate | QIODevice::Text ) )
|
||||
{
|
||||
QTextStream stream( &file );
|
||||
|
||||
stream << "{" << caf::endl;
|
||||
|
||||
if ( settings->geomechEnabled() )
|
||||
{
|
||||
if ( QFile::exists( settings->advancedMacrisDatabase() ) )
|
||||
stream << "\"MacrisCalcCalibration_path\": \"" + settings->advancedMacrisDatabase() + "\"," << caf::endl;
|
||||
}
|
||||
|
||||
if ( QFile::exists( settings->basicMacrisDatabase() ) )
|
||||
stream << "\"MacrisCalc_path\": \"" + settings->basicMacrisDatabase() + "\"," << caf::endl;
|
||||
|
||||
stream << "\"base_directory_path\": \"" + settings->outputBaseDirectory() + "\"," << caf::endl;
|
||||
|
||||
for ( auto p : settings->parameters()->parameters() )
|
||||
{
|
||||
stream << "\"" + p->name() + "\" : " + p->stringValue() + "," << caf::endl;
|
||||
}
|
||||
|
||||
stream << "\"tsurf_loadsteps\": [ " + settings->stepsToLoad().join( ',' ) + " ]" << caf::endl;
|
||||
stream << "}" << caf::endl;
|
||||
|
||||
file.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
outErrorText += "Could not open file.";
|
||||
return false;
|
||||
}
|
||||
|
||||
outErrorText = "";
|
||||
return true;
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2021 Equinor ASA
|
||||
//
|
||||
// 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 <QString>
|
||||
|
||||
class RimFaultRAPreprocSettings;
|
||||
class RimFaultRAPostprocSettings;
|
||||
|
||||
class RifFaultRAJSonWriter
|
||||
{
|
||||
public:
|
||||
static bool writeToPreprocFile( RimFaultRAPreprocSettings& settings, QString& outErrorText );
|
||||
static bool writeToPostprocFile( int faultID, RimFaultRAPostprocSettings* settings, QString& outErrorText );
|
||||
|
||||
private:
|
||||
RifFaultRAJSonWriter(){};
|
||||
};
|
||||
@@ -1,81 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2021 Equinor ASA
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RifFaultRAXmlWriter.h"
|
||||
|
||||
#include "RimFaultRASettings.h"
|
||||
#include "RimGenericParameter.h"
|
||||
|
||||
#include "caf.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QXmlStreamReader>
|
||||
|
||||
RifFaultRAXmlWriter::RifFaultRAXmlWriter( RimFaultRASettings* settings )
|
||||
: m_settings( settings )
|
||||
{
|
||||
}
|
||||
|
||||
RifFaultRAXmlWriter::~RifFaultRAXmlWriter()
|
||||
{
|
||||
}
|
||||
|
||||
bool RifFaultRAXmlWriter::writeCalculateFile( QString filename, int faultID, QString& outErrorText )
|
||||
{
|
||||
std::list<RimGenericParameter*> paramlist = m_settings->basicParameters( faultID );
|
||||
return writeParametersToXML( filename, paramlist, outErrorText );
|
||||
}
|
||||
|
||||
bool RifFaultRAXmlWriter::writeCalibrateFile( QString filename, int faultID, QString& outErrorText )
|
||||
{
|
||||
std::list<RimGenericParameter*> paramlist = m_settings->advancedParameters( faultID );
|
||||
return writeParametersToXML( filename, paramlist, outErrorText );
|
||||
}
|
||||
|
||||
bool RifFaultRAXmlWriter::writeParametersToXML( QString filename, std::list<RimGenericParameter*>& params, QString& outErrorText )
|
||||
{
|
||||
bool bResult = false;
|
||||
|
||||
outErrorText = "Unable to write to file \"" + filename + "\" - ";
|
||||
|
||||
QFile file( filename );
|
||||
if ( file.open( QIODevice::ReadWrite ) )
|
||||
{
|
||||
QTextStream stream( &file );
|
||||
|
||||
stream << "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>" << caf::endl;
|
||||
stream << "<project type_id=\"0\">" << caf::endl;
|
||||
|
||||
for ( auto& p : params )
|
||||
{
|
||||
QString tmpStr = QString( "<%1>%2</%1>" ).arg( p->name(), p->stringValue() );
|
||||
stream << tmpStr << caf::endl;
|
||||
}
|
||||
stream << "</project>" << caf::endl;
|
||||
|
||||
bResult = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
outErrorText += "Could not open file.";
|
||||
}
|
||||
|
||||
if ( bResult ) outErrorText = "";
|
||||
|
||||
return bResult;
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2021 Equinor ASA
|
||||
//
|
||||
// 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 <QString>
|
||||
|
||||
#include <list>
|
||||
|
||||
class RimFaultRASettings;
|
||||
class RimGenericParameter;
|
||||
|
||||
class RifFaultRAXmlWriter
|
||||
{
|
||||
public:
|
||||
RifFaultRAXmlWriter( RimFaultRASettings* settings );
|
||||
~RifFaultRAXmlWriter();
|
||||
|
||||
bool writeCalculateFile( QString filename, int faultID, QString& outErrorText );
|
||||
bool writeCalibrateFile( QString filename, int faultID, QString& outErrorText );
|
||||
|
||||
private:
|
||||
bool writeParametersToXML( QString filename, std::list<RimGenericParameter*>& params, QString& outErrorText );
|
||||
|
||||
RimFaultRASettings* m_settings;
|
||||
};
|
||||
Reference in New Issue
Block a user