mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge branch 'dev' into feature-analysis-plots-initial
This commit is contained in:
commit
9fcfe4fa84
3213
ApplicationCode/Adm/projectfilekeywords/2020.04/ri-fieldKeywords.txt
Normal file
3213
ApplicationCode/Adm/projectfilekeywords/2020.04/ri-fieldKeywords.txt
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,334 @@
|
||||
// ResInsight version string : 2020.04.0
|
||||
// Report generated : Fri Apr 17 13:45:38 2020
|
||||
//
|
||||
//
|
||||
|
||||
Annotations
|
||||
AsciiDataCurve
|
||||
CalcScript
|
||||
CalculatedSummaryCase
|
||||
CellEdgeResultSlot
|
||||
CellFilter
|
||||
CellPropertyFilter
|
||||
CellPropertyFilters
|
||||
CellRangeFilter
|
||||
CellRangeFilterCollection
|
||||
ChangeDataSourceFeatureUi
|
||||
CmdAddItemExecData
|
||||
CmdDeleteItemExecData
|
||||
CmdFieldChangeExecData
|
||||
CmdSelectionChangeExecData
|
||||
CompletionTemplateCollection
|
||||
CrossSection
|
||||
CrossSectionCollection
|
||||
DataContainerFloat
|
||||
DataContainerString
|
||||
DataContainerTime
|
||||
Eclipse2dViewCollection
|
||||
EclipseCase
|
||||
EclipseGeometrySelectionItem
|
||||
Fault
|
||||
Faults
|
||||
FileSummaryCase
|
||||
FishbonesCollection
|
||||
FishbonesMultipleSubs
|
||||
FishbonesPipeProperties
|
||||
FlowCharacteristicsPlot
|
||||
FlowDiagSolution
|
||||
FlowPlotCollection
|
||||
FormationNames
|
||||
FormationNamesCollectionObject
|
||||
FractureContainment
|
||||
FractureDefinitionCollection
|
||||
GeoMech2dViewCollection
|
||||
GeoMechGeometrySelectionItem
|
||||
GeoMechPropertyFilter
|
||||
GeoMechPropertyFilters
|
||||
GeoMechResultDefinition
|
||||
GeoMechResultSlot
|
||||
GeoMechView
|
||||
GridCollection
|
||||
GridCrossPlotCurve
|
||||
GridCrossPlotCurveSet
|
||||
GridInfo
|
||||
GridInfoCollection
|
||||
GridSummaryCase
|
||||
GridTimeHistoryCurve
|
||||
Intersection2dView
|
||||
Intersection2dViewCollection
|
||||
IntersectionBox
|
||||
IntersectionResultDefinition
|
||||
Legend
|
||||
MainPlotCollection
|
||||
MdiWindowController
|
||||
MockModelSettings
|
||||
ModeledWellPath
|
||||
MultiPlot
|
||||
MultiSnapshotDefinition
|
||||
NoCommonAreaNNC
|
||||
ObservedDataCollection
|
||||
ObservedFmuRftData
|
||||
PdmDocument
|
||||
PdmObjectCollection
|
||||
PdmObjectGroup
|
||||
Perforation
|
||||
PerforationCollection
|
||||
PlotTemplateCollection
|
||||
PlotTemplateFileItem
|
||||
PolylineTarget
|
||||
PolylinesFromFileAnnotation
|
||||
PropertyFilter
|
||||
ResInsightAnalysisModels
|
||||
ResInsightGeoMechCase
|
||||
ResInsightGeoMechModels
|
||||
ResInsightOilField
|
||||
ResInsightProject
|
||||
ResampleData
|
||||
ReservoirCellResultStorage
|
||||
ReservoirView
|
||||
ResultDefinition
|
||||
ResultSlot
|
||||
ResultStorageEntryInfo
|
||||
RftAddress
|
||||
RiaMemoryCleanup
|
||||
RiaPreferences
|
||||
RiaRegressionTest
|
||||
RicCaseAndFileExportSettingsUi
|
||||
RicCellRangeUi
|
||||
RicDeleteItemExecData
|
||||
RicExportCarfinUi
|
||||
RicExportCompletionDataSettingsUi
|
||||
RicExportContourMapToTextUi
|
||||
RicExportEclipseInputGridUi
|
||||
RicExportLgrUi
|
||||
RicExportToLasFileObj
|
||||
RicExportToLasFileResampleUi
|
||||
RicExportWellPathsUi
|
||||
RicHoloLensCreateSessionUi
|
||||
RicHoloLensExportToFolderUi
|
||||
RicHoloLensServerSettings
|
||||
RicLinkVisibleViewsFeatureUi
|
||||
RicPasteAsciiDataToSummaryPlotFeatureUi
|
||||
RicSaturationPressureUi
|
||||
RicSaveEclipseInputVisibleCellsUi
|
||||
RicSelectPlotTemplateUi
|
||||
RicSelectSummaryPlotUI
|
||||
RicSelectViewUI
|
||||
RicSummaryAddressSelection
|
||||
RicSummaryCurveCalculator
|
||||
RicSummaryCurveCreator
|
||||
RicWellPathsUnitSystemSettingsUi
|
||||
RifReaderSettings
|
||||
Rim3dWellLogCurveCollection
|
||||
Rim3dWellLogExtractionCurve
|
||||
Rim3dWellLogFileCurve
|
||||
Rim3dWellLogRftCurve
|
||||
RimAnnotationCollection
|
||||
RimAnnotationCollectionBase
|
||||
RimAnnotationGroupCollection
|
||||
RimAnnotationLineAppearance
|
||||
RimAnnotationTextAppearance
|
||||
RimBinaryExportSettings
|
||||
RimCaseCollection
|
||||
RimCommandExecuteScript
|
||||
RimCommandIssueFieldChanged
|
||||
RimCommandObject
|
||||
RimContourMapView
|
||||
RimCsvUserData
|
||||
RimDerivedEnsembleCase
|
||||
RimDerivedEnsembleCaseCollection
|
||||
RimDialogData
|
||||
RimEclipseContourMapProjection
|
||||
RimEllipseFractureTemplate
|
||||
RimEnsembleCurveFilter
|
||||
RimEnsembleCurveFilterCollection
|
||||
RimEnsembleCurveSet
|
||||
RimEnsembleCurveSetCollection
|
||||
RimEnsembleStatistics
|
||||
RimExportInputSettings
|
||||
RimFaultResultSlot
|
||||
RimFractureExportSettings
|
||||
RimGeoMechContourMapProjection
|
||||
RimGeoMechContourMapView
|
||||
RimGridCrossPlot
|
||||
RimGridCrossPlotCollection
|
||||
RimGridCrossPlotCurveSetNameConfig
|
||||
RimGridCrossPlotNameConfig
|
||||
RimIdenticalGridCaseGroup
|
||||
RimInputProperty
|
||||
RimInputPropertyCollection
|
||||
RimInputReservoir
|
||||
RimIntersectionResultsDefinitionCollection
|
||||
RimMeasurement
|
||||
RimMswCompletionParameters
|
||||
RimMultiPlotCollection
|
||||
RimMultipleValveLocations
|
||||
RimNoCommonAreaNncCollection
|
||||
RimNonDarcyPerforationParameters
|
||||
RimObservedEclipseUserData
|
||||
RimOilFieldEntry
|
||||
RimOilRegionEntry
|
||||
RimPlotAxisAnnotation
|
||||
RimPlotCellFilterCollection
|
||||
RimPlotCellPropertyFilter
|
||||
RimPolylineAppearance
|
||||
RimPolylinesAnnotationInView
|
||||
RimPolylinesFromFileAnnotationInView
|
||||
RimReachCircleAnnotation
|
||||
RimReachCircleAnnotationInView
|
||||
RimSaturationPressurePlot
|
||||
RimSaturationPressurePlotCollection
|
||||
RimStatisticalCalculation
|
||||
RimStatisticalCollection
|
||||
RimStimPlanColors
|
||||
RimStimPlanFractureTemplate
|
||||
RimStimPlanLegendConfig
|
||||
RimSummaryCalculation
|
||||
RimSummaryCalculationCollection
|
||||
RimSummaryCalculationVariable
|
||||
RimSummaryCurveCollection
|
||||
RimSummaryCurveCollectionModifier
|
||||
RimTensorResults
|
||||
RimTernaryLegendConfig
|
||||
RimTextAnnotation
|
||||
RimTextAnnotationInView
|
||||
RimTimeStepFilter
|
||||
RimUserDefinedPolylinesAnnotationInView
|
||||
RimViewLinkerCollection
|
||||
RimViewNameConfig
|
||||
RimVirtualPerforationResults
|
||||
RimWellLogExtractionCurve
|
||||
RimWellLogExtractionCurveNameConfig
|
||||
RimWellLogFileCurveNameConfig
|
||||
RimWellLogPlotNameConfig
|
||||
RimWellLogRftCurveNameConfig
|
||||
RimWellLogWbsCurve
|
||||
RimWellPathEntry
|
||||
RimWellPathImport
|
||||
RiuCreateMultipleFractionsUi
|
||||
RiuMultipleFractionsOptions
|
||||
ScaleLegend
|
||||
ScriptLocation
|
||||
SimWellFracture
|
||||
SimWellFractureCollection
|
||||
SummaryAddress
|
||||
SummaryCaseCollection
|
||||
SummaryCaseSubCollection
|
||||
SummaryCrossPlot
|
||||
SummaryCrossPlotCollection
|
||||
SummaryCurve
|
||||
SummaryCurveAutoName
|
||||
SummaryCurveFilter
|
||||
SummaryFilterSettings
|
||||
SummaryObservedDataFile
|
||||
SummaryPageDownloadEntity
|
||||
SummaryPlot
|
||||
SummaryPlotCollection
|
||||
SummaryPlotFilterTextCurveSetEditor
|
||||
SummaryTimeAxisProperties
|
||||
SummaryYAxisProperties
|
||||
Surface
|
||||
SurfaceCollection
|
||||
SurfaceInView
|
||||
SurfaceInViewCollection
|
||||
TC2
|
||||
TestCommand1
|
||||
TofAccumulatedPhaseFractionsPlot
|
||||
TotalWellAllocationPlot
|
||||
UserDefinedPolylinesAnnotation
|
||||
ValveTemplate
|
||||
ValveTemplateCollection
|
||||
View3dOverlayInfoConfig
|
||||
ViewController
|
||||
ViewLinker
|
||||
WbsParameters
|
||||
Well
|
||||
WellAllocationPlot
|
||||
WellAllocationPlotLegend
|
||||
WellBoreStabilityPlot
|
||||
WellDistributionPlot
|
||||
WellDistributionPlotCollection
|
||||
WellFlowRateCurve
|
||||
WellLogFile
|
||||
WellLogFileChannel
|
||||
WellLogFileCurve
|
||||
WellLogPlot
|
||||
WellLogPlotCollection
|
||||
WellLogPlotTrack
|
||||
WellLogRftCurve
|
||||
WellMeasurement
|
||||
WellMeasurementCurve
|
||||
WellMeasurementFilePath
|
||||
WellMeasurementInView
|
||||
WellMeasurements
|
||||
WellMeasurementsInView
|
||||
WellPath
|
||||
WellPathAicdParameters
|
||||
WellPathAttribute
|
||||
WellPathAttributes
|
||||
WellPathBase
|
||||
WellPathCompletion
|
||||
WellPathCompletionCollection
|
||||
WellPathCompletions
|
||||
WellPathFracture
|
||||
WellPathFractureCollection
|
||||
WellPathGeometryDef
|
||||
WellPathTarget
|
||||
WellPathValve
|
||||
WellPaths
|
||||
WellPltPlot
|
||||
WellPltPlotCollection
|
||||
WellRftEnsembleCurveSet
|
||||
WellRftPlot
|
||||
WellRftPlotCollection
|
||||
Wells
|
||||
cloneView
|
||||
closeProject
|
||||
computeCaseGroupStatistics
|
||||
createGridCaseGroup
|
||||
createGridCaseGroupResult
|
||||
createLgrForCompletions
|
||||
createMultiPlot
|
||||
createMultipleFractures
|
||||
createSaturationPressurePlots
|
||||
createStatisticsCase
|
||||
createStatisticsCaseResult
|
||||
createView
|
||||
createViewResult
|
||||
createWbsPlotResult
|
||||
createWellBoreStabilityPlot
|
||||
exportContourMapToText
|
||||
exportFlowCharacteristics
|
||||
exportLgrForCompletions
|
||||
exportMsw
|
||||
exportMultiCaseSnapshots
|
||||
exportProperty
|
||||
exportPropertyInViews
|
||||
exportSimWellFractureCompletions
|
||||
exportSnapshots
|
||||
exportVisibleCells
|
||||
exportWellLogPlotData
|
||||
exportWellLogPlotDataResult
|
||||
exportWellPathCompletions
|
||||
exportWellPaths
|
||||
importFormationNames
|
||||
importWellLogFiles
|
||||
importWellLogFilesResult
|
||||
importWellPaths
|
||||
importWellPathsResult
|
||||
loadCase
|
||||
loadCaseResult
|
||||
openProject
|
||||
replaceCase
|
||||
replaceMultipleCases
|
||||
replaceSourceCases
|
||||
runOctaveScript
|
||||
saveProject
|
||||
saveProjectAs
|
||||
scaleFractureTemplate
|
||||
setExportFolder
|
||||
setFractureContainment
|
||||
setMainWindowSize
|
||||
setPlotWindowSize
|
||||
setStartDir
|
||||
setTimeStep
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include "cafClassTypeName.h"
|
||||
#include "cafPdmDefaultObjectFactory.h"
|
||||
#include "cafPdmXmlFieldHandle.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QApplication>
|
||||
@ -122,7 +123,14 @@ void RicExportObjectAndFieldKeywordsFeature::exportObjectAndFieldKeywords( const
|
||||
|
||||
for ( auto f : fields )
|
||||
{
|
||||
if ( !f->xmlCapability()->isIOReadable() ) continue;
|
||||
|
||||
stream << " " << f->keyword() << "\n";
|
||||
|
||||
for ( auto alias : f->keywordAliases() )
|
||||
{
|
||||
stream << " (A)" << alias << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
stream << "\n";
|
||||
|
@ -43,6 +43,14 @@ bool RicImportElementPropertyFeature::isCommandEnabled()
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicImportElementPropertyFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
importElementProperties();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicImportElementPropertyFeature::importElementProperties()
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
|
@ -27,6 +27,8 @@ class RicImportElementPropertyFeature : public caf::CmdFeature
|
||||
{
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
static void importElementProperties();
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include "RigFemPartResultsCollection.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RifElementPropertyReader.h"
|
||||
#include "RifGeoMechReaderInterface.h"
|
||||
|
||||
@ -104,6 +106,9 @@ RigFemPartResultsCollection::RigFemPartResultsCollection( RifGeoMechReaderInterf
|
||||
m_cohesion = 10.0;
|
||||
m_frictionAngleRad = cvf::Math::toRadians( 30.0 );
|
||||
m_normalizationAirGap = 0.0;
|
||||
|
||||
m_biotFixedFactor = 1.0;
|
||||
m_biotResultAddress = "";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -213,6 +218,25 @@ std::vector<RigFemResultAddress>
|
||||
return addressesToRemove;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::map<std::string, QString>
|
||||
RigFemPartResultsCollection::addressesInElementPropertyFiles( const std::vector<QString>& filenames )
|
||||
{
|
||||
std::map<std::string, QString> fieldsInFile;
|
||||
for ( const QString& filename : filenames )
|
||||
{
|
||||
std::vector<std::string> fields = m_elementPropertyReader->fieldsInFile( filename.toStdString() );
|
||||
for ( const std::string& field : fields )
|
||||
{
|
||||
fieldsInFile[field] = filename;
|
||||
}
|
||||
}
|
||||
|
||||
return fieldsInFile;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -233,6 +257,72 @@ void RigFemPartResultsCollection::setCalculationParameters( double cohesion, dou
|
||||
RigFemResultAddress( RIG_INTEGRATION_POINT, "SE", "FOS", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigFemPartResultsCollection::setBiotCoefficientParameters( double biotFixedFactor, const QString& biotResultAddress )
|
||||
{
|
||||
m_biotFixedFactor = biotFixedFactor;
|
||||
m_biotResultAddress = biotResultAddress;
|
||||
|
||||
// Invalidate all results which depends on biot coefficient (directly or indirectly)
|
||||
// Shear results are independent of pore pressure and biot coefficient.
|
||||
bool includeShear = false;
|
||||
std::vector<std::string> componentNames = getStressComponentNames( includeShear );
|
||||
componentNames.push_back( "S1inc" );
|
||||
componentNames.push_back( "S1azi" );
|
||||
componentNames.push_back( "S2inc" );
|
||||
componentNames.push_back( "S2azi" );
|
||||
componentNames.push_back( "S3inc" );
|
||||
componentNames.push_back( "S3azi" );
|
||||
|
||||
for ( auto elementType : {RIG_ELEMENT_NODAL, RIG_INTEGRATION_POINT} )
|
||||
{
|
||||
for ( auto fieldName : {"SE", "ST"} )
|
||||
{
|
||||
for ( auto componentName : componentNames )
|
||||
{
|
||||
deleteResult(
|
||||
RigFemResultAddress( elementType, fieldName, componentName, RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
}
|
||||
}
|
||||
|
||||
// SE only: depends on SE.S1 and SE.S3
|
||||
deleteResult( RigFemResultAddress( elementType, "SE", "SFI", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
deleteResult( RigFemResultAddress( elementType, "SE", "DSM", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
deleteResult( RigFemResultAddress( elementType, "SE", "SEM", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
|
||||
// SE only: depends on SE.DSM
|
||||
deleteResult( RigFemResultAddress( elementType, "SE", "FOS", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
|
||||
// ST only: depends on ST.S1 and ST.S3
|
||||
deleteResult( RigFemResultAddress( elementType, "ST", "Q", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
deleteResult( RigFemResultAddress( elementType, "ST", "STM", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
}
|
||||
|
||||
for ( auto fieldName : {"SE", "ST"} )
|
||||
{
|
||||
// Surface aligned stress
|
||||
for ( auto componentName : {"SN", "TP", "TPinc", "TPH", "TPQV", "FAULTMOB", "PCRIT"} )
|
||||
{
|
||||
deleteResult( RigFemResultAddress( RIG_ELEMENT_NODAL_FACE,
|
||||
fieldName,
|
||||
componentName,
|
||||
RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
}
|
||||
|
||||
// Stress gradient components
|
||||
const std::vector<std::string> stressGradientComponentNames = getStressGradientComponentNames( includeShear );
|
||||
for ( auto componentName : stressGradientComponentNames )
|
||||
{
|
||||
deleteResult( RigFemResultAddress( RIG_DIFFERENTIALS,
|
||||
fieldName,
|
||||
componentName,
|
||||
RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Will always return a valid object, but it can be empty
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -338,8 +428,9 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::findOrLoadScalarResult( i
|
||||
|
||||
if ( !frames )
|
||||
{
|
||||
frames = m_femPartResults[partIndex]->createScalarResult( resVarAddr ); // Create a dummy empty result, if the
|
||||
// request did not specify the component.
|
||||
frames = m_femPartResults[partIndex]->createScalarResult( resVarAddr ); // Create a dummy empty result, if
|
||||
// the request did not specify the
|
||||
// component.
|
||||
}
|
||||
|
||||
return frames;
|
||||
@ -710,7 +801,8 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateTimeLapseResult(
|
||||
}
|
||||
else
|
||||
{
|
||||
// Gamma time lapse needs to be calculated as ST_dt / POR_dt and not Gamma - Gamma_baseFrame see github issue #937
|
||||
// Gamma time lapse needs to be calculated as ST_dt / POR_dt and not Gamma - Gamma_baseFrame see github
|
||||
// issue #937
|
||||
|
||||
caf::ProgressInfo frameCountProgress( this->frameCount() * 3, "" );
|
||||
frameCountProgress.setProgressDescription(
|
||||
@ -2131,7 +2223,8 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateNE( int partInde
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigFemScalarResultFrames* RigFemPartResultsCollection::calculateSE( int partIndex, const RigFemResultAddress& resVarAddr )
|
||||
RigFemScalarResultFrames* RigFemPartResultsCollection::calculateSE_12_13_23( int partIndex,
|
||||
const RigFemResultAddress& resVarAddr )
|
||||
{
|
||||
caf::ProgressInfo frameCountProgress( this->frameCount() * 3, "" );
|
||||
frameCountProgress.setProgressDescription(
|
||||
@ -2143,8 +2236,6 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateSE( int partInde
|
||||
RigFemResultAddress( resVarAddr.resultPosType, "S-Bar", resVarAddr.componentName ) );
|
||||
frameCountProgress.incrementProgress();
|
||||
frameCountProgress.setNextProgressIncrement( this->frameCount() );
|
||||
RigFemScalarResultFrames* srcPORDataFrames =
|
||||
this->findOrLoadScalarResult( partIndex, RigFemResultAddress( RIG_NODAL, "POR-Bar", "" ) );
|
||||
RigFemScalarResultFrames* dstDataFrames = m_femPartResults[partIndex]->createScalarResult( resVarAddr );
|
||||
|
||||
frameCountProgress.incrementProgress();
|
||||
@ -2153,6 +2244,7 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateSE( int partInde
|
||||
float inf = std::numeric_limits<float>::infinity();
|
||||
|
||||
int frameCount = srcDataFrames->frameCount();
|
||||
|
||||
for ( int fIdx = 0; fIdx < frameCount; ++fIdx )
|
||||
{
|
||||
const std::vector<float>& srcSFrameData = srcDataFrames->frameData( fIdx );
|
||||
@ -2160,8 +2252,6 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateSE( int partInde
|
||||
size_t valCount = srcSFrameData.size();
|
||||
dstFrameData.resize( valCount );
|
||||
|
||||
const std::vector<float>& srcPORFrameData = srcPORDataFrames->frameData( fIdx );
|
||||
|
||||
int elementCount = femPart->elementCount();
|
||||
|
||||
#pragma omp parallel for
|
||||
@ -2201,6 +2291,131 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateSE( int partInde
|
||||
return dstDataFrames;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigFemScalarResultFrames* RigFemPartResultsCollection::calculateSE_11_22_33( int partIndex,
|
||||
const RigFemResultAddress& resVarAddr )
|
||||
{
|
||||
caf::ProgressInfo frameCountProgress( this->frameCount() * 3, "" );
|
||||
frameCountProgress.setProgressDescription(
|
||||
"Calculating " + QString::fromStdString( resVarAddr.fieldName + ": " + resVarAddr.componentName ) );
|
||||
frameCountProgress.setNextProgressIncrement( this->frameCount() );
|
||||
|
||||
RigFemScalarResultFrames* srcDataFrames =
|
||||
this->findOrLoadScalarResult( partIndex,
|
||||
RigFemResultAddress( resVarAddr.resultPosType, "S-Bar", resVarAddr.componentName ) );
|
||||
frameCountProgress.incrementProgress();
|
||||
frameCountProgress.setNextProgressIncrement( this->frameCount() );
|
||||
RigFemScalarResultFrames* srcPORDataFrames =
|
||||
this->findOrLoadScalarResult( partIndex, RigFemResultAddress( RIG_NODAL, "POR-Bar", "" ) );
|
||||
RigFemScalarResultFrames* dstDataFrames = m_femPartResults[partIndex]->createScalarResult( resVarAddr );
|
||||
|
||||
frameCountProgress.incrementProgress();
|
||||
|
||||
// Biot porelastic coeffisient (alpha)
|
||||
RigFemScalarResultFrames* biotCoefficient = nullptr;
|
||||
if ( !m_biotResultAddress.isEmpty() )
|
||||
{
|
||||
biotCoefficient =
|
||||
this->findOrLoadScalarResult( partIndex,
|
||||
RigFemResultAddress( RIG_ELEMENT, m_biotResultAddress.toStdString(), "" ) );
|
||||
}
|
||||
|
||||
const RigFemPart* femPart = m_femParts->part( partIndex );
|
||||
float inf = std::numeric_limits<float>::infinity();
|
||||
|
||||
int frameCount = srcDataFrames->frameCount();
|
||||
|
||||
for ( int fIdx = 0; fIdx < frameCount; ++fIdx )
|
||||
{
|
||||
const std::vector<float>& srcSFrameData = srcDataFrames->frameData( fIdx );
|
||||
std::vector<float>& dstFrameData = dstDataFrames->frameData( fIdx );
|
||||
size_t valCount = srcSFrameData.size();
|
||||
dstFrameData.resize( valCount );
|
||||
|
||||
const std::vector<float>& initialPORFrameData = srcPORDataFrames->frameData( 0 );
|
||||
|
||||
int elementCount = femPart->elementCount();
|
||||
|
||||
std::vector<float> biotData;
|
||||
if ( biotCoefficient )
|
||||
{
|
||||
biotData = biotCoefficient->frameData( fIdx );
|
||||
if ( !isValidBiotData( biotData, elementCount ) )
|
||||
{
|
||||
deleteResult( resVarAddr );
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma omp parallel for
|
||||
for ( int elmIdx = 0; elmIdx < elementCount; ++elmIdx )
|
||||
{
|
||||
RigElementType elmType = femPart->elementType( elmIdx );
|
||||
|
||||
int elmNodeCount = RigFemTypes::elmentNodeCount( femPart->elementType( elmIdx ) );
|
||||
|
||||
if ( elmType == HEX8P )
|
||||
{
|
||||
for ( int elmNodIdx = 0; elmNodIdx < elmNodeCount; ++elmNodIdx )
|
||||
{
|
||||
size_t elmNodResIdx = femPart->elementNodeResultIdx( elmIdx, elmNodIdx );
|
||||
if ( elmNodResIdx < srcSFrameData.size() )
|
||||
{
|
||||
double SE_abacus = -srcSFrameData[elmNodResIdx];
|
||||
if ( fIdx == 0 )
|
||||
{
|
||||
// Geostatic step: biot coefficient == 1.0
|
||||
dstFrameData[elmNodResIdx] = SE_abacus;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use biot coefficient for all other (not Geostatic) timesteps
|
||||
double biotCoefficient = 1.0;
|
||||
if ( biotData.empty() )
|
||||
{
|
||||
biotCoefficient = m_biotFixedFactor;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use coefficient from element property table
|
||||
biotCoefficient = biotData[elmIdx];
|
||||
}
|
||||
|
||||
// SE = St - alpha * porePressure - (1 - alpha) * initialPorePressure
|
||||
// ST = SE_abaqus + alpha * porePressure
|
||||
// Can be simplified:
|
||||
// SE = SE_abaqus - (1-alpha) * initialPorePressure
|
||||
// SE_abaqus is called S-Bar
|
||||
int nodeIdx = femPart->nodeIdxFromElementNodeResultIdx( elmNodResIdx );
|
||||
double initialPorePressure = initialPORFrameData[nodeIdx];
|
||||
if ( initialPorePressure == inf ) initialPorePressure = 0.0f;
|
||||
|
||||
dstFrameData[elmNodResIdx] = SE_abacus - ( 1.0 - biotCoefficient ) * initialPorePressure;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( int elmNodIdx = 0; elmNodIdx < elmNodeCount; ++elmNodIdx )
|
||||
{
|
||||
size_t elmNodResIdx = femPart->elementNodeResultIdx( elmIdx, elmNodIdx );
|
||||
if ( elmNodResIdx < dstFrameData.size() )
|
||||
{
|
||||
dstFrameData[elmNodResIdx] = inf;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
frameCountProgress.incrementProgress();
|
||||
}
|
||||
|
||||
return dstDataFrames;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -2221,6 +2436,15 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateST_11_22_33( int
|
||||
RigFemScalarResultFrames* srcPORDataFrames =
|
||||
this->findOrLoadScalarResult( partIndex, RigFemResultAddress( RIG_NODAL, "POR-Bar", "" ) );
|
||||
|
||||
// Biot porelastic coeffisient (alpha)
|
||||
RigFemScalarResultFrames* biotCoefficient = nullptr;
|
||||
if ( !m_biotResultAddress.isEmpty() )
|
||||
{
|
||||
biotCoefficient =
|
||||
this->findOrLoadScalarResult( partIndex,
|
||||
RigFemResultAddress( RIG_ELEMENT, m_biotResultAddress.toStdString(), "" ) );
|
||||
}
|
||||
|
||||
RigFemScalarResultFrames* dstDataFrames = m_femPartResults[partIndex]->createScalarResult( resVarAddr );
|
||||
const RigFemPart* femPart = m_femParts->part( partIndex );
|
||||
int frameCount = srcSDataFrames->frameCount();
|
||||
@ -2234,13 +2458,24 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateST_11_22_33( int
|
||||
const std::vector<float>& srcSFrameData = srcSDataFrames->frameData( fIdx );
|
||||
const std::vector<float>& srcPORFrameData = srcPORDataFrames->frameData( fIdx );
|
||||
|
||||
int elementCount = femPart->elementCount();
|
||||
|
||||
std::vector<float> biotData;
|
||||
if ( biotCoefficient )
|
||||
{
|
||||
biotData = biotCoefficient->frameData( fIdx );
|
||||
if ( !isValidBiotData( biotData, elementCount ) )
|
||||
{
|
||||
deleteResult( resVarAddr );
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<float>& dstFrameData = dstDataFrames->frameData( fIdx );
|
||||
|
||||
size_t valCount = srcSFrameData.size();
|
||||
dstFrameData.resize( valCount );
|
||||
|
||||
int elementCount = femPart->elementCount();
|
||||
|
||||
#pragma omp parallel for
|
||||
for ( int elmIdx = 0; elmIdx < elementCount; ++elmIdx )
|
||||
{
|
||||
@ -2260,7 +2495,31 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateST_11_22_33( int
|
||||
float por = srcPORFrameData[nodeIdx];
|
||||
if ( por == inf ) por = 0.0f;
|
||||
|
||||
dstFrameData[elmNodResIdx] = -srcSFrameData[elmNodResIdx] + por;
|
||||
// ST = SE_abacus + alpha * porePressure
|
||||
// where alpha is biot coefficient, and porePressure is POR-Bar.
|
||||
|
||||
double SE_abacus = -srcSFrameData[elmNodResIdx];
|
||||
if ( fIdx == 0 )
|
||||
{
|
||||
// Geostatic step: biot coefficient == 1.0
|
||||
dstFrameData[elmNodResIdx] = SE_abacus + por;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use biot coefficient for all other (not Geostatic) timesteps
|
||||
double biotCoefficient = 1.0;
|
||||
if ( biotData.empty() )
|
||||
{
|
||||
biotCoefficient = m_biotFixedFactor;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use coefficient from element property table
|
||||
biotCoefficient = biotData[elmIdx];
|
||||
}
|
||||
|
||||
dstFrameData[elmNodResIdx] = SE_abacus + biotCoefficient * por;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2555,11 +2814,16 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDerivedResult( i
|
||||
return calculatePrincipalStrainValues( partIndex, resVarAddr );
|
||||
}
|
||||
|
||||
if ( ( resVarAddr.fieldName == "SE" ) && ( resVarAddr.componentName == "S11" || resVarAddr.componentName == "S22" ||
|
||||
resVarAddr.componentName == "S33" || resVarAddr.componentName == "S12" ||
|
||||
resVarAddr.componentName == "S13" || resVarAddr.componentName == "S23" ) )
|
||||
if ( ( resVarAddr.fieldName == "SE" ) &&
|
||||
( resVarAddr.componentName == "S11" || resVarAddr.componentName == "S22" || resVarAddr.componentName == "S33" ) )
|
||||
{
|
||||
return calculateSE( partIndex, resVarAddr );
|
||||
return calculateSE_11_22_33( partIndex, resVarAddr );
|
||||
}
|
||||
|
||||
if ( ( resVarAddr.fieldName == "SE" ) &&
|
||||
( resVarAddr.componentName == "S12" || resVarAddr.componentName == "S13" || resVarAddr.componentName == "S23" ) )
|
||||
{
|
||||
return calculateSE_12_13_23( partIndex, resVarAddr );
|
||||
}
|
||||
|
||||
if ( ( resVarAddr.fieldName == "SE" || resVarAddr.fieldName == "ST" ) &&
|
||||
@ -3488,18 +3752,26 @@ void findReferenceElementForNode( const RigFemPart& part, size_t nodeIdx, size_t
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::string> RigFemPartResultsCollection::getStressComponentNames()
|
||||
std::vector<std::string> RigFemPartResultsCollection::getStressComponentNames( bool includeShear )
|
||||
{
|
||||
return {"S11", "S22", "S33", "S12", "S13", "S23", "S1", "S2", "S3"};
|
||||
std::vector<std::string> componentNames = {"S11", "S22", "S33", "S1", "S2", "S3"};
|
||||
if ( includeShear )
|
||||
{
|
||||
componentNames.push_back( "S12" );
|
||||
componentNames.push_back( "S13" );
|
||||
componentNames.push_back( "S23" );
|
||||
}
|
||||
|
||||
return componentNames;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::string> RigFemPartResultsCollection::getStressGradientComponentNames()
|
||||
std::vector<std::string> RigFemPartResultsCollection::getStressGradientComponentNames( bool includeShear )
|
||||
{
|
||||
std::vector<std::string> directions = {"X", "Y", "Z"};
|
||||
std::vector<std::string> stressComponentNames = getStressComponentNames();
|
||||
std::vector<std::string> stressComponentNames = getStressComponentNames( includeShear );
|
||||
|
||||
std::vector<std::string> stressGradientComponentNames;
|
||||
for ( auto& s : stressComponentNames )
|
||||
@ -3512,3 +3784,29 @@ std::vector<std::string> RigFemPartResultsCollection::getStressGradientComponent
|
||||
|
||||
return stressGradientComponentNames;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigFemPartResultsCollection::isValidBiotData( const std::vector<float>& biotData, size_t elementCount ) const
|
||||
{
|
||||
if ( biotData.size() != elementCount )
|
||||
{
|
||||
RiaLogging::error( QString( "Unexpected size of biot coefficient element properties: %1 (expected: %2)" )
|
||||
.arg( biotData.size() )
|
||||
.arg( elementCount ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
for ( float b : biotData )
|
||||
{
|
||||
if ( !std::isinf( b ) && ( b < 0.0 || b > 1.0 ) )
|
||||
{
|
||||
RiaLogging::error(
|
||||
QString( "Found unexpected biot coefficient. The value must be in the [0, 1] interval." ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -61,11 +61,14 @@ public:
|
||||
|
||||
void addElementPropertyFiles( const std::vector<QString>& filenames );
|
||||
std::vector<RigFemResultAddress> removeElementPropertyFiles( const std::vector<QString>& filenames );
|
||||
std::map<std::string, QString> addressesInElementPropertyFiles( const std::vector<QString>& filenames );
|
||||
|
||||
void setCalculationParameters( double cohesion, double frictionAngleRad );
|
||||
double parameterCohesion() const { return m_cohesion; }
|
||||
double parameterFrictionAngleRad() const { return m_frictionAngleRad; }
|
||||
|
||||
void setBiotCoefficientParameters( double fixedFactor, const QString& biotResultAddress );
|
||||
|
||||
std::map<std::string, std::vector<std::string>> scalarFieldAndComponentNames( RigFemResultPosEnum resPos );
|
||||
std::vector<std::string> filteredStepNames() const;
|
||||
bool assertResultsLoaded( const RigFemResultAddress& resVarAddr );
|
||||
@ -150,7 +153,8 @@ private:
|
||||
RigFemScalarResultFrames* calculatePrincipalStrainValues( int partIndex, const RigFemResultAddress& resVarAddr );
|
||||
RigFemScalarResultFrames* calculateCompactionValues( int partIndex, const RigFemResultAddress& resVarAddr );
|
||||
RigFemScalarResultFrames* calculateNE( int partIndex, const RigFemResultAddress& resVarAddr );
|
||||
RigFemScalarResultFrames* calculateSE( int partIndex, const RigFemResultAddress& resVarAddr );
|
||||
RigFemScalarResultFrames* calculateSE_11_22_33( int partIndex, const RigFemResultAddress& resVarAddr );
|
||||
RigFemScalarResultFrames* calculateSE_12_13_23( int partIndex, const RigFemResultAddress& resVarAddr );
|
||||
RigFemScalarResultFrames* calculateST_11_22_33( int partIndex, const RigFemResultAddress& resVarAddr );
|
||||
RigFemScalarResultFrames* calculateST_12_13_23( int partIndex, const RigFemResultAddress& resVarAddr );
|
||||
RigFemScalarResultFrames* calculateGamma( int partIndex, const RigFemResultAddress& resVarAddr );
|
||||
@ -161,6 +165,8 @@ private:
|
||||
|
||||
const RigFormationNames* activeFormationNames() const;
|
||||
|
||||
bool isValidBiotData( const std::vector<float>& biotData, size_t elementCount ) const;
|
||||
|
||||
private:
|
||||
cvf::Collection<RigFemPartResults> m_femPartResults;
|
||||
cvf::ref<RifGeoMechReaderInterface> m_readerInterface;
|
||||
@ -172,12 +178,15 @@ private:
|
||||
double m_frictionAngleRad;
|
||||
double m_normalizationAirGap;
|
||||
|
||||
double m_biotFixedFactor;
|
||||
QString m_biotResultAddress;
|
||||
|
||||
RigStatisticsDataCache* statistics( const RigFemResultAddress& resVarAddr );
|
||||
std::vector<RigFemResultAddress> getResAddrToComponentsToRead( const RigFemResultAddress& resVarAddr );
|
||||
std::map<RigFemResultAddress, cvf::ref<RigStatisticsDataCache>> m_resultStatistics;
|
||||
|
||||
static std::vector<std::string> getStressComponentNames();
|
||||
static std::vector<std::string> getStressGradientComponentNames();
|
||||
static std::vector<std::string> getStressComponentNames( bool includeShear = true );
|
||||
static std::vector<std::string> getStressGradientComponentNames( bool includeShear = true );
|
||||
};
|
||||
|
||||
class RigFemPart;
|
||||
|
@ -56,7 +56,7 @@ exclude_patterns = ['build/*', 'rips.rst']
|
||||
#
|
||||
html_theme = 'alabaster'
|
||||
|
||||
smartquotes=False
|
||||
smartquotes = False
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
|
@ -12,6 +12,29 @@ Operate on a ResInsight case specified by a Case Id integer.
|
||||
Not meant to be constructed separately but created by one of the following
|
||||
methods in Project: loadCase, case, allCases, selectedCases
|
||||
|
||||
.. _result-definition-label:
|
||||
|
||||
Result Definition
|
||||
-----------------
|
||||
When working with grid case results, the following two argumenst are used in many functions to identify a
|
||||
result
|
||||
|
||||
**Result Definition enums**::
|
||||
|
||||
property_type | | porosity_model
|
||||
(str enum) | | (str enum)
|
||||
----------------------- | ----- | --------------
|
||||
DYNAMIC_NATIVE | | MATRIX_MODEL
|
||||
STATIC_NATIVE | | FRACTURE_MODEL
|
||||
SOURSIMRL | |
|
||||
GENERATED | |
|
||||
INPUT_PROPERTY | |
|
||||
FORMATION_NAMES | |
|
||||
FLOW_DIAGNOSTICS | |
|
||||
INJECTION_FLOODING | |
|
||||
|
||||
|
||||
|
||||
Attributes:
|
||||
id (int): Case Id corresponding to case Id in ResInsight project.
|
||||
name (str): Case name
|
||||
@ -55,6 +78,7 @@ def __custom_init__(self, pb2_object, channel):
|
||||
# Public properties
|
||||
self.chunk_size = 8160
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def __grid_count(self):
|
||||
"""Get number of grids in the case"""
|
||||
@ -65,10 +89,12 @@ def __grid_count(self):
|
||||
return 0
|
||||
return 0
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def __request(self):
|
||||
return Case_pb2.CaseRequest(id=self.id)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def __generate_property_input_iterator(self, values_iterator, parameters):
|
||||
chunk = Properties_pb2.PropertyInputChunk()
|
||||
@ -80,6 +106,7 @@ def __generate_property_input_iterator(self, values_iterator, parameters):
|
||||
chunk.values.CopyFrom(valmsg)
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def __generate_property_input_chunks(self, array, parameters):
|
||||
index = -1
|
||||
@ -100,6 +127,7 @@ def __generate_property_input_chunks(self, array, parameters):
|
||||
chunk = Properties_pb2.PropertyInputChunk()
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def grid(self, index):
|
||||
"""Get Grid of a given index
|
||||
@ -107,27 +135,31 @@ def grid(self, index):
|
||||
Arguments:
|
||||
index (int): The grid index
|
||||
|
||||
Returns: :class:`rips.grid.Grid`
|
||||
Returns:
|
||||
:class:`rips.grid.Grid`
|
||||
"""
|
||||
return Grid(index, self, self.channel())
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def grids(self):
|
||||
"""Get a list of all rips Grid objects in the case
|
||||
|
||||
Returns: List of :class:`rips.grid.Grid`
|
||||
Returns:
|
||||
List of :class:`rips.grid.Grid`
|
||||
"""
|
||||
grid_list = []
|
||||
for i in range(0, self.__grid_count()):
|
||||
grid_list.append(Grid(i, self, self.channel()))
|
||||
return grid_list
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def replace(self, new_grid_file):
|
||||
"""Replace the current case grid with a new grid loaded from file
|
||||
|
||||
Arguments:
|
||||
new_egrid_file (str): path to EGRID file
|
||||
new_egrid_file (str): Path to EGRID file
|
||||
"""
|
||||
project = self.ancestor(rips.project.Project)
|
||||
self._execute_command(replaceCase=Cmd.ReplaceCaseRequest(
|
||||
@ -135,10 +167,10 @@ def replace(self, new_grid_file):
|
||||
new_case = project.case(self.id)
|
||||
self.copy_from(new_case)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def cell_count(self, porosity_model="MATRIX_MODEL"):
|
||||
"""Get a cell count object containing number of active cells and
|
||||
total number of cells
|
||||
"""Get a cell count object containing number of active cells and total number of cells
|
||||
|
||||
Arguments:
|
||||
porosity_model (str): String representing an enum.
|
||||
@ -147,12 +179,21 @@ def cell_count(self, porosity_model="MATRIX_MODEL"):
|
||||
Cell Count object with the following integer attributes:
|
||||
active_cell_count: number of active cells
|
||||
reservoir_cell_count: total number of reservoir cells
|
||||
|
||||
**CellCount class description**::
|
||||
|
||||
Parameter | Description | Type
|
||||
----------------------- | ------------------------- | -----
|
||||
active_cell_count | Number of active cells | Integer
|
||||
reservoir_cell_count | Total number of cells | Integer
|
||||
|
||||
"""
|
||||
porosity_model_enum = Case_pb2.PorosityModelType.Value(porosity_model)
|
||||
request = Case_pb2.CellInfoRequest(case_request=self.__request(),
|
||||
porosity_model=porosity_model_enum)
|
||||
return self.__case_stub.GetCellCount(request)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def cell_info_for_active_cells_async(self, porosity_model="MATRIX_MODEL"):
|
||||
"""Get Stream of cell info objects for current case
|
||||
@ -164,13 +205,14 @@ def cell_info_for_active_cells_async(self, porosity_model="MATRIX_MODEL"):
|
||||
Returns:
|
||||
Stream of **CellInfo** objects
|
||||
|
||||
See cell_info_for_active_cells() for detalis on the **CellInfo** class.
|
||||
See :meth:`rips.case.cell_info_for_active_cells()` for detalis on the **CellInfo** class.
|
||||
"""
|
||||
porosity_model_enum = Case_pb2.PorosityModelType.Value(porosity_model)
|
||||
request = Case_pb2.CellInfoRequest(case_request=self.__request(),
|
||||
porosity_model=porosity_model_enum)
|
||||
return self.__case_stub.GetCellInfoForActiveCells(request)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def cell_info_for_active_cells(self, porosity_model="MATRIX_MODEL"):
|
||||
"""Get list of cell info objects for current case
|
||||
@ -209,6 +251,7 @@ def cell_info_for_active_cells(self, porosity_model="MATRIX_MODEL"):
|
||||
received_active_cells.append(active_cell)
|
||||
return received_active_cells
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def time_steps(self):
|
||||
"""Get a list containing all time steps
|
||||
@ -230,36 +273,56 @@ def time_steps(self):
|
||||
"""
|
||||
return self.__case_stub.GetTimeSteps(self.__request()).dates
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def reservoir_boundingbox(self):
|
||||
"""Get the reservoir bounding box
|
||||
|
||||
Returns: A class with six double members: min_x, max_x, min_y, max_y, min_z, max_z
|
||||
Returns:
|
||||
BoundingBox
|
||||
|
||||
**BoundingBox class description**::
|
||||
|
||||
Type | Name
|
||||
--------- | ----------
|
||||
int | min_x
|
||||
int | max_x
|
||||
int | min_y
|
||||
int | max_y
|
||||
int | min_z
|
||||
int | max_z
|
||||
|
||||
|
||||
"""
|
||||
return self.__case_stub.GetReservoirBoundingBox(self.__request())
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def reservoir_depth_range(self):
|
||||
"""Get the reservoir depth range
|
||||
|
||||
Returns: A tuple with two members. The first is the minimum depth, the second is the maximum depth
|
||||
Returns:
|
||||
A tuple with two members. The first is the minimum depth, the second is the maximum depth
|
||||
"""
|
||||
bbox = self.reservoir_boundingbox()
|
||||
return -bbox.max_z, -bbox.min_z
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def days_since_start(self):
|
||||
"""Get a list of decimal values representing days since the start of the simulation"""
|
||||
return self.__case_stub.GetDaysSinceStart(self.__request()).day_decimals
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def view(self, view_id):
|
||||
"""Get a particular view belonging to a case by providing view id
|
||||
|
||||
Arguments:
|
||||
view_id(int): view id
|
||||
|
||||
Returns: a view object
|
||||
|
||||
Returns:
|
||||
:class:`rips.generated.pdm_objects.View`
|
||||
"""
|
||||
views = self.views()
|
||||
for view_object in views:
|
||||
@ -267,13 +330,19 @@ def view(self, view_id):
|
||||
return view_object
|
||||
return None
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def create_view(self):
|
||||
"""Create a new view in the current case"""
|
||||
"""Create a new view in the current case
|
||||
|
||||
Returns:
|
||||
:class:`rips.generated.pdm_objects.View`
|
||||
"""
|
||||
return self.view(
|
||||
self._execute_command(createView=Cmd.CreateViewRequest(
|
||||
caseId=self.id)).createViewResult.viewId)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def export_snapshots_of_all_views(self, prefix="", export_folder=""):
|
||||
""" Export snapshots for all views in the case
|
||||
@ -287,6 +356,7 @@ def export_snapshots_of_all_views(self, prefix="", export_folder=""):
|
||||
exportSnapshots=Cmd.ExportSnapshotsRequest(
|
||||
type="VIEWS", prefix=prefix, caseId=self.id, viewId=-1, exportFolder=export_folder))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def export_well_path_completions(
|
||||
self,
|
||||
@ -353,6 +423,7 @@ def export_well_path_completions(
|
||||
combinationMode=combination_mode,
|
||||
))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def export_msw(self, well_path):
|
||||
"""
|
||||
@ -364,6 +435,7 @@ def export_msw(self, well_path):
|
||||
return self._execute_command(exportMsw=Cmd.ExportMswRequest(
|
||||
caseId=self.id, wellPath=well_path))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def create_multiple_fractures(
|
||||
self,
|
||||
@ -408,6 +480,7 @@ def create_multiple_fractures(
|
||||
action=action,
|
||||
))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def create_lgr_for_completion(
|
||||
self,
|
||||
@ -454,6 +527,7 @@ def create_lgr_for_completion(
|
||||
splitType=split_type,
|
||||
))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def create_saturation_pressure_plots(self):
|
||||
"""
|
||||
@ -464,6 +538,7 @@ def create_saturation_pressure_plots(self):
|
||||
createSaturationPressurePlots=Cmd.CreateSatPressPlotRequest(
|
||||
caseIds=case_ids))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def export_flow_characteristics(
|
||||
self,
|
||||
@ -505,23 +580,17 @@ def export_flow_characteristics(
|
||||
aquiferCellThreshold=aquifer_cell_threshold,
|
||||
))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def available_properties(self,
|
||||
property_type,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Get a list of available properties
|
||||
|
||||
Arguments:
|
||||
property_type (str): string corresponding to property_type enum. Choices::
|
||||
- DYNAMIC_NATIVE
|
||||
- STATIC_NATIVE
|
||||
- SOURSIMRL
|
||||
- GENERATED
|
||||
- INPUT_PROPERTY
|
||||
- FORMATION_NAMES
|
||||
- FLOW_DIAGNOSTICS
|
||||
- INJECTION_FLOODING
|
||||
For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
property_type (str): string corresponding to property_type enum.
|
||||
porosity_model(str): 'MATRIX_MODEL' or 'FRACTURE_MODEL'.
|
||||
"""
|
||||
|
||||
@ -535,19 +604,20 @@ def available_properties(self,
|
||||
return self.__properties_stub.GetAvailableProperties(
|
||||
request).property_names
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def active_cell_property_async(self,
|
||||
property_type,
|
||||
property_name,
|
||||
time_step,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Get a cell property for all active cells. Async, so returns an iterator
|
||||
"""Get a cell property for all active cells. Async, so returns an iterator. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
|
||||
Returns:
|
||||
An iterator to a chunk object containing an array of double values
|
||||
@ -565,19 +635,20 @@ def active_cell_property_async(self,
|
||||
for chunk in self.__properties_stub.GetActiveCellProperty(request):
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def active_cell_property(self,
|
||||
property_type,
|
||||
property_name,
|
||||
time_step,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Get a cell property for all active cells. Sync, so returns a list
|
||||
"""Get a cell property for all active cells. Sync, so returns a list. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
|
||||
Returns:
|
||||
A list containing double values
|
||||
@ -592,19 +663,20 @@ def active_cell_property(self,
|
||||
all_values.append(value)
|
||||
return all_values
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def selected_cell_property_async(self,
|
||||
property_type,
|
||||
property_name,
|
||||
time_step,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Get a cell property for all selected cells. Async, so returns an iterator
|
||||
"""Get a cell property for all selected cells. Async, so returns an iterator. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
|
||||
Returns:
|
||||
An iterator to a chunk object containing an array of double values
|
||||
@ -622,19 +694,20 @@ def selected_cell_property_async(self,
|
||||
for chunk in self.__properties_stub.GetSelectedCellProperty(request):
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def selected_cell_property(self,
|
||||
property_type,
|
||||
property_name,
|
||||
time_step,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Get a cell property for all selected cells. Sync, so returns a list
|
||||
"""Get a cell property for all selected cells. Sync, so returns a list. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
|
||||
Returns:
|
||||
A list containing double values
|
||||
@ -649,6 +722,7 @@ def selected_cell_property(self,
|
||||
all_values.append(value)
|
||||
return all_values
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def grid_property_async(
|
||||
self,
|
||||
@ -657,14 +731,14 @@ def grid_property_async(
|
||||
time_step,
|
||||
grid_index=0,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Get a cell property for all grid cells. Async, so returns an iterator
|
||||
"""Get a cell property for all grid cells. Async, so returns an iterator. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
gridIndex(int): index to the grid we're getting values for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
|
||||
Returns:
|
||||
An iterator to a chunk object containing an array of double values
|
||||
@ -683,6 +757,7 @@ def grid_property_async(
|
||||
for chunk in self.__properties_stub.GetGridProperty(request):
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def grid_property(
|
||||
self,
|
||||
@ -691,14 +766,14 @@ def grid_property(
|
||||
time_step,
|
||||
grid_index=0,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Get a cell property for all grid cells. Synchronous, so returns a list
|
||||
"""Get a cell property for all grid cells. Synchronous, so returns a list. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
grid_index(int): index to the grid we're getting values for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
|
||||
Returns:
|
||||
A list of double values
|
||||
@ -712,6 +787,7 @@ def grid_property(
|
||||
all_values.append(value)
|
||||
return all_values
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def set_active_cell_property_async(
|
||||
self,
|
||||
@ -720,14 +796,14 @@ def set_active_cell_property_async(
|
||||
property_name,
|
||||
time_step,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Set cell property for all active cells Async. Takes an iterator to the input values
|
||||
"""Set cell property for all active cells Async. Takes an iterator to the input values. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
values_iterator(iterator): an iterator to the properties to be set
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
"""
|
||||
property_type_enum = Properties_pb2.PropertyType.Value(property_type)
|
||||
porosity_model_enum = Case_pb2.PorosityModelType.Value(porosity_model)
|
||||
@ -743,6 +819,7 @@ def set_active_cell_property_async(
|
||||
values_iterator, request)
|
||||
self.__properties_stub.SetActiveCellProperty(request_iterator)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def set_active_cell_property(
|
||||
self,
|
||||
@ -751,14 +828,14 @@ def set_active_cell_property(
|
||||
property_name,
|
||||
time_step,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Set a cell property for all active cells.
|
||||
"""Set a cell property for all active cells. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
values(list): a list of double precision floating point numbers
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
"""
|
||||
property_type_enum = Properties_pb2.PropertyType.Value(property_type)
|
||||
porosity_model_enum = Case_pb2.PorosityModelType.Value(porosity_model)
|
||||
@ -775,6 +852,7 @@ def set_active_cell_property(
|
||||
if reply.accepted_value_count < len(values):
|
||||
raise IndexError
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def set_grid_property(
|
||||
self,
|
||||
@ -784,15 +862,15 @@ def set_grid_property(
|
||||
time_step,
|
||||
grid_index=0,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Set a cell property for all grid cells.
|
||||
"""Set a cell property for all grid cells. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
values(list): a list of double precision floating point numbers
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
grid_index(int): index to the grid we're setting values for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
"""
|
||||
property_type_enum = Properties_pb2.PropertyType.Value(property_type)
|
||||
porosity_model_enum = Case_pb2.PorosityModelType.Value(porosity_model)
|
||||
@ -810,6 +888,7 @@ def set_grid_property(
|
||||
if reply.accepted_value_count < len(values):
|
||||
raise IndexError
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def export_property(
|
||||
self,
|
||||
@ -836,6 +915,7 @@ def export_property(
|
||||
exportFile=export_file,
|
||||
))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def create_well_bore_stability_plot(self, well_path, time_step, parameters=None):
|
||||
""" Create a new well bore stability plot
|
||||
@ -845,7 +925,7 @@ def create_well_bore_stability_plot(self, well_path, time_step, parameters=None)
|
||||
time_step(int): time step
|
||||
|
||||
Returns:
|
||||
A new plot object
|
||||
:class:`rips.generated.pdm_objects.WellBoreStabilityPlot`
|
||||
"""
|
||||
pb2_parameters = None
|
||||
if parameters is not None:
|
||||
@ -860,6 +940,7 @@ def create_well_bore_stability_plot(self, well_path, time_step, parameters=None)
|
||||
plot = project.plot(view_id=plot_result.createWbsPlotResult.viewId)
|
||||
return plot
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def import_formation_names(self, formation_files=None):
|
||||
""" Import formation names into project and apply it to the current case
|
||||
@ -876,16 +957,19 @@ def import_formation_names(self, formation_files=None):
|
||||
self._execute_command(importFormationNames=Cmd.ImportFormationNamesRequest(formationFiles=formation_files,
|
||||
applyToCaseId=self.id))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def simulation_wells(self):
|
||||
"""Get a list of all simulation wells for a case
|
||||
|
||||
Returns:
|
||||
A list of rips **SimulationWell** objects
|
||||
:class:`rips.generated.pdm_objects.SimulationWell`
|
||||
|
||||
"""
|
||||
wells = self.descendants(SimulationWell)
|
||||
return wells
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def active_cell_centers_async(
|
||||
self,
|
||||
@ -904,6 +988,7 @@ def active_cell_centers_async(
|
||||
porosity_model=porosity_model_enum)
|
||||
return self.__case_stub.GetCellCenterForActiveCells(request)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def active_cell_centers(
|
||||
self,
|
||||
@ -923,6 +1008,7 @@ def active_cell_centers(
|
||||
cell_centers.append(value)
|
||||
return cell_centers
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def active_cell_corners_async(
|
||||
self,
|
||||
@ -941,6 +1027,7 @@ def active_cell_corners_async(
|
||||
porosity_model=porosity_model_enum)
|
||||
return self.__case_stub.GetCellCornersForActiveCells(request)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def active_cell_corners(
|
||||
self,
|
||||
@ -950,8 +1037,20 @@ def active_cell_corners(
|
||||
Arguments:
|
||||
porosity_model(str): string enum. See available()
|
||||
|
||||
Returns:
|
||||
A list of CellCorners
|
||||
**CellCorner class description**::
|
||||
|
||||
Parameter | Description | Type
|
||||
----------- | ------------ | -----
|
||||
c0 | | Vec3d
|
||||
c1 | | Vec3d
|
||||
c2 | | Vec3d
|
||||
c3 | | Vec3d
|
||||
c4 | | Vec3d
|
||||
c5 | | Vec3d
|
||||
c6 | | Vec3d
|
||||
c7 | | Vec3d
|
||||
|
||||
|
||||
"""
|
||||
cell_corners = []
|
||||
generator = self.active_cell_corners_async(porosity_model)
|
||||
@ -960,6 +1059,7 @@ def active_cell_corners(
|
||||
cell_corners.append(value)
|
||||
return cell_corners
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def selected_cells_async(self):
|
||||
"""Get the selected cells. Async, so returns an iterator.
|
||||
@ -970,6 +1070,7 @@ def selected_cells_async(self):
|
||||
"""
|
||||
return self.__case_stub.GetSelectedCells(self.__request())
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def selected_cells(self):
|
||||
"""Get the selected cells. Synchronous, so returns a list.
|
||||
@ -984,6 +1085,7 @@ def selected_cells(self):
|
||||
cells.append(value)
|
||||
return cells
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def coarsening_info(self):
|
||||
"""Get a coarsening information for all grids in the case.
|
||||
@ -994,12 +1096,24 @@ def coarsening_info(self):
|
||||
"""
|
||||
return self.__case_stub.GetCoarseningInfoArray(self.__request()).data
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def available_nnc_properties(self):
|
||||
"""Get a list of available NNC properties
|
||||
|
||||
**NNCConnection class description**::
|
||||
|
||||
Parameter | Description | Type
|
||||
------------------------| --------------------------------------------- | -----
|
||||
cell_grid_index1 | Reservoir Cell Index to cell 1 | int32
|
||||
cell_grid_index2 | Reservoir Cell Index to cell 2 | int32
|
||||
cell1 | Reservoir Cell IJK to cell 1 | Vec3i
|
||||
cell2 | Reservoir Cell IJK to cell 1 | Vec3i
|
||||
|
||||
"""
|
||||
return self.__nnc_properties_stub.GetAvailableNNCProperties(self.__request()).properties
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def nnc_connections_async(self):
|
||||
"""Get the NNC connections. Async, so returns an iterator.
|
||||
@ -1010,6 +1124,7 @@ def nnc_connections_async(self):
|
||||
"""
|
||||
return self.__nnc_properties_stub.GetNNCConnections(self.__request())
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def nnc_connections(self):
|
||||
"""Get the NNC connection. Synchronous, so returns a list.
|
||||
@ -1024,6 +1139,7 @@ def nnc_connections(self):
|
||||
connections.append(value)
|
||||
return connections
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def __nnc_connections_values_async(self, property_name, property_type, time_step):
|
||||
request = NNCProperties_pb2.NNCValuesRequest(case_id=self.id,
|
||||
@ -1032,6 +1148,7 @@ def __nnc_connections_values_async(self, property_name, property_type, time_step
|
||||
time_step=time_step)
|
||||
return self.__nnc_properties_stub.GetNNCValues(request)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def __nnc_values_generator_to_list(self, generator):
|
||||
"""Converts a NNC values generator to a list."""
|
||||
@ -1041,6 +1158,7 @@ def __nnc_values_generator_to_list(self, generator):
|
||||
vals.append(value)
|
||||
return vals
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def nnc_connections_static_values_async(self, property_name):
|
||||
"""Get the static NNC values. Async, so returns an iterator.
|
||||
@ -1054,6 +1172,7 @@ def nnc_connections_static_values_async(self, property_name):
|
||||
"""
|
||||
return self.__nnc_connections_values_async(property_name, NNCProperties_pb2.NNC_STATIC, 0)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def nnc_connections_static_values(self, property_name):
|
||||
"""Get the static NNC values.
|
||||
@ -1066,6 +1185,7 @@ def nnc_connections_static_values(self, property_name):
|
||||
generator = self.nnc_connections_static_values_async(property_name)
|
||||
return self.__nnc_values_generator_to_list(generator)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def nnc_connections_dynamic_values_async(self, property_name, time_step):
|
||||
"""Get the dynamic NNC values. Async, so returns an iterator.
|
||||
@ -1079,6 +1199,7 @@ def nnc_connections_dynamic_values_async(self, property_name, time_step):
|
||||
"""
|
||||
return self.__nnc_connections_values_async(property_name, NNCProperties_pb2.NNC_DYNAMIC, time_step)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def nnc_connections_dynamic_values(self, property_name, time_step):
|
||||
"""Get the dynamic NNC values.
|
||||
@ -1091,6 +1212,7 @@ def nnc_connections_dynamic_values(self, property_name, time_step):
|
||||
generator = self.nnc_connections_dynamic_values_async(property_name, time_step)
|
||||
return self.__nnc_values_generator_to_list(generator)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def nnc_connections_generated_values_async(self, property_name, time_step):
|
||||
"""Get the generated NNC values. Async, so returns an iterator.
|
||||
@ -1104,6 +1226,7 @@ def nnc_connections_generated_values_async(self, property_name, time_step):
|
||||
"""
|
||||
return self.__nnc_connections_values_async(property_name, NNCProperties_pb2.NNC_GENERATED, time_step)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def nnc_connections_generated_values(self, property_name, time_step):
|
||||
"""Get the generated NNC values.
|
||||
@ -1116,6 +1239,7 @@ def nnc_connections_generated_values(self, property_name, time_step):
|
||||
generator = self.nnc_connections_generated_values_async(property_name, time_step)
|
||||
return self.__nnc_values_generator_to_list(generator)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def __generate_nnc_property_input_chunks(self, array, parameters):
|
||||
index = -1
|
||||
@ -1135,6 +1259,7 @@ def __generate_nnc_property_input_chunks(self, array, parameters):
|
||||
chunk = NNCProperties_pb2.NNCValuesChunk()
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def set_nnc_connections_values(
|
||||
self,
|
||||
|
@ -7,6 +7,7 @@ from rips.pdmobject import PdmObject, add_method
|
||||
from rips.view import View
|
||||
from rips.generated.pdm_objects import EclipseContourMap, GeoMechContourMap
|
||||
|
||||
|
||||
@add_method(EclipseContourMap)
|
||||
def export_to_text(self, export_file_name='', export_local_coordinates=False, undefined_value_label="NaN", exclude_undefined_values=False):
|
||||
""" Export snapshot for the current view
|
||||
@ -25,6 +26,7 @@ def export_to_text(self, export_file_name='', export_local_coordinates=False, un
|
||||
excludeUndefinedValues=exclude_undefined_values,
|
||||
viewId=self.id))
|
||||
|
||||
|
||||
@add_method(GeoMechContourMap)
|
||||
def export_to_text(self, export_file_name='', export_local_coordinates=False, undefined_value_label="NaN", exclude_undefined_values=False):
|
||||
""" Export snapshot for the current view
|
||||
@ -42,4 +44,3 @@ def export_to_text(self, export_file_name='', export_local_coordinates=False, un
|
||||
undefinedValueLabel=undefined_value_label,
|
||||
excludeUndefinedValues=exclude_undefined_values,
|
||||
viewId=self.id))
|
||||
|
||||
|
@ -11,10 +11,11 @@ import rips.generated.Grid_pb2_grpc as Grid_pb2_grpc
|
||||
|
||||
|
||||
class Grid:
|
||||
"""Grid Information. Not meant to be constructed separately
|
||||
|
||||
Create Grid objects using methods on Case: Grid() and Grids()
|
||||
"""Grid Information. Created by methods in Case
|
||||
:meth:`rips.case.grid()`
|
||||
:meth:`rips.case.grids()`
|
||||
"""
|
||||
|
||||
def __init__(self, index, case, channel):
|
||||
self.__channel = channel
|
||||
self.__stub = Grid_pb2_grpc.GridStub(self.__channel)
|
||||
@ -33,7 +34,6 @@ class Grid:
|
||||
Grid_pb2.GridRequest(case_request=case_request,
|
||||
grid_index=self.index)).dimensions
|
||||
|
||||
|
||||
def cell_centers_async(self):
|
||||
"""The cells center for all cells in given grid async.
|
||||
|
||||
|
@ -9,12 +9,13 @@ from rips.case import Case
|
||||
import rips.generated.Commands_pb2 as Cmd
|
||||
from rips.generated.pdm_objects import GridCaseGroup
|
||||
|
||||
|
||||
@add_method(GridCaseGroup)
|
||||
def create_statistics_case(self):
|
||||
"""Create a Statistics case in the Grid Case Group
|
||||
|
||||
Returns:
|
||||
A new Case
|
||||
:class:`rips.generated.pdm_objects.EclipseCase`
|
||||
"""
|
||||
command_reply = self._execute_command(
|
||||
createStatisticsCase=Cmd.CreateStatisticsCaseRequest(
|
||||
@ -22,28 +23,42 @@ def create_statistics_case(self):
|
||||
return Case(self.channel,
|
||||
command_reply.createStatisticsCaseResult.caseId)
|
||||
|
||||
|
||||
@add_method(GridCaseGroup)
|
||||
def statistics_cases(self):
|
||||
"""Get a list of all statistics cases in the Grid Case Group"""
|
||||
"""Get a list of all statistics cases in the Grid Case Group
|
||||
|
||||
Returns:
|
||||
List of :class:`rips.generated.pdm_objects.EclipseCase`
|
||||
|
||||
"""
|
||||
stat_case_collection = self.children("StatisticsCaseCollection")[0]
|
||||
return stat_case_collection.children("Reservoirs")
|
||||
|
||||
|
||||
@add_method(GridCaseGroup)
|
||||
def views(self):
|
||||
"""Get a list of views belonging to a grid case group"""
|
||||
"""Get a list of views belonging to a grid case group
|
||||
|
||||
Returns:
|
||||
List of :class:`rips.generated.pdm_objects.EclipseView`
|
||||
|
||||
"""
|
||||
pdm_objects = self.descendants(EclipseView)
|
||||
view_list = []
|
||||
for pdm_object in pdm_objects:
|
||||
view_list.append(pdm_object)
|
||||
return view_list
|
||||
|
||||
|
||||
@add_method(GridCaseGroup)
|
||||
def view(self, view_id):
|
||||
"""Get a particular view belonging to a case group by providing view id
|
||||
Arguments:
|
||||
id(int): view id
|
||||
|
||||
Returns: a view object
|
||||
Returns:
|
||||
List of :class:`rips.generated.pdm_objects.EclipseView`
|
||||
|
||||
"""
|
||||
views = self.views()
|
||||
@ -52,13 +67,13 @@ def view(self, view_id):
|
||||
return view_object
|
||||
return None
|
||||
|
||||
|
||||
@add_method(GridCaseGroup)
|
||||
def compute_statistics(self, case_ids=None):
|
||||
""" Compute statistics for the given case ids
|
||||
|
||||
Arguments:
|
||||
case_ids(list of integers): list of case ids.
|
||||
If this is None all cases in group are included
|
||||
case_ids(list of integers): List of case ids. If this is None all cases in group are included
|
||||
|
||||
"""
|
||||
if case_ids is None:
|
||||
|
@ -17,19 +17,23 @@ import rips.generated.Commands_pb2 as Cmd
|
||||
import rips.generated.Commands_pb2_grpc as CmdRpc
|
||||
from rips.generated.pdm_objects import PdmObject, class_from_keyword
|
||||
|
||||
|
||||
def camel_to_snake(name):
|
||||
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
|
||||
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
|
||||
|
||||
|
||||
def snake_to_camel(name):
|
||||
return ''.join(word.title() for word in name.split('_'))
|
||||
|
||||
|
||||
def add_method(cls):
|
||||
def decorator(func):
|
||||
setattr(cls, func.__name__, func)
|
||||
return func # returning func means func can still be used normally
|
||||
return decorator
|
||||
|
||||
|
||||
def add_static_method(cls):
|
||||
def decorator(func):
|
||||
@wraps(func)
|
||||
@ -40,6 +44,7 @@ def add_static_method(cls):
|
||||
return func # returning func means func can still be used normally
|
||||
return decorator
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def _execute_command(self, **command_params):
|
||||
self.__warnings = []
|
||||
@ -51,6 +56,7 @@ def _execute_command(self, **command_params):
|
||||
|
||||
return response
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __custom_init__(self, pb2_object, channel):
|
||||
self.__warnings = []
|
||||
@ -75,6 +81,7 @@ def __custom_init__(self, pb2_object, channel):
|
||||
self._pb2_object = PdmObject_pb2.PdmObject(class_keyword=self.__class__.__name__)
|
||||
self.__copy_to_pb2()
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def copy_from(self, object):
|
||||
"""Copy attribute values from object to self
|
||||
@ -89,14 +96,17 @@ def copy_from(self, object):
|
||||
self.__custom_init__(self._pb2_object, self._channel)
|
||||
self.update()
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def warnings(self):
|
||||
return self.__warnings
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def has_warnings(self):
|
||||
return len(self.__warnings) > 0
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __copy_to_pb2(self):
|
||||
if self._pb2_object is not None:
|
||||
@ -108,16 +118,19 @@ def __copy_to_pb2(self):
|
||||
camel_kw = snake_to_camel(snake_kw)
|
||||
self.__set_grpc_value(camel_kw, value)
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def pb2_object(self):
|
||||
""" Private method"""
|
||||
return self._pb2_object
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def channel(self):
|
||||
""" Private method"""
|
||||
return self._channel
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def address(self):
|
||||
"""Get the unique address of the PdmObject
|
||||
@ -128,16 +141,19 @@ def address(self):
|
||||
|
||||
return self._pb2_object.address
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def set_visible(self, visible):
|
||||
"""Set the visibility of the object in the ResInsight project tree"""
|
||||
self._pb2_object.visible = visible
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def visible(self):
|
||||
"""Get the visibility of the object in the ResInsight project tree"""
|
||||
return self._pb2_object.visible
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def print_object_info(self):
|
||||
"""Print the structure and data content of the PdmObject"""
|
||||
@ -151,7 +167,8 @@ def print_object_info(self):
|
||||
print("Object Methods:")
|
||||
for snake_kw in dir(self):
|
||||
if not snake_kw.startswith("_") and callable(getattr(self, snake_kw)):
|
||||
print (" " + snake_kw)
|
||||
print(" " + snake_kw)
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __convert_from_grpc_value(self, value):
|
||||
@ -173,6 +190,7 @@ def __convert_from_grpc_value(self, value):
|
||||
return self.__makelist(value)
|
||||
return value
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __convert_to_grpc_value(self, value):
|
||||
if isinstance(value, bool):
|
||||
@ -188,14 +206,17 @@ def __convert_to_grpc_value(self, value):
|
||||
return "[" + ", ".join(list_of_strings) + "]"
|
||||
return str(value)
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __get_grpc_value(self, camel_keyword):
|
||||
return self.__convert_from_grpc_value(self._pb2_object.parameters[camel_keyword])
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __set_grpc_value(self, camel_keyword, value):
|
||||
self._pb2_object.parameters[camel_keyword] = self.__convert_to_grpc_value(value)
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def set_value(self, snake_keyword, value):
|
||||
"""Set the value associated with the provided keyword and updates ResInsight
|
||||
@ -208,10 +229,12 @@ def set_value(self, snake_keyword, value):
|
||||
setattr(self, snake_keyword, value)
|
||||
self.update()
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __islist(self, value):
|
||||
return value.startswith("[") and value.endswith("]")
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __makelist(self, list_string):
|
||||
list_string = list_string.lstrip("[")
|
||||
@ -222,6 +245,7 @@ def __makelist(self, list_string):
|
||||
values.append(self.__convert_from_grpc_value(string))
|
||||
return values
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __from_pb2_to_pdm_objects(self, pb2_object_list, super_class_definition):
|
||||
pdm_object_list = []
|
||||
@ -234,6 +258,7 @@ def __from_pb2_to_pdm_objects(self, pb2_object_list, super_class_definition):
|
||||
pdm_object_list.append(pdm_object)
|
||||
return pdm_object_list
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def descendants(self, class_definition):
|
||||
"""Get a list of all project tree descendants matching the class keyword
|
||||
@ -257,6 +282,7 @@ def descendants(self, class_definition):
|
||||
return [] # Valid empty result
|
||||
raise e
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def children(self, child_field, class_definition=PdmObject):
|
||||
"""Get a list of all direct project tree children inside the provided child_field
|
||||
@ -275,6 +301,7 @@ def children(self, child_field, class_definition=PdmObject):
|
||||
return []
|
||||
raise e
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def ancestor(self, class_definition):
|
||||
"""Find the first ancestor that matches the provided class_keyword
|
||||
@ -301,12 +328,14 @@ def ancestor(self, class_definition):
|
||||
return None
|
||||
raise e
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def _call_get_method_async(self, method_name):
|
||||
request = PdmObject_pb2.PdmObjectGetterRequest(object=self._pb2_object, method=method_name)
|
||||
for chunk in self._pdm_object_stub.CallPdmObjectGetter(request):
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def _call_get_method(self, method_name):
|
||||
all_values = []
|
||||
@ -317,6 +346,7 @@ def _call_get_method(self, method_name):
|
||||
all_values.append(value)
|
||||
return all_values
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __generate_set_method_chunks(self, array, method_request):
|
||||
index = -1
|
||||
@ -324,7 +354,8 @@ def __generate_set_method_chunks(self, array, method_request):
|
||||
while index < len(array):
|
||||
chunk = PdmObject_pb2.PdmObjectSetterChunk()
|
||||
if index is -1:
|
||||
chunk.set_request.CopyFrom(PdmObject_pb2.PdmObjectSetterRequest(request=method_request, data_count=len(array)))
|
||||
chunk.set_request.CopyFrom(PdmObject_pb2.PdmObjectSetterRequest(
|
||||
request=method_request, data_count=len(array)))
|
||||
index += 1
|
||||
else:
|
||||
actual_chunk_size = min(len(array) - index + 1, self.__chunk_size)
|
||||
@ -348,20 +379,24 @@ def __generate_set_method_chunks(self, array, method_request):
|
||||
chunk = PdmObject_pb2.PdmObjectSetterChunk()
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def _call_set_method(self, method_name, values):
|
||||
method_request = PdmObject_pb2.PdmObjectGetterRequest(object=self._pb2_object, method=method_name)
|
||||
method_request = PdmObject_pb2.PdmObjectGetterRequest(
|
||||
object=self._pb2_object, method=method_name)
|
||||
request_iterator = self.__generate_set_method_chunks(values, method_request)
|
||||
reply = self._pdm_object_stub.CallPdmObjectSetter(request_iterator)
|
||||
if reply.accepted_value_count < len(values):
|
||||
raise IndexError
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def _call_pdm_method(self, method_name, **kwargs):
|
||||
pb2_params = PdmObject_pb2.PdmObject(class_keyword=method_name)
|
||||
for key, value in kwargs.items():
|
||||
pb2_params.parameters[snake_to_camel(key)] = self.__convert_to_grpc_value(value)
|
||||
request = PdmObject_pb2.PdmObjectMethodRequest(object=self._pb2_object, method=method_name, params=pb2_params)
|
||||
request = PdmObject_pb2.PdmObjectMethodRequest(
|
||||
object=self._pb2_object, method=method_name, params=pb2_params)
|
||||
|
||||
pb2_object = self._pdm_object_stub.CallPdmObjectMethod(request)
|
||||
|
||||
@ -372,6 +407,7 @@ def _call_pdm_method(self, method_name, **kwargs):
|
||||
pdm_object = child_class_definition(pb2_object=pb2_object, channel=self.channel())
|
||||
return pdm_object
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def update(self):
|
||||
"""Sync all fields from the Python Object to ResInsight"""
|
||||
|
@ -7,6 +7,7 @@ from rips.pdmobject import PdmObject
|
||||
from rips.generated.pdm_objects import PlotWindow, Plot
|
||||
from rips.pdmobject import add_method
|
||||
|
||||
|
||||
@add_method(PlotWindow)
|
||||
def export_snapshot(self, export_folder='', file_prefix='', output_format='PNG'):
|
||||
""" Export snapshot for the current plot
|
||||
@ -23,5 +24,3 @@ def export_snapshot(self, export_folder='', file_prefix='', output_format='PNG')
|
||||
viewId=self.id,
|
||||
exportFolder=export_folder,
|
||||
plotOutputFormat=output_format))
|
||||
|
||||
|
@ -24,12 +24,14 @@ from rips.generated.pdm_objects import Project, PlotWindow, WellPath
|
||||
def __custom_init__(self, pb2_object, channel):
|
||||
self._project_stub = Project_pb2_grpc.ProjectStub(self._channel)
|
||||
|
||||
|
||||
@add_static_method(Project)
|
||||
def create(channel):
|
||||
project_stub = Project_pb2_grpc.ProjectStub(channel)
|
||||
pb2_object = project_stub.GetPdmObject(Empty())
|
||||
return Project(pb2_object, channel)
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def open(self, path):
|
||||
"""Open a new project from the given path
|
||||
@ -41,20 +43,24 @@ def open(self, path):
|
||||
self._execute_command(openProject=Cmd.FilePathRequest(path=path))
|
||||
return self
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def save(self, path=""):
|
||||
"""Save the project to the existing project file, or to a new file
|
||||
|
||||
Arguments:
|
||||
path(str): File path to the file to save the project to. If empty, saves to the active project file
|
||||
"""
|
||||
self._execute_command(saveProject=Cmd.SaveProjectRequest(filePath=path))
|
||||
return self
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def close(self):
|
||||
"""Close the current project (and open new blank project)"""
|
||||
self._execute_command(closeProject=Empty())
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def load_case(self, path):
|
||||
"""Load a new case from the given file path
|
||||
@ -62,18 +68,19 @@ def load_case(self, path):
|
||||
Arguments:
|
||||
path(str): file path to case
|
||||
Returns:
|
||||
A rips Case object
|
||||
:class:`rips.generated.pdm_objects.Case`
|
||||
"""
|
||||
command_reply = self._execute_command(loadCase=Cmd.FilePathRequest(
|
||||
path=path))
|
||||
return self.case(command_reply.loadCaseResult.id)
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def selected_cases(self):
|
||||
"""Get a list of all cases selected in the project tree
|
||||
|
||||
Returns:
|
||||
A list of rips Case objects
|
||||
A list of :class:`rips.generated.pdm_objects.Case`
|
||||
"""
|
||||
case_infos = self._project_stub.GetSelectedCases(Empty())
|
||||
cases = []
|
||||
@ -81,15 +88,17 @@ def selected_cases(self):
|
||||
cases.append(self.case(case_info.id))
|
||||
return cases
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def cases(self):
|
||||
"""Get a list of all cases in the project
|
||||
|
||||
Returns:
|
||||
A list of rips Case objects
|
||||
A list of :class:`rips.generated.pdm_objects.Case`
|
||||
"""
|
||||
return self.descendants(Case)
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def case(self, case_id):
|
||||
"""Get a specific case from the provided case Id
|
||||
@ -97,7 +106,7 @@ def case(self, case_id):
|
||||
Arguments:
|
||||
id(int): case id
|
||||
Returns:
|
||||
A rips Case object
|
||||
:class:`rips.generated.pdm_objects.Case`
|
||||
"""
|
||||
allCases = self.cases()
|
||||
for case in allCases:
|
||||
@ -105,6 +114,7 @@ def case(self, case_id):
|
||||
return case
|
||||
return None
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def replace_source_cases(self, grid_list_file, case_group_id=0):
|
||||
"""Replace all source cases within a case group
|
||||
@ -117,6 +127,7 @@ def replace_source_cases(self, grid_list_file, case_group_id=0):
|
||||
replaceSourceCases=Cmd.ReplaceSourceCasesRequest(
|
||||
gridListFile=grid_list_file, caseGroupId=case_group_id))
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def create_grid_case_group(self, case_paths):
|
||||
"""Create a Grid Case Group from a list of cases
|
||||
@ -124,7 +135,7 @@ def create_grid_case_group(self, case_paths):
|
||||
Arguments:
|
||||
case_paths (list): list of file path strings
|
||||
Returns:
|
||||
A case group id and name
|
||||
:class:`rips.generated.pdm_objects.GridCaseGroup`
|
||||
"""
|
||||
command_reply = self._execute_command(
|
||||
createGridCaseGroup=Cmd.CreateGridCaseGroupRequest(
|
||||
@ -132,18 +143,21 @@ def create_grid_case_group(self, case_paths):
|
||||
return self.grid_case_group(
|
||||
command_reply.createGridCaseGroupResult.groupId)
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def views(self):
|
||||
"""Get a list of views belonging to a project"""
|
||||
return self.descendants(View)
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def view(self, view_id):
|
||||
"""Get a particular view belonging to a case by providing view id
|
||||
|
||||
Arguments:
|
||||
view_id(int): view id
|
||||
Returns: a view object
|
||||
Returns:
|
||||
:class:`rips.generated.pdm_objects.View`
|
||||
"""
|
||||
views = self.views()
|
||||
for view_object in views:
|
||||
@ -151,9 +165,14 @@ def view(self, view_id):
|
||||
return view_object
|
||||
return None
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def plots(self):
|
||||
"""Get a list of all plots belonging to a project"""
|
||||
"""Get a list of all plots belonging to a project
|
||||
|
||||
Returns:
|
||||
List of :class:`rips.generated.pdm_objects.Plot`
|
||||
"""
|
||||
pdm_objects = self.descendants(PlotWindow)
|
||||
plot_list = []
|
||||
for pdm_object in pdm_objects:
|
||||
@ -161,12 +180,16 @@ def plots(self):
|
||||
plot_list.append(pdm_object)
|
||||
return plot_list
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def plot(self, view_id):
|
||||
"""Get a particular plot by providing view id
|
||||
|
||||
Arguments:
|
||||
view_id(int): view id
|
||||
Returns: a plot object
|
||||
|
||||
Returns:
|
||||
:class:`rips.generated.pdm_objects.Plot`
|
||||
"""
|
||||
plots = self.plots()
|
||||
for plot_object in plots:
|
||||
@ -174,12 +197,19 @@ def plot(self, view_id):
|
||||
return plot_object
|
||||
return None
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def grid_case_groups(self):
|
||||
"""Get a list of all grid case groups in the project"""
|
||||
"""Get a list of all grid case groups in the project
|
||||
|
||||
Returns:
|
||||
List of :class:`rips.generated.pdm_objects.GridCaseGroup`
|
||||
|
||||
"""
|
||||
case_groups = self.descendants(GridCaseGroup)
|
||||
return case_groups
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def grid_case_group(self, group_id):
|
||||
"""Get a particular grid case group belonging to a project
|
||||
@ -187,7 +217,8 @@ def grid_case_group(self, group_id):
|
||||
Arguments:
|
||||
groupId(int): group id
|
||||
|
||||
Returns: a grid case group object
|
||||
Returns:
|
||||
:class:`rips.generated.pdm_objects.GridCaseGroup`
|
||||
"""
|
||||
case_groups = self.grid_case_groups()
|
||||
for case_group in case_groups:
|
||||
@ -195,6 +226,7 @@ def grid_case_group(self, group_id):
|
||||
return case_group
|
||||
return None
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def export_multi_case_snapshots(self, grid_list_file):
|
||||
"""Export snapshots for a set of cases
|
||||
@ -206,6 +238,7 @@ def export_multi_case_snapshots(self, grid_list_file):
|
||||
exportMultiCaseSnapshot=Cmd.ExportMultiCaseRequest(
|
||||
gridListFile=grid_list_file))
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def export_snapshots(self, snapshot_type='ALL', prefix='', plot_format='PNG'):
|
||||
""" Export all snapshots of a given type
|
||||
@ -219,6 +252,7 @@ def export_snapshots(self, snapshot_type='ALL', prefix='', plot_format='PNG'):
|
||||
exportSnapshots=Cmd.ExportSnapshotsRequest(
|
||||
type=snapshot_type, prefix=prefix, caseId=-1, viewId=-1, plotOutputFormat=plot_format))
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def export_well_paths(self, well_paths=None, md_step_size=5.0):
|
||||
""" Export a set of well paths
|
||||
@ -234,6 +268,7 @@ def export_well_paths(self, well_paths=None, md_step_size=5.0):
|
||||
return self._execute_command(exportWellPaths=Cmd.ExportWellPathRequest(
|
||||
wellPathNames=well_paths, mdStepSize=md_step_size))
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def scale_fracture_template(self, template_id, half_length, height,
|
||||
d_factor, conductivity):
|
||||
@ -254,6 +289,7 @@ def scale_fracture_template(self, template_id, half_length, height,
|
||||
dFactor=d_factor,
|
||||
conductivity=conductivity))
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def set_fracture_containment(self, template_id, top_layer, base_layer):
|
||||
""" Set fracture template containment parameters
|
||||
@ -267,6 +303,7 @@ def set_fracture_containment(self, template_id, top_layer, base_layer):
|
||||
setFractureContainment=Cmd.SetFracContainmentRequest(
|
||||
id=template_id, topLayer=top_layer, baseLayer=base_layer))
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def import_well_paths(self, well_path_files=None, well_path_folder=''):
|
||||
""" Import well paths into project
|
||||
@ -276,7 +313,7 @@ def import_well_paths(self, well_path_files=None, well_path_folder=''):
|
||||
well_path_folder(str): A folder path containing files to import
|
||||
|
||||
Returns:
|
||||
A list of WellPath objects
|
||||
List of :class:`rips.generated.pdm_objects.WellPath`
|
||||
"""
|
||||
if well_path_files is None:
|
||||
well_path_files = []
|
||||
@ -288,21 +325,23 @@ def import_well_paths(self, well_path_files=None, well_path_folder=''):
|
||||
well_paths.append(self.well_path_by_name(well_path_name))
|
||||
return well_paths
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def well_paths(self):
|
||||
"""Get a list of all well paths in the project
|
||||
|
||||
Returns:
|
||||
A list of rips WellPath objects
|
||||
List of :class:`rips.generated.pdm_objects.WellPath`
|
||||
"""
|
||||
return self.descendants(WellPath)
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def well_path_by_name(self, well_path_name):
|
||||
"""Get a specific well path by name from the project
|
||||
|
||||
Returns:
|
||||
A WellPath object
|
||||
:class:`rips.generated.pdm_objects.WellPath`
|
||||
"""
|
||||
all_well_paths = self.well_paths()
|
||||
for well_path in all_well_paths:
|
||||
@ -310,6 +349,7 @@ def well_path_by_name(self, well_path_name):
|
||||
return well_path
|
||||
return None
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def import_well_log_files(self, well_log_files=None, well_log_folder=''):
|
||||
""" Import well log files into project
|
||||
@ -328,6 +368,7 @@ def import_well_log_files(self, well_log_files=None, well_log_folder=''):
|
||||
wellLogFiles=well_log_files))
|
||||
return res.importWellLogFilesResult.wellPathNames
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def import_formation_names(self, formation_files=None):
|
||||
""" Import formation names into project
|
||||
|
@ -15,24 +15,60 @@ from rips.generated.pdm_objects import SimulationWell
|
||||
from rips.pdmobject import PdmObject, add_method
|
||||
import rips.case
|
||||
|
||||
|
||||
@add_method(SimulationWell)
|
||||
def __custom_init__(self, pb2_object, channel):
|
||||
self._simulation_well_stub = SimulationWell_pb2_grpc.SimulationWellStub(channel)
|
||||
|
||||
|
||||
@add_method(SimulationWell)
|
||||
def status(self, timestep):
|
||||
"""Get simulation well status
|
||||
|
||||
**SimulationWellStatus class description**::
|
||||
|
||||
Parameter | Description | Type
|
||||
----------- | ------------------------------------------------------------- | -----
|
||||
well_type | Well type as string | string
|
||||
is_open | True if simulation well is open at the specified time step | bool
|
||||
|
||||
Arguments:
|
||||
timestep(int): Time step index
|
||||
|
||||
"""
|
||||
sim_well_request = SimulationWell_pb2.SimulationWellRequest(case_id=self.case().id,
|
||||
well_name=self.name,
|
||||
timestep=timestep)
|
||||
return self._simulation_well_stub.GetSimulationWellStatus(sim_well_request)
|
||||
|
||||
|
||||
@add_method(SimulationWell)
|
||||
def cells(self, timestep):
|
||||
"""Get reservoir cells the simulation well is defined for
|
||||
|
||||
**SimulationWellCellInfo class description**::
|
||||
|
||||
Parameter | Description | Type
|
||||
----------- | --------------------------------------------------------- | -----
|
||||
ijk | Cell IJK location | Vec3i
|
||||
grid_index | Grid index | int
|
||||
is_open | True if connection to is open at the specified time step | bool
|
||||
branch_id | | int
|
||||
segment_id | | int
|
||||
|
||||
Arguments:
|
||||
timestep(int): Time step index
|
||||
|
||||
Returns:
|
||||
List of SimulationWellCellInfo
|
||||
|
||||
"""
|
||||
sim_well_request = SimulationWell_pb2.SimulationWellRequest(case_id=self.case().id,
|
||||
well_name=self.name,
|
||||
timestep=timestep)
|
||||
return self._simulation_well_stub.GetSimulationWellCells(sim_well_request).data
|
||||
|
||||
|
||||
@add_method(SimulationWell)
|
||||
def case(self):
|
||||
return self.ancestor(rips.case.Case)
|
||||
|
@ -8,19 +8,25 @@ import rips
|
||||
|
||||
_rips_instance = None
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def rips_instance():
|
||||
return _rips_instance
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def initialize_test():
|
||||
_rips_instance.project.close() # make sure ResInsight is clean before execution of test
|
||||
yield initialize_test
|
||||
_rips_instance.project.close() # make sure ResInsight is clean after test
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
parser.addoption("--console", action="store_true", default=False, help="Run as console application")
|
||||
parser.addoption("--existing", action="store_true", default=False, help="Look for existing ResInsight")
|
||||
parser.addoption("--console", action="store_true", default=False,
|
||||
help="Run as console application")
|
||||
parser.addoption("--existing", action="store_true", default=False,
|
||||
help="Look for existing ResInsight")
|
||||
|
||||
|
||||
def pytest_configure(config):
|
||||
global _rips_instance
|
||||
@ -36,6 +42,7 @@ def pytest_configure(config):
|
||||
print("Need a valid ResInsight executable to launch tests")
|
||||
exit(0)
|
||||
|
||||
|
||||
def pytest_unconfigure(config):
|
||||
if not config.getoption('--existing'):
|
||||
_rips_instance.exit()
|
||||
|
@ -10,22 +10,28 @@ import rips
|
||||
|
||||
import dataroot
|
||||
|
||||
|
||||
def test_Launch(rips_instance, initialize_test):
|
||||
assert(rips_instance is not None)
|
||||
|
||||
|
||||
def test_EmptyProject(rips_instance, initialize_test):
|
||||
cases = rips_instance.project.cases()
|
||||
assert(len(cases) is 0)
|
||||
|
||||
|
||||
def test_OneCase(rips_instance, initialize_test):
|
||||
case = rips_instance.project.load_case(dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID")
|
||||
case = rips_instance.project.load_case(
|
||||
dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID")
|
||||
assert(case.name == "TEST10K_FLT_LGR_NNC")
|
||||
assert(case.id == 0)
|
||||
cases = rips_instance.project.cases()
|
||||
assert(len(cases) is 1)
|
||||
|
||||
|
||||
def test_BoundingBox(rips_instance, initialize_test):
|
||||
case = rips_instance.project.load_case(dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID")
|
||||
case = rips_instance.project.load_case(
|
||||
dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID")
|
||||
assert(case.name == "TEST10K_FLT_LGR_NNC")
|
||||
boundingbox = case.reservoir_boundingbox()
|
||||
assert(math.isclose(3382.90, boundingbox.min_x, abs_tol=1.0e-1))
|
||||
@ -39,6 +45,7 @@ def test_BoundingBox(rips_instance, initialize_test):
|
||||
assert(math.isclose(4103.60, min_depth, abs_tol=1.0e-1))
|
||||
assert(math.isclose(4252.61, max_depth, abs_tol=1.0e-1))
|
||||
|
||||
|
||||
def test_MultipleCases(rips_instance, initialize_test):
|
||||
case_paths = []
|
||||
case_paths.append(dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID")
|
||||
@ -56,17 +63,20 @@ def test_MultipleCases(rips_instance, initialize_test):
|
||||
for i, case_name in enumerate(case_names):
|
||||
assert(case_name == cases[i].name)
|
||||
|
||||
|
||||
def get_cell_index_with_ijk(cell_info, i, j, k):
|
||||
for (idx, cell) in enumerate(cell_info):
|
||||
if cell.local_ijk.i == i and cell.local_ijk.j == j and cell.local_ijk.k == k:
|
||||
return idx
|
||||
return -1
|
||||
|
||||
|
||||
def check_corner(actual, expected):
|
||||
assert(math.isclose(actual.x, expected[0], abs_tol=0.1))
|
||||
assert(math.isclose(actual.y, expected[1], abs_tol=0.1))
|
||||
assert(math.isclose(actual.z, expected[2], abs_tol=0.1))
|
||||
|
||||
|
||||
def test_10k(rips_instance, initialize_test):
|
||||
case_path = dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID"
|
||||
case = rips_instance.project.load_case(path=case_path)
|
||||
@ -96,14 +106,14 @@ def test_10k(rips_instance, initialize_test):
|
||||
cell_corners = case.active_cell_corners()
|
||||
assert(len(cell_corners) == cell_count_info.active_cell_count)
|
||||
# Expected values from ResInsight UI
|
||||
expected_corners = [[ 3565.22, 5179.02, 4177.18],
|
||||
[ 3655.67, 5145.34, 4176.63],
|
||||
[ 3690.07, 5240.69, 4180.02],
|
||||
[ 3599.87, 5275.16, 4179.32],
|
||||
[ 3564.13, 5178.61, 4179.75],
|
||||
[ 3654.78, 5144.79, 4179.23],
|
||||
[ 3688.99, 5239.88, 4182.7],
|
||||
[ 3598.62, 5274.48, 4181.96]]
|
||||
expected_corners = [[3565.22, 5179.02, 4177.18],
|
||||
[3655.67, 5145.34, 4176.63],
|
||||
[3690.07, 5240.69, 4180.02],
|
||||
[3599.87, 5275.16, 4179.32],
|
||||
[3564.13, 5178.61, 4179.75],
|
||||
[3654.78, 5144.79, 4179.23],
|
||||
[3688.99, 5239.88, 4182.7],
|
||||
[3598.62, 5274.48, 4181.96]]
|
||||
check_corner(cell_corners[cell_index].c0, expected_corners[0])
|
||||
check_corner(cell_corners[cell_index].c1, expected_corners[1])
|
||||
check_corner(cell_corners[cell_index].c2, expected_corners[2])
|
||||
@ -117,6 +127,7 @@ def test_10k(rips_instance, initialize_test):
|
||||
coarsening_info = case.coarsening_info()
|
||||
assert(len(coarsening_info) == 0)
|
||||
|
||||
|
||||
def test_PdmObject(rips_instance, initialize_test):
|
||||
case_path = dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID"
|
||||
case = rips_instance.project.load_case(path=case_path)
|
||||
@ -124,6 +135,7 @@ def test_PdmObject(rips_instance, initialize_test):
|
||||
assert(case.address() is not 0)
|
||||
assert(case.__class__.__name__ == "EclipseCase")
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform.startswith('linux'), reason="Brugge is currently exceptionally slow on Linux")
|
||||
def test_brugge_0010(rips_instance, initialize_test):
|
||||
case_path = dataroot.PATH + "/Case_with_10_timesteps/Real10/BRUGGE_0010.EGRID"
|
||||
@ -137,6 +149,7 @@ def test_brugge_0010(rips_instance, initialize_test):
|
||||
days_since_start = case.days_since_start()
|
||||
assert(len(days_since_start) == 11)
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform.startswith('linux'), reason="Brugge is currently exceptionally slow on Linux")
|
||||
def test_replaceCase(rips_instance, initialize_test):
|
||||
project = rips_instance.project.open(dataroot.PATH + "/TEST10K_FLT_LGR_NNC/10KWithWellLog.rsp")
|
||||
@ -160,11 +173,13 @@ def test_replaceCase(rips_instance, initialize_test):
|
||||
assert(case.name == "Real0--BRUGGE_0000.EGRID")
|
||||
assert(case.id == 0)
|
||||
|
||||
|
||||
def test_loadNonExistingCase(rips_instance, initialize_test):
|
||||
case_path = "Nonsense/Nonsense/Nonsense"
|
||||
with pytest.raises(grpc.RpcError):
|
||||
assert rips_instance.project.load_case(case_path)
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform.startswith('linux'), reason="Brugge is currently exceptionally slow on Linux")
|
||||
def test_exportFlowCharacteristics(rips_instance, initialize_test):
|
||||
case_path = dataroot.PATH + "/Case_with_10_timesteps/Real0/BRUGGE_0000.EGRID"
|
||||
@ -172,10 +187,13 @@ def test_exportFlowCharacteristics(rips_instance, initialize_test):
|
||||
with tempfile.TemporaryDirectory(prefix="rips") as tmpdirname:
|
||||
print("Temporary folder: ", tmpdirname)
|
||||
file_name = tmpdirname + "/exportFlowChar.txt"
|
||||
case.export_flow_characteristics(time_steps=8, producers=[], injectors = "I01", file_name = file_name)
|
||||
case.export_flow_characteristics(time_steps=8, producers=[],
|
||||
injectors="I01", file_name=file_name)
|
||||
|
||||
|
||||
def test_selected_cells(rips_instance, initialize_test):
|
||||
case = rips_instance.project.load_case(dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID")
|
||||
case = rips_instance.project.load_case(
|
||||
dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID")
|
||||
assert(case.name == "TEST10K_FLT_LGR_NNC")
|
||||
selected_cells = case.selected_cells()
|
||||
assert(len(selected_cells) == 0)
|
||||
|
@ -8,4 +8,3 @@ sys.path.insert(1, os.path.join(sys.path[0], '../../'))
|
||||
import rips
|
||||
|
||||
import dataroot
|
||||
|
||||
|
@ -7,11 +7,13 @@ import rips
|
||||
|
||||
import dataroot
|
||||
|
||||
|
||||
def check_corner(actual, expected):
|
||||
assert(math.isclose(actual.x, expected[0], abs_tol=0.1))
|
||||
assert(math.isclose(actual.y, expected[1], abs_tol=0.1))
|
||||
assert(math.isclose(actual.z, expected[2], abs_tol=0.1))
|
||||
|
||||
|
||||
def test_10k(rips_instance, initialize_test):
|
||||
casePath = dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID"
|
||||
case = rips_instance.project.load_case(path=casePath)
|
||||
@ -35,14 +37,14 @@ def test_10k(rips_instance, initialize_test):
|
||||
assert(len(cell_corners) == (dimensions.i * dimensions.j * dimensions.k))
|
||||
|
||||
# Expected values from ResInsight UI
|
||||
expected_corners = [[ 3565.22, 5179.02, 4177.18],
|
||||
[ 3655.67, 5145.34, 4176.63],
|
||||
[ 3690.07, 5240.69, 4180.02],
|
||||
[ 3599.87, 5275.16, 4179.32],
|
||||
[ 3564.13, 5178.61, 4179.75],
|
||||
[ 3654.78, 5144.79, 4179.23],
|
||||
[ 3688.99, 5239.88, 4182.7],
|
||||
[ 3598.62, 5274.48, 4181.96]]
|
||||
expected_corners = [[3565.22, 5179.02, 4177.18],
|
||||
[3655.67, 5145.34, 4176.63],
|
||||
[3690.07, 5240.69, 4180.02],
|
||||
[3599.87, 5275.16, 4179.32],
|
||||
[3564.13, 5178.61, 4179.75],
|
||||
[3654.78, 5144.79, 4179.23],
|
||||
[3688.99, 5239.88, 4182.7],
|
||||
[3598.62, 5274.48, 4181.96]]
|
||||
check_corner(cell_corners[cell_index].c0, expected_corners[0])
|
||||
check_corner(cell_corners[cell_index].c1, expected_corners[1])
|
||||
check_corner(cell_corners[cell_index].c2, expected_corners[2])
|
||||
|
@ -68,6 +68,7 @@ def test_10kSync(rips_instance, initialize_test):
|
||||
for i in range(0, len(new_data)):
|
||||
assert(new_data[i] == new_prop_vals[i])
|
||||
|
||||
|
||||
def test_non_existing_dynamic_values(rips_instance, initialize_test):
|
||||
casePath = dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID"
|
||||
case = rips_instance.project.load_case(path=casePath)
|
||||
@ -75,6 +76,7 @@ def test_non_existing_dynamic_values(rips_instance, initialize_test):
|
||||
with pytest.raises(grpc.RpcError):
|
||||
case.nnc_connections_dynamic_values("x", 0)
|
||||
|
||||
|
||||
def test_invalid_time_steps(rips_instance, initialize_test):
|
||||
casePath = dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID"
|
||||
case = rips_instance.project.load_case(path=casePath)
|
||||
|
@ -9,6 +9,7 @@ import rips
|
||||
|
||||
import dataroot
|
||||
|
||||
|
||||
def test_loadProject(rips_instance, initialize_test):
|
||||
project = rips_instance.project.open(dataroot.PATH + "/TEST10K_FLT_LGR_NNC/10KWithWellLog.rsp")
|
||||
case = project.cases()[0]
|
||||
@ -18,6 +19,7 @@ def test_loadProject(rips_instance, initialize_test):
|
||||
cases = rips_instance.project.cases()
|
||||
assert(len(cases) is 1)
|
||||
|
||||
|
||||
def test_well_log_plots(rips_instance, initialize_test):
|
||||
project = rips_instance.project.open(dataroot.PATH + "/TEST10K_FLT_LGR_NNC/10KWithWellLog.rsp")
|
||||
plots = project.plots()
|
||||
@ -36,7 +38,7 @@ def test_well_log_plots(rips_instance, initialize_test):
|
||||
well_log_plot.export_snapshot(tmpdirname)
|
||||
well_log_plot.export_data_as_las(tmpdirname)
|
||||
files = os.listdir(tmpdirname)
|
||||
print (files)
|
||||
print(files)
|
||||
if rips_instance.is_gui():
|
||||
assert(len(files) == 4)
|
||||
else:
|
||||
@ -47,6 +49,7 @@ def test_well_log_plots(rips_instance, initialize_test):
|
||||
if isinstance(plot2, rips.WellLogPlot):
|
||||
assert(plot2.depth_type == "TRUE_VERTICAL_DEPTH_RKB")
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform.startswith('linux'), reason="Brugge is currently exceptionally slow on Linux")
|
||||
def test_loadGridCaseGroup(rips_instance, initialize_test):
|
||||
case_paths = []
|
||||
@ -55,6 +58,7 @@ def test_loadGridCaseGroup(rips_instance, initialize_test):
|
||||
grid_case_group = rips_instance.project.create_grid_case_group(case_paths=case_paths)
|
||||
assert(grid_case_group is not None and grid_case_group.group_id == 0)
|
||||
|
||||
|
||||
def test_exportSnapshots(rips_instance, initialize_test):
|
||||
if not rips_instance.is_gui():
|
||||
pytest.skip("Cannot run test without a GUI")
|
||||
|
@ -9,6 +9,7 @@ import rips
|
||||
|
||||
import dataroot
|
||||
|
||||
|
||||
def test_10kAsync(rips_instance, initialize_test):
|
||||
casePath = dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID"
|
||||
case = rips_instance.project.load_case(path=casePath)
|
||||
@ -24,6 +25,7 @@ def test_10kAsync(rips_instance, initialize_test):
|
||||
assert(average != pytest.approx(0.0158893, abs=0.0000001))
|
||||
assert(average == pytest.approx(0.0558893, abs=0.0000001))
|
||||
|
||||
|
||||
def test_10kSync(rips_instance, initialize_test):
|
||||
casePath = dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID"
|
||||
case = rips_instance.project.load_case(path=casePath)
|
||||
@ -35,6 +37,7 @@ def test_10kSync(rips_instance, initialize_test):
|
||||
assert(average != pytest.approx(0.0158893, abs=0.0000001))
|
||||
assert(average == pytest.approx(0.0558893, abs=0.0000001))
|
||||
|
||||
|
||||
def test_10k_set(rips_instance, initialize_test):
|
||||
casePath = dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID"
|
||||
case = rips_instance.project.load_case(path=casePath)
|
||||
@ -42,6 +45,7 @@ def test_10k_set(rips_instance, initialize_test):
|
||||
results = case.active_cell_property('DYNAMIC_NATIVE', 'SOIL', 1)
|
||||
case.set_active_cell_property(results, 'GENERATED', 'SOIL', 1)
|
||||
|
||||
|
||||
def test_10k_set_out_of_bounds(rips_instance, initialize_test):
|
||||
casePath = dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID"
|
||||
case = rips_instance.project.load_case(path=casePath)
|
||||
@ -51,6 +55,7 @@ def test_10k_set_out_of_bounds(rips_instance, initialize_test):
|
||||
with pytest.raises(grpc.RpcError):
|
||||
assert case.set_active_cell_property(results, 'GENERATED', 'SOIL', 1)
|
||||
|
||||
|
||||
def test_10k_set_out_of_bounds_client(rips_instance, initialize_test):
|
||||
casePath = dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID"
|
||||
case = rips_instance.project.load_case(path=casePath)
|
||||
@ -61,6 +66,7 @@ def test_10k_set_out_of_bounds_client(rips_instance, initialize_test):
|
||||
with pytest.raises(IndexError):
|
||||
assert case.set_active_cell_property(results, 'GENERATED', 'SOIL', 1)
|
||||
|
||||
|
||||
def createResult(poroChunks, permxChunks):
|
||||
for (poroChunk, permxChunk) in zip(poroChunks, permxChunks):
|
||||
resultChunk = []
|
||||
@ -68,11 +74,13 @@ def createResult(poroChunks, permxChunks):
|
||||
resultChunk.append(poro * permx)
|
||||
yield resultChunk
|
||||
|
||||
|
||||
def checkResults(poroValues, permxValues, poropermxValues):
|
||||
for (poro, permx, poropermx) in zip(poroValues, permxValues, poropermxValues):
|
||||
recalc = poro * permx
|
||||
assert(recalc == pytest.approx(poropermx, rel=1.0e-10))
|
||||
|
||||
|
||||
def test_10k_PoroPermX(rips_instance, initialize_test):
|
||||
casePath = dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID"
|
||||
case = rips_instance.project.load_case(path=casePath)
|
||||
@ -80,7 +88,8 @@ def test_10k_PoroPermX(rips_instance, initialize_test):
|
||||
poroChunks = case.active_cell_property_async('STATIC_NATIVE', 'PORO', 0)
|
||||
permxChunks = case.active_cell_property_async('STATIC_NATIVE', 'PERMX', 0)
|
||||
|
||||
case.set_active_cell_property_async(createResult(poroChunks, permxChunks), 'GENERATED', 'POROPERMXAS', 0)
|
||||
case.set_active_cell_property_async(createResult(
|
||||
poroChunks, permxChunks), 'GENERATED', 'POROPERMXAS', 0)
|
||||
|
||||
poro = case.active_cell_property('STATIC_NATIVE', 'PORO', 0)
|
||||
permx = case.active_cell_property('STATIC_NATIVE', 'PERMX', 0)
|
||||
@ -88,6 +97,7 @@ def test_10k_PoroPermX(rips_instance, initialize_test):
|
||||
|
||||
checkResults(poro, permx, poroPermX)
|
||||
|
||||
|
||||
def test_exportPropertyInView(rips_instance, initialize_test):
|
||||
case_path = dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID"
|
||||
rips_instance.project.load_case(case_path)
|
||||
|
@ -6,6 +6,7 @@ import rips
|
||||
|
||||
import dataroot
|
||||
|
||||
|
||||
def test_10k(rips_instance, initialize_test):
|
||||
case_path = dataroot.PATH + "/TEST10K_FLT_LGR_NNC/TEST10K_FLT_LGR_NNC.EGRID"
|
||||
case = rips_instance.project.load_case(path=case_path)
|
||||
@ -45,5 +46,6 @@ def test_10k(rips_instance, initialize_test):
|
||||
for (tidx, timestep) in enumerate(timesteps):
|
||||
if (tidx > 0):
|
||||
cells = sim_well.cells(tidx)
|
||||
print("well: " + sim_well.name + " timestep: " + str(tidx) + " cells:" + str(len(cells)))
|
||||
print("well: " + sim_well.name + " timestep: " +
|
||||
str(tidx) + " cells:" + str(len(cells)))
|
||||
assert(len(cells) == expected_cell_count[sim_well.name])
|
||||
|
@ -7,6 +7,7 @@ import rips
|
||||
|
||||
import dataroot
|
||||
|
||||
|
||||
def test_summary_import_and_find(rips_instance, initialize_test):
|
||||
casePath = dataroot.PATH + "/flow_diagnostics_test/SIMPLE_SUMMARY2.SMSPEC"
|
||||
summary_case = rips_instance.project.import_summary_case(casePath)
|
||||
@ -37,6 +38,7 @@ def test_summary_data(rips_instance, initialize_test):
|
||||
summary_data = summary_case.summary_vector_values("FOPT")
|
||||
assert(len(summary_data.values) == 60)
|
||||
|
||||
|
||||
def test_summary_resample(rips_instance, initialize_test):
|
||||
casePath = dataroot.PATH + "/flow_diagnostics_test/SIMPLE_SUMMARY2.SMSPEC"
|
||||
summary_case = rips_instance.project.import_summary_case(casePath)
|
||||
|
@ -6,6 +6,7 @@ import rips
|
||||
|
||||
import dataroot
|
||||
|
||||
|
||||
def test_10k(rips_instance, initialize_test):
|
||||
case_root_path = dataroot.PATH + "/TEST10K_FLT_LGR_NNC"
|
||||
case_path = case_root_path + "/TEST10K_FLT_LGR_NNC.EGRID"
|
||||
|
@ -9,6 +9,7 @@ import rips.case # Circular import of Case, which already imports View. Use ful
|
||||
from rips.pdmobject import add_method
|
||||
from rips.generated.pdm_objects import View, ViewWindow, EclipseView, GeoMechView
|
||||
|
||||
|
||||
@add_method(View)
|
||||
def apply_cell_result(self, result_type, result_variable):
|
||||
"""Apply a regular cell result
|
||||
@ -30,6 +31,7 @@ def apply_cell_result(self, result_type, result_variable):
|
||||
cell_result.result_variable = result_variable
|
||||
cell_result.update()
|
||||
|
||||
|
||||
@add_method(View)
|
||||
def apply_flow_diagnostics_cell_result(
|
||||
self,
|
||||
@ -71,6 +73,7 @@ def apply_flow_diagnostics_cell_result(
|
||||
cell_result.selected_producer_tracers = producers
|
||||
cell_result.update()
|
||||
|
||||
|
||||
@add_method(View)
|
||||
def clone(self):
|
||||
"""Clone the current view"""
|
||||
@ -78,6 +81,7 @@ def clone(self):
|
||||
viewId=self.id)).createViewResult.viewId
|
||||
return self.case().view(view_id)
|
||||
|
||||
|
||||
@add_method(View)
|
||||
def set_time_step(self, time_step):
|
||||
"""Set the time step for current view"""
|
||||
@ -85,6 +89,7 @@ def set_time_step(self, time_step):
|
||||
return self._execute_command(setTimeStep=Cmd.SetTimeStepParams(
|
||||
caseId=case_id, viewId=self.id, timeStep=time_step))
|
||||
|
||||
|
||||
@add_method(View)
|
||||
def export_sim_well_fracture_completions(self, time_step,
|
||||
simulation_well_names, file_split,
|
||||
@ -129,6 +134,7 @@ def export_sim_well_fracture_completions(self, time_step,
|
||||
fileSplit=file_split,
|
||||
compdatExport=compdat_export))
|
||||
|
||||
|
||||
@add_method(View)
|
||||
def export_visible_cells(self,
|
||||
export_keyword='FLUXNUM',
|
||||
@ -154,6 +160,7 @@ def export_visible_cells(self,
|
||||
hiddenActiveCellsValue=hidden_active_cells_value,
|
||||
inactiveCellsValue=inactive_cells_value))
|
||||
|
||||
|
||||
@add_method(View)
|
||||
def export_property(self, undefined_value=0.0):
|
||||
""" Export the current Eclipse property from the view
|
||||
@ -168,6 +175,7 @@ def export_property(self, undefined_value=0.0):
|
||||
viewIds=[self.id],
|
||||
undefinedValue=undefined_value))
|
||||
|
||||
|
||||
@add_method(ViewWindow)
|
||||
def case(self):
|
||||
"""Get the case the view belongs to"""
|
||||
@ -175,6 +183,7 @@ def case(self):
|
||||
assert(mycase is not None)
|
||||
return mycase
|
||||
|
||||
|
||||
@add_method(ViewWindow)
|
||||
def export_snapshot(self, prefix='', export_folder=''):
|
||||
""" Export snapshot for the current view
|
||||
|
@ -9,6 +9,7 @@ from rips.pdmobject import PdmObject
|
||||
from rips.generated.pdm_objects import WellLogPlot
|
||||
from rips.pdmobject import add_method
|
||||
|
||||
|
||||
@add_method(WellLogPlot)
|
||||
def export_data_as_las(self, export_folder, file_prefix='', export_tvdrkb=False, capitalize_file_names=False, resample_interval=0.0, convert_to_standard_units=False):
|
||||
""" Export LAS file(s) for the current plot
|
||||
@ -33,6 +34,7 @@ def export_data_as_las(self, export_folder, file_prefix='', export_tvdrkb=False,
|
||||
convertCurveUnits=convert_to_standard_units))
|
||||
return res.exportWellLogPlotDataResult.exportedFiles
|
||||
|
||||
|
||||
@add_method(WellLogPlot)
|
||||
def export_data_as_ascii(self, export_folder, file_prefix='', capitalize_file_names=False):
|
||||
""" Export LAS file(s) for the current plot
|
||||
|
@ -18,6 +18,6 @@ setup(
|
||||
url='http://www.resinsight.org',
|
||||
license=license,
|
||||
packages=['rips'],
|
||||
package_data={'rips': ['*.py', 'generated/*.py', 'PythonExamples/*.py', 'tests/*.py']}
|
||||
package_data={'rips': ['*.py', 'generated/*.py', 'PythonExamples/*.py', 'tests/*.py']},
|
||||
install_requires=['grpcio>=1.20.0']
|
||||
)
|
@ -80,6 +80,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RimPlot.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimPlotWindow.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimMultiPlot.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellLogPlot.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimDepthTrackPlot.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellLogTrack.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellLogCurve.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellBoreStabilityPlot.h
|
||||
@ -235,6 +236,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RimPlot.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimPlotWindow.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimMultiPlot.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellLogPlot.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimDepthTrackPlot.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellBoreStabilityPlot.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWbsParameters.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimWellLogTrack.cpp
|
||||
|
@ -861,6 +861,24 @@ QString Rim3dOverlayInfoConfig::resultInfoText( const HistogramData& histData, R
|
||||
QString( "<b>Cell result:</b> %1, %2, %3<br>" ).arg( resultPos ).arg( fieldName ).arg( compName );
|
||||
}
|
||||
|
||||
if ( geoMechView->cellResultResultDefinition()->isBiotCoefficientDependent() )
|
||||
{
|
||||
if ( geoMechCase->biotCoefficientType() == RimGeoMechCase::BiotCoefficientType::BIOT_NONE )
|
||||
{
|
||||
infoText += QString( "<b>Biot Coefficient</b>: 1.0 (None)<br>" );
|
||||
}
|
||||
else if ( geoMechCase->biotCoefficientType() == RimGeoMechCase::BiotCoefficientType::BIOT_FIXED )
|
||||
{
|
||||
infoText +=
|
||||
QString( "<b>Biot Coefficient</b>: %1 (Fixed)<br>" ).arg( geoMechCase->biotFixedCoefficient() );
|
||||
}
|
||||
else if ( geoMechCase->biotCoefficientType() == RimGeoMechCase::BiotCoefficientType::BIOT_PER_ELEMENT )
|
||||
{
|
||||
infoText += QString( "<b>Biot Coefficient</b>: %1 (From element property)<br>" )
|
||||
.arg( geoMechCase->biotResultAddress() );
|
||||
}
|
||||
}
|
||||
|
||||
const RimGeoMechContourMapView* contourMapView = dynamic_cast<const RimGeoMechContourMapView*>( geoMechView );
|
||||
if ( contourMapView )
|
||||
{
|
||||
|
1055
ApplicationCode/ProjectDataModel/RimDepthTrackPlot.cpp
Normal file
1055
ApplicationCode/ProjectDataModel/RimDepthTrackPlot.cpp
Normal file
File diff suppressed because it is too large
Load Diff
174
ApplicationCode/ProjectDataModel/RimDepthTrackPlot.h
Normal file
174
ApplicationCode/ProjectDataModel/RimDepthTrackPlot.h
Normal file
@ -0,0 +1,174 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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 "cafAppEnum.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmChildField.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmFieldHandle.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
#include "RiaDefines.h"
|
||||
#include "RimPlotWindow.h"
|
||||
#include "RimWellLogPlotNameConfig.h"
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
#include <set>
|
||||
|
||||
class RimWellLogCurveCommonDataSource;
|
||||
class RiuWellLogPlot;
|
||||
class RimPlot;
|
||||
class QKeyEvent;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimDepthTrackPlot : public RimPlotWindow, public RimNameConfigHolderInterface
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
enum AxisGridVisibility
|
||||
{
|
||||
AXIS_GRID_NONE = 0x00,
|
||||
AXIS_GRID_MAJOR = 0x01,
|
||||
AXIS_GRID_MINOR = 0x02,
|
||||
AXIS_GRID_MAJOR_AND_MINOR = 0x03
|
||||
};
|
||||
|
||||
typedef caf::AppEnum<AxisGridVisibility> AxisGridEnum;
|
||||
using DepthTypeEnum = RiaDefines::DepthTypeEnum;
|
||||
|
||||
public:
|
||||
RimDepthTrackPlot();
|
||||
~RimDepthTrackPlot() override;
|
||||
|
||||
QWidget* viewWidget() override;
|
||||
QWidget* createPlotWidget( QWidget* mainWindowParent = nullptr );
|
||||
QString description() const override;
|
||||
|
||||
bool isPlotTitleVisible() const;
|
||||
void setPlotTitleVisible( bool visible );
|
||||
|
||||
void addPlot( RimPlot* plot );
|
||||
void insertPlot( RimPlot* plot, size_t index );
|
||||
void removePlot( RimPlot* plot );
|
||||
|
||||
size_t plotCount() const;
|
||||
size_t plotIndex( const RimPlot* plot ) const;
|
||||
RimPlot* plotByIndex( size_t index ) const;
|
||||
|
||||
std::vector<RimPlot*> plots() const;
|
||||
std::vector<RimPlot*> visiblePlots() const;
|
||||
|
||||
DepthTypeEnum depthType() const;
|
||||
void setDepthType( DepthTypeEnum depthType );
|
||||
|
||||
RiaDefines::DepthUnitType depthUnit() const;
|
||||
void setDepthUnit( RiaDefines::DepthUnitType depthUnit );
|
||||
|
||||
QString depthAxisTitle() const;
|
||||
void enableDepthAxisGridLines( AxisGridVisibility gridVisibility );
|
||||
AxisGridVisibility depthAxisGridLinesEnabled() const;
|
||||
|
||||
void setAutoScaleXEnabled( bool enabled );
|
||||
void setAutoScaleDepthEnabled( bool enabled );
|
||||
|
||||
void zoomAll() override;
|
||||
void updateZoom();
|
||||
void setDepthAxisRangeByFactorAndCenter( double zoomFactor, double zoomCenter );
|
||||
void setDepthAxisRangeByPanDepth( double panFactor );
|
||||
void setDepthAxisRange( double minimumDepth, double maximumDepth );
|
||||
|
||||
void calculateAvailableDepthRange();
|
||||
void availableDepthRange( double* minimumDepth, double* maximumDepth ) const;
|
||||
void visibleDepthRange( double* minimumDepth, double* maximumDepth ) const;
|
||||
|
||||
void uiOrderingForDepthAxis( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
void uiOrderingForAutoName( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
|
||||
QString createAutoName() const override;
|
||||
RimWellLogPlotNameConfig* nameConfig() const;
|
||||
|
||||
RimWellLogCurveCommonDataSource* commonDataSource() const;
|
||||
void updateCommonDataSource();
|
||||
void setCommonDataSourceEnabled( bool enable );
|
||||
|
||||
void setAvailableDepthUnits( const std::set<RiaDefines::DepthUnitType>& depthUnits );
|
||||
void setAvailableDepthTypes( const std::set<DepthTypeEnum>& depthTypes );
|
||||
|
||||
QString asciiDataForPlotExport() const;
|
||||
void handleKeyPressEvent( QKeyEvent* keyEvent );
|
||||
|
||||
protected:
|
||||
QImage snapshotWindowContent() override;
|
||||
|
||||
QWidget* createViewWidget( QWidget* mainWindowParent ) override;
|
||||
void deleteViewWidget() override;
|
||||
void performAutoNameUpdate() override;
|
||||
void recreatePlotWidgets();
|
||||
|
||||
// Overridden PDM methods
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
|
||||
void initAfterRead() override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void onLoadDataAndUpdate() override;
|
||||
void updatePlots();
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
|
||||
private:
|
||||
void cleanupBeforeClose();
|
||||
void updateSubPlotNames();
|
||||
void onPlotAdditionOrRemoval();
|
||||
void doRenderWindowContent( QPaintDevice* paintDevice ) override;
|
||||
void doUpdateLayout() override;
|
||||
|
||||
protected:
|
||||
caf::PdmChildField<RimWellLogCurveCommonDataSource*> m_commonDataSource;
|
||||
bool m_commonDataSourceEnabled;
|
||||
|
||||
caf::PdmField<bool> m_showPlotWindowTitle;
|
||||
caf::PdmField<QString> m_plotWindowTitle;
|
||||
caf::PdmField<caf::AppEnum<DepthTypeEnum>> m_depthType;
|
||||
caf::PdmField<caf::AppEnum<RiaDefines::DepthUnitType>> m_depthUnit;
|
||||
caf::PdmField<double> m_minVisibleDepth;
|
||||
caf::PdmField<double> m_maxVisibleDepth;
|
||||
caf::PdmField<AxisGridEnum> m_depthAxisGridVisibility;
|
||||
caf::PdmField<bool> m_isAutoScaleDepthEnabled;
|
||||
|
||||
caf::PdmChildField<RimWellLogPlotNameConfig*> m_nameConfig;
|
||||
caf::PdmChildArrayField<RimPlot*> m_plots;
|
||||
|
||||
QPointer<RiuWellLogPlot> m_viewer;
|
||||
std::set<RiaDefines::DepthUnitType> m_availableDepthUnits;
|
||||
std::set<DepthTypeEnum> m_availableDepthTypes;
|
||||
|
||||
double m_minAvailableDepth;
|
||||
double m_maxAvailableDepth;
|
||||
};
|
@ -97,7 +97,7 @@ QString RimEclipseGeometrySelectionItem::geometrySelectionText() const
|
||||
}
|
||||
else
|
||||
{
|
||||
text = "No case";
|
||||
return "No case";
|
||||
}
|
||||
|
||||
text += ", ";
|
||||
|
@ -652,7 +652,7 @@ QList<caf::PdmOptionItemInfo>
|
||||
{
|
||||
RigCaseCellResultsData* cellResultsData = m_eclipseCase->results( this->porosityModel() );
|
||||
|
||||
if ( cellResultsData->hasFlowDiagUsableFluxes() )
|
||||
if ( cellResultsData && cellResultsData->hasFlowDiagUsableFluxes() )
|
||||
{
|
||||
enableSouring = true;
|
||||
}
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RicImportElementPropertyFeature.h"
|
||||
#include "RicfCommandObject.h"
|
||||
#include "RifOdbReader.h"
|
||||
|
||||
@ -49,8 +50,11 @@
|
||||
#include "RimTools.h"
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
|
||||
#include "cafCmdFeatureManager.h"
|
||||
#include "cafPdmFieldIOScriptability.h"
|
||||
#include "cafPdmObjectScriptability.h"
|
||||
#include "cafPdmUiDoubleValueEditor.h"
|
||||
#include "cafPdmUiListEditor.h"
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
#include "cafPdmUiPushButtonEditor.h"
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
@ -58,13 +62,27 @@
|
||||
|
||||
#include "cvfVector3.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QIcon>
|
||||
#include <QFileInfo>
|
||||
|
||||
#include <array>
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimGeoMechCase, "ResInsightGeoMechCase" );
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template <>
|
||||
void caf::AppEnum<RimGeoMechCase::BiotCoefficientType>::setUp()
|
||||
{
|
||||
addItem( RimGeoMechCase::BiotCoefficientType::BIOT_NONE, "BIOT_NONE", "None" );
|
||||
addItem( RimGeoMechCase::BiotCoefficientType::BIOT_FIXED, "BIOT_FIXED", "Fixed biot coefficient" );
|
||||
addItem( RimGeoMechCase::BiotCoefficientType::BIOT_PER_ELEMENT,
|
||||
"BIOT_PER_ELEMENT",
|
||||
"Biot coefficient from element properties" );
|
||||
setDefault( RimGeoMechCase::BiotCoefficientType::BIOT_NONE );
|
||||
}
|
||||
|
||||
} // End namespace caf
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -106,12 +124,23 @@ RimGeoMechCase::RimGeoMechCase( void )
|
||||
"" );
|
||||
m_elementPropertyFileNameIndexUiSelection.xmlCapability()->disableIO();
|
||||
|
||||
CAF_PDM_InitField( &m_importElementPropertyFileCommand, "importElementPropertyFileCommad", false, "", "", "", "" );
|
||||
caf::PdmUiPushButtonEditor::configureEditorForField( &m_importElementPropertyFileCommand );
|
||||
|
||||
CAF_PDM_InitField( &m_closeElementPropertyFileCommand, "closeElementPropertyFileCommad", false, "", "", "", "" );
|
||||
caf::PdmUiPushButtonEditor::configureEditorForField( &m_closeElementPropertyFileCommand );
|
||||
|
||||
CAF_PDM_InitField( &m_reloadElementPropertyFileCommand, "reloadElementPropertyFileCommand", false, "", "", "", "" );
|
||||
caf::PdmUiPushButtonEditor::configureEditorForField( &m_reloadElementPropertyFileCommand );
|
||||
|
||||
caf::AppEnum<BiotCoefficientType> defaultBiotCoefficientType = RimGeoMechCase::BiotCoefficientType::BIOT_NONE;
|
||||
CAF_PDM_InitField( &m_biotCoefficientType, "BiotCoefficientType", defaultBiotCoefficientType, "Biot Coefficient", "", "", "" );
|
||||
CAF_PDM_InitField( &m_biotFixedCoefficient, "BiotFixedCoefficient", 1.0, "Fixed coefficient", "", "", "" );
|
||||
m_biotFixedCoefficient.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleValueEditor::uiEditorTypeName() );
|
||||
|
||||
CAF_PDM_InitField( &m_biotResultAddress, "BiotResultAddress", QString( "" ), "Value", "", "", "" );
|
||||
m_biotResultAddress.uiCapability()->setUiEditorTypeName( caf::PdmUiListEditor::uiEditorTypeName() );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_contourMapCollection, "ContourMaps", "2d Contour Maps", "", "", "" );
|
||||
m_contourMapCollection = new RimGeoMechContourMapViewCollection;
|
||||
m_contourMapCollection.uiCapability()->setUiTreeHidden( true );
|
||||
@ -564,6 +593,30 @@ double RimGeoMechCase::frictionAngleDeg() const
|
||||
return m_frictionAngleDeg;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimGeoMechCase::BiotCoefficientType RimGeoMechCase::biotCoefficientType() const
|
||||
{
|
||||
return m_biotCoefficientType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimGeoMechCase::biotFixedCoefficient() const
|
||||
{
|
||||
return m_biotFixedCoefficient;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimGeoMechCase::biotResultAddress() const
|
||||
{
|
||||
return m_biotResultAddress;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -636,14 +689,56 @@ void RimGeoMechCase::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
cvf::Math::toRadians( m_frictionAngleDeg() ) );
|
||||
}
|
||||
|
||||
std::vector<Rim3dView*> views = this->views();
|
||||
for ( Rim3dView* view : views )
|
||||
updateConnectedViews();
|
||||
}
|
||||
else if ( changedField == &m_biotFixedCoefficient || changedField == &m_biotCoefficientType ||
|
||||
changedField == &m_biotResultAddress )
|
||||
{
|
||||
if ( view ) // Todo: only those using the variable actively
|
||||
RigGeoMechCaseData* rigCaseData = geoMechData();
|
||||
if ( rigCaseData && rigCaseData->femPartResults() )
|
||||
{
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
if ( m_biotCoefficientType() == RimGeoMechCase::BiotCoefficientType::BIOT_NONE )
|
||||
{
|
||||
rigCaseData->femPartResults()->setBiotCoefficientParameters( 1.0, "" );
|
||||
}
|
||||
else if ( m_biotCoefficientType() == RimGeoMechCase::BiotCoefficientType::BIOT_FIXED )
|
||||
{
|
||||
rigCaseData->femPartResults()->setBiotCoefficientParameters( m_biotFixedCoefficient(), "" );
|
||||
}
|
||||
else if ( m_biotCoefficientType() == RimGeoMechCase::BiotCoefficientType::BIOT_PER_ELEMENT )
|
||||
{
|
||||
if ( changedField == &m_biotCoefficientType )
|
||||
{
|
||||
// Show info message to user when selecting "from file" option before
|
||||
// an element property has been imported
|
||||
std::vector<std::string> elementProperties = possibleElementPropertyFieldNames();
|
||||
if ( elementProperties.empty() )
|
||||
{
|
||||
QString importMessage =
|
||||
QString( "Please import biot coefficients from file (typically called alpha.inp) by "
|
||||
"selecting 'Import Element Property Table' on the Geomechanical Model." );
|
||||
RiaLogging::info( importMessage );
|
||||
// Set back to default value
|
||||
m_biotCoefficientType = RimGeoMechCase::BiotCoefficientType::BIOT_NONE;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ( biotResultAddress().isEmpty() )
|
||||
{
|
||||
// Automatically select the first available property element if empty
|
||||
std::vector<std::string> elementProperties = possibleElementPropertyFieldNames();
|
||||
if ( !elementProperties.empty() )
|
||||
{
|
||||
m_biotResultAddress = QString::fromStdString( elementProperties[0] );
|
||||
}
|
||||
}
|
||||
|
||||
rigCaseData->femPartResults()->setBiotCoefficientParameters( 1.0, biotResultAddress() );
|
||||
}
|
||||
}
|
||||
|
||||
updateConnectedViews();
|
||||
}
|
||||
else if ( changedField == &m_reloadElementPropertyFileCommand )
|
||||
{
|
||||
@ -657,6 +752,12 @@ void RimGeoMechCase::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
closeSelectedElementPropertyFiles();
|
||||
updateConnectedEditors();
|
||||
}
|
||||
else if ( changedField == &m_importElementPropertyFileCommand )
|
||||
{
|
||||
m_importElementPropertyFileCommand = false;
|
||||
importElementPropertyFile();
|
||||
updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -795,6 +896,12 @@ void RimGeoMechCase::closeSelectedElementPropertyFiles()
|
||||
view->cellResult()->setResultAddress( RigFemResultAddress() );
|
||||
}
|
||||
|
||||
if ( address.fieldName == biotResultAddress().toStdString() )
|
||||
{
|
||||
// If the used biot value is being removed we need to change the biot type back to default
|
||||
m_biotCoefficientType = RimGeoMechCase::BiotCoefficientType::BIOT_NONE;
|
||||
}
|
||||
|
||||
for ( RimGeoMechPropertyFilter* propertyFilter : view->geoMechPropertyFilterCollection()->propertyFilters() )
|
||||
{
|
||||
if ( address == propertyFilter->resultDefinition->resultAddress() )
|
||||
@ -834,6 +941,14 @@ void RimGeoMechCase::reloadSelectedElementPropertyFiles()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGeoMechCase::importElementPropertyFile()
|
||||
{
|
||||
RicImportElementPropertyFeature::importElementProperties();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -850,9 +965,19 @@ void RimGeoMechCase::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
|
||||
caf::PdmUiGroup* elmPropGroup = uiOrdering.addNewGroup( "Element Properties" );
|
||||
elmPropGroup->add( &m_elementPropertyFileNameIndexUiSelection );
|
||||
elmPropGroup->add( &m_importElementPropertyFileCommand );
|
||||
elmPropGroup->add( &m_reloadElementPropertyFileCommand );
|
||||
elmPropGroup->add( &m_closeElementPropertyFileCommand );
|
||||
|
||||
caf::PdmUiGroup* biotGroup = uiOrdering.addNewGroup( "Biot Coefficient" );
|
||||
biotGroup->add( &m_biotCoefficientType );
|
||||
biotGroup->add( &m_biotFixedCoefficient );
|
||||
biotGroup->add( &m_biotResultAddress );
|
||||
m_biotFixedCoefficient.uiCapability()->setUiHidden( m_biotCoefficientType !=
|
||||
RimGeoMechCase::BiotCoefficientType::BIOT_FIXED );
|
||||
m_biotResultAddress.uiCapability()->setUiHidden( m_biotCoefficientType !=
|
||||
RimGeoMechCase::BiotCoefficientType::BIOT_PER_ELEMENT );
|
||||
|
||||
caf::PdmUiGroup* timeStepFilterGroup = uiOrdering.addNewGroup( "Time Step Filter" );
|
||||
timeStepFilterGroup->setCollapsedByDefault( true );
|
||||
m_timeStepFilter->uiOrdering( uiConfigName, *timeStepFilterGroup );
|
||||
@ -865,13 +990,27 @@ void RimGeoMechCase::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
if ( field == &m_importElementPropertyFileCommand )
|
||||
{
|
||||
dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute )->m_buttonText = "Import Element Property";
|
||||
}
|
||||
if ( field == &m_reloadElementPropertyFileCommand )
|
||||
{
|
||||
dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute )->m_buttonText = "Reload Case(s)";
|
||||
dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute )->m_buttonText = "Reload Element Property";
|
||||
}
|
||||
if ( field == &m_closeElementPropertyFileCommand )
|
||||
{
|
||||
dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute )->m_buttonText = "Close Case(s)";
|
||||
dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute )->m_buttonText = "Close Element Property";
|
||||
}
|
||||
|
||||
if ( field == &m_biotFixedCoefficient )
|
||||
{
|
||||
auto uiDoubleValueEditorAttr = dynamic_cast<caf::PdmUiDoubleValueEditorAttribute*>( attribute );
|
||||
if ( uiDoubleValueEditorAttr )
|
||||
{
|
||||
uiDoubleValueEditorAttr->m_decimals = 2;
|
||||
uiDoubleValueEditorAttr->m_validator = new QDoubleValidator( 0.0, 1.0, 2 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -892,6 +1031,80 @@ QList<caf::PdmOptionItemInfo> RimGeoMechCase::calculateValueOptions( const caf::
|
||||
options.push_back( caf::PdmOptionItemInfo( m_elementPropertyFileNames.v().at( i ).path(), (int)i, true ) );
|
||||
}
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_biotResultAddress )
|
||||
{
|
||||
std::vector<std::string> elementProperties = possibleElementPropertyFieldNames();
|
||||
|
||||
std::vector<QString> paths;
|
||||
for ( auto path : m_elementPropertyFileNames.v() )
|
||||
{
|
||||
paths.push_back( path.path() );
|
||||
}
|
||||
|
||||
std::map<std::string, QString> addressesInFile =
|
||||
geoMechData()->femPartResults()->addressesInElementPropertyFiles( paths );
|
||||
|
||||
for ( const std::string elementProperty : elementProperties )
|
||||
{
|
||||
QString result = QString::fromStdString( elementProperty );
|
||||
QString filename = findFileNameForElementProperty( elementProperty, addressesInFile );
|
||||
options.push_back( caf::PdmOptionItemInfo( result + " (" + filename + ")", result ) );
|
||||
}
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimGeoMechCase::findFileNameForElementProperty( const std::string& elementProperty,
|
||||
const std::map<std::string, QString> addressesInFiles ) const
|
||||
{
|
||||
auto it = addressesInFiles.find( elementProperty );
|
||||
if ( it != addressesInFiles.end() )
|
||||
{
|
||||
QFileInfo fileInfo( it->second );
|
||||
return fileInfo.fileName();
|
||||
}
|
||||
else
|
||||
{
|
||||
return QString( "Unknown file" );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGeoMechCase::updateConnectedViews()
|
||||
{
|
||||
std::vector<Rim3dView*> views = this->views();
|
||||
for ( Rim3dView* view : views )
|
||||
{
|
||||
if ( view )
|
||||
{
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::string> RimGeoMechCase::possibleElementPropertyFieldNames()
|
||||
{
|
||||
std::vector<std::string> fieldNames;
|
||||
|
||||
if ( geoMechData() )
|
||||
{
|
||||
std::map<std::string, std::vector<std::string>> fieldWithComponentNames =
|
||||
geoMechData()->femPartResults()->scalarFieldAndComponentNames( RIG_ELEMENT );
|
||||
|
||||
std::map<std::string, std::vector<std::string>>::const_iterator fieldIt;
|
||||
for ( fieldIt = fieldWithComponentNames.begin(); fieldIt != fieldWithComponentNames.end(); ++fieldIt )
|
||||
{
|
||||
fieldNames.push_back( fieldIt->first );
|
||||
}
|
||||
}
|
||||
return fieldNames;
|
||||
}
|
||||
|
@ -52,6 +52,14 @@ public:
|
||||
CASE_OPEN_CANCELLED,
|
||||
CASE_OPEN_ERROR
|
||||
};
|
||||
|
||||
enum class BiotCoefficientType
|
||||
{
|
||||
BIOT_NONE = 0,
|
||||
BIOT_FIXED,
|
||||
BIOT_PER_ELEMENT
|
||||
};
|
||||
|
||||
RimGeoMechCase( void );
|
||||
~RimGeoMechCase( void ) override;
|
||||
|
||||
@ -88,6 +96,10 @@ public:
|
||||
// Fields:
|
||||
caf::PdmChildArrayField<RimGeoMechView*> geoMechViews;
|
||||
|
||||
BiotCoefficientType biotCoefficientType() const;
|
||||
double biotFixedCoefficient() const;
|
||||
QString biotResultAddress() const;
|
||||
|
||||
private:
|
||||
cvf::Vec3d displayModelOffset() const override;
|
||||
static std::vector<QDateTime> vectorOfValidDateTimesFromTimeStepStrings( const QStringList& timeStepStrings );
|
||||
@ -102,14 +114,20 @@ private:
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
|
||||
QString findFileNameForElementProperty( const std::string& elementProperty,
|
||||
const std::map<std::string, QString> addressesInFiles ) const;
|
||||
|
||||
void updateFormationNamesData() override;
|
||||
|
||||
void initAfterRead() override;
|
||||
static QString subStringOfDigits( const QString& timeStepString, int numberOfDigitsToFind );
|
||||
|
||||
void importElementPropertyFile();
|
||||
void closeSelectedElementPropertyFiles();
|
||||
void reloadSelectedElementPropertyFiles();
|
||||
std::vector<Rim3dView*> allSpecialViews() const override;
|
||||
void updateConnectedViews();
|
||||
std::vector<std::string> possibleElementPropertyFieldNames();
|
||||
|
||||
private:
|
||||
cvf::ref<RigGeoMechCaseData> m_geoMechCaseData;
|
||||
@ -117,9 +135,14 @@ private:
|
||||
caf::PdmField<double> m_frictionAngleDeg;
|
||||
caf::PdmField<std::vector<caf::FilePath>> m_elementPropertyFileNames;
|
||||
caf::PdmField<std::vector<int>> m_elementPropertyFileNameIndexUiSelection;
|
||||
caf::PdmField<bool> m_importElementPropertyFileCommand;
|
||||
caf::PdmField<bool> m_closeElementPropertyFileCommand;
|
||||
caf::PdmField<bool> m_reloadElementPropertyFileCommand;
|
||||
|
||||
caf::PdmField<caf::AppEnum<BiotCoefficientType>> m_biotCoefficientType;
|
||||
caf::PdmField<double> m_biotFixedCoefficient;
|
||||
caf::PdmField<QString> m_biotResultAddress;
|
||||
|
||||
caf::PdmChildField<RimGeoMechContourMapViewCollection*> m_contourMapCollection;
|
||||
|
||||
bool m_applyTimeFilter;
|
||||
|
@ -931,3 +931,11 @@ void RimGeoMechResultDefinition::updateLegendTextAndRanges( RimRegularLegendConf
|
||||
|
||||
legendConfigToUpdate->setTitle( legendTitle );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimGeoMechResultDefinition::isBiotCoefficientDependent() const
|
||||
{
|
||||
return ( this->resultFieldName() == "SE" || this->resultFieldName() == "ST" );
|
||||
}
|
||||
|
@ -80,6 +80,8 @@ public:
|
||||
const QString& legendHeading,
|
||||
int timeStepIndex );
|
||||
|
||||
bool isBiotCoefficientDependent() const;
|
||||
|
||||
protected:
|
||||
virtual void updateLegendCategorySettings(){};
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
@ -225,6 +225,8 @@ std::vector<double> RimGridTimeHistoryCurve::yValues() const
|
||||
|
||||
RigCaseCellResultsData* cellResultsData = m_eclipseResultDefinition->currentGridCellResults();
|
||||
|
||||
if ( cellResultsData )
|
||||
{
|
||||
std::vector<QDateTime> timeStepDates = cellResultsData->timeStepDates();
|
||||
|
||||
values = RigTimeHistoryResultAccessor::timeHistoryValues( eclTopItem->eclipseCase()->eclipseCaseData(),
|
||||
@ -233,6 +235,7 @@ std::vector<double> RimGridTimeHistoryCurve::yValues() const
|
||||
cellIndex,
|
||||
timeStepDates.size() );
|
||||
}
|
||||
}
|
||||
|
||||
if ( geoMechGeomSelectionItem() && geoMechGeomSelectionItem()->geoMechCase() )
|
||||
{
|
||||
@ -464,6 +467,8 @@ std::vector<time_t> RimGridTimeHistoryCurve::timeStepValues() const
|
||||
{
|
||||
RigCaseCellResultsData* cellResultsData = m_eclipseResultDefinition->currentGridCellResults();
|
||||
|
||||
if ( cellResultsData )
|
||||
{
|
||||
std::vector<QDateTime> timeStepDates = cellResultsData->timeStepDates();
|
||||
|
||||
for ( QDateTime dt : timeStepDates )
|
||||
@ -471,6 +476,7 @@ std::vector<time_t> RimGridTimeHistoryCurve::timeStepValues() const
|
||||
dateTimes.push_back( dt.toTime_t() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RimGeoMechGeometrySelectionItem* geoMechTopItem = geoMechGeomSelectionItem();
|
||||
if ( geoMechTopItem && geoMechTopItem->geoMechCase() )
|
||||
@ -512,8 +518,11 @@ std::vector<double> RimGridTimeHistoryCurve::daysSinceSimulationStart() const
|
||||
{
|
||||
RigCaseCellResultsData* cellResultsData = m_eclipseResultDefinition->currentGridCellResults();
|
||||
|
||||
if ( cellResultsData )
|
||||
{
|
||||
daysSinceSimulationStart = cellResultsData->daysSinceSimulationStart();
|
||||
}
|
||||
}
|
||||
|
||||
RimGeoMechGeometrySelectionItem* geoMechTopItem = geoMechGeomSelectionItem();
|
||||
if ( geoMechTopItem && geoMechTopItem->geoMechCase() )
|
||||
|
@ -42,7 +42,7 @@ CAF_PDM_SOURCE_INIT( RimIntersectionResultDefinition, "IntersectionResultDefinit
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimIntersectionResultDefinition::RimIntersectionResultDefinition()
|
||||
{
|
||||
CAF_PDM_InitObject( "Intersection Result Definition", "", "", "" );
|
||||
CAF_PDM_InitObject( "Intersection Result Definition", ":/CellResult.png", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &m_isActive, "IsActive", true, "Active", "", "", "" );
|
||||
m_isActive.uiCapability()->setUiHidden( true );
|
||||
@ -327,12 +327,21 @@ void RimIntersectionResultDefinition::fieldChangedByUi( const caf::PdmFieldHandl
|
||||
|
||||
if ( changedField == &m_isActive || ( changedField == &m_timeStep && isInAction ) )
|
||||
{
|
||||
std::vector<PdmObject*> referringObjects;
|
||||
this->objectsWithReferringPtrFieldsOfType( referringObjects );
|
||||
for ( auto* obj : referringObjects )
|
||||
{
|
||||
obj->updateConnectedEditors();
|
||||
}
|
||||
|
||||
RimGridView* gridView = nullptr;
|
||||
this->firstAncestorOrThisOfType( gridView );
|
||||
if ( gridView ) gridView->scheduleCreateDisplayModelAndRedraw();
|
||||
|
||||
update2dIntersectionViews();
|
||||
}
|
||||
|
||||
this->updateUiIconFromToggleField();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -440,6 +449,8 @@ void RimIntersectionResultDefinition::initAfterRead()
|
||||
{
|
||||
m_geomResultDefinition->setGeoMechCase( geomCase );
|
||||
}
|
||||
|
||||
this->updateUiIconFromToggleField();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -304,6 +304,8 @@ void RimRegularLegendConfig::fieldChangedByUi( const caf::PdmFieldHandle* change
|
||||
{
|
||||
rftPlot->onLegendDefinitionChanged();
|
||||
}
|
||||
|
||||
this->updateUiIconFromToggleField();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -540,8 +542,13 @@ void RimRegularLegendConfig::setAutomaticRanges( double globalMin, double global
|
||||
void RimRegularLegendConfig::initAfterRead()
|
||||
{
|
||||
updateFieldVisibility();
|
||||
|
||||
this->updateUiIconFromToggleField();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimRegularLegendConfig::objectToggleField()
|
||||
{
|
||||
return &m_showLegend;
|
||||
|
@ -649,6 +649,7 @@ double RimSimWellInView::calculateInjectionProductionFractions( const RimWellDis
|
||||
const RimEclipseView* reservoirView = nullptr;
|
||||
this->firstAncestorOrThisOfType( reservoirView );
|
||||
if ( !reservoirView ) return false;
|
||||
if ( !reservoirView->eclipseCase() ) return false;
|
||||
|
||||
size_t timeStep = static_cast<size_t>( reservoirView->currentTimeStep() );
|
||||
std::vector<QDateTime> caseTimeSteps = reservoirView->eclipseCase()->timeStepDates();
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -19,158 +19,21 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmChildField.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmFieldHandle.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
#include "RiaDefines.h"
|
||||
#include "RimPlotWindow.h"
|
||||
#include "RimWellLogPlotNameConfig.h"
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
#include <set>
|
||||
|
||||
class RimWellLogCurveCommonDataSource;
|
||||
class RiuWellLogPlot;
|
||||
class RimPlot;
|
||||
class QKeyEvent;
|
||||
#include "RimDepthTrackPlot.h"
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimWellLogPlot : public RimPlotWindow, public RimNameConfigHolderInterface
|
||||
class RimWellLogPlot : public RimDepthTrackPlot
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
enum AxisGridVisibility
|
||||
{
|
||||
AXIS_GRID_NONE = 0x00,
|
||||
AXIS_GRID_MAJOR = 0x01,
|
||||
AXIS_GRID_MINOR = 0x02,
|
||||
AXIS_GRID_MAJOR_AND_MINOR = 0x03
|
||||
};
|
||||
|
||||
typedef caf::AppEnum<AxisGridVisibility> AxisGridEnum;
|
||||
using DepthTypeEnum = RiaDefines::DepthTypeEnum;
|
||||
|
||||
public:
|
||||
RimWellLogPlot();
|
||||
~RimWellLogPlot() override;
|
||||
|
||||
RimWellLogPlot& operator=( RimWellLogPlot&& rhs );
|
||||
|
||||
QWidget* viewWidget() override;
|
||||
QWidget* createPlotWidget( QWidget* mainWindowParent = nullptr );
|
||||
QString description() const override;
|
||||
|
||||
bool isPlotTitleVisible() const;
|
||||
void setPlotTitleVisible( bool visible );
|
||||
|
||||
void addPlot( RimPlot* plot );
|
||||
void insertPlot( RimPlot* plot, size_t index );
|
||||
void removePlot( RimPlot* plot );
|
||||
|
||||
size_t plotCount() const;
|
||||
size_t plotIndex( const RimPlot* plot ) const;
|
||||
RimPlot* plotByIndex( size_t index ) const;
|
||||
|
||||
std::vector<RimPlot*> plots() const;
|
||||
std::vector<RimPlot*> visiblePlots() const;
|
||||
|
||||
DepthTypeEnum depthType() const;
|
||||
void setDepthType( DepthTypeEnum depthType );
|
||||
|
||||
RiaDefines::DepthUnitType depthUnit() const;
|
||||
void setDepthUnit( RiaDefines::DepthUnitType depthUnit );
|
||||
|
||||
QString depthAxisTitle() const;
|
||||
void enableDepthAxisGridLines( AxisGridVisibility gridVisibility );
|
||||
AxisGridVisibility depthAxisGridLinesEnabled() const;
|
||||
|
||||
void setAutoScaleXEnabled( bool enabled );
|
||||
void setAutoScaleDepthEnabled( bool enabled );
|
||||
|
||||
void zoomAll() override;
|
||||
void updateZoom();
|
||||
void setDepthAxisRangeByFactorAndCenter( double zoomFactor, double zoomCenter );
|
||||
void setDepthAxisRangeByPanDepth( double panFactor );
|
||||
void setDepthAxisRange( double minimumDepth, double maximumDepth );
|
||||
|
||||
void calculateAvailableDepthRange();
|
||||
void availableDepthRange( double* minimumDepth, double* maximumDepth ) const;
|
||||
void visibleDepthRange( double* minimumDepth, double* maximumDepth ) const;
|
||||
|
||||
void uiOrderingForDepthAxis( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
void uiOrderingForAutoName( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
|
||||
|
||||
QString createAutoName() const override;
|
||||
RimWellLogPlotNameConfig* nameConfig() const;
|
||||
|
||||
RimWellLogCurveCommonDataSource* commonDataSource() const;
|
||||
void updateCommonDataSource();
|
||||
void setCommonDataSourceEnabled( bool enable );
|
||||
|
||||
void setAvailableDepthUnits( const std::set<RiaDefines::DepthUnitType>& depthUnits );
|
||||
void setAvailableDepthTypes( const std::set<DepthTypeEnum>& depthTypes );
|
||||
|
||||
QString asciiDataForPlotExport() const;
|
||||
void handleKeyPressEvent( QKeyEvent* keyEvent );
|
||||
|
||||
protected:
|
||||
QImage snapshotWindowContent() override;
|
||||
|
||||
QWidget* createViewWidget( QWidget* mainWindowParent ) override;
|
||||
void deleteViewWidget() override;
|
||||
void performAutoNameUpdate() override;
|
||||
void recreatePlotWidgets();
|
||||
|
||||
// Overridden PDM methods
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
|
||||
void initAfterRead() override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void onLoadDataAndUpdate() override;
|
||||
void updatePlots();
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
|
||||
private:
|
||||
void cleanupBeforeClose();
|
||||
void updateSubPlotNames();
|
||||
void onPlotAdditionOrRemoval();
|
||||
void doRenderWindowContent( QPaintDevice* paintDevice ) override;
|
||||
void doUpdateLayout() override;
|
||||
|
||||
protected:
|
||||
caf::PdmChildField<RimWellLogCurveCommonDataSource*> m_commonDataSource;
|
||||
bool m_commonDataSourceEnabled;
|
||||
|
||||
caf::PdmField<bool> m_showPlotWindowTitle;
|
||||
caf::PdmField<QString> m_plotWindowTitle;
|
||||
caf::PdmField<caf::AppEnum<DepthTypeEnum>> m_depthType;
|
||||
caf::PdmField<caf::AppEnum<RiaDefines::DepthUnitType>> m_depthUnit;
|
||||
caf::PdmField<double> m_minVisibleDepth;
|
||||
caf::PdmField<double> m_maxVisibleDepth;
|
||||
caf::PdmField<AxisGridEnum> m_depthAxisGridVisibility;
|
||||
caf::PdmField<bool> m_isAutoScaleDepthEnabled;
|
||||
|
||||
caf::PdmChildField<RimWellLogPlotNameConfig*> m_nameConfig;
|
||||
caf::PdmChildArrayField<RimPlot*> m_plots;
|
||||
|
||||
QPointer<RiuWellLogPlot> m_viewer;
|
||||
std::set<RiaDefines::DepthUnitType> m_availableDepthUnits;
|
||||
std::set<DepthTypeEnum> m_availableDepthTypes;
|
||||
|
||||
double m_minAvailableDepth;
|
||||
double m_maxAvailableDepth;
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "RiuWellLogPlot.h"
|
||||
|
||||
#include "RimDepthTrackPlot.h"
|
||||
#include "RimPlotWindow.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
|
||||
#include "RiuQwtPlotWidget.h"
|
||||
#include "RiuWellLogTrack.h"
|
||||
@ -14,7 +14,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuWellLogPlot::RiuWellLogPlot( RimWellLogPlot* plotDefinition, QWidget* parent )
|
||||
RiuWellLogPlot::RiuWellLogPlot( RimDepthTrackPlot* plotDefinition, QWidget* parent )
|
||||
: RiuMultiPlotPage( plotDefinition, parent )
|
||||
{
|
||||
m_trackScrollBar = new QScrollBar( nullptr );
|
||||
@ -30,9 +30,9 @@ RiuWellLogPlot::RiuWellLogPlot( RimWellLogPlot* plotDefinition, QWidget* parent
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellLogPlot* RiuWellLogPlot::wellLogPlotDefinition()
|
||||
RimDepthTrackPlot* RiuWellLogPlot::wellLogPlotDefinition()
|
||||
{
|
||||
RimWellLogPlot* wellLogPlot = dynamic_cast<RimWellLogPlot*>( m_plotDefinition.p() );
|
||||
RimDepthTrackPlot* wellLogPlot = dynamic_cast<RimDepthTrackPlot*>( m_plotDefinition.p() );
|
||||
CAF_ASSERT( wellLogPlot );
|
||||
return wellLogPlot;
|
||||
}
|
||||
|
@ -21,13 +21,13 @@
|
||||
#include "RiuMultiPlotPage.h"
|
||||
|
||||
class RiuQwtPlotWidget;
|
||||
class RimWellLogPlot;
|
||||
class RimDepthTrackPlot;
|
||||
|
||||
class RiuWellLogPlot : public RiuMultiPlotPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
RiuWellLogPlot( RimWellLogPlot* plotDefinition, QWidget* parent );
|
||||
RiuWellLogPlot( RimDepthTrackPlot* plotDefinition, QWidget* parent );
|
||||
|
||||
RimViewWindow* ownerViewWindow() const override;
|
||||
|
||||
@ -41,7 +41,7 @@ protected:
|
||||
void alignScrollbar( int offset );
|
||||
|
||||
private:
|
||||
RimWellLogPlot* wellLogPlotDefinition();
|
||||
RimDepthTrackPlot* wellLogPlotDefinition();
|
||||
|
||||
private slots:
|
||||
void slotSetMinDepth( int value );
|
||||
|
@ -124,6 +124,14 @@ bool PdmFieldHandle::matchesKeywordAlias(const QString& keyword) const
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QString> PdmFieldHandle::keywordAliases() const
|
||||
{
|
||||
return m_keywordAliases;
|
||||
}
|
||||
|
||||
// These two functions can be used when PdmCore is used standalone without PdmUi/PdmXml
|
||||
/*
|
||||
PdmUiFieldHandle* PdmFieldHandle::uiCapability()
|
||||
|
@ -29,6 +29,7 @@ public:
|
||||
|
||||
void registerKeywordAlias(const QString& alias);
|
||||
bool matchesKeywordAlias(const QString& keyword) const;
|
||||
std::vector<QString> keywordAliases() const;
|
||||
|
||||
// Child objects
|
||||
bool hasChildObjects();
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
set(RESINSIGHT_MAJOR_VERSION 2019)
|
||||
set(RESINSIGHT_MINOR_VERSION 12)
|
||||
set(RESINSIGHT_PATCH_VERSION 1)
|
||||
set(RESINSIGHT_MAJOR_VERSION 2020)
|
||||
set(RESINSIGHT_MINOR_VERSION 04)
|
||||
set(RESINSIGHT_PATCH_VERSION 0)
|
||||
|
||||
# Opional text with no restrictions
|
||||
set(RESINSIGHT_VERSION_TEXT "-dev")
|
||||
@ -10,7 +10,7 @@ set(RESINSIGHT_VERSION_TEXT "-dev")
|
||||
# Must be unique and increasing within one combination of major/minor/patch version
|
||||
# The uniqueness of this text is independent of RESINSIGHT_VERSION_TEXT
|
||||
# Format of text must be ".xx"
|
||||
set(RESINSIGHT_DEV_VERSION ".05")
|
||||
set(RESINSIGHT_DEV_VERSION ".01")
|
||||
|
||||
# https://github.com/CRAVA/crava/tree/master/libs/nrlib
|
||||
set(NRLIB_GITHUB_SHA "ba35d4359882f1c6f5e9dc30eb95fe52af50fd6f")
|
||||
|
1
ThirdParty/Ert/lib/ecl/ecl_smspec.cpp
vendored
1
ThirdParty/Ert/lib/ecl/ecl_smspec.cpp
vendored
@ -28,6 +28,7 @@
|
||||
#include <map>
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <ert/util/hash.hpp>
|
||||
#include <ert/util/util.h>
|
||||
|
@ -12,6 +12,29 @@ Operate on a ResInsight case specified by a Case Id integer.
|
||||
Not meant to be constructed separately but created by one of the following
|
||||
methods in Project: loadCase, case, allCases, selectedCases
|
||||
|
||||
.. _result-definition-label:
|
||||
|
||||
Result Definition
|
||||
-----------------
|
||||
When working with grid case results, the following two argumenst are used in many functions to identify a
|
||||
result
|
||||
|
||||
**Result Definition enums**::
|
||||
|
||||
property_type | | porosity_model
|
||||
(str enum) | | (str enum)
|
||||
----------------------- | ----- | --------------
|
||||
DYNAMIC_NATIVE | | MATRIX_MODEL
|
||||
STATIC_NATIVE | | FRACTURE_MODEL
|
||||
SOURSIMRL | |
|
||||
GENERATED | |
|
||||
INPUT_PROPERTY | |
|
||||
FORMATION_NAMES | |
|
||||
FLOW_DIAGNOSTICS | |
|
||||
INJECTION_FLOODING | |
|
||||
|
||||
|
||||
|
||||
Attributes:
|
||||
id (int): Case Id corresponding to case Id in ResInsight project.
|
||||
name (str): Case name
|
||||
@ -55,6 +78,7 @@ def __custom_init__(self, pb2_object, channel):
|
||||
# Public properties
|
||||
self.chunk_size = 8160
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def __grid_count(self):
|
||||
"""Get number of grids in the case"""
|
||||
@ -65,10 +89,12 @@ def __grid_count(self):
|
||||
return 0
|
||||
return 0
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def __request(self):
|
||||
return Case_pb2.CaseRequest(id=self.id)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def __generate_property_input_iterator(self, values_iterator, parameters):
|
||||
chunk = Properties_pb2.PropertyInputChunk()
|
||||
@ -80,6 +106,7 @@ def __generate_property_input_iterator(self, values_iterator, parameters):
|
||||
chunk.values.CopyFrom(valmsg)
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def __generate_property_input_chunks(self, array, parameters):
|
||||
index = -1
|
||||
@ -100,6 +127,7 @@ def __generate_property_input_chunks(self, array, parameters):
|
||||
chunk = Properties_pb2.PropertyInputChunk()
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def grid(self, index):
|
||||
"""Get Grid of a given index
|
||||
@ -107,27 +135,31 @@ def grid(self, index):
|
||||
Arguments:
|
||||
index (int): The grid index
|
||||
|
||||
Returns: :class:`rips.grid.Grid`
|
||||
Returns:
|
||||
:class:`rips.grid.Grid`
|
||||
"""
|
||||
return Grid(index, self, self.channel())
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def grids(self):
|
||||
"""Get a list of all rips Grid objects in the case
|
||||
|
||||
Returns: List of :class:`rips.grid.Grid`
|
||||
Returns:
|
||||
List of :class:`rips.grid.Grid`
|
||||
"""
|
||||
grid_list = []
|
||||
for i in range(0, self.__grid_count()):
|
||||
grid_list.append(Grid(i, self, self.channel()))
|
||||
return grid_list
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def replace(self, new_grid_file):
|
||||
"""Replace the current case grid with a new grid loaded from file
|
||||
|
||||
Arguments:
|
||||
new_egrid_file (str): path to EGRID file
|
||||
new_egrid_file (str): Path to EGRID file
|
||||
"""
|
||||
project = self.ancestor(rips.project.Project)
|
||||
self._execute_command(replaceCase=Cmd.ReplaceCaseRequest(
|
||||
@ -135,10 +167,10 @@ def replace(self, new_grid_file):
|
||||
new_case = project.case(self.id)
|
||||
self.copy_from(new_case)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def cell_count(self, porosity_model="MATRIX_MODEL"):
|
||||
"""Get a cell count object containing number of active cells and
|
||||
total number of cells
|
||||
"""Get a cell count object containing number of active cells and total number of cells
|
||||
|
||||
Arguments:
|
||||
porosity_model (str): String representing an enum.
|
||||
@ -147,12 +179,21 @@ def cell_count(self, porosity_model="MATRIX_MODEL"):
|
||||
Cell Count object with the following integer attributes:
|
||||
active_cell_count: number of active cells
|
||||
reservoir_cell_count: total number of reservoir cells
|
||||
|
||||
**CellCount class description**::
|
||||
|
||||
Parameter | Description | Type
|
||||
----------------------- | ------------------------- | -----
|
||||
active_cell_count | Number of active cells | Integer
|
||||
reservoir_cell_count | Total number of cells | Integer
|
||||
|
||||
"""
|
||||
porosity_model_enum = Case_pb2.PorosityModelType.Value(porosity_model)
|
||||
request = Case_pb2.CellInfoRequest(case_request=self.__request(),
|
||||
porosity_model=porosity_model_enum)
|
||||
return self.__case_stub.GetCellCount(request)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def cell_info_for_active_cells_async(self, porosity_model="MATRIX_MODEL"):
|
||||
"""Get Stream of cell info objects for current case
|
||||
@ -164,13 +205,14 @@ def cell_info_for_active_cells_async(self, porosity_model="MATRIX_MODEL"):
|
||||
Returns:
|
||||
Stream of **CellInfo** objects
|
||||
|
||||
See cell_info_for_active_cells() for detalis on the **CellInfo** class.
|
||||
See :meth:`rips.case.cell_info_for_active_cells()` for detalis on the **CellInfo** class.
|
||||
"""
|
||||
porosity_model_enum = Case_pb2.PorosityModelType.Value(porosity_model)
|
||||
request = Case_pb2.CellInfoRequest(case_request=self.__request(),
|
||||
porosity_model=porosity_model_enum)
|
||||
return self.__case_stub.GetCellInfoForActiveCells(request)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def cell_info_for_active_cells(self, porosity_model="MATRIX_MODEL"):
|
||||
"""Get list of cell info objects for current case
|
||||
@ -209,6 +251,7 @@ def cell_info_for_active_cells(self, porosity_model="MATRIX_MODEL"):
|
||||
received_active_cells.append(active_cell)
|
||||
return received_active_cells
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def time_steps(self):
|
||||
"""Get a list containing all time steps
|
||||
@ -230,36 +273,56 @@ def time_steps(self):
|
||||
"""
|
||||
return self.__case_stub.GetTimeSteps(self.__request()).dates
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def reservoir_boundingbox(self):
|
||||
"""Get the reservoir bounding box
|
||||
|
||||
Returns: A class with six double members: min_x, max_x, min_y, max_y, min_z, max_z
|
||||
Returns:
|
||||
BoundingBox
|
||||
|
||||
**BoundingBox class description**::
|
||||
|
||||
Type | Name
|
||||
--------- | ----------
|
||||
int | min_x
|
||||
int | max_x
|
||||
int | min_y
|
||||
int | max_y
|
||||
int | min_z
|
||||
int | max_z
|
||||
|
||||
|
||||
"""
|
||||
return self.__case_stub.GetReservoirBoundingBox(self.__request())
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def reservoir_depth_range(self):
|
||||
"""Get the reservoir depth range
|
||||
|
||||
Returns: A tuple with two members. The first is the minimum depth, the second is the maximum depth
|
||||
Returns:
|
||||
A tuple with two members. The first is the minimum depth, the second is the maximum depth
|
||||
"""
|
||||
bbox = self.reservoir_boundingbox()
|
||||
return -bbox.max_z, -bbox.min_z
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def days_since_start(self):
|
||||
"""Get a list of decimal values representing days since the start of the simulation"""
|
||||
return self.__case_stub.GetDaysSinceStart(self.__request()).day_decimals
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def view(self, view_id):
|
||||
"""Get a particular view belonging to a case by providing view id
|
||||
|
||||
Arguments:
|
||||
view_id(int): view id
|
||||
|
||||
Returns: a view object
|
||||
|
||||
Returns:
|
||||
:class:`rips.generated.pdm_objects.View`
|
||||
"""
|
||||
views = self.views()
|
||||
for view_object in views:
|
||||
@ -267,13 +330,19 @@ def view(self, view_id):
|
||||
return view_object
|
||||
return None
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def create_view(self):
|
||||
"""Create a new view in the current case"""
|
||||
"""Create a new view in the current case
|
||||
|
||||
Returns:
|
||||
:class:`rips.generated.pdm_objects.View`
|
||||
"""
|
||||
return self.view(
|
||||
self._execute_command(createView=Cmd.CreateViewRequest(
|
||||
caseId=self.id)).createViewResult.viewId)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def export_snapshots_of_all_views(self, prefix="", export_folder=""):
|
||||
""" Export snapshots for all views in the case
|
||||
@ -287,6 +356,7 @@ def export_snapshots_of_all_views(self, prefix="", export_folder=""):
|
||||
exportSnapshots=Cmd.ExportSnapshotsRequest(
|
||||
type="VIEWS", prefix=prefix, caseId=self.id, viewId=-1, exportFolder=export_folder))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def export_well_path_completions(
|
||||
self,
|
||||
@ -353,6 +423,7 @@ def export_well_path_completions(
|
||||
combinationMode=combination_mode,
|
||||
))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def export_msw(self, well_path):
|
||||
"""
|
||||
@ -364,6 +435,7 @@ def export_msw(self, well_path):
|
||||
return self._execute_command(exportMsw=Cmd.ExportMswRequest(
|
||||
caseId=self.id, wellPath=well_path))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def create_multiple_fractures(
|
||||
self,
|
||||
@ -408,6 +480,7 @@ def create_multiple_fractures(
|
||||
action=action,
|
||||
))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def create_lgr_for_completion(
|
||||
self,
|
||||
@ -454,6 +527,7 @@ def create_lgr_for_completion(
|
||||
splitType=split_type,
|
||||
))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def create_saturation_pressure_plots(self):
|
||||
"""
|
||||
@ -464,6 +538,7 @@ def create_saturation_pressure_plots(self):
|
||||
createSaturationPressurePlots=Cmd.CreateSatPressPlotRequest(
|
||||
caseIds=case_ids))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def export_flow_characteristics(
|
||||
self,
|
||||
@ -505,23 +580,17 @@ def export_flow_characteristics(
|
||||
aquiferCellThreshold=aquifer_cell_threshold,
|
||||
))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def available_properties(self,
|
||||
property_type,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Get a list of available properties
|
||||
|
||||
Arguments:
|
||||
property_type (str): string corresponding to property_type enum. Choices::
|
||||
- DYNAMIC_NATIVE
|
||||
- STATIC_NATIVE
|
||||
- SOURSIMRL
|
||||
- GENERATED
|
||||
- INPUT_PROPERTY
|
||||
- FORMATION_NAMES
|
||||
- FLOW_DIAGNOSTICS
|
||||
- INJECTION_FLOODING
|
||||
For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
property_type (str): string corresponding to property_type enum.
|
||||
porosity_model(str): 'MATRIX_MODEL' or 'FRACTURE_MODEL'.
|
||||
"""
|
||||
|
||||
@ -535,19 +604,20 @@ def available_properties(self,
|
||||
return self.__properties_stub.GetAvailableProperties(
|
||||
request).property_names
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def active_cell_property_async(self,
|
||||
property_type,
|
||||
property_name,
|
||||
time_step,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Get a cell property for all active cells. Async, so returns an iterator
|
||||
"""Get a cell property for all active cells. Async, so returns an iterator. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
|
||||
Returns:
|
||||
An iterator to a chunk object containing an array of double values
|
||||
@ -565,19 +635,20 @@ def active_cell_property_async(self,
|
||||
for chunk in self.__properties_stub.GetActiveCellProperty(request):
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def active_cell_property(self,
|
||||
property_type,
|
||||
property_name,
|
||||
time_step,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Get a cell property for all active cells. Sync, so returns a list
|
||||
"""Get a cell property for all active cells. Sync, so returns a list. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
|
||||
Returns:
|
||||
A list containing double values
|
||||
@ -592,19 +663,20 @@ def active_cell_property(self,
|
||||
all_values.append(value)
|
||||
return all_values
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def selected_cell_property_async(self,
|
||||
property_type,
|
||||
property_name,
|
||||
time_step,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Get a cell property for all selected cells. Async, so returns an iterator
|
||||
"""Get a cell property for all selected cells. Async, so returns an iterator. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
|
||||
Returns:
|
||||
An iterator to a chunk object containing an array of double values
|
||||
@ -622,19 +694,20 @@ def selected_cell_property_async(self,
|
||||
for chunk in self.__properties_stub.GetSelectedCellProperty(request):
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def selected_cell_property(self,
|
||||
property_type,
|
||||
property_name,
|
||||
time_step,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Get a cell property for all selected cells. Sync, so returns a list
|
||||
"""Get a cell property for all selected cells. Sync, so returns a list. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
|
||||
Returns:
|
||||
A list containing double values
|
||||
@ -649,6 +722,7 @@ def selected_cell_property(self,
|
||||
all_values.append(value)
|
||||
return all_values
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def grid_property_async(
|
||||
self,
|
||||
@ -657,14 +731,14 @@ def grid_property_async(
|
||||
time_step,
|
||||
grid_index=0,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Get a cell property for all grid cells. Async, so returns an iterator
|
||||
"""Get a cell property for all grid cells. Async, so returns an iterator. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
gridIndex(int): index to the grid we're getting values for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
|
||||
Returns:
|
||||
An iterator to a chunk object containing an array of double values
|
||||
@ -683,6 +757,7 @@ def grid_property_async(
|
||||
for chunk in self.__properties_stub.GetGridProperty(request):
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def grid_property(
|
||||
self,
|
||||
@ -691,14 +766,14 @@ def grid_property(
|
||||
time_step,
|
||||
grid_index=0,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Get a cell property for all grid cells. Synchronous, so returns a list
|
||||
"""Get a cell property for all grid cells. Synchronous, so returns a list. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
grid_index(int): index to the grid we're getting values for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
|
||||
Returns:
|
||||
A list of double values
|
||||
@ -712,6 +787,7 @@ def grid_property(
|
||||
all_values.append(value)
|
||||
return all_values
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def set_active_cell_property_async(
|
||||
self,
|
||||
@ -720,14 +796,14 @@ def set_active_cell_property_async(
|
||||
property_name,
|
||||
time_step,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Set cell property for all active cells Async. Takes an iterator to the input values
|
||||
"""Set cell property for all active cells Async. Takes an iterator to the input values. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
values_iterator(iterator): an iterator to the properties to be set
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
"""
|
||||
property_type_enum = Properties_pb2.PropertyType.Value(property_type)
|
||||
porosity_model_enum = Case_pb2.PorosityModelType.Value(porosity_model)
|
||||
@ -743,6 +819,7 @@ def set_active_cell_property_async(
|
||||
values_iterator, request)
|
||||
self.__properties_stub.SetActiveCellProperty(request_iterator)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def set_active_cell_property(
|
||||
self,
|
||||
@ -751,14 +828,14 @@ def set_active_cell_property(
|
||||
property_name,
|
||||
time_step,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Set a cell property for all active cells.
|
||||
"""Set a cell property for all active cells. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
values(list): a list of double precision floating point numbers
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
"""
|
||||
property_type_enum = Properties_pb2.PropertyType.Value(property_type)
|
||||
porosity_model_enum = Case_pb2.PorosityModelType.Value(porosity_model)
|
||||
@ -775,6 +852,7 @@ def set_active_cell_property(
|
||||
if reply.accepted_value_count < len(values):
|
||||
raise IndexError
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def set_grid_property(
|
||||
self,
|
||||
@ -784,15 +862,15 @@ def set_grid_property(
|
||||
time_step,
|
||||
grid_index=0,
|
||||
porosity_model="MATRIX_MODEL"):
|
||||
"""Set a cell property for all grid cells.
|
||||
"""Set a cell property for all grid cells. For argument details, see :ref:`result-definition-label`
|
||||
|
||||
Arguments:
|
||||
values(list): a list of double precision floating point numbers
|
||||
property_type(str): string enum. See available()
|
||||
property_type(str): string enum
|
||||
property_name(str): name of an Eclipse property
|
||||
time_step(int): the time step for which to get the property for
|
||||
grid_index(int): index to the grid we're setting values for
|
||||
porosity_model(str): string enum. See available()
|
||||
porosity_model(str): string enum
|
||||
"""
|
||||
property_type_enum = Properties_pb2.PropertyType.Value(property_type)
|
||||
porosity_model_enum = Case_pb2.PorosityModelType.Value(porosity_model)
|
||||
@ -810,6 +888,7 @@ def set_grid_property(
|
||||
if reply.accepted_value_count < len(values):
|
||||
raise IndexError
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def export_property(
|
||||
self,
|
||||
@ -836,6 +915,7 @@ def export_property(
|
||||
exportFile=export_file,
|
||||
))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def create_well_bore_stability_plot(self, well_path, time_step, parameters=None):
|
||||
""" Create a new well bore stability plot
|
||||
@ -845,7 +925,7 @@ def create_well_bore_stability_plot(self, well_path, time_step, parameters=None)
|
||||
time_step(int): time step
|
||||
|
||||
Returns:
|
||||
A new plot object
|
||||
:class:`rips.generated.pdm_objects.WellBoreStabilityPlot`
|
||||
"""
|
||||
pb2_parameters = None
|
||||
if parameters is not None:
|
||||
@ -860,6 +940,7 @@ def create_well_bore_stability_plot(self, well_path, time_step, parameters=None)
|
||||
plot = project.plot(view_id=plot_result.createWbsPlotResult.viewId)
|
||||
return plot
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def import_formation_names(self, formation_files=None):
|
||||
""" Import formation names into project and apply it to the current case
|
||||
@ -876,16 +957,19 @@ def import_formation_names(self, formation_files=None):
|
||||
self._execute_command(importFormationNames=Cmd.ImportFormationNamesRequest(formationFiles=formation_files,
|
||||
applyToCaseId=self.id))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def simulation_wells(self):
|
||||
"""Get a list of all simulation wells for a case
|
||||
|
||||
Returns:
|
||||
A list of rips **SimulationWell** objects
|
||||
:class:`rips.generated.pdm_objects.SimulationWell`
|
||||
|
||||
"""
|
||||
wells = self.descendants(SimulationWell)
|
||||
return wells
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def active_cell_centers_async(
|
||||
self,
|
||||
@ -904,6 +988,7 @@ def active_cell_centers_async(
|
||||
porosity_model=porosity_model_enum)
|
||||
return self.__case_stub.GetCellCenterForActiveCells(request)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def active_cell_centers(
|
||||
self,
|
||||
@ -923,6 +1008,7 @@ def active_cell_centers(
|
||||
cell_centers.append(value)
|
||||
return cell_centers
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def active_cell_corners_async(
|
||||
self,
|
||||
@ -941,6 +1027,7 @@ def active_cell_corners_async(
|
||||
porosity_model=porosity_model_enum)
|
||||
return self.__case_stub.GetCellCornersForActiveCells(request)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def active_cell_corners(
|
||||
self,
|
||||
@ -950,8 +1037,20 @@ def active_cell_corners(
|
||||
Arguments:
|
||||
porosity_model(str): string enum. See available()
|
||||
|
||||
Returns:
|
||||
A list of CellCorners
|
||||
**CellCorner class description**::
|
||||
|
||||
Parameter | Description | Type
|
||||
----------- | ------------ | -----
|
||||
c0 | | Vec3d
|
||||
c1 | | Vec3d
|
||||
c2 | | Vec3d
|
||||
c3 | | Vec3d
|
||||
c4 | | Vec3d
|
||||
c5 | | Vec3d
|
||||
c6 | | Vec3d
|
||||
c7 | | Vec3d
|
||||
|
||||
|
||||
"""
|
||||
cell_corners = []
|
||||
generator = self.active_cell_corners_async(porosity_model)
|
||||
@ -960,6 +1059,7 @@ def active_cell_corners(
|
||||
cell_corners.append(value)
|
||||
return cell_corners
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def selected_cells_async(self):
|
||||
"""Get the selected cells. Async, so returns an iterator.
|
||||
@ -970,6 +1070,7 @@ def selected_cells_async(self):
|
||||
"""
|
||||
return self.__case_stub.GetSelectedCells(self.__request())
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def selected_cells(self):
|
||||
"""Get the selected cells. Synchronous, so returns a list.
|
||||
@ -984,6 +1085,7 @@ def selected_cells(self):
|
||||
cells.append(value)
|
||||
return cells
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def coarsening_info(self):
|
||||
"""Get a coarsening information for all grids in the case.
|
||||
@ -994,12 +1096,24 @@ def coarsening_info(self):
|
||||
"""
|
||||
return self.__case_stub.GetCoarseningInfoArray(self.__request()).data
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def available_nnc_properties(self):
|
||||
"""Get a list of available NNC properties
|
||||
|
||||
**NNCConnection class description**::
|
||||
|
||||
Parameter | Description | Type
|
||||
------------------------| --------------------------------------------- | -----
|
||||
cell_grid_index1 | Reservoir Cell Index to cell 1 | int32
|
||||
cell_grid_index2 | Reservoir Cell Index to cell 2 | int32
|
||||
cell1 | Reservoir Cell IJK to cell 1 | Vec3i
|
||||
cell2 | Reservoir Cell IJK to cell 1 | Vec3i
|
||||
|
||||
"""
|
||||
return self.__nnc_properties_stub.GetAvailableNNCProperties(self.__request()).properties
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def nnc_connections_async(self):
|
||||
"""Get the NNC connections. Async, so returns an iterator.
|
||||
@ -1010,6 +1124,7 @@ def nnc_connections_async(self):
|
||||
"""
|
||||
return self.__nnc_properties_stub.GetNNCConnections(self.__request())
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def nnc_connections(self):
|
||||
"""Get the NNC connection. Synchronous, so returns a list.
|
||||
@ -1024,6 +1139,7 @@ def nnc_connections(self):
|
||||
connections.append(value)
|
||||
return connections
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def __nnc_connections_values_async(self, property_name, property_type, time_step):
|
||||
request = NNCProperties_pb2.NNCValuesRequest(case_id=self.id,
|
||||
@ -1032,6 +1148,7 @@ def __nnc_connections_values_async(self, property_name, property_type, time_step
|
||||
time_step=time_step)
|
||||
return self.__nnc_properties_stub.GetNNCValues(request)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def __nnc_values_generator_to_list(self, generator):
|
||||
"""Converts a NNC values generator to a list."""
|
||||
@ -1041,6 +1158,7 @@ def __nnc_values_generator_to_list(self, generator):
|
||||
vals.append(value)
|
||||
return vals
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def nnc_connections_static_values_async(self, property_name):
|
||||
"""Get the static NNC values. Async, so returns an iterator.
|
||||
@ -1054,6 +1172,7 @@ def nnc_connections_static_values_async(self, property_name):
|
||||
"""
|
||||
return self.__nnc_connections_values_async(property_name, NNCProperties_pb2.NNC_STATIC, 0)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def nnc_connections_static_values(self, property_name):
|
||||
"""Get the static NNC values.
|
||||
@ -1066,6 +1185,7 @@ def nnc_connections_static_values(self, property_name):
|
||||
generator = self.nnc_connections_static_values_async(property_name)
|
||||
return self.__nnc_values_generator_to_list(generator)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def nnc_connections_dynamic_values_async(self, property_name, time_step):
|
||||
"""Get the dynamic NNC values. Async, so returns an iterator.
|
||||
@ -1079,6 +1199,7 @@ def nnc_connections_dynamic_values_async(self, property_name, time_step):
|
||||
"""
|
||||
return self.__nnc_connections_values_async(property_name, NNCProperties_pb2.NNC_DYNAMIC, time_step)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def nnc_connections_dynamic_values(self, property_name, time_step):
|
||||
"""Get the dynamic NNC values.
|
||||
@ -1091,6 +1212,7 @@ def nnc_connections_dynamic_values(self, property_name, time_step):
|
||||
generator = self.nnc_connections_dynamic_values_async(property_name, time_step)
|
||||
return self.__nnc_values_generator_to_list(generator)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def nnc_connections_generated_values_async(self, property_name, time_step):
|
||||
"""Get the generated NNC values. Async, so returns an iterator.
|
||||
@ -1104,6 +1226,7 @@ def nnc_connections_generated_values_async(self, property_name, time_step):
|
||||
"""
|
||||
return self.__nnc_connections_values_async(property_name, NNCProperties_pb2.NNC_GENERATED, time_step)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def nnc_connections_generated_values(self, property_name, time_step):
|
||||
"""Get the generated NNC values.
|
||||
@ -1116,6 +1239,7 @@ def nnc_connections_generated_values(self, property_name, time_step):
|
||||
generator = self.nnc_connections_generated_values_async(property_name, time_step)
|
||||
return self.__nnc_values_generator_to_list(generator)
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def __generate_nnc_property_input_chunks(self, array, parameters):
|
||||
index = -1
|
||||
@ -1135,6 +1259,7 @@ def __generate_nnc_property_input_chunks(self, array, parameters):
|
||||
chunk = NNCProperties_pb2.NNCValuesChunk()
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def set_nnc_connections_values(
|
||||
self,
|
||||
|
@ -7,6 +7,7 @@ from rips.pdmobject import PdmObject, add_method
|
||||
from rips.view import View
|
||||
from rips.generated.pdm_objects import EclipseContourMap, GeoMechContourMap
|
||||
|
||||
|
||||
@add_method(EclipseContourMap)
|
||||
def export_to_text(self, export_file_name='', export_local_coordinates=False, undefined_value_label="NaN", exclude_undefined_values=False):
|
||||
""" Export snapshot for the current view
|
||||
@ -25,6 +26,7 @@ def export_to_text(self, export_file_name='', export_local_coordinates=False, un
|
||||
excludeUndefinedValues=exclude_undefined_values,
|
||||
viewId=self.id))
|
||||
|
||||
|
||||
@add_method(GeoMechContourMap)
|
||||
def export_to_text(self, export_file_name='', export_local_coordinates=False, undefined_value_label="NaN", exclude_undefined_values=False):
|
||||
""" Export snapshot for the current view
|
||||
@ -42,4 +44,3 @@ def export_to_text(self, export_file_name='', export_local_coordinates=False, un
|
||||
undefinedValueLabel=undefined_value_label,
|
||||
excludeUndefinedValues=exclude_undefined_values,
|
||||
viewId=self.id))
|
||||
|
||||
|
@ -2,29 +2,27 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: App.proto
|
||||
|
||||
import sys
|
||||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
||||
from google.protobuf.internal import enum_type_wrapper
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
||||
import Definitions_pb2 as Definitions__pb2
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf import reflection as _reflection
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf.internal import enum_type_wrapper
|
||||
import sys
|
||||
_b = sys.version_info[0] < 3 and (
|
||||
lambda x: x) or (lambda x: x.encode('latin1'))
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
import Definitions_pb2 as Definitions__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
name='App.proto',
|
||||
package='rips',
|
||||
syntax='proto3',
|
||||
serialized_options=None,
|
||||
serialized_pb=_b('\n\tApp.proto\x12\x04rips\x1a\x11\x44\x65\x66initions.proto\"N\n\x07Version\x12\x15\n\rmajor_version\x18\x01 \x01(\x05\x12\x15\n\rminor_version\x18\x02 \x01(\x05\x12\x15\n\rpatch_version\x18\x03 \x01(\x05\":\n\x0bRuntimeInfo\x12+\n\x08\x61pp_type\x18\x01 \x01(\x0e\x32\x19.rips.ApplicationTypeEnum*C\n\x13\x41pplicationTypeEnum\x12\x13\n\x0fGUI_APPLICATION\x10\x00\x12\x17\n\x13\x43ONSOLE_APPLICATION\x10\x01\x32\x89\x01\n\x03\x41pp\x12*\n\nGetVersion\x12\x0b.rips.Empty\x1a\r.rips.Version\"\x00\x12\"\n\x04\x45xit\x12\x0b.rips.Empty\x1a\x0b.rips.Empty\"\x00\x12\x32\n\x0eGetRuntimeInfo\x12\x0b.rips.Empty\x1a\x11.rips.RuntimeInfo\"\x00\x62\x06proto3')
|
||||
,
|
||||
dependencies=[Definitions__pb2.DESCRIPTOR,])
|
||||
serialized_pb=_b('\n\tApp.proto\x12\x04rips\x1a\x11\x44\x65\x66initions.proto\"N\n\x07Version\x12\x15\n\rmajor_version\x18\x01 \x01(\x05\x12\x15\n\rminor_version\x18\x02 \x01(\x05\x12\x15\n\rpatch_version\x18\x03 \x01(\x05\":\n\x0bRuntimeInfo\x12+\n\x08\x61pp_type\x18\x01 \x01(\x0e\x32\x19.rips.ApplicationTypeEnum*C\n\x13\x41pplicationTypeEnum\x12\x13\n\x0fGUI_APPLICATION\x10\x00\x12\x17\n\x13\x43ONSOLE_APPLICATION\x10\x01\x32\x89\x01\n\x03\x41pp\x12*\n\nGetVersion\x12\x0b.rips.Empty\x1a\r.rips.Version\"\x00\x12\"\n\x04\x45xit\x12\x0b.rips.Empty\x1a\x0b.rips.Empty\"\x00\x12\x32\n\x0eGetRuntimeInfo\x12\x0b.rips.Empty\x1a\x11.rips.RuntimeInfo\"\x00\x62\x06proto3'),
|
||||
dependencies=[Definitions__pb2.DESCRIPTOR, ])
|
||||
|
||||
_APPLICATIONTYPEENUM = _descriptor.EnumDescriptor(
|
||||
name='ApplicationTypeEnum',
|
||||
@ -53,7 +51,6 @@ GUI_APPLICATION = 0
|
||||
CONSOLE_APPLICATION = 1
|
||||
|
||||
|
||||
|
||||
_VERSION = _descriptor.Descriptor(
|
||||
name='Version',
|
||||
full_name='rips.Version',
|
||||
@ -136,21 +133,20 @@ DESCRIPTOR.enum_types_by_name['ApplicationTypeEnum'] = _APPLICATIONTYPEENUM
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
Version = _reflection.GeneratedProtocolMessageType('Version', (_message.Message,), dict(
|
||||
DESCRIPTOR = _VERSION,
|
||||
__module__ = 'App_pb2'
|
||||
DESCRIPTOR=_VERSION,
|
||||
__module__='App_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.Version)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(Version)
|
||||
|
||||
RuntimeInfo = _reflection.GeneratedProtocolMessageType('RuntimeInfo', (_message.Message,), dict(
|
||||
DESCRIPTOR = _RUNTIMEINFO,
|
||||
__module__ = 'App_pb2'
|
||||
DESCRIPTOR=_RUNTIMEINFO,
|
||||
__module__='App_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.RuntimeInfo)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(RuntimeInfo)
|
||||
|
||||
|
||||
|
||||
_APP = _descriptor.ServiceDescriptor(
|
||||
name='App',
|
||||
full_name='rips.App',
|
||||
@ -187,7 +183,7 @@ _APP = _descriptor.ServiceDescriptor(
|
||||
output_type=_RUNTIMEINFO,
|
||||
serialized_options=None,
|
||||
),
|
||||
])
|
||||
])
|
||||
_sym_db.RegisterServiceDescriptor(_APP)
|
||||
|
||||
DESCRIPTOR.services_by_name['App'] = _APP
|
||||
|
@ -2,30 +2,28 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: Case.proto
|
||||
|
||||
import sys
|
||||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
||||
from google.protobuf.internal import enum_type_wrapper
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
||||
import Definitions_pb2 as Definitions__pb2
|
||||
import PdmObject_pb2 as PdmObject__pb2
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf import reflection as _reflection
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf.internal import enum_type_wrapper
|
||||
import sys
|
||||
_b = sys.version_info[0] < 3 and (
|
||||
lambda x: x) or (lambda x: x.encode('latin1'))
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
import PdmObject_pb2 as PdmObject__pb2
|
||||
import Definitions_pb2 as Definitions__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
name='Case.proto',
|
||||
package='rips',
|
||||
syntax='proto3',
|
||||
serialized_options=None,
|
||||
serialized_pb=_b('\n\nCase.proto\x12\x04rips\x1a\x0fPdmObject.proto\x1a\x11\x44\x65\x66initions.proto\"\x19\n\x0b\x43\x61seRequest\x12\n\n\x02id\x18\x01 \x01(\x05\"D\n\x08\x43\x61seInfo\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x10\n\x08group_id\x18\x02 \x01(\x05\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x0c\n\x04type\x18\x04 \x01(\t\"-\n\rCaseInfoArray\x12\x1c\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32\x0e.rips.CaseInfo\"g\n\x0b\x42oundingBox\x12\r\n\x05min_x\x18\x01 \x01(\x01\x12\r\n\x05max_x\x18\x02 \x01(\x01\x12\r\n\x05min_y\x18\x03 \x01(\x01\x12\r\n\x05max_y\x18\x04 \x01(\x01\x12\r\n\x05min_z\x18\x05 \x01(\x01\x12\r\n\x05max_z\x18\x06 \x01(\x01\"%\n\tCaseGroup\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0c\n\x04name\x18\x02 \x01(\t\"2\n\nCaseGroups\x12$\n\x0b\x63\x61se_groups\x18\x01 \x03(\x0b\x32\x0f.rips.CaseGroup\"\x1a\n\tGridCount\x12\r\n\x05\x63ount\x18\x01 \x01(\x05\"D\n\tCellCount\x12\x19\n\x11\x61\x63tive_cell_count\x18\x01 \x01(\x05\x12\x1c\n\x14reservoir_cell_count\x18\x02 \x01(\x05\"k\n\x0f\x43\x65llInfoRequest\x12\'\n\x0c\x63\x61se_request\x18\x01 \x01(\x0b\x32\x11.rips.CaseRequest\x12/\n\x0eporosity_model\x18\x02 \x01(\x0e\x32\x17.rips.PorosityModelType\"-\n\rCellInfoArray\x12\x1c\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32\x0e.rips.CellInfo\"\x98\x01\n\x08\x43\x65llInfo\x12\x12\n\ngrid_index\x18\x01 \x01(\x05\x12\x19\n\x11parent_grid_index\x18\x02 \x01(\x05\x12\x1c\n\x14\x63oarsening_box_index\x18\x03 \x01(\x05\x12\x1e\n\tlocal_ijk\x18\x04 \x01(\x0b\x32\x0b.rips.Vec3i\x12\x1f\n\nparent_ijk\x18\x05 \x01(\x0b\x32\x0b.rips.Vec3i\"9\n\x13\x43oarseningInfoArray\x12\"\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32\x14.rips.CoarseningInfo\"D\n\x0e\x43oarseningInfo\x12\x18\n\x03min\x18\x01 \x01(\x0b\x32\x0b.rips.Vec3i\x12\x18\n\x03max\x18\x02 \x01(\x0b\x32\x0b.rips.Vec3i\"2\n\rTimeStepDates\x12!\n\x05\x64\x61tes\x18\x01 \x03(\x0b\x32\x12.rips.TimeStepDate\"f\n\x0cTimeStepDate\x12\x0c\n\x04year\x18\x01 \x01(\x05\x12\r\n\x05month\x18\x02 \x01(\x05\x12\x0b\n\x03\x64\x61y\x18\x03 \x01(\x05\x12\x0c\n\x04hour\x18\x04 \x01(\x05\x12\x0e\n\x06minute\x18\x05 \x01(\x05\x12\x0e\n\x06second\x18\x06 \x01(\x05\"&\n\x0e\x44\x61ysSinceStart\x12\x14\n\x0c\x64\x61y_decimals\x18\x01 \x03(\x01\"<\n\x0cSelectedCell\x12\x12\n\ngrid_index\x18\x01 \x01(\x05\x12\x18\n\x03ijk\x18\x02 \x01(\x0b\x32\x0b.rips.Vec3i\"2\n\rSelectedCells\x12!\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32\x12.rips.SelectedCell*9\n\x11PorosityModelType\x12\x10\n\x0cMATRIX_MODEL\x10\x00\x12\x12\n\x0e\x46RACTURE_MODEL\x10\x01\x32\x94\x06\n\x04\x43\x61se\x12\x34\n\x0cGetGridCount\x12\x11.rips.CaseRequest\x1a\x0f.rips.GridCount\"\x00\x12\x38\n\x0cGetCellCount\x12\x15.rips.CellInfoRequest\x1a\x0f.rips.CellCount\"\x00\x12K\n\x19GetCellInfoForActiveCells\x12\x15.rips.CellInfoRequest\x1a\x13.rips.CellInfoArray\"\x00\x30\x01\x12K\n\x1bGetCellCenterForActiveCells\x12\x15.rips.CellInfoRequest\x1a\x11.rips.CellCenters\"\x00\x30\x01\x12Q\n\x1cGetCellCornersForActiveCells\x12\x15.rips.CellInfoRequest\x1a\x16.rips.CellCornersArray\"\x00\x30\x01\x12H\n\x16GetCoarseningInfoArray\x12\x11.rips.CaseRequest\x1a\x19.rips.CoarseningInfoArray\"\x00\x12\x38\n\x0cGetTimeSteps\x12\x11.rips.CaseRequest\x1a\x13.rips.TimeStepDates\"\x00\x12>\n\x10GetSelectedCells\x12\x11.rips.CaseRequest\x1a\x13.rips.SelectedCells\"\x00\x30\x01\x12>\n\x11GetDaysSinceStart\x12\x11.rips.CaseRequest\x1a\x14.rips.DaysSinceStart\"\x00\x12\x32\n\x0bGetCaseInfo\x12\x11.rips.CaseRequest\x1a\x0e.rips.CaseInfo\"\x00\x12\x34\n\x0cGetPdmObject\x12\x11.rips.CaseRequest\x1a\x0f.rips.PdmObject\"\x00\x12\x41\n\x17GetReservoirBoundingBox\x12\x11.rips.CaseRequest\x1a\x11.rips.BoundingBox\"\x00\x62\x06proto3')
|
||||
,
|
||||
dependencies=[PdmObject__pb2.DESCRIPTOR,Definitions__pb2.DESCRIPTOR,])
|
||||
serialized_pb=_b('\n\nCase.proto\x12\x04rips\x1a\x0fPdmObject.proto\x1a\x11\x44\x65\x66initions.proto\"\x19\n\x0b\x43\x61seRequest\x12\n\n\x02id\x18\x01 \x01(\x05\"D\n\x08\x43\x61seInfo\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x10\n\x08group_id\x18\x02 \x01(\x05\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x0c\n\x04type\x18\x04 \x01(\t\"-\n\rCaseInfoArray\x12\x1c\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32\x0e.rips.CaseInfo\"g\n\x0b\x42oundingBox\x12\r\n\x05min_x\x18\x01 \x01(\x01\x12\r\n\x05max_x\x18\x02 \x01(\x01\x12\r\n\x05min_y\x18\x03 \x01(\x01\x12\r\n\x05max_y\x18\x04 \x01(\x01\x12\r\n\x05min_z\x18\x05 \x01(\x01\x12\r\n\x05max_z\x18\x06 \x01(\x01\"%\n\tCaseGroup\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0c\n\x04name\x18\x02 \x01(\t\"2\n\nCaseGroups\x12$\n\x0b\x63\x61se_groups\x18\x01 \x03(\x0b\x32\x0f.rips.CaseGroup\"\x1a\n\tGridCount\x12\r\n\x05\x63ount\x18\x01 \x01(\x05\"D\n\tCellCount\x12\x19\n\x11\x61\x63tive_cell_count\x18\x01 \x01(\x05\x12\x1c\n\x14reservoir_cell_count\x18\x02 \x01(\x05\"k\n\x0f\x43\x65llInfoRequest\x12\'\n\x0c\x63\x61se_request\x18\x01 \x01(\x0b\x32\x11.rips.CaseRequest\x12/\n\x0eporosity_model\x18\x02 \x01(\x0e\x32\x17.rips.PorosityModelType\"-\n\rCellInfoArray\x12\x1c\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32\x0e.rips.CellInfo\"\x98\x01\n\x08\x43\x65llInfo\x12\x12\n\ngrid_index\x18\x01 \x01(\x05\x12\x19\n\x11parent_grid_index\x18\x02 \x01(\x05\x12\x1c\n\x14\x63oarsening_box_index\x18\x03 \x01(\x05\x12\x1e\n\tlocal_ijk\x18\x04 \x01(\x0b\x32\x0b.rips.Vec3i\x12\x1f\n\nparent_ijk\x18\x05 \x01(\x0b\x32\x0b.rips.Vec3i\"9\n\x13\x43oarseningInfoArray\x12\"\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32\x14.rips.CoarseningInfo\"D\n\x0e\x43oarseningInfo\x12\x18\n\x03min\x18\x01 \x01(\x0b\x32\x0b.rips.Vec3i\x12\x18\n\x03max\x18\x02 \x01(\x0b\x32\x0b.rips.Vec3i\"2\n\rTimeStepDates\x12!\n\x05\x64\x61tes\x18\x01 \x03(\x0b\x32\x12.rips.TimeStepDate\"f\n\x0cTimeStepDate\x12\x0c\n\x04year\x18\x01 \x01(\x05\x12\r\n\x05month\x18\x02 \x01(\x05\x12\x0b\n\x03\x64\x61y\x18\x03 \x01(\x05\x12\x0c\n\x04hour\x18\x04 \x01(\x05\x12\x0e\n\x06minute\x18\x05 \x01(\x05\x12\x0e\n\x06second\x18\x06 \x01(\x05\"&\n\x0e\x44\x61ysSinceStart\x12\x14\n\x0c\x64\x61y_decimals\x18\x01 \x03(\x01\"<\n\x0cSelectedCell\x12\x12\n\ngrid_index\x18\x01 \x01(\x05\x12\x18\n\x03ijk\x18\x02 \x01(\x0b\x32\x0b.rips.Vec3i\"2\n\rSelectedCells\x12!\n\x05\x63\x65lls\x18\x01 \x03(\x0b\x32\x12.rips.SelectedCell*9\n\x11PorosityModelType\x12\x10\n\x0cMATRIX_MODEL\x10\x00\x12\x12\n\x0e\x46RACTURE_MODEL\x10\x01\x32\x94\x06\n\x04\x43\x61se\x12\x34\n\x0cGetGridCount\x12\x11.rips.CaseRequest\x1a\x0f.rips.GridCount\"\x00\x12\x38\n\x0cGetCellCount\x12\x15.rips.CellInfoRequest\x1a\x0f.rips.CellCount\"\x00\x12K\n\x19GetCellInfoForActiveCells\x12\x15.rips.CellInfoRequest\x1a\x13.rips.CellInfoArray\"\x00\x30\x01\x12K\n\x1bGetCellCenterForActiveCells\x12\x15.rips.CellInfoRequest\x1a\x11.rips.CellCenters\"\x00\x30\x01\x12Q\n\x1cGetCellCornersForActiveCells\x12\x15.rips.CellInfoRequest\x1a\x16.rips.CellCornersArray\"\x00\x30\x01\x12H\n\x16GetCoarseningInfoArray\x12\x11.rips.CaseRequest\x1a\x19.rips.CoarseningInfoArray\"\x00\x12\x38\n\x0cGetTimeSteps\x12\x11.rips.CaseRequest\x1a\x13.rips.TimeStepDates\"\x00\x12>\n\x10GetSelectedCells\x12\x11.rips.CaseRequest\x1a\x13.rips.SelectedCells\"\x00\x30\x01\x12>\n\x11GetDaysSinceStart\x12\x11.rips.CaseRequest\x1a\x14.rips.DaysSinceStart\"\x00\x12\x32\n\x0bGetCaseInfo\x12\x11.rips.CaseRequest\x1a\x0e.rips.CaseInfo\"\x00\x12\x34\n\x0cGetPdmObject\x12\x11.rips.CaseRequest\x1a\x0f.rips.PdmObject\"\x00\x12\x41\n\x17GetReservoirBoundingBox\x12\x11.rips.CaseRequest\x1a\x11.rips.BoundingBox\"\x00\x62\x06proto3'),
|
||||
dependencies=[PdmObject__pb2.DESCRIPTOR, Definitions__pb2.DESCRIPTOR, ])
|
||||
|
||||
_POROSITYMODELTYPE = _descriptor.EnumDescriptor(
|
||||
name='PorosityModelType',
|
||||
@ -54,7 +52,6 @@ MATRIX_MODEL = 0
|
||||
FRACTURE_MODEL = 1
|
||||
|
||||
|
||||
|
||||
_CASEREQUEST = _descriptor.Descriptor(
|
||||
name='CaseRequest',
|
||||
full_name='rips.CaseRequest',
|
||||
@ -801,133 +798,132 @@ DESCRIPTOR.enum_types_by_name['PorosityModelType'] = _POROSITYMODELTYPE
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
CaseRequest = _reflection.GeneratedProtocolMessageType('CaseRequest', (_message.Message,), dict(
|
||||
DESCRIPTOR = _CASEREQUEST,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_CASEREQUEST,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.CaseRequest)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(CaseRequest)
|
||||
|
||||
CaseInfo = _reflection.GeneratedProtocolMessageType('CaseInfo', (_message.Message,), dict(
|
||||
DESCRIPTOR = _CASEINFO,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_CASEINFO,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.CaseInfo)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(CaseInfo)
|
||||
|
||||
CaseInfoArray = _reflection.GeneratedProtocolMessageType('CaseInfoArray', (_message.Message,), dict(
|
||||
DESCRIPTOR = _CASEINFOARRAY,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_CASEINFOARRAY,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.CaseInfoArray)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(CaseInfoArray)
|
||||
|
||||
BoundingBox = _reflection.GeneratedProtocolMessageType('BoundingBox', (_message.Message,), dict(
|
||||
DESCRIPTOR = _BOUNDINGBOX,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_BOUNDINGBOX,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.BoundingBox)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(BoundingBox)
|
||||
|
||||
CaseGroup = _reflection.GeneratedProtocolMessageType('CaseGroup', (_message.Message,), dict(
|
||||
DESCRIPTOR = _CASEGROUP,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_CASEGROUP,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.CaseGroup)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(CaseGroup)
|
||||
|
||||
CaseGroups = _reflection.GeneratedProtocolMessageType('CaseGroups', (_message.Message,), dict(
|
||||
DESCRIPTOR = _CASEGROUPS,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_CASEGROUPS,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.CaseGroups)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(CaseGroups)
|
||||
|
||||
GridCount = _reflection.GeneratedProtocolMessageType('GridCount', (_message.Message,), dict(
|
||||
DESCRIPTOR = _GRIDCOUNT,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_GRIDCOUNT,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.GridCount)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(GridCount)
|
||||
|
||||
CellCount = _reflection.GeneratedProtocolMessageType('CellCount', (_message.Message,), dict(
|
||||
DESCRIPTOR = _CELLCOUNT,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_CELLCOUNT,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.CellCount)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(CellCount)
|
||||
|
||||
CellInfoRequest = _reflection.GeneratedProtocolMessageType('CellInfoRequest', (_message.Message,), dict(
|
||||
DESCRIPTOR = _CELLINFOREQUEST,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_CELLINFOREQUEST,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.CellInfoRequest)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(CellInfoRequest)
|
||||
|
||||
CellInfoArray = _reflection.GeneratedProtocolMessageType('CellInfoArray', (_message.Message,), dict(
|
||||
DESCRIPTOR = _CELLINFOARRAY,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_CELLINFOARRAY,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.CellInfoArray)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(CellInfoArray)
|
||||
|
||||
CellInfo = _reflection.GeneratedProtocolMessageType('CellInfo', (_message.Message,), dict(
|
||||
DESCRIPTOR = _CELLINFO,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_CELLINFO,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.CellInfo)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(CellInfo)
|
||||
|
||||
CoarseningInfoArray = _reflection.GeneratedProtocolMessageType('CoarseningInfoArray', (_message.Message,), dict(
|
||||
DESCRIPTOR = _COARSENINGINFOARRAY,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_COARSENINGINFOARRAY,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.CoarseningInfoArray)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(CoarseningInfoArray)
|
||||
|
||||
CoarseningInfo = _reflection.GeneratedProtocolMessageType('CoarseningInfo', (_message.Message,), dict(
|
||||
DESCRIPTOR = _COARSENINGINFO,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_COARSENINGINFO,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.CoarseningInfo)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(CoarseningInfo)
|
||||
|
||||
TimeStepDates = _reflection.GeneratedProtocolMessageType('TimeStepDates', (_message.Message,), dict(
|
||||
DESCRIPTOR = _TIMESTEPDATES,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_TIMESTEPDATES,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.TimeStepDates)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(TimeStepDates)
|
||||
|
||||
TimeStepDate = _reflection.GeneratedProtocolMessageType('TimeStepDate', (_message.Message,), dict(
|
||||
DESCRIPTOR = _TIMESTEPDATE,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_TIMESTEPDATE,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.TimeStepDate)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(TimeStepDate)
|
||||
|
||||
DaysSinceStart = _reflection.GeneratedProtocolMessageType('DaysSinceStart', (_message.Message,), dict(
|
||||
DESCRIPTOR = _DAYSSINCESTART,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_DAYSSINCESTART,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.DaysSinceStart)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(DaysSinceStart)
|
||||
|
||||
SelectedCell = _reflection.GeneratedProtocolMessageType('SelectedCell', (_message.Message,), dict(
|
||||
DESCRIPTOR = _SELECTEDCELL,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_SELECTEDCELL,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.SelectedCell)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(SelectedCell)
|
||||
|
||||
SelectedCells = _reflection.GeneratedProtocolMessageType('SelectedCells', (_message.Message,), dict(
|
||||
DESCRIPTOR = _SELECTEDCELLS,
|
||||
__module__ = 'Case_pb2'
|
||||
DESCRIPTOR=_SELECTEDCELLS,
|
||||
__module__='Case_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.SelectedCells)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(SelectedCells)
|
||||
|
||||
|
||||
|
||||
_CASE = _descriptor.ServiceDescriptor(
|
||||
name='Case',
|
||||
full_name='rips.Case',
|
||||
@ -1045,7 +1041,7 @@ _CASE = _descriptor.ServiceDescriptor(
|
||||
output_type=_BOUNDINGBOX,
|
||||
serialized_options=None,
|
||||
),
|
||||
])
|
||||
])
|
||||
_sym_db.RegisterServiceDescriptor(_CASE)
|
||||
|
||||
DESCRIPTOR.services_by_name['Case'] = _CASE
|
||||
|
File diff suppressed because one or more lines are too long
@ -2,19 +2,18 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: Definitions.proto
|
||||
|
||||
import sys
|
||||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf import reflection as _reflection
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
import sys
|
||||
_b = sys.version_info[0] < 3 and (
|
||||
lambda x: x) or (lambda x: x.encode('latin1'))
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
name='Definitions.proto',
|
||||
package='rips',
|
||||
@ -24,8 +23,6 @@ DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
_EMPTY = _descriptor.Descriptor(
|
||||
name='Empty',
|
||||
full_name='rips.Empty',
|
||||
@ -332,52 +329,52 @@ DESCRIPTOR.message_types_by_name['CellCornersArray'] = _CELLCORNERSARRAY
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
Empty = _reflection.GeneratedProtocolMessageType('Empty', (_message.Message,), dict(
|
||||
DESCRIPTOR = _EMPTY,
|
||||
__module__ = 'Definitions_pb2'
|
||||
DESCRIPTOR=_EMPTY,
|
||||
__module__='Definitions_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.Empty)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(Empty)
|
||||
|
||||
ClientToServerStreamReply = _reflection.GeneratedProtocolMessageType('ClientToServerStreamReply', (_message.Message,), dict(
|
||||
DESCRIPTOR = _CLIENTTOSERVERSTREAMREPLY,
|
||||
__module__ = 'Definitions_pb2'
|
||||
DESCRIPTOR=_CLIENTTOSERVERSTREAMREPLY,
|
||||
__module__='Definitions_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.ClientToServerStreamReply)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(ClientToServerStreamReply)
|
||||
|
||||
Vec3i = _reflection.GeneratedProtocolMessageType('Vec3i', (_message.Message,), dict(
|
||||
DESCRIPTOR = _VEC3I,
|
||||
__module__ = 'Definitions_pb2'
|
||||
DESCRIPTOR=_VEC3I,
|
||||
__module__='Definitions_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.Vec3i)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(Vec3i)
|
||||
|
||||
Vec3d = _reflection.GeneratedProtocolMessageType('Vec3d', (_message.Message,), dict(
|
||||
DESCRIPTOR = _VEC3D,
|
||||
__module__ = 'Definitions_pb2'
|
||||
DESCRIPTOR=_VEC3D,
|
||||
__module__='Definitions_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.Vec3d)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(Vec3d)
|
||||
|
||||
CellCenters = _reflection.GeneratedProtocolMessageType('CellCenters', (_message.Message,), dict(
|
||||
DESCRIPTOR = _CELLCENTERS,
|
||||
__module__ = 'Definitions_pb2'
|
||||
DESCRIPTOR=_CELLCENTERS,
|
||||
__module__='Definitions_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.CellCenters)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(CellCenters)
|
||||
|
||||
CellCorners = _reflection.GeneratedProtocolMessageType('CellCorners', (_message.Message,), dict(
|
||||
DESCRIPTOR = _CELLCORNERS,
|
||||
__module__ = 'Definitions_pb2'
|
||||
DESCRIPTOR=_CELLCORNERS,
|
||||
__module__='Definitions_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.CellCorners)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(CellCorners)
|
||||
|
||||
CellCornersArray = _reflection.GeneratedProtocolMessageType('CellCornersArray', (_message.Message,), dict(
|
||||
DESCRIPTOR = _CELLCORNERSARRAY,
|
||||
__module__ = 'Definitions_pb2'
|
||||
DESCRIPTOR=_CELLCORNERSARRAY,
|
||||
__module__='Definitions_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.CellCornersArray)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(CellCornersArray)
|
||||
|
||||
|
||||
|
@ -1,3 +1,2 @@
|
||||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
||||
import grpc
|
||||
|
||||
|
@ -2,31 +2,27 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: Grid.proto
|
||||
|
||||
import sys
|
||||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
||||
import Case_pb2 as Case__pb2
|
||||
import Definitions_pb2 as Definitions__pb2
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf import reflection as _reflection
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
import sys
|
||||
_b = sys.version_info[0] < 3 and (
|
||||
lambda x: x) or (lambda x: x.encode('latin1'))
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
import Definitions_pb2 as Definitions__pb2
|
||||
import Case_pb2 as Case__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
name='Grid.proto',
|
||||
package='rips',
|
||||
syntax='proto3',
|
||||
serialized_options=None,
|
||||
serialized_pb=_b('\n\nGrid.proto\x12\x04rips\x1a\x11\x44\x65\x66initions.proto\x1a\nCase.proto\"J\n\x0bGridRequest\x12\'\n\x0c\x63\x61se_request\x18\x01 \x01(\x0b\x32\x11.rips.CaseRequest\x12\x12\n\ngrid_index\x18\x02 \x01(\x05\"1\n\x0eGridDimensions\x12\x1f\n\ndimensions\x18\x01 \x01(\x0b\x32\x0b.rips.Vec3i2\xbf\x01\n\x04Grid\x12:\n\x0eGetCellCenters\x12\x11.rips.GridRequest\x1a\x11.rips.CellCenters\"\x00\x30\x01\x12?\n\x0eGetCellCorners\x12\x11.rips.GridRequest\x1a\x16.rips.CellCornersArray\"\x00\x30\x01\x12:\n\rGetDimensions\x12\x11.rips.GridRequest\x1a\x14.rips.GridDimensions\"\x00\x62\x06proto3')
|
||||
,
|
||||
dependencies=[Definitions__pb2.DESCRIPTOR,Case__pb2.DESCRIPTOR,])
|
||||
|
||||
|
||||
serialized_pb=_b('\n\nGrid.proto\x12\x04rips\x1a\x11\x44\x65\x66initions.proto\x1a\nCase.proto\"J\n\x0bGridRequest\x12\'\n\x0c\x63\x61se_request\x18\x01 \x01(\x0b\x32\x11.rips.CaseRequest\x12\x12\n\ngrid_index\x18\x02 \x01(\x05\"1\n\x0eGridDimensions\x12\x1f\n\ndimensions\x18\x01 \x01(\x0b\x32\x0b.rips.Vec3i2\xbf\x01\n\x04Grid\x12:\n\x0eGetCellCenters\x12\x11.rips.GridRequest\x1a\x11.rips.CellCenters\"\x00\x30\x01\x12?\n\x0eGetCellCorners\x12\x11.rips.GridRequest\x1a\x16.rips.CellCornersArray\"\x00\x30\x01\x12:\n\rGetDimensions\x12\x11.rips.GridRequest\x1a\x14.rips.GridDimensions\"\x00\x62\x06proto3'),
|
||||
dependencies=[Definitions__pb2.DESCRIPTOR, Case__pb2.DESCRIPTOR, ])
|
||||
|
||||
|
||||
_GRIDREQUEST = _descriptor.Descriptor(
|
||||
@ -104,21 +100,20 @@ DESCRIPTOR.message_types_by_name['GridDimensions'] = _GRIDDIMENSIONS
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
GridRequest = _reflection.GeneratedProtocolMessageType('GridRequest', (_message.Message,), dict(
|
||||
DESCRIPTOR = _GRIDREQUEST,
|
||||
__module__ = 'Grid_pb2'
|
||||
DESCRIPTOR=_GRIDREQUEST,
|
||||
__module__='Grid_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.GridRequest)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(GridRequest)
|
||||
|
||||
GridDimensions = _reflection.GeneratedProtocolMessageType('GridDimensions', (_message.Message,), dict(
|
||||
DESCRIPTOR = _GRIDDIMENSIONS,
|
||||
__module__ = 'Grid_pb2'
|
||||
DESCRIPTOR=_GRIDDIMENSIONS,
|
||||
__module__='Grid_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.GridDimensions)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(GridDimensions)
|
||||
|
||||
|
||||
|
||||
_GRID = _descriptor.ServiceDescriptor(
|
||||
name='Grid',
|
||||
full_name='rips.Grid',
|
||||
@ -155,7 +150,7 @@ _GRID = _descriptor.ServiceDescriptor(
|
||||
output_type=_GRIDDIMENSIONS,
|
||||
serialized_options=None,
|
||||
),
|
||||
])
|
||||
])
|
||||
_sym_db.RegisterServiceDescriptor(_GRID)
|
||||
|
||||
DESCRIPTOR.services_by_name['Grid'] = _GRID
|
||||
|
@ -2,30 +2,28 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: NNCProperties.proto
|
||||
|
||||
import sys
|
||||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
||||
from google.protobuf.internal import enum_type_wrapper
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
||||
import Definitions_pb2 as Definitions__pb2
|
||||
import Case_pb2 as Case__pb2
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf import reflection as _reflection
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf.internal import enum_type_wrapper
|
||||
import sys
|
||||
_b = sys.version_info[0] < 3 and (
|
||||
lambda x: x) or (lambda x: x.encode('latin1'))
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
import Case_pb2 as Case__pb2
|
||||
import Definitions_pb2 as Definitions__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
name='NNCProperties.proto',
|
||||
package='rips',
|
||||
syntax='proto3',
|
||||
serialized_options=None,
|
||||
serialized_pb=_b('\n\x13NNCProperties.proto\x12\x04rips\x1a\nCase.proto\x1a\x11\x44\x65\x66initions.proto\"R\n\x14\x41vailableNNCProperty\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\rproperty_type\x18\x02 \x01(\x0e\x32\x15.rips.NNCPropertyType\"H\n\x16\x41vailableNNCProperties\x12.\n\nproperties\x18\x01 \x03(\x0b\x32\x1a.rips.AvailableNNCProperty\"{\n\rNNCConnection\x12\x18\n\x10\x63\x65ll_grid_index1\x18\x01 \x01(\x05\x12\x18\n\x10\x63\x65ll_grid_index2\x18\x02 \x01(\x05\x12\x1a\n\x05\x63\x65ll1\x18\x03 \x01(\x0b\x32\x0b.rips.Vec3i\x12\x1a\n\x05\x63\x65ll2\x18\x04 \x01(\x0b\x32\x0b.rips.Vec3i\":\n\x0eNNCConnections\x12(\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32\x13.rips.NNCConnection\"{\n\x10NNCValuesRequest\x12\x0f\n\x07\x63\x61se_id\x18\x01 \x01(\x05\x12\x15\n\rproperty_name\x18\x02 \x01(\t\x12,\n\rproperty_type\x18\x03 \x01(\x0e\x32\x15.rips.NNCPropertyType\x12\x11\n\ttime_step\x18\x04 \x01(\x05\"\x1b\n\tNNCValues\x12\x0e\n\x06values\x18\x01 \x03(\x01\"\x83\x01\n\x15NNCValuesInputRequest\x12\x0f\n\x07\x63\x61se_id\x18\x01 \x01(\x05\x12\x15\n\rproperty_name\x18\x02 \x01(\t\x12/\n\x0eporosity_model\x18\x03 \x01(\x0e\x32\x17.rips.PorosityModelType\x12\x11\n\ttime_step\x18\x04 \x01(\x05\"o\n\x0eNNCValuesChunk\x12-\n\x06params\x18\x01 \x01(\x0b\x32\x1b.rips.NNCValuesInputRequestH\x00\x12!\n\x06values\x18\x02 \x01(\x0b\x32\x0f.rips.NNCValuesH\x00\x42\x0b\n\tChunkType*E\n\x0fNNCPropertyType\x12\x0f\n\x0bNNC_DYNAMIC\x10\x00\x12\x0e\n\nNNC_STATIC\x10\x01\x12\x11\n\rNNC_GENERATED\x10\x02\x32\xa9\x02\n\rNNCProperties\x12N\n\x19GetAvailableNNCProperties\x12\x11.rips.CaseRequest\x1a\x1c.rips.AvailableNNCProperties\"\x00\x12@\n\x11GetNNCConnections\x12\x11.rips.CaseRequest\x1a\x14.rips.NNCConnections\"\x00\x30\x01\x12;\n\x0cGetNNCValues\x12\x16.rips.NNCValuesRequest\x1a\x0f.rips.NNCValues\"\x00\x30\x01\x12I\n\x0cSetNNCValues\x12\x14.rips.NNCValuesChunk\x1a\x1f.rips.ClientToServerStreamReply\"\x00(\x01\x62\x06proto3')
|
||||
,
|
||||
dependencies=[Case__pb2.DESCRIPTOR,Definitions__pb2.DESCRIPTOR,])
|
||||
serialized_pb=_b('\n\x13NNCProperties.proto\x12\x04rips\x1a\nCase.proto\x1a\x11\x44\x65\x66initions.proto\"R\n\x14\x41vailableNNCProperty\x12\x0c\n\x04name\x18\x01 \x01(\t\x12,\n\rproperty_type\x18\x02 \x01(\x0e\x32\x15.rips.NNCPropertyType\"H\n\x16\x41vailableNNCProperties\x12.\n\nproperties\x18\x01 \x03(\x0b\x32\x1a.rips.AvailableNNCProperty\"{\n\rNNCConnection\x12\x18\n\x10\x63\x65ll_grid_index1\x18\x01 \x01(\x05\x12\x18\n\x10\x63\x65ll_grid_index2\x18\x02 \x01(\x05\x12\x1a\n\x05\x63\x65ll1\x18\x03 \x01(\x0b\x32\x0b.rips.Vec3i\x12\x1a\n\x05\x63\x65ll2\x18\x04 \x01(\x0b\x32\x0b.rips.Vec3i\":\n\x0eNNCConnections\x12(\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32\x13.rips.NNCConnection\"{\n\x10NNCValuesRequest\x12\x0f\n\x07\x63\x61se_id\x18\x01 \x01(\x05\x12\x15\n\rproperty_name\x18\x02 \x01(\t\x12,\n\rproperty_type\x18\x03 \x01(\x0e\x32\x15.rips.NNCPropertyType\x12\x11\n\ttime_step\x18\x04 \x01(\x05\"\x1b\n\tNNCValues\x12\x0e\n\x06values\x18\x01 \x03(\x01\"\x83\x01\n\x15NNCValuesInputRequest\x12\x0f\n\x07\x63\x61se_id\x18\x01 \x01(\x05\x12\x15\n\rproperty_name\x18\x02 \x01(\t\x12/\n\x0eporosity_model\x18\x03 \x01(\x0e\x32\x17.rips.PorosityModelType\x12\x11\n\ttime_step\x18\x04 \x01(\x05\"o\n\x0eNNCValuesChunk\x12-\n\x06params\x18\x01 \x01(\x0b\x32\x1b.rips.NNCValuesInputRequestH\x00\x12!\n\x06values\x18\x02 \x01(\x0b\x32\x0f.rips.NNCValuesH\x00\x42\x0b\n\tChunkType*E\n\x0fNNCPropertyType\x12\x0f\n\x0bNNC_DYNAMIC\x10\x00\x12\x0e\n\nNNC_STATIC\x10\x01\x12\x11\n\rNNC_GENERATED\x10\x02\x32\xa9\x02\n\rNNCProperties\x12N\n\x19GetAvailableNNCProperties\x12\x11.rips.CaseRequest\x1a\x1c.rips.AvailableNNCProperties\"\x00\x12@\n\x11GetNNCConnections\x12\x11.rips.CaseRequest\x1a\x14.rips.NNCConnections\"\x00\x30\x01\x12;\n\x0cGetNNCValues\x12\x16.rips.NNCValuesRequest\x1a\x0f.rips.NNCValues\"\x00\x30\x01\x12I\n\x0cSetNNCValues\x12\x14.rips.NNCValuesChunk\x1a\x1f.rips.ClientToServerStreamReply\"\x00(\x01\x62\x06proto3'),
|
||||
dependencies=[Case__pb2.DESCRIPTOR, Definitions__pb2.DESCRIPTOR, ])
|
||||
|
||||
_NNCPROPERTYTYPE = _descriptor.EnumDescriptor(
|
||||
name='NNCPropertyType',
|
||||
@ -59,7 +57,6 @@ NNC_STATIC = 1
|
||||
NNC_GENERATED = 2
|
||||
|
||||
|
||||
|
||||
_AVAILABLENNCPROPERTY = _descriptor.Descriptor(
|
||||
name='AvailableNNCProperty',
|
||||
full_name='rips.AvailableNNCProperty',
|
||||
@ -414,63 +411,62 @@ DESCRIPTOR.enum_types_by_name['NNCPropertyType'] = _NNCPROPERTYTYPE
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
AvailableNNCProperty = _reflection.GeneratedProtocolMessageType('AvailableNNCProperty', (_message.Message,), dict(
|
||||
DESCRIPTOR = _AVAILABLENNCPROPERTY,
|
||||
__module__ = 'NNCProperties_pb2'
|
||||
DESCRIPTOR=_AVAILABLENNCPROPERTY,
|
||||
__module__='NNCProperties_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.AvailableNNCProperty)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(AvailableNNCProperty)
|
||||
|
||||
AvailableNNCProperties = _reflection.GeneratedProtocolMessageType('AvailableNNCProperties', (_message.Message,), dict(
|
||||
DESCRIPTOR = _AVAILABLENNCPROPERTIES,
|
||||
__module__ = 'NNCProperties_pb2'
|
||||
DESCRIPTOR=_AVAILABLENNCPROPERTIES,
|
||||
__module__='NNCProperties_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.AvailableNNCProperties)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(AvailableNNCProperties)
|
||||
|
||||
NNCConnection = _reflection.GeneratedProtocolMessageType('NNCConnection', (_message.Message,), dict(
|
||||
DESCRIPTOR = _NNCCONNECTION,
|
||||
__module__ = 'NNCProperties_pb2'
|
||||
DESCRIPTOR=_NNCCONNECTION,
|
||||
__module__='NNCProperties_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.NNCConnection)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(NNCConnection)
|
||||
|
||||
NNCConnections = _reflection.GeneratedProtocolMessageType('NNCConnections', (_message.Message,), dict(
|
||||
DESCRIPTOR = _NNCCONNECTIONS,
|
||||
__module__ = 'NNCProperties_pb2'
|
||||
DESCRIPTOR=_NNCCONNECTIONS,
|
||||
__module__='NNCProperties_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.NNCConnections)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(NNCConnections)
|
||||
|
||||
NNCValuesRequest = _reflection.GeneratedProtocolMessageType('NNCValuesRequest', (_message.Message,), dict(
|
||||
DESCRIPTOR = _NNCVALUESREQUEST,
|
||||
__module__ = 'NNCProperties_pb2'
|
||||
DESCRIPTOR=_NNCVALUESREQUEST,
|
||||
__module__='NNCProperties_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.NNCValuesRequest)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(NNCValuesRequest)
|
||||
|
||||
NNCValues = _reflection.GeneratedProtocolMessageType('NNCValues', (_message.Message,), dict(
|
||||
DESCRIPTOR = _NNCVALUES,
|
||||
__module__ = 'NNCProperties_pb2'
|
||||
DESCRIPTOR=_NNCVALUES,
|
||||
__module__='NNCProperties_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.NNCValues)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(NNCValues)
|
||||
|
||||
NNCValuesInputRequest = _reflection.GeneratedProtocolMessageType('NNCValuesInputRequest', (_message.Message,), dict(
|
||||
DESCRIPTOR = _NNCVALUESINPUTREQUEST,
|
||||
__module__ = 'NNCProperties_pb2'
|
||||
DESCRIPTOR=_NNCVALUESINPUTREQUEST,
|
||||
__module__='NNCProperties_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.NNCValuesInputRequest)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(NNCValuesInputRequest)
|
||||
|
||||
NNCValuesChunk = _reflection.GeneratedProtocolMessageType('NNCValuesChunk', (_message.Message,), dict(
|
||||
DESCRIPTOR = _NNCVALUESCHUNK,
|
||||
__module__ = 'NNCProperties_pb2'
|
||||
DESCRIPTOR=_NNCVALUESCHUNK,
|
||||
__module__='NNCProperties_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.NNCValuesChunk)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(NNCValuesChunk)
|
||||
|
||||
|
||||
|
||||
_NNCPROPERTIES = _descriptor.ServiceDescriptor(
|
||||
name='NNCProperties',
|
||||
full_name='rips.NNCProperties',
|
||||
@ -516,7 +512,7 @@ _NNCPROPERTIES = _descriptor.ServiceDescriptor(
|
||||
output_type=Definitions__pb2._CLIENTTOSERVERSTREAMREPLY,
|
||||
serialized_options=None,
|
||||
),
|
||||
])
|
||||
])
|
||||
_sym_db.RegisterServiceDescriptor(_NNCPROPERTIES)
|
||||
|
||||
DESCRIPTOR.services_by_name['NNCProperties'] = _NNCPROPERTIES
|
||||
|
@ -2,30 +2,27 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: PdmObject.proto
|
||||
|
||||
import sys
|
||||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
||||
import Definitions_pb2 as Definitions__pb2
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf import reflection as _reflection
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
import sys
|
||||
_b = sys.version_info[0] < 3 and (
|
||||
lambda x: x) or (lambda x: x.encode('latin1'))
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
import Definitions_pb2 as Definitions__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
name='PdmObject.proto',
|
||||
package='rips',
|
||||
syntax='proto3',
|
||||
serialized_options=None,
|
||||
serialized_pb=_b('\n\x0fPdmObject.proto\x12\x04rips\x1a\x11\x44\x65\x66initions.proto\"T\n\x1aPdmDescendantObjectRequest\x12\x1f\n\x06object\x18\x01 \x01(\x0b\x32\x0f.rips.PdmObject\x12\x15\n\rchild_keyword\x18\x02 \x01(\t\"M\n\x15PdmChildObjectRequest\x12\x1f\n\x06object\x18\x01 \x01(\x0b\x32\x0f.rips.PdmObject\x12\x13\n\x0b\x63hild_field\x18\x02 \x01(\t\"S\n\x1b\x43reatePdmChildObjectRequest\x12\x1f\n\x06object\x18\x01 \x01(\x0b\x32\x0f.rips.PdmObject\x12\x13\n\x0b\x63hild_field\x18\x02 \x01(\t\"Q\n\x16PdmParentObjectRequest\x12\x1f\n\x06object\x18\x01 \x01(\x0b\x32\x0f.rips.PdmObject\x12\x16\n\x0eparent_keyword\x18\x02 \x01(\t\"\xc0\x01\n\tPdmObject\x12\x15\n\rclass_keyword\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\x04\x12\x33\n\nparameters\x18\x03 \x03(\x0b\x32\x1f.rips.PdmObject.ParametersEntry\x12\x0f\n\x07visible\x18\x04 \x01(\x08\x12\x12\n\npersistent\x18\x05 \x01(\x08\x1a\x31\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"2\n\x0ePdmObjectArray\x12 \n\x07objects\x18\x01 \x03(\x0b\x32\x0f.rips.PdmObject\"I\n\x16PdmObjectGetterRequest\x12\x1f\n\x06object\x18\x01 \x01(\x0b\x32\x0f.rips.PdmObject\x12\x0e\n\x06method\x18\x02 \x01(\t\"[\n\x16PdmObjectSetterRequest\x12-\n\x07request\x18\x01 \x01(\x0b\x32\x1c.rips.PdmObjectGetterRequest\x12\x12\n\ndata_count\x18\x02 \x01(\x05\"\xbf\x01\n\x14PdmObjectSetterChunk\x12\x33\n\x0bset_request\x18\x01 \x01(\x0b\x32\x1c.rips.PdmObjectSetterRequestH\x00\x12$\n\x07\x64oubles\x18\x02 \x01(\x0b\x32\x11.rips.DoubleArrayH\x00\x12\x1e\n\x04ints\x18\x03 \x01(\x0b\x32\x0e.rips.IntArrayH\x00\x12$\n\x07strings\x18\x04 \x01(\x0b\x32\x11.rips.StringArrayH\x00\x42\x06\n\x04\x64\x61ta\"\x1b\n\x0b\x44oubleArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x01\"\x18\n\x08IntArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x05\"\x1b\n\x0bStringArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\t\"\x8a\x01\n\x14PdmObjectGetterReply\x12$\n\x07\x64oubles\x18\x01 \x01(\x0b\x32\x11.rips.DoubleArrayH\x00\x12\x1e\n\x04ints\x18\x02 \x01(\x0b\x32\x0e.rips.IntArrayH\x00\x12$\n\x07strings\x18\x03 \x01(\x0b\x32\x11.rips.StringArrayH\x00\x42\x06\n\x04\x64\x61ta\"j\n\x16PdmObjectMethodRequest\x12\x1f\n\x06object\x18\x01 \x01(\x0b\x32\x0f.rips.PdmObject\x12\x0e\n\x06method\x18\x02 \x01(\t\x12\x1f\n\x06params\x18\x03 \x01(\x0b\x32\x0f.rips.PdmObject2\xf9\x04\n\x10PdmObjectService\x12S\n\x17GetDescendantPdmObjects\x12 .rips.PdmDescendantObjectRequest\x1a\x14.rips.PdmObjectArray\"\x00\x12I\n\x12GetChildPdmObjects\x12\x1b.rips.PdmChildObjectRequest\x1a\x14.rips.PdmObjectArray\"\x00\x12G\n\x14GetAncestorPdmObject\x12\x1c.rips.PdmParentObjectRequest\x1a\x0f.rips.PdmObject\"\x00\x12L\n\x14\x43reateChildPdmObject\x12!.rips.CreatePdmChildObjectRequest\x1a\x0f.rips.PdmObject\"\x00\x12\x39\n\x17UpdateExistingPdmObject\x12\x0f.rips.PdmObject\x1a\x0b.rips.Empty\"\x00\x12S\n\x13\x43\x61llPdmObjectGetter\x12\x1c.rips.PdmObjectGetterRequest\x1a\x1a.rips.PdmObjectGetterReply\"\x00\x30\x01\x12V\n\x13\x43\x61llPdmObjectSetter\x12\x1a.rips.PdmObjectSetterChunk\x1a\x1f.rips.ClientToServerStreamReply\"\x00(\x01\x12\x46\n\x13\x43\x61llPdmObjectMethod\x12\x1c.rips.PdmObjectMethodRequest\x1a\x0f.rips.PdmObject\"\x00\x62\x06proto3')
|
||||
,
|
||||
dependencies=[Definitions__pb2.DESCRIPTOR,])
|
||||
|
||||
|
||||
serialized_pb=_b(
|
||||
'\n\x0fPdmObject.proto\x12\x04rips\x1a\x11\x44\x65\x66initions.proto\"T\n\x1aPdmDescendantObjectRequest\x12\x1f\n\x06object\x18\x01 \x01(\x0b\x32\x0f.rips.PdmObject\x12\x15\n\rchild_keyword\x18\x02 \x01(\t\"M\n\x15PdmChildObjectRequest\x12\x1f\n\x06object\x18\x01 \x01(\x0b\x32\x0f.rips.PdmObject\x12\x13\n\x0b\x63hild_field\x18\x02 \x01(\t\"S\n\x1b\x43reatePdmChildObjectRequest\x12\x1f\n\x06object\x18\x01 \x01(\x0b\x32\x0f.rips.PdmObject\x12\x13\n\x0b\x63hild_field\x18\x02 \x01(\t\"Q\n\x16PdmParentObjectRequest\x12\x1f\n\x06object\x18\x01 \x01(\x0b\x32\x0f.rips.PdmObject\x12\x16\n\x0eparent_keyword\x18\x02 \x01(\t\"\xc0\x01\n\tPdmObject\x12\x15\n\rclass_keyword\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\x04\x12\x33\n\nparameters\x18\x03 \x03(\x0b\x32\x1f.rips.PdmObject.ParametersEntry\x12\x0f\n\x07visible\x18\x04 \x01(\x08\x12\x12\n\npersistent\x18\x05 \x01(\x08\x1a\x31\n\x0fParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"2\n\x0ePdmObjectArray\x12 \n\x07objects\x18\x01 \x03(\x0b\x32\x0f.rips.PdmObject\"I\n\x16PdmObjectGetterRequest\x12\x1f\n\x06object\x18\x01 \x01(\x0b\x32\x0f.rips.PdmObject\x12\x0e\n\x06method\x18\x02 \x01(\t\"[\n\x16PdmObjectSetterRequest\x12-\n\x07request\x18\x01 \x01(\x0b\x32\x1c.rips.PdmObjectGetterRequest\x12\x12\n\ndata_count\x18\x02 \x01(\x05\"\xbf\x01\n\x14PdmObjectSetterChunk\x12\x33\n\x0bset_request\x18\x01 \x01(\x0b\x32\x1c.rips.PdmObjectSetterRequestH\x00\x12$\n\x07\x64oubles\x18\x02 \x01(\x0b\x32\x11.rips.DoubleArrayH\x00\x12\x1e\n\x04ints\x18\x03 \x01(\x0b\x32\x0e.rips.IntArrayH\x00\x12$\n\x07strings\x18\x04 \x01(\x0b\x32\x11.rips.StringArrayH\x00\x42\x06\n\x04\x64\x61ta\"\x1b\n\x0b\x44oubleArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x01\"\x18\n\x08IntArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\x05\"\x1b\n\x0bStringArray\x12\x0c\n\x04\x64\x61ta\x18\x01 \x03(\t\"\x8a\x01\n\x14PdmObjectGetterReply\x12$\n\x07\x64oubles\x18\x01 \x01(\x0b\x32\x11.rips.DoubleArrayH\x00\x12\x1e\n\x04ints\x18\x02 \x01(\x0b\x32\x0e.rips.IntArrayH\x00\x12$\n\x07strings\x18\x03 \x01(\x0b\x32\x11.rips.StringArrayH\x00\x42\x06\n\x04\x64\x61ta\"j\n\x16PdmObjectMethodRequest\x12\x1f\n\x06object\x18\x01 \x01(\x0b\x32\x0f.rips.PdmObject\x12\x0e\n\x06method\x18\x02 \x01(\t\x12\x1f\n\x06params\x18\x03 \x01(\x0b\x32\x0f.rips.PdmObject2\xf9\x04\n\x10PdmObjectService\x12S\n\x17GetDescendantPdmObjects\x12 .rips.PdmDescendantObjectRequest\x1a\x14.rips.PdmObjectArray\"\x00\x12I\n\x12GetChildPdmObjects\x12\x1b.rips.PdmChildObjectRequest\x1a\x14.rips.PdmObjectArray\"\x00\x12G\n\x14GetAncestorPdmObject\x12\x1c.rips.PdmParentObjectRequest\x1a\x0f.rips.PdmObject\"\x00\x12L\n\x14\x43reateChildPdmObject\x12!.rips.CreatePdmChildObjectRequest\x1a\x0f.rips.PdmObject\"\x00\x12\x39\n\x17UpdateExistingPdmObject\x12\x0f.rips.PdmObject\x1a\x0b.rips.Empty\"\x00\x12S\n\x13\x43\x61llPdmObjectGetter\x12\x1c.rips.PdmObjectGetterRequest\x1a\x1a.rips.PdmObjectGetterReply\"\x00\x30\x01\x12V\n\x13\x43\x61llPdmObjectSetter\x12\x1a.rips.PdmObjectSetterChunk\x1a\x1f.rips.ClientToServerStreamReply\"\x00(\x01\x12\x46\n\x13\x43\x61llPdmObjectMethod\x12\x1c.rips.PdmObjectMethodRequest\x1a\x0f.rips.PdmObject\"\x00\x62\x06proto3'),
|
||||
dependencies=[Definitions__pb2.DESCRIPTOR, ])
|
||||
|
||||
|
||||
_PDMDESCENDANTOBJECTREQUEST = _descriptor.Descriptor(
|
||||
@ -679,109 +676,108 @@ DESCRIPTOR.message_types_by_name['PdmObjectMethodRequest'] = _PDMOBJECTMETHODREQ
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
PdmDescendantObjectRequest = _reflection.GeneratedProtocolMessageType('PdmDescendantObjectRequest', (_message.Message,), dict(
|
||||
DESCRIPTOR = _PDMDESCENDANTOBJECTREQUEST,
|
||||
__module__ = 'PdmObject_pb2'
|
||||
DESCRIPTOR=_PDMDESCENDANTOBJECTREQUEST,
|
||||
__module__='PdmObject_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.PdmDescendantObjectRequest)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(PdmDescendantObjectRequest)
|
||||
|
||||
PdmChildObjectRequest = _reflection.GeneratedProtocolMessageType('PdmChildObjectRequest', (_message.Message,), dict(
|
||||
DESCRIPTOR = _PDMCHILDOBJECTREQUEST,
|
||||
__module__ = 'PdmObject_pb2'
|
||||
DESCRIPTOR=_PDMCHILDOBJECTREQUEST,
|
||||
__module__='PdmObject_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.PdmChildObjectRequest)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(PdmChildObjectRequest)
|
||||
|
||||
CreatePdmChildObjectRequest = _reflection.GeneratedProtocolMessageType('CreatePdmChildObjectRequest', (_message.Message,), dict(
|
||||
DESCRIPTOR = _CREATEPDMCHILDOBJECTREQUEST,
|
||||
__module__ = 'PdmObject_pb2'
|
||||
DESCRIPTOR=_CREATEPDMCHILDOBJECTREQUEST,
|
||||
__module__='PdmObject_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.CreatePdmChildObjectRequest)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(CreatePdmChildObjectRequest)
|
||||
|
||||
PdmParentObjectRequest = _reflection.GeneratedProtocolMessageType('PdmParentObjectRequest', (_message.Message,), dict(
|
||||
DESCRIPTOR = _PDMPARENTOBJECTREQUEST,
|
||||
__module__ = 'PdmObject_pb2'
|
||||
DESCRIPTOR=_PDMPARENTOBJECTREQUEST,
|
||||
__module__='PdmObject_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.PdmParentObjectRequest)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(PdmParentObjectRequest)
|
||||
|
||||
PdmObject = _reflection.GeneratedProtocolMessageType('PdmObject', (_message.Message,), dict(
|
||||
|
||||
ParametersEntry = _reflection.GeneratedProtocolMessageType('ParametersEntry', (_message.Message,), dict(
|
||||
DESCRIPTOR = _PDMOBJECT_PARAMETERSENTRY,
|
||||
__module__ = 'PdmObject_pb2'
|
||||
ParametersEntry=_reflection.GeneratedProtocolMessageType('ParametersEntry', (_message.Message,), dict(
|
||||
DESCRIPTOR=_PDMOBJECT_PARAMETERSENTRY,
|
||||
__module__='PdmObject_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.PdmObject.ParametersEntry)
|
||||
))
|
||||
,
|
||||
DESCRIPTOR = _PDMOBJECT,
|
||||
__module__ = 'PdmObject_pb2'
|
||||
)),
|
||||
DESCRIPTOR=_PDMOBJECT,
|
||||
__module__='PdmObject_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.PdmObject)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(PdmObject)
|
||||
_sym_db.RegisterMessage(PdmObject.ParametersEntry)
|
||||
|
||||
PdmObjectArray = _reflection.GeneratedProtocolMessageType('PdmObjectArray', (_message.Message,), dict(
|
||||
DESCRIPTOR = _PDMOBJECTARRAY,
|
||||
__module__ = 'PdmObject_pb2'
|
||||
DESCRIPTOR=_PDMOBJECTARRAY,
|
||||
__module__='PdmObject_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.PdmObjectArray)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(PdmObjectArray)
|
||||
|
||||
PdmObjectGetterRequest = _reflection.GeneratedProtocolMessageType('PdmObjectGetterRequest', (_message.Message,), dict(
|
||||
DESCRIPTOR = _PDMOBJECTGETTERREQUEST,
|
||||
__module__ = 'PdmObject_pb2'
|
||||
DESCRIPTOR=_PDMOBJECTGETTERREQUEST,
|
||||
__module__='PdmObject_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.PdmObjectGetterRequest)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(PdmObjectGetterRequest)
|
||||
|
||||
PdmObjectSetterRequest = _reflection.GeneratedProtocolMessageType('PdmObjectSetterRequest', (_message.Message,), dict(
|
||||
DESCRIPTOR = _PDMOBJECTSETTERREQUEST,
|
||||
__module__ = 'PdmObject_pb2'
|
||||
DESCRIPTOR=_PDMOBJECTSETTERREQUEST,
|
||||
__module__='PdmObject_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.PdmObjectSetterRequest)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(PdmObjectSetterRequest)
|
||||
|
||||
PdmObjectSetterChunk = _reflection.GeneratedProtocolMessageType('PdmObjectSetterChunk', (_message.Message,), dict(
|
||||
DESCRIPTOR = _PDMOBJECTSETTERCHUNK,
|
||||
__module__ = 'PdmObject_pb2'
|
||||
DESCRIPTOR=_PDMOBJECTSETTERCHUNK,
|
||||
__module__='PdmObject_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.PdmObjectSetterChunk)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(PdmObjectSetterChunk)
|
||||
|
||||
DoubleArray = _reflection.GeneratedProtocolMessageType('DoubleArray', (_message.Message,), dict(
|
||||
DESCRIPTOR = _DOUBLEARRAY,
|
||||
__module__ = 'PdmObject_pb2'
|
||||
DESCRIPTOR=_DOUBLEARRAY,
|
||||
__module__='PdmObject_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.DoubleArray)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(DoubleArray)
|
||||
|
||||
IntArray = _reflection.GeneratedProtocolMessageType('IntArray', (_message.Message,), dict(
|
||||
DESCRIPTOR = _INTARRAY,
|
||||
__module__ = 'PdmObject_pb2'
|
||||
DESCRIPTOR=_INTARRAY,
|
||||
__module__='PdmObject_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.IntArray)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(IntArray)
|
||||
|
||||
StringArray = _reflection.GeneratedProtocolMessageType('StringArray', (_message.Message,), dict(
|
||||
DESCRIPTOR = _STRINGARRAY,
|
||||
__module__ = 'PdmObject_pb2'
|
||||
DESCRIPTOR=_STRINGARRAY,
|
||||
__module__='PdmObject_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.StringArray)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(StringArray)
|
||||
|
||||
PdmObjectGetterReply = _reflection.GeneratedProtocolMessageType('PdmObjectGetterReply', (_message.Message,), dict(
|
||||
DESCRIPTOR = _PDMOBJECTGETTERREPLY,
|
||||
__module__ = 'PdmObject_pb2'
|
||||
DESCRIPTOR=_PDMOBJECTGETTERREPLY,
|
||||
__module__='PdmObject_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.PdmObjectGetterReply)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(PdmObjectGetterReply)
|
||||
|
||||
PdmObjectMethodRequest = _reflection.GeneratedProtocolMessageType('PdmObjectMethodRequest', (_message.Message,), dict(
|
||||
DESCRIPTOR = _PDMOBJECTMETHODREQUEST,
|
||||
__module__ = 'PdmObject_pb2'
|
||||
DESCRIPTOR=_PDMOBJECTMETHODREQUEST,
|
||||
__module__='PdmObject_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.PdmObjectMethodRequest)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(PdmObjectMethodRequest)
|
||||
|
||||
|
||||
@ -868,7 +864,7 @@ _PDMOBJECTSERVICE = _descriptor.ServiceDescriptor(
|
||||
output_type=_PDMOBJECT,
|
||||
serialized_options=None,
|
||||
),
|
||||
])
|
||||
])
|
||||
_sym_db.RegisterServiceDescriptor(_PDMOBJECTSERVICE)
|
||||
|
||||
DESCRIPTOR.services_by_name['PdmObjectService'] = _PDMOBJECTSERVICE
|
||||
|
@ -2,37 +2,33 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: Project.proto
|
||||
|
||||
import sys
|
||||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
||||
import PdmObject_pb2 as PdmObject__pb2
|
||||
import Case_pb2 as Case__pb2
|
||||
import Definitions_pb2 as Definitions__pb2
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf import reflection as _reflection
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
import sys
|
||||
_b = sys.version_info[0] < 3 and (
|
||||
lambda x: x) or (lambda x: x.encode('latin1'))
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
import Definitions_pb2 as Definitions__pb2
|
||||
import Case_pb2 as Case__pb2
|
||||
import PdmObject_pb2 as PdmObject__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
name='Project.proto',
|
||||
package='rips',
|
||||
syntax='proto3',
|
||||
serialized_options=None,
|
||||
serialized_pb=_b('\n\rProject.proto\x12\x04rips\x1a\x11\x44\x65\x66initions.proto\x1a\nCase.proto\x1a\x0fPdmObject.proto2\xc8\x02\n\x07Project\x12\x32\n\x0eGetCurrentCase\x12\x0b.rips.Empty\x1a\x11.rips.CaseRequest\"\x00\x12\x36\n\x10GetSelectedCases\x12\x0b.rips.Empty\x1a\x13.rips.CaseInfoArray\"\x00\x12\x33\n\x10GetAllCaseGroups\x12\x0b.rips.Empty\x1a\x10.rips.CaseGroups\"\x00\x12\x31\n\x0bGetAllCases\x12\x0b.rips.Empty\x1a\x13.rips.CaseInfoArray\"\x00\x12\x39\n\x0fGetCasesInGroup\x12\x0f.rips.CaseGroup\x1a\x13.rips.CaseInfoArray\"\x00\x12.\n\x0cGetPdmObject\x12\x0b.rips.Empty\x1a\x0f.rips.PdmObject\"\x00\x62\x06proto3')
|
||||
,
|
||||
dependencies=[Definitions__pb2.DESCRIPTOR,Case__pb2.DESCRIPTOR,PdmObject__pb2.DESCRIPTOR,])
|
||||
|
||||
serialized_pb=_b('\n\rProject.proto\x12\x04rips\x1a\x11\x44\x65\x66initions.proto\x1a\nCase.proto\x1a\x0fPdmObject.proto2\xc8\x02\n\x07Project\x12\x32\n\x0eGetCurrentCase\x12\x0b.rips.Empty\x1a\x11.rips.CaseRequest\"\x00\x12\x36\n\x10GetSelectedCases\x12\x0b.rips.Empty\x1a\x13.rips.CaseInfoArray\"\x00\x12\x33\n\x10GetAllCaseGroups\x12\x0b.rips.Empty\x1a\x10.rips.CaseGroups\"\x00\x12\x31\n\x0bGetAllCases\x12\x0b.rips.Empty\x1a\x13.rips.CaseInfoArray\"\x00\x12\x39\n\x0fGetCasesInGroup\x12\x0f.rips.CaseGroup\x1a\x13.rips.CaseInfoArray\"\x00\x12.\n\x0cGetPdmObject\x12\x0b.rips.Empty\x1a\x0f.rips.PdmObject\"\x00\x62\x06proto3'),
|
||||
dependencies=[Definitions__pb2.DESCRIPTOR, Case__pb2.DESCRIPTOR, PdmObject__pb2.DESCRIPTOR, ])
|
||||
|
||||
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
|
||||
|
||||
_PROJECT = _descriptor.ServiceDescriptor(
|
||||
name='Project',
|
||||
full_name='rips.Project',
|
||||
@ -96,7 +92,7 @@ _PROJECT = _descriptor.ServiceDescriptor(
|
||||
output_type=PdmObject__pb2._PDMOBJECT,
|
||||
serialized_options=None,
|
||||
),
|
||||
])
|
||||
])
|
||||
_sym_db.RegisterServiceDescriptor(_PROJECT)
|
||||
|
||||
DESCRIPTOR.services_by_name['Project'] = _PROJECT
|
||||
|
@ -2,30 +2,28 @@
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: Properties.proto
|
||||
|
||||
import sys
|
||||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
||||
from google.protobuf.internal import enum_type_wrapper
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
||||
import Case_pb2 as Case__pb2
|
||||
import Definitions_pb2 as Definitions__pb2
|
||||
from google.protobuf import symbol_database as _symbol_database
|
||||
from google.protobuf import reflection as _reflection
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf.internal import enum_type_wrapper
|
||||
import sys
|
||||
_b = sys.version_info[0] < 3 and (
|
||||
lambda x: x) or (lambda x: x.encode('latin1'))
|
||||
# @@protoc_insertion_point(imports)
|
||||
|
||||
_sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
import Definitions_pb2 as Definitions__pb2
|
||||
import Case_pb2 as Case__pb2
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
name='Properties.proto',
|
||||
package='rips',
|
||||
syntax='proto3',
|
||||
serialized_options=None,
|
||||
serialized_pb=_b('\n\x10Properties.proto\x12\x04rips\x1a\x11\x44\x65\x66initions.proto\x1a\nCase.proto\"\xa1\x01\n\x1a\x41vailablePropertiesRequest\x12\'\n\x0c\x63\x61se_request\x18\x01 \x01(\x0b\x32\x11.rips.CaseRequest\x12)\n\rproperty_type\x18\x02 \x01(\x0e\x32\x12.rips.PropertyType\x12/\n\x0eporosity_model\x18\x03 \x01(\x0e\x32\x17.rips.PorosityModelType\"-\n\x13\x41vailableProperties\x12\x16\n\x0eproperty_names\x18\x01 \x03(\t\"\xd4\x01\n\x0fPropertyRequest\x12\'\n\x0c\x63\x61se_request\x18\x01 \x01(\x0b\x32\x11.rips.CaseRequest\x12)\n\rproperty_type\x18\x02 \x01(\x0e\x32\x12.rips.PropertyType\x12\x15\n\rproperty_name\x18\x03 \x01(\t\x12\x11\n\ttime_step\x18\x04 \x01(\x05\x12\x12\n\ngrid_index\x18\x05 \x01(\x05\x12/\n\x0eporosity_model\x18\x06 \x01(\x0e\x32\x17.rips.PorosityModelType\"\x19\n\x08TimeStep\x12\r\n\x05index\x18\x01 \x01(\x05\"q\n\x12PropertyInputChunk\x12\'\n\x06params\x18\x01 \x01(\x0b\x32\x15.rips.PropertyRequestH\x00\x12%\n\x06values\x18\x02 \x01(\x0b\x32\x13.rips.PropertyChunkH\x00\x42\x0b\n\tChunkType\"\x1f\n\rPropertyChunk\x12\x0e\n\x06values\x18\x01 \x03(\x01*\xc7\x01\n\x0cPropertyType\x12\x12\n\x0e\x44YNAMIC_NATIVE\x10\x00\x12\x11\n\rSTATIC_NATIVE\x10\x01\x12\r\n\tSOURSIMRL\x10\x02\x12\r\n\tGENERATED\x10\x03\x12\x12\n\x0eINPUT_PROPERTY\x10\x04\x12\x13\n\x0f\x46ORMATION_NAMES\x10\x05\x12\x14\n\x10\x46LOW_DIAGNOSTICS\x10\x06\x12\x16\n\x12INJECTION_FLOODING\x10\x07\x12\x0b\n\x07REMOVED\x10\x08\x12\x0e\n\tUNDEFINED\x10\xe7\x07\x32\xe6\x03\n\nProperties\x12W\n\x16GetAvailableProperties\x12 .rips.AvailablePropertiesRequest\x1a\x19.rips.AvailableProperties\"\x00\x12G\n\x15GetActiveCellProperty\x12\x15.rips.PropertyRequest\x1a\x13.rips.PropertyChunk\"\x00\x30\x01\x12I\n\x17GetSelectedCellProperty\x12\x15.rips.PropertyRequest\x1a\x13.rips.PropertyChunk\"\x00\x30\x01\x12\x41\n\x0fGetGridProperty\x12\x15.rips.PropertyRequest\x1a\x13.rips.PropertyChunk\"\x00\x30\x01\x12V\n\x15SetActiveCellProperty\x12\x18.rips.PropertyInputChunk\x1a\x1f.rips.ClientToServerStreamReply\"\x00(\x01\x12P\n\x0fSetGridProperty\x12\x18.rips.PropertyInputChunk\x1a\x1f.rips.ClientToServerStreamReply\"\x00(\x01\x62\x06proto3')
|
||||
,
|
||||
dependencies=[Definitions__pb2.DESCRIPTOR,Case__pb2.DESCRIPTOR,])
|
||||
serialized_pb=_b('\n\x10Properties.proto\x12\x04rips\x1a\x11\x44\x65\x66initions.proto\x1a\nCase.proto\"\xa1\x01\n\x1a\x41vailablePropertiesRequest\x12\'\n\x0c\x63\x61se_request\x18\x01 \x01(\x0b\x32\x11.rips.CaseRequest\x12)\n\rproperty_type\x18\x02 \x01(\x0e\x32\x12.rips.PropertyType\x12/\n\x0eporosity_model\x18\x03 \x01(\x0e\x32\x17.rips.PorosityModelType\"-\n\x13\x41vailableProperties\x12\x16\n\x0eproperty_names\x18\x01 \x03(\t\"\xd4\x01\n\x0fPropertyRequest\x12\'\n\x0c\x63\x61se_request\x18\x01 \x01(\x0b\x32\x11.rips.CaseRequest\x12)\n\rproperty_type\x18\x02 \x01(\x0e\x32\x12.rips.PropertyType\x12\x15\n\rproperty_name\x18\x03 \x01(\t\x12\x11\n\ttime_step\x18\x04 \x01(\x05\x12\x12\n\ngrid_index\x18\x05 \x01(\x05\x12/\n\x0eporosity_model\x18\x06 \x01(\x0e\x32\x17.rips.PorosityModelType\"\x19\n\x08TimeStep\x12\r\n\x05index\x18\x01 \x01(\x05\"q\n\x12PropertyInputChunk\x12\'\n\x06params\x18\x01 \x01(\x0b\x32\x15.rips.PropertyRequestH\x00\x12%\n\x06values\x18\x02 \x01(\x0b\x32\x13.rips.PropertyChunkH\x00\x42\x0b\n\tChunkType\"\x1f\n\rPropertyChunk\x12\x0e\n\x06values\x18\x01 \x03(\x01*\xc7\x01\n\x0cPropertyType\x12\x12\n\x0e\x44YNAMIC_NATIVE\x10\x00\x12\x11\n\rSTATIC_NATIVE\x10\x01\x12\r\n\tSOURSIMRL\x10\x02\x12\r\n\tGENERATED\x10\x03\x12\x12\n\x0eINPUT_PROPERTY\x10\x04\x12\x13\n\x0f\x46ORMATION_NAMES\x10\x05\x12\x14\n\x10\x46LOW_DIAGNOSTICS\x10\x06\x12\x16\n\x12INJECTION_FLOODING\x10\x07\x12\x0b\n\x07REMOVED\x10\x08\x12\x0e\n\tUNDEFINED\x10\xe7\x07\x32\xe6\x03\n\nProperties\x12W\n\x16GetAvailableProperties\x12 .rips.AvailablePropertiesRequest\x1a\x19.rips.AvailableProperties\"\x00\x12G\n\x15GetActiveCellProperty\x12\x15.rips.PropertyRequest\x1a\x13.rips.PropertyChunk\"\x00\x30\x01\x12I\n\x17GetSelectedCellProperty\x12\x15.rips.PropertyRequest\x1a\x13.rips.PropertyChunk\"\x00\x30\x01\x12\x41\n\x0fGetGridProperty\x12\x15.rips.PropertyRequest\x1a\x13.rips.PropertyChunk\"\x00\x30\x01\x12V\n\x15SetActiveCellProperty\x12\x18.rips.PropertyInputChunk\x1a\x1f.rips.ClientToServerStreamReply\"\x00(\x01\x12P\n\x0fSetGridProperty\x12\x18.rips.PropertyInputChunk\x1a\x1f.rips.ClientToServerStreamReply\"\x00(\x01\x62\x06proto3'),
|
||||
dependencies=[Definitions__pb2.DESCRIPTOR, Case__pb2.DESCRIPTOR, ])
|
||||
|
||||
_PROPERTYTYPE = _descriptor.EnumDescriptor(
|
||||
name='PropertyType',
|
||||
@ -94,7 +92,6 @@ REMOVED = 8
|
||||
UNDEFINED = 999
|
||||
|
||||
|
||||
|
||||
_AVAILABLEPROPERTIESREQUEST = _descriptor.Descriptor(
|
||||
name='AvailablePropertiesRequest',
|
||||
full_name='rips.AvailablePropertiesRequest',
|
||||
@ -363,49 +360,48 @@ DESCRIPTOR.enum_types_by_name['PropertyType'] = _PROPERTYTYPE
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
AvailablePropertiesRequest = _reflection.GeneratedProtocolMessageType('AvailablePropertiesRequest', (_message.Message,), dict(
|
||||
DESCRIPTOR = _AVAILABLEPROPERTIESREQUEST,
|
||||
__module__ = 'Properties_pb2'
|
||||
DESCRIPTOR=_AVAILABLEPROPERTIESREQUEST,
|
||||
__module__='Properties_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.AvailablePropertiesRequest)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(AvailablePropertiesRequest)
|
||||
|
||||
AvailableProperties = _reflection.GeneratedProtocolMessageType('AvailableProperties', (_message.Message,), dict(
|
||||
DESCRIPTOR = _AVAILABLEPROPERTIES,
|
||||
__module__ = 'Properties_pb2'
|
||||
DESCRIPTOR=_AVAILABLEPROPERTIES,
|
||||
__module__='Properties_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.AvailableProperties)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(AvailableProperties)
|
||||
|
||||
PropertyRequest = _reflection.GeneratedProtocolMessageType('PropertyRequest', (_message.Message,), dict(
|
||||
DESCRIPTOR = _PROPERTYREQUEST,
|
||||
__module__ = 'Properties_pb2'
|
||||
DESCRIPTOR=_PROPERTYREQUEST,
|
||||
__module__='Properties_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.PropertyRequest)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(PropertyRequest)
|
||||
|
||||
TimeStep = _reflection.GeneratedProtocolMessageType('TimeStep', (_message.Message,), dict(
|
||||
DESCRIPTOR = _TIMESTEP,
|
||||
__module__ = 'Properties_pb2'
|
||||
DESCRIPTOR=_TIMESTEP,
|
||||
__module__='Properties_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.TimeStep)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(TimeStep)
|
||||
|
||||
PropertyInputChunk = _reflection.GeneratedProtocolMessageType('PropertyInputChunk', (_message.Message,), dict(
|
||||
DESCRIPTOR = _PROPERTYINPUTCHUNK,
|
||||
__module__ = 'Properties_pb2'
|
||||
DESCRIPTOR=_PROPERTYINPUTCHUNK,
|
||||
__module__='Properties_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.PropertyInputChunk)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(PropertyInputChunk)
|
||||
|
||||
PropertyChunk = _reflection.GeneratedProtocolMessageType('PropertyChunk', (_message.Message,), dict(
|
||||
DESCRIPTOR = _PROPERTYCHUNK,
|
||||
__module__ = 'Properties_pb2'
|
||||
DESCRIPTOR=_PROPERTYCHUNK,
|
||||
__module__='Properties_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.PropertyChunk)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(PropertyChunk)
|
||||
|
||||
|
||||
|
||||
_PROPERTIES = _descriptor.ServiceDescriptor(
|
||||
name='Properties',
|
||||
full_name='rips.Properties',
|
||||
@ -469,7 +465,7 @@ _PROPERTIES = _descriptor.ServiceDescriptor(
|
||||
output_type=Definitions__pb2._CLIENTTOSERVERSTREAMREPLY,
|
||||
serialized_options=None,
|
||||
),
|
||||
])
|
||||
])
|
||||
_sym_db.RegisterServiceDescriptor(_PROPERTIES)
|
||||
|
||||
DESCRIPTOR.services_by_name['Properties'] = _PROPERTIES
|
||||
|
@ -3,7 +3,7 @@
|
||||
# source: SimulationWell.proto
|
||||
|
||||
import sys
|
||||
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
|
||||
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode('latin1'))
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import message as _message
|
||||
from google.protobuf import reflection as _reflection
|
||||
@ -21,11 +21,8 @@ DESCRIPTOR = _descriptor.FileDescriptor(
|
||||
package='rips',
|
||||
syntax='proto3',
|
||||
serialized_options=None,
|
||||
serialized_pb=_b('\n\x14SimulationWell.proto\x12\x04rips\x1a\x11\x44\x65\x66initions.proto\"M\n\x15SimulationWellRequest\x12\x0f\n\x07\x63\x61se_id\x18\x01 \x01(\x05\x12\x11\n\twell_name\x18\x02 \x01(\t\x12\x10\n\x08timestep\x18\x03 \x01(\x05\":\n\x14SimulationWellStatus\x12\x11\n\twell_type\x18\x01 \x01(\t\x12\x0f\n\x07is_open\x18\x02 \x01(\x08\"~\n\x16SimulationWellCellInfo\x12\x18\n\x03ijk\x18\x01 \x01(\x0b\x32\x0b.rips.Vec3i\x12\x12\n\ngrid_index\x18\x02 \x01(\x05\x12\x0f\n\x07is_open\x18\x03 \x01(\x08\x12\x11\n\tbranch_id\x18\x04 \x01(\x05\x12\x12\n\nsegment_id\x18\x05 \x01(\x05\"I\n\x1bSimulationWellCellInfoArray\x12*\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32\x1c.rips.SimulationWellCellInfo2\xc2\x01\n\x0eSimulationWell\x12T\n\x17GetSimulationWellStatus\x12\x1b.rips.SimulationWellRequest\x1a\x1a.rips.SimulationWellStatus\"\x00\x12Z\n\x16GetSimulationWellCells\x12\x1b.rips.SimulationWellRequest\x1a!.rips.SimulationWellCellInfoArray\"\x00\x62\x06proto3')
|
||||
,
|
||||
dependencies=[Definitions__pb2.DESCRIPTOR,])
|
||||
|
||||
|
||||
serialized_pb=_b('\n\x14SimulationWell.proto\x12\x04rips\x1a\x11\x44\x65\x66initions.proto\"M\n\x15SimulationWellRequest\x12\x0f\n\x07\x63\x61se_id\x18\x01 \x01(\x05\x12\x11\n\twell_name\x18\x02 \x01(\t\x12\x10\n\x08timestep\x18\x03 \x01(\x05\":\n\x14SimulationWellStatus\x12\x11\n\twell_type\x18\x01 \x01(\t\x12\x0f\n\x07is_open\x18\x02 \x01(\x08\"~\n\x16SimulationWellCellInfo\x12\x18\n\x03ijk\x18\x01 \x01(\x0b\x32\x0b.rips.Vec3i\x12\x12\n\ngrid_index\x18\x02 \x01(\x05\x12\x0f\n\x07is_open\x18\x03 \x01(\x08\x12\x11\n\tbranch_id\x18\x04 \x01(\x05\x12\x12\n\nsegment_id\x18\x05 \x01(\x05\"I\n\x1bSimulationWellCellInfoArray\x12*\n\x04\x64\x61ta\x18\x01 \x03(\x0b\x32\x1c.rips.SimulationWellCellInfo2\xc2\x01\n\x0eSimulationWell\x12T\n\x17GetSimulationWellStatus\x12\x1b.rips.SimulationWellRequest\x1a\x1a.rips.SimulationWellStatus\"\x00\x12Z\n\x16GetSimulationWellCells\x12\x1b.rips.SimulationWellRequest\x1a!.rips.SimulationWellCellInfoArray\"\x00\x62\x06proto3'),
|
||||
dependencies=[Definitions__pb2.DESCRIPTOR, ])
|
||||
|
||||
|
||||
_SIMULATIONWELLREQUEST = _descriptor.Descriptor(
|
||||
@ -209,35 +206,34 @@ DESCRIPTOR.message_types_by_name['SimulationWellCellInfoArray'] = _SIMULATIONWEL
|
||||
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
|
||||
|
||||
SimulationWellRequest = _reflection.GeneratedProtocolMessageType('SimulationWellRequest', (_message.Message,), dict(
|
||||
DESCRIPTOR = _SIMULATIONWELLREQUEST,
|
||||
__module__ = 'SimulationWell_pb2'
|
||||
DESCRIPTOR=_SIMULATIONWELLREQUEST,
|
||||
__module__='SimulationWell_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.SimulationWellRequest)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(SimulationWellRequest)
|
||||
|
||||
SimulationWellStatus = _reflection.GeneratedProtocolMessageType('SimulationWellStatus', (_message.Message,), dict(
|
||||
DESCRIPTOR = _SIMULATIONWELLSTATUS,
|
||||
__module__ = 'SimulationWell_pb2'
|
||||
DESCRIPTOR=_SIMULATIONWELLSTATUS,
|
||||
__module__='SimulationWell_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.SimulationWellStatus)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(SimulationWellStatus)
|
||||
|
||||
SimulationWellCellInfo = _reflection.GeneratedProtocolMessageType('SimulationWellCellInfo', (_message.Message,), dict(
|
||||
DESCRIPTOR = _SIMULATIONWELLCELLINFO,
|
||||
__module__ = 'SimulationWell_pb2'
|
||||
DESCRIPTOR=_SIMULATIONWELLCELLINFO,
|
||||
__module__='SimulationWell_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.SimulationWellCellInfo)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(SimulationWellCellInfo)
|
||||
|
||||
SimulationWellCellInfoArray = _reflection.GeneratedProtocolMessageType('SimulationWellCellInfoArray', (_message.Message,), dict(
|
||||
DESCRIPTOR = _SIMULATIONWELLCELLINFOARRAY,
|
||||
__module__ = 'SimulationWell_pb2'
|
||||
DESCRIPTOR=_SIMULATIONWELLCELLINFOARRAY,
|
||||
__module__='SimulationWell_pb2'
|
||||
# @@protoc_insertion_point(class_scope:rips.SimulationWellCellInfoArray)
|
||||
))
|
||||
))
|
||||
_sym_db.RegisterMessage(SimulationWellCellInfoArray)
|
||||
|
||||
|
||||
|
||||
_SIMULATIONWELL = _descriptor.ServiceDescriptor(
|
||||
name='SimulationWell',
|
||||
full_name='rips.SimulationWell',
|
||||
@ -265,7 +261,7 @@ _SIMULATIONWELL = _descriptor.ServiceDescriptor(
|
||||
output_type=_SIMULATIONWELLCELLINFOARRAY,
|
||||
serialized_options=None,
|
||||
),
|
||||
])
|
||||
])
|
||||
_sym_db.RegisterServiceDescriptor(_SIMULATIONWELL)
|
||||
|
||||
DESCRIPTOR.services_by_name['SimulationWell'] = _SIMULATIONWELL
|
||||
|
@ -1,16 +1,17 @@
|
||||
class PdmObject:
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
if PdmObject.__custom_init__ is not None:
|
||||
PdmObject.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class DataContainerFloat(PdmObject):
|
||||
"""
|
||||
Attributes:
|
||||
values (List of float): Float Values
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.values = []
|
||||
@ -18,12 +19,13 @@ class DataContainerFloat(PdmObject):
|
||||
if DataContainerFloat.__custom_init__ is not None:
|
||||
DataContainerFloat.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class DataContainerString(PdmObject):
|
||||
"""
|
||||
Attributes:
|
||||
values (List of str): String Values
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.values = []
|
||||
@ -31,12 +33,13 @@ class DataContainerString(PdmObject):
|
||||
if DataContainerString.__custom_init__ is not None:
|
||||
DataContainerString.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class DataContainerTime(PdmObject):
|
||||
"""
|
||||
Attributes:
|
||||
values (List of time): Time Values
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.values = []
|
||||
@ -44,6 +47,7 @@ class DataContainerTime(PdmObject):
|
||||
if DataContainerTime.__custom_init__ is not None:
|
||||
DataContainerTime.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class Case(PdmObject):
|
||||
"""
|
||||
The ResInsight base class for Cases
|
||||
@ -53,7 +57,7 @@ class Case(PdmObject):
|
||||
id (int): Case ID
|
||||
name (str): Case Name
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.file_path = ""
|
||||
@ -63,12 +67,13 @@ class Case(PdmObject):
|
||||
if Case.__custom_init__ is not None:
|
||||
Case.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class Reservoir(Case):
|
||||
"""
|
||||
Abtract base class for Eclipse Cases
|
||||
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
Case.__init__(self, pb2_object, channel)
|
||||
@ -88,13 +93,14 @@ class EclipseCase(Reservoir):
|
||||
The Regular Eclipse Results Case
|
||||
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
Reservoir.__init__(self, pb2_object, channel)
|
||||
if EclipseCase.__custom_init__ is not None:
|
||||
EclipseCase.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class SummaryCase(PdmObject):
|
||||
"""
|
||||
The Base Class for all Summary Cases
|
||||
@ -105,7 +111,7 @@ class SummaryCase(PdmObject):
|
||||
short_name (str): Display Name
|
||||
summary_header_filename (str): Summary Header File
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.auto_shorty_name = False
|
||||
@ -126,7 +132,6 @@ class SummaryCase(PdmObject):
|
||||
"""
|
||||
return self._call_pdm_method("availableAddresses")
|
||||
|
||||
|
||||
def available_time_steps(self, ):
|
||||
"""
|
||||
|
||||
@ -137,7 +142,6 @@ class SummaryCase(PdmObject):
|
||||
"""
|
||||
return self._call_pdm_method("availableTimeSteps")
|
||||
|
||||
|
||||
def resample_values(self, address=None, resampling_period=None):
|
||||
"""
|
||||
|
||||
@ -149,7 +153,6 @@ class SummaryCase(PdmObject):
|
||||
"""
|
||||
return self._call_pdm_method("resampleValues", address=address, resampling_period=resampling_period)
|
||||
|
||||
|
||||
def summary_vector_values(self, address=None):
|
||||
"""
|
||||
Create a new Summary Plot
|
||||
@ -161,6 +164,9 @@ class SummaryCase(PdmObject):
|
||||
return self._call_pdm_method("summaryVectorValues", address=address)
|
||||
|
||||
|
||||
return self._call_pdm_method("summaryVectorValues", address=address)
|
||||
|
||||
|
||||
class FileSummaryCase(SummaryCase):
|
||||
"""
|
||||
A Summary Case based on SMSPEC files
|
||||
@ -168,7 +174,7 @@ class FileSummaryCase(SummaryCase):
|
||||
Attributes:
|
||||
include_restart_files (str): Include Restart Files
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.include_restart_files = False
|
||||
@ -176,18 +182,20 @@ class FileSummaryCase(SummaryCase):
|
||||
if FileSummaryCase.__custom_init__ is not None:
|
||||
FileSummaryCase.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class ViewWindow(PdmObject):
|
||||
"""
|
||||
The Base Class for all Views and Plots in ResInsight
|
||||
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
PdmObject.__init__(self, pb2_object, channel)
|
||||
if ViewWindow.__custom_init__ is not None:
|
||||
ViewWindow.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class View(ViewWindow):
|
||||
"""
|
||||
Attributes:
|
||||
@ -200,7 +208,7 @@ class View(ViewWindow):
|
||||
show_grid_box (str): Show Grid Box
|
||||
show_z_scale (str): Show Z Scale Label
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.background_color = "#b0c4de"
|
||||
@ -215,30 +223,33 @@ class View(ViewWindow):
|
||||
if View.__custom_init__ is not None:
|
||||
View.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class GeoMechView(View):
|
||||
"""
|
||||
The Geomechanical 3d View
|
||||
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
View.__init__(self, pb2_object, channel)
|
||||
if GeoMechView.__custom_init__ is not None:
|
||||
GeoMechView.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class GridSummaryCase(SummaryCase):
|
||||
"""
|
||||
A Summary Case based on extracting grid data.
|
||||
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
SummaryCase.__init__(self, pb2_object, channel)
|
||||
if GridSummaryCase.__custom_init__ is not None:
|
||||
GridSummaryCase.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class WellPath(PdmObject):
|
||||
"""
|
||||
The Base class for Well Paths
|
||||
@ -246,7 +257,7 @@ class WellPath(PdmObject):
|
||||
Attributes:
|
||||
name (str): Name
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.name = ""
|
||||
@ -254,24 +265,26 @@ class WellPath(PdmObject):
|
||||
if WellPath.__custom_init__ is not None:
|
||||
WellPath.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class ModeledWellPath(WellPath):
|
||||
"""
|
||||
A Well Path created interactively in ResInsight
|
||||
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
WellPath.__init__(self, pb2_object, channel)
|
||||
if ModeledWellPath.__custom_init__ is not None:
|
||||
ModeledWellPath.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class GeoMechCase(Case):
|
||||
"""
|
||||
The Abaqus Based GeoMech Case
|
||||
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
Case.__init__(self, pb2_object, channel)
|
||||
@ -291,7 +304,7 @@ class Project(PdmObject):
|
||||
The ResInsight Project
|
||||
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
PdmObject.__init__(self, pb2_object, channel)
|
||||
@ -308,7 +321,6 @@ class Project(PdmObject):
|
||||
"""
|
||||
return self._call_pdm_method("importSummaryCase", file_name=file_name)
|
||||
|
||||
|
||||
def summary_case(self, case_id=None):
|
||||
"""
|
||||
Find Summary Case
|
||||
@ -326,7 +338,7 @@ class ResampleData(PdmObject):
|
||||
time_steps (List of time): Time Steps
|
||||
values (List of float): Values
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.time_steps = []
|
||||
@ -335,12 +347,13 @@ class ResampleData(PdmObject):
|
||||
if ResampleData.__custom_init__ is not None:
|
||||
ResampleData.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class EclipseView(View):
|
||||
"""
|
||||
The Eclipse 3d Reservoir View
|
||||
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
View.__init__(self, pb2_object, channel)
|
||||
@ -355,7 +368,6 @@ class EclipseView(View):
|
||||
children = self.children("CellResult", CellColors)
|
||||
return children[0] if len(children) > 0 else None
|
||||
|
||||
|
||||
def cell_result_data(self):
|
||||
"""Current Eclipse Cell Result
|
||||
Returns:
|
||||
@ -363,7 +375,6 @@ class EclipseView(View):
|
||||
"""
|
||||
return self._call_get_method("CellResultData")
|
||||
|
||||
|
||||
def set_cell_result_data(self, values):
|
||||
"""Set Current Eclipse Cell Result
|
||||
Arguments:
|
||||
@ -386,7 +397,7 @@ class EclipseResult(PdmObject):
|
||||
selected_producer_tracers (List of str): Producer Tracers
|
||||
selected_souring_tracers (List of str): Tracers
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.flow_tracer_selection_mode = "FLOW_TR_INJ_AND_PROD"
|
||||
@ -401,42 +412,46 @@ class EclipseResult(PdmObject):
|
||||
if EclipseResult.__custom_init__ is not None:
|
||||
EclipseResult.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class CellColors(EclipseResult):
|
||||
"""
|
||||
Eclipse Cell Colors class
|
||||
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
EclipseResult.__init__(self, pb2_object, channel)
|
||||
if CellColors.__custom_init__ is not None:
|
||||
CellColors.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class EclipseContourMap(EclipseView):
|
||||
"""
|
||||
A contour map for Eclipse cases
|
||||
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
EclipseView.__init__(self, pb2_object, channel)
|
||||
if EclipseContourMap.__custom_init__ is not None:
|
||||
EclipseContourMap.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class GeoMechContourMap(GeoMechView):
|
||||
"""
|
||||
A contour map for GeoMech cases
|
||||
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
GeoMechView.__init__(self, pb2_object, channel)
|
||||
if GeoMechContourMap.__custom_init__ is not None:
|
||||
GeoMechContourMap.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class GridCaseGroup(PdmObject):
|
||||
"""
|
||||
A statistics case group
|
||||
@ -445,7 +460,7 @@ class GridCaseGroup(PdmObject):
|
||||
group_id (int): Case Group ID
|
||||
user_description (str): Name
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.group_id = -1
|
||||
@ -454,6 +469,7 @@ class GridCaseGroup(PdmObject):
|
||||
if GridCaseGroup.__custom_init__ is not None:
|
||||
GridCaseGroup.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class SummaryCaseSubCollection(PdmObject):
|
||||
"""
|
||||
Attributes:
|
||||
@ -462,7 +478,7 @@ class SummaryCaseSubCollection(PdmObject):
|
||||
name_count (str): Name
|
||||
summary_collection_name (str): Name
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.id = -1
|
||||
@ -473,6 +489,7 @@ class SummaryCaseSubCollection(PdmObject):
|
||||
if SummaryCaseSubCollection.__custom_init__ is not None:
|
||||
SummaryCaseSubCollection.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class PlotWindow(ViewWindow):
|
||||
"""
|
||||
The Abstract base class for all MDI Windows in the Plot Window
|
||||
@ -480,7 +497,7 @@ class PlotWindow(ViewWindow):
|
||||
Attributes:
|
||||
id (int): View ID
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.id = -1
|
||||
@ -488,18 +505,20 @@ class PlotWindow(ViewWindow):
|
||||
if PlotWindow.__custom_init__ is not None:
|
||||
PlotWindow.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class Plot(PlotWindow):
|
||||
"""
|
||||
The Abstract Base Class for all Plot Objects
|
||||
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
PlotWindow.__init__(self, pb2_object, channel)
|
||||
if Plot.__custom_init__ is not None:
|
||||
Plot.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class SummaryPlot(Plot):
|
||||
"""
|
||||
A Summary Plot
|
||||
@ -510,7 +529,7 @@ class SummaryPlot(Plot):
|
||||
plot_description (str): Name
|
||||
show_plot_title (str): Plot Title
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.is_using_auto_name = True
|
||||
@ -521,8 +540,9 @@ class SummaryPlot(Plot):
|
||||
if SummaryPlot.__custom_init__ is not None:
|
||||
SummaryPlot.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class SummaryPlotCollection(PdmObject):
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
PdmObject.__init__(self, pb2_object, channel)
|
||||
@ -563,7 +583,7 @@ class WbsParameters(PdmObject):
|
||||
user_ucs (float): User Defined UCS [bar]
|
||||
water_density (float): Density of Sea Water [g/cm^3]
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.df_source = "LAS_FILE"
|
||||
@ -587,6 +607,7 @@ class WbsParameters(PdmObject):
|
||||
if WbsParameters.__custom_init__ is not None:
|
||||
WbsParameters.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class SimulationWell(PdmObject):
|
||||
"""
|
||||
An Eclipse Simulation Well
|
||||
@ -594,7 +615,7 @@ class SimulationWell(PdmObject):
|
||||
Attributes:
|
||||
name (str): Name
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.name = ""
|
||||
@ -602,6 +623,7 @@ class SimulationWell(PdmObject):
|
||||
if SimulationWell.__custom_init__ is not None:
|
||||
SimulationWell.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class WellLogPlot(PlotWindow):
|
||||
"""
|
||||
A Well Log Plot With a shared Depth Axis and Multiple Tracks
|
||||
@ -615,7 +637,7 @@ class WellLogPlot(PlotWindow):
|
||||
show_depth_grid_lines (str): Show Grid Lines
|
||||
show_title_in_plot (str): Show Title
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
self.auto_scale_depth_enabled = True
|
||||
@ -629,12 +651,13 @@ class WellLogPlot(PlotWindow):
|
||||
if WellLogPlot.__custom_init__ is not None:
|
||||
WellLogPlot.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
class WellBoreStabilityPlot(WellLogPlot):
|
||||
"""
|
||||
A GeoMechanical Well Bore Stabilit Plot
|
||||
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
WellLogPlot.__init__(self, pb2_object, channel)
|
||||
@ -655,13 +678,14 @@ class FileWellPath(WellPath):
|
||||
Well Paths Loaded From File
|
||||
|
||||
"""
|
||||
__custom_init__ = None #: Assign a custom init routine to be run at __init__
|
||||
__custom_init__ = None # : Assign a custom init routine to be run at __init__
|
||||
|
||||
def __init__(self, pb2_object=None, channel=None):
|
||||
WellPath.__init__(self, pb2_object, channel)
|
||||
if FileWellPath.__custom_init__ is not None:
|
||||
FileWellPath.__custom_init__(self, pb2_object=pb2_object, channel=channel)
|
||||
|
||||
|
||||
def class_dict():
|
||||
classes = {}
|
||||
classes['Case'] = Case
|
||||
@ -700,6 +724,7 @@ def class_dict():
|
||||
classes['WellPath'] = WellPath
|
||||
return classes
|
||||
|
||||
|
||||
def class_from_keyword(class_keyword):
|
||||
all_classes = class_dict()
|
||||
if class_keyword in all_classes.keys():
|
||||
|
@ -11,10 +11,11 @@ import rips.generated.Grid_pb2_grpc as Grid_pb2_grpc
|
||||
|
||||
|
||||
class Grid:
|
||||
"""Grid Information. Not meant to be constructed separately
|
||||
|
||||
Create Grid objects using methods on Case: Grid() and Grids()
|
||||
"""Grid Information. Created by methods in Case
|
||||
:meth:`rips.case.grid()`
|
||||
:meth:`rips.case.grids()`
|
||||
"""
|
||||
|
||||
def __init__(self, index, case, channel):
|
||||
self.__channel = channel
|
||||
self.__stub = Grid_pb2_grpc.GridStub(self.__channel)
|
||||
@ -33,7 +34,6 @@ class Grid:
|
||||
Grid_pb2.GridRequest(case_request=case_request,
|
||||
grid_index=self.index)).dimensions
|
||||
|
||||
|
||||
def cell_centers_async(self):
|
||||
"""The cells center for all cells in given grid async.
|
||||
|
||||
|
@ -9,12 +9,13 @@ from rips.case import Case
|
||||
import rips.generated.Commands_pb2 as Cmd
|
||||
from rips.generated.pdm_objects import GridCaseGroup
|
||||
|
||||
|
||||
@add_method(GridCaseGroup)
|
||||
def create_statistics_case(self):
|
||||
"""Create a Statistics case in the Grid Case Group
|
||||
|
||||
Returns:
|
||||
A new Case
|
||||
:class:`rips.generated.pdm_objects.EclipseCase`
|
||||
"""
|
||||
command_reply = self._execute_command(
|
||||
createStatisticsCase=Cmd.CreateStatisticsCaseRequest(
|
||||
@ -22,28 +23,42 @@ def create_statistics_case(self):
|
||||
return Case(self.channel,
|
||||
command_reply.createStatisticsCaseResult.caseId)
|
||||
|
||||
|
||||
@add_method(GridCaseGroup)
|
||||
def statistics_cases(self):
|
||||
"""Get a list of all statistics cases in the Grid Case Group"""
|
||||
"""Get a list of all statistics cases in the Grid Case Group
|
||||
|
||||
Returns:
|
||||
List of :class:`rips.generated.pdm_objects.EclipseCase`
|
||||
|
||||
"""
|
||||
stat_case_collection = self.children("StatisticsCaseCollection")[0]
|
||||
return stat_case_collection.children("Reservoirs")
|
||||
|
||||
|
||||
@add_method(GridCaseGroup)
|
||||
def views(self):
|
||||
"""Get a list of views belonging to a grid case group"""
|
||||
"""Get a list of views belonging to a grid case group
|
||||
|
||||
Returns:
|
||||
List of :class:`rips.generated.pdm_objects.EclipseView`
|
||||
|
||||
"""
|
||||
pdm_objects = self.descendants(EclipseView)
|
||||
view_list = []
|
||||
for pdm_object in pdm_objects:
|
||||
view_list.append(pdm_object)
|
||||
return view_list
|
||||
|
||||
|
||||
@add_method(GridCaseGroup)
|
||||
def view(self, view_id):
|
||||
"""Get a particular view belonging to a case group by providing view id
|
||||
Arguments:
|
||||
id(int): view id
|
||||
|
||||
Returns: a view object
|
||||
Returns:
|
||||
List of :class:`rips.generated.pdm_objects.EclipseView`
|
||||
|
||||
"""
|
||||
views = self.views()
|
||||
@ -52,13 +67,13 @@ def view(self, view_id):
|
||||
return view_object
|
||||
return None
|
||||
|
||||
|
||||
@add_method(GridCaseGroup)
|
||||
def compute_statistics(self, case_ids=None):
|
||||
""" Compute statistics for the given case ids
|
||||
|
||||
Arguments:
|
||||
case_ids(list of integers): list of case ids.
|
||||
If this is None all cases in group are included
|
||||
case_ids(list of integers): List of case ids. If this is None all cases in group are included
|
||||
|
||||
"""
|
||||
if case_ids is None:
|
||||
|
@ -17,19 +17,23 @@ import rips.generated.Commands_pb2 as Cmd
|
||||
import rips.generated.Commands_pb2_grpc as CmdRpc
|
||||
from rips.generated.pdm_objects import PdmObject, class_from_keyword
|
||||
|
||||
|
||||
def camel_to_snake(name):
|
||||
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
|
||||
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
|
||||
|
||||
|
||||
def snake_to_camel(name):
|
||||
return ''.join(word.title() for word in name.split('_'))
|
||||
|
||||
|
||||
def add_method(cls):
|
||||
def decorator(func):
|
||||
setattr(cls, func.__name__, func)
|
||||
return func # returning func means func can still be used normally
|
||||
return decorator
|
||||
|
||||
|
||||
def add_static_method(cls):
|
||||
def decorator(func):
|
||||
@wraps(func)
|
||||
@ -40,6 +44,7 @@ def add_static_method(cls):
|
||||
return func # returning func means func can still be used normally
|
||||
return decorator
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def _execute_command(self, **command_params):
|
||||
self.__warnings = []
|
||||
@ -51,6 +56,7 @@ def _execute_command(self, **command_params):
|
||||
|
||||
return response
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __custom_init__(self, pb2_object, channel):
|
||||
self.__warnings = []
|
||||
@ -75,6 +81,7 @@ def __custom_init__(self, pb2_object, channel):
|
||||
self._pb2_object = PdmObject_pb2.PdmObject(class_keyword=self.__class__.__name__)
|
||||
self.__copy_to_pb2()
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def copy_from(self, object):
|
||||
"""Copy attribute values from object to self
|
||||
@ -89,14 +96,17 @@ def copy_from(self, object):
|
||||
self.__custom_init__(self._pb2_object, self._channel)
|
||||
self.update()
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def warnings(self):
|
||||
return self.__warnings
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def has_warnings(self):
|
||||
return len(self.__warnings) > 0
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __copy_to_pb2(self):
|
||||
if self._pb2_object is not None:
|
||||
@ -108,16 +118,19 @@ def __copy_to_pb2(self):
|
||||
camel_kw = snake_to_camel(snake_kw)
|
||||
self.__set_grpc_value(camel_kw, value)
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def pb2_object(self):
|
||||
""" Private method"""
|
||||
return self._pb2_object
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def channel(self):
|
||||
""" Private method"""
|
||||
return self._channel
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def address(self):
|
||||
"""Get the unique address of the PdmObject
|
||||
@ -128,16 +141,19 @@ def address(self):
|
||||
|
||||
return self._pb2_object.address
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def set_visible(self, visible):
|
||||
"""Set the visibility of the object in the ResInsight project tree"""
|
||||
self._pb2_object.visible = visible
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def visible(self):
|
||||
"""Get the visibility of the object in the ResInsight project tree"""
|
||||
return self._pb2_object.visible
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def print_object_info(self):
|
||||
"""Print the structure and data content of the PdmObject"""
|
||||
@ -151,7 +167,8 @@ def print_object_info(self):
|
||||
print("Object Methods:")
|
||||
for snake_kw in dir(self):
|
||||
if not snake_kw.startswith("_") and callable(getattr(self, snake_kw)):
|
||||
print (" " + snake_kw)
|
||||
print(" " + snake_kw)
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __convert_from_grpc_value(self, value):
|
||||
@ -173,6 +190,7 @@ def __convert_from_grpc_value(self, value):
|
||||
return self.__makelist(value)
|
||||
return value
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __convert_to_grpc_value(self, value):
|
||||
if isinstance(value, bool):
|
||||
@ -188,14 +206,17 @@ def __convert_to_grpc_value(self, value):
|
||||
return "[" + ", ".join(list_of_strings) + "]"
|
||||
return str(value)
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __get_grpc_value(self, camel_keyword):
|
||||
return self.__convert_from_grpc_value(self._pb2_object.parameters[camel_keyword])
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __set_grpc_value(self, camel_keyword, value):
|
||||
self._pb2_object.parameters[camel_keyword] = self.__convert_to_grpc_value(value)
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def set_value(self, snake_keyword, value):
|
||||
"""Set the value associated with the provided keyword and updates ResInsight
|
||||
@ -208,10 +229,12 @@ def set_value(self, snake_keyword, value):
|
||||
setattr(self, snake_keyword, value)
|
||||
self.update()
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __islist(self, value):
|
||||
return value.startswith("[") and value.endswith("]")
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __makelist(self, list_string):
|
||||
list_string = list_string.lstrip("[")
|
||||
@ -222,6 +245,7 @@ def __makelist(self, list_string):
|
||||
values.append(self.__convert_from_grpc_value(string))
|
||||
return values
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __from_pb2_to_pdm_objects(self, pb2_object_list, super_class_definition):
|
||||
pdm_object_list = []
|
||||
@ -234,6 +258,7 @@ def __from_pb2_to_pdm_objects(self, pb2_object_list, super_class_definition):
|
||||
pdm_object_list.append(pdm_object)
|
||||
return pdm_object_list
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def descendants(self, class_definition):
|
||||
"""Get a list of all project tree descendants matching the class keyword
|
||||
@ -257,6 +282,7 @@ def descendants(self, class_definition):
|
||||
return [] # Valid empty result
|
||||
raise e
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def children(self, child_field, class_definition=PdmObject):
|
||||
"""Get a list of all direct project tree children inside the provided child_field
|
||||
@ -275,6 +301,7 @@ def children(self, child_field, class_definition=PdmObject):
|
||||
return []
|
||||
raise e
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def ancestor(self, class_definition):
|
||||
"""Find the first ancestor that matches the provided class_keyword
|
||||
@ -301,12 +328,14 @@ def ancestor(self, class_definition):
|
||||
return None
|
||||
raise e
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def _call_get_method_async(self, method_name):
|
||||
request = PdmObject_pb2.PdmObjectGetterRequest(object=self._pb2_object, method=method_name)
|
||||
for chunk in self._pdm_object_stub.CallPdmObjectGetter(request):
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def _call_get_method(self, method_name):
|
||||
all_values = []
|
||||
@ -317,6 +346,7 @@ def _call_get_method(self, method_name):
|
||||
all_values.append(value)
|
||||
return all_values
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def __generate_set_method_chunks(self, array, method_request):
|
||||
index = -1
|
||||
@ -324,7 +354,8 @@ def __generate_set_method_chunks(self, array, method_request):
|
||||
while index < len(array):
|
||||
chunk = PdmObject_pb2.PdmObjectSetterChunk()
|
||||
if index is -1:
|
||||
chunk.set_request.CopyFrom(PdmObject_pb2.PdmObjectSetterRequest(request=method_request, data_count=len(array)))
|
||||
chunk.set_request.CopyFrom(PdmObject_pb2.PdmObjectSetterRequest(
|
||||
request=method_request, data_count=len(array)))
|
||||
index += 1
|
||||
else:
|
||||
actual_chunk_size = min(len(array) - index + 1, self.__chunk_size)
|
||||
@ -348,20 +379,24 @@ def __generate_set_method_chunks(self, array, method_request):
|
||||
chunk = PdmObject_pb2.PdmObjectSetterChunk()
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def _call_set_method(self, method_name, values):
|
||||
method_request = PdmObject_pb2.PdmObjectGetterRequest(object=self._pb2_object, method=method_name)
|
||||
method_request = PdmObject_pb2.PdmObjectGetterRequest(
|
||||
object=self._pb2_object, method=method_name)
|
||||
request_iterator = self.__generate_set_method_chunks(values, method_request)
|
||||
reply = self._pdm_object_stub.CallPdmObjectSetter(request_iterator)
|
||||
if reply.accepted_value_count < len(values):
|
||||
raise IndexError
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def _call_pdm_method(self, method_name, **kwargs):
|
||||
pb2_params = PdmObject_pb2.PdmObject(class_keyword=method_name)
|
||||
for key, value in kwargs.items():
|
||||
pb2_params.parameters[snake_to_camel(key)] = self.__convert_to_grpc_value(value)
|
||||
request = PdmObject_pb2.PdmObjectMethodRequest(object=self._pb2_object, method=method_name, params=pb2_params)
|
||||
request = PdmObject_pb2.PdmObjectMethodRequest(
|
||||
object=self._pb2_object, method=method_name, params=pb2_params)
|
||||
|
||||
pb2_object = self._pdm_object_stub.CallPdmObjectMethod(request)
|
||||
|
||||
@ -372,6 +407,7 @@ def _call_pdm_method(self, method_name, **kwargs):
|
||||
pdm_object = child_class_definition(pb2_object=pb2_object, channel=self.channel())
|
||||
return pdm_object
|
||||
|
||||
|
||||
@add_method(PdmObject)
|
||||
def update(self):
|
||||
"""Sync all fields from the Python Object to ResInsight"""
|
||||
|
@ -7,6 +7,7 @@ from rips.pdmobject import PdmObject
|
||||
from rips.generated.pdm_objects import PlotWindow, Plot
|
||||
from rips.pdmobject import add_method
|
||||
|
||||
|
||||
@add_method(PlotWindow)
|
||||
def export_snapshot(self, export_folder='', file_prefix='', output_format='PNG'):
|
||||
""" Export snapshot for the current plot
|
||||
@ -23,5 +24,3 @@ def export_snapshot(self, export_folder='', file_prefix='', output_format='PNG')
|
||||
viewId=self.id,
|
||||
exportFolder=export_folder,
|
||||
plotOutputFormat=output_format))
|
||||
|
||||
|
@ -24,12 +24,14 @@ from rips.generated.pdm_objects import Project, PlotWindow, WellPath
|
||||
def __custom_init__(self, pb2_object, channel):
|
||||
self._project_stub = Project_pb2_grpc.ProjectStub(self._channel)
|
||||
|
||||
|
||||
@add_static_method(Project)
|
||||
def create(channel):
|
||||
project_stub = Project_pb2_grpc.ProjectStub(channel)
|
||||
pb2_object = project_stub.GetPdmObject(Empty())
|
||||
return Project(pb2_object, channel)
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def open(self, path):
|
||||
"""Open a new project from the given path
|
||||
@ -41,20 +43,24 @@ def open(self, path):
|
||||
self._execute_command(openProject=Cmd.FilePathRequest(path=path))
|
||||
return self
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def save(self, path=""):
|
||||
"""Save the project to the existing project file, or to a new file
|
||||
|
||||
Arguments:
|
||||
path(str): File path to the file to save the project to. If empty, saves to the active project file
|
||||
"""
|
||||
self._execute_command(saveProject=Cmd.SaveProjectRequest(filePath=path))
|
||||
return self
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def close(self):
|
||||
"""Close the current project (and open new blank project)"""
|
||||
self._execute_command(closeProject=Empty())
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def load_case(self, path):
|
||||
"""Load a new case from the given file path
|
||||
@ -62,18 +68,19 @@ def load_case(self, path):
|
||||
Arguments:
|
||||
path(str): file path to case
|
||||
Returns:
|
||||
A rips Case object
|
||||
:class:`rips.generated.pdm_objects.Case`
|
||||
"""
|
||||
command_reply = self._execute_command(loadCase=Cmd.FilePathRequest(
|
||||
path=path))
|
||||
return self.case(command_reply.loadCaseResult.id)
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def selected_cases(self):
|
||||
"""Get a list of all cases selected in the project tree
|
||||
|
||||
Returns:
|
||||
A list of rips Case objects
|
||||
A list of :class:`rips.generated.pdm_objects.Case`
|
||||
"""
|
||||
case_infos = self._project_stub.GetSelectedCases(Empty())
|
||||
cases = []
|
||||
@ -81,15 +88,17 @@ def selected_cases(self):
|
||||
cases.append(self.case(case_info.id))
|
||||
return cases
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def cases(self):
|
||||
"""Get a list of all cases in the project
|
||||
|
||||
Returns:
|
||||
A list of rips Case objects
|
||||
A list of :class:`rips.generated.pdm_objects.Case`
|
||||
"""
|
||||
return self.descendants(Case)
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def case(self, case_id):
|
||||
"""Get a specific case from the provided case Id
|
||||
@ -97,7 +106,7 @@ def case(self, case_id):
|
||||
Arguments:
|
||||
id(int): case id
|
||||
Returns:
|
||||
A rips Case object
|
||||
:class:`rips.generated.pdm_objects.Case`
|
||||
"""
|
||||
allCases = self.cases()
|
||||
for case in allCases:
|
||||
@ -105,6 +114,7 @@ def case(self, case_id):
|
||||
return case
|
||||
return None
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def replace_source_cases(self, grid_list_file, case_group_id=0):
|
||||
"""Replace all source cases within a case group
|
||||
@ -117,6 +127,7 @@ def replace_source_cases(self, grid_list_file, case_group_id=0):
|
||||
replaceSourceCases=Cmd.ReplaceSourceCasesRequest(
|
||||
gridListFile=grid_list_file, caseGroupId=case_group_id))
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def create_grid_case_group(self, case_paths):
|
||||
"""Create a Grid Case Group from a list of cases
|
||||
@ -124,7 +135,7 @@ def create_grid_case_group(self, case_paths):
|
||||
Arguments:
|
||||
case_paths (list): list of file path strings
|
||||
Returns:
|
||||
A case group id and name
|
||||
:class:`rips.generated.pdm_objects.GridCaseGroup`
|
||||
"""
|
||||
command_reply = self._execute_command(
|
||||
createGridCaseGroup=Cmd.CreateGridCaseGroupRequest(
|
||||
@ -132,18 +143,21 @@ def create_grid_case_group(self, case_paths):
|
||||
return self.grid_case_group(
|
||||
command_reply.createGridCaseGroupResult.groupId)
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def views(self):
|
||||
"""Get a list of views belonging to a project"""
|
||||
return self.descendants(View)
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def view(self, view_id):
|
||||
"""Get a particular view belonging to a case by providing view id
|
||||
|
||||
Arguments:
|
||||
view_id(int): view id
|
||||
Returns: a view object
|
||||
Returns:
|
||||
:class:`rips.generated.pdm_objects.View`
|
||||
"""
|
||||
views = self.views()
|
||||
for view_object in views:
|
||||
@ -151,9 +165,14 @@ def view(self, view_id):
|
||||
return view_object
|
||||
return None
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def plots(self):
|
||||
"""Get a list of all plots belonging to a project"""
|
||||
"""Get a list of all plots belonging to a project
|
||||
|
||||
Returns:
|
||||
List of :class:`rips.generated.pdm_objects.Plot`
|
||||
"""
|
||||
pdm_objects = self.descendants(PlotWindow)
|
||||
plot_list = []
|
||||
for pdm_object in pdm_objects:
|
||||
@ -161,12 +180,16 @@ def plots(self):
|
||||
plot_list.append(pdm_object)
|
||||
return plot_list
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def plot(self, view_id):
|
||||
"""Get a particular plot by providing view id
|
||||
|
||||
Arguments:
|
||||
view_id(int): view id
|
||||
Returns: a plot object
|
||||
|
||||
Returns:
|
||||
:class:`rips.generated.pdm_objects.Plot`
|
||||
"""
|
||||
plots = self.plots()
|
||||
for plot_object in plots:
|
||||
@ -174,12 +197,19 @@ def plot(self, view_id):
|
||||
return plot_object
|
||||
return None
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def grid_case_groups(self):
|
||||
"""Get a list of all grid case groups in the project"""
|
||||
"""Get a list of all grid case groups in the project
|
||||
|
||||
Returns:
|
||||
List of :class:`rips.generated.pdm_objects.GridCaseGroup`
|
||||
|
||||
"""
|
||||
case_groups = self.descendants(GridCaseGroup)
|
||||
return case_groups
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def grid_case_group(self, group_id):
|
||||
"""Get a particular grid case group belonging to a project
|
||||
@ -187,7 +217,8 @@ def grid_case_group(self, group_id):
|
||||
Arguments:
|
||||
groupId(int): group id
|
||||
|
||||
Returns: a grid case group object
|
||||
Returns:
|
||||
:class:`rips.generated.pdm_objects.GridCaseGroup`
|
||||
"""
|
||||
case_groups = self.grid_case_groups()
|
||||
for case_group in case_groups:
|
||||
@ -195,6 +226,7 @@ def grid_case_group(self, group_id):
|
||||
return case_group
|
||||
return None
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def export_multi_case_snapshots(self, grid_list_file):
|
||||
"""Export snapshots for a set of cases
|
||||
@ -206,6 +238,7 @@ def export_multi_case_snapshots(self, grid_list_file):
|
||||
exportMultiCaseSnapshot=Cmd.ExportMultiCaseRequest(
|
||||
gridListFile=grid_list_file))
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def export_snapshots(self, snapshot_type='ALL', prefix='', plot_format='PNG'):
|
||||
""" Export all snapshots of a given type
|
||||
@ -219,6 +252,7 @@ def export_snapshots(self, snapshot_type='ALL', prefix='', plot_format='PNG'):
|
||||
exportSnapshots=Cmd.ExportSnapshotsRequest(
|
||||
type=snapshot_type, prefix=prefix, caseId=-1, viewId=-1, plotOutputFormat=plot_format))
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def export_well_paths(self, well_paths=None, md_step_size=5.0):
|
||||
""" Export a set of well paths
|
||||
@ -234,6 +268,7 @@ def export_well_paths(self, well_paths=None, md_step_size=5.0):
|
||||
return self._execute_command(exportWellPaths=Cmd.ExportWellPathRequest(
|
||||
wellPathNames=well_paths, mdStepSize=md_step_size))
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def scale_fracture_template(self, template_id, half_length, height,
|
||||
d_factor, conductivity):
|
||||
@ -254,6 +289,7 @@ def scale_fracture_template(self, template_id, half_length, height,
|
||||
dFactor=d_factor,
|
||||
conductivity=conductivity))
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def set_fracture_containment(self, template_id, top_layer, base_layer):
|
||||
""" Set fracture template containment parameters
|
||||
@ -267,6 +303,7 @@ def set_fracture_containment(self, template_id, top_layer, base_layer):
|
||||
setFractureContainment=Cmd.SetFracContainmentRequest(
|
||||
id=template_id, topLayer=top_layer, baseLayer=base_layer))
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def import_well_paths(self, well_path_files=None, well_path_folder=''):
|
||||
""" Import well paths into project
|
||||
@ -276,7 +313,7 @@ def import_well_paths(self, well_path_files=None, well_path_folder=''):
|
||||
well_path_folder(str): A folder path containing files to import
|
||||
|
||||
Returns:
|
||||
A list of WellPath objects
|
||||
List of :class:`rips.generated.pdm_objects.WellPath`
|
||||
"""
|
||||
if well_path_files is None:
|
||||
well_path_files = []
|
||||
@ -288,21 +325,23 @@ def import_well_paths(self, well_path_files=None, well_path_folder=''):
|
||||
well_paths.append(self.well_path_by_name(well_path_name))
|
||||
return well_paths
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def well_paths(self):
|
||||
"""Get a list of all well paths in the project
|
||||
|
||||
Returns:
|
||||
A list of rips WellPath objects
|
||||
List of :class:`rips.generated.pdm_objects.WellPath`
|
||||
"""
|
||||
return self.descendants(WellPath)
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def well_path_by_name(self, well_path_name):
|
||||
"""Get a specific well path by name from the project
|
||||
|
||||
Returns:
|
||||
A WellPath object
|
||||
:class:`rips.generated.pdm_objects.WellPath`
|
||||
"""
|
||||
all_well_paths = self.well_paths()
|
||||
for well_path in all_well_paths:
|
||||
@ -310,6 +349,7 @@ def well_path_by_name(self, well_path_name):
|
||||
return well_path
|
||||
return None
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def import_well_log_files(self, well_log_files=None, well_log_folder=''):
|
||||
""" Import well log files into project
|
||||
@ -328,6 +368,7 @@ def import_well_log_files(self, well_log_files=None, well_log_folder=''):
|
||||
wellLogFiles=well_log_files))
|
||||
return res.importWellLogFilesResult.wellPathNames
|
||||
|
||||
|
||||
@add_method(Project)
|
||||
def import_formation_names(self, formation_files=None):
|
||||
""" Import formation names into project
|
||||
|
@ -15,24 +15,60 @@ from rips.generated.pdm_objects import SimulationWell
|
||||
from rips.pdmobject import PdmObject, add_method
|
||||
import rips.case
|
||||
|
||||
|
||||
@add_method(SimulationWell)
|
||||
def __custom_init__(self, pb2_object, channel):
|
||||
self._simulation_well_stub = SimulationWell_pb2_grpc.SimulationWellStub(channel)
|
||||
|
||||
|
||||
@add_method(SimulationWell)
|
||||
def status(self, timestep):
|
||||
"""Get simulation well status
|
||||
|
||||
**SimulationWellStatus class description**::
|
||||
|
||||
Parameter | Description | Type
|
||||
----------- | ------------------------------------------------------------- | -----
|
||||
well_type | Well type as string | string
|
||||
is_open | True if simulation well is open at the specified time step | bool
|
||||
|
||||
Arguments:
|
||||
timestep(int): Time step index
|
||||
|
||||
"""
|
||||
sim_well_request = SimulationWell_pb2.SimulationWellRequest(case_id=self.case().id,
|
||||
well_name=self.name,
|
||||
timestep=timestep)
|
||||
return self._simulation_well_stub.GetSimulationWellStatus(sim_well_request)
|
||||
|
||||
|
||||
@add_method(SimulationWell)
|
||||
def cells(self, timestep):
|
||||
"""Get reservoir cells the simulation well is defined for
|
||||
|
||||
**SimulationWellCellInfo class description**::
|
||||
|
||||
Parameter | Description | Type
|
||||
----------- | --------------------------------------------------------- | -----
|
||||
ijk | Cell IJK location | Vec3i
|
||||
grid_index | Grid index | int
|
||||
is_open | True if connection to is open at the specified time step | bool
|
||||
branch_id | | int
|
||||
segment_id | | int
|
||||
|
||||
Arguments:
|
||||
timestep(int): Time step index
|
||||
|
||||
Returns:
|
||||
List of SimulationWellCellInfo
|
||||
|
||||
"""
|
||||
sim_well_request = SimulationWell_pb2.SimulationWellRequest(case_id=self.case().id,
|
||||
well_name=self.name,
|
||||
timestep=timestep)
|
||||
return self._simulation_well_stub.GetSimulationWellCells(sim_well_request).data
|
||||
|
||||
|
||||
@add_method(SimulationWell)
|
||||
def case(self):
|
||||
return self.ancestor(rips.case.Case)
|
||||
|
@ -9,6 +9,7 @@ import rips.case # Circular import of Case, which already imports View. Use ful
|
||||
from rips.pdmobject import add_method
|
||||
from rips.generated.pdm_objects import View, ViewWindow, EclipseView, GeoMechView
|
||||
|
||||
|
||||
@add_method(View)
|
||||
def apply_cell_result(self, result_type, result_variable):
|
||||
"""Apply a regular cell result
|
||||
@ -30,6 +31,7 @@ def apply_cell_result(self, result_type, result_variable):
|
||||
cell_result.result_variable = result_variable
|
||||
cell_result.update()
|
||||
|
||||
|
||||
@add_method(View)
|
||||
def apply_flow_diagnostics_cell_result(
|
||||
self,
|
||||
@ -71,6 +73,7 @@ def apply_flow_diagnostics_cell_result(
|
||||
cell_result.selected_producer_tracers = producers
|
||||
cell_result.update()
|
||||
|
||||
|
||||
@add_method(View)
|
||||
def clone(self):
|
||||
"""Clone the current view"""
|
||||
@ -78,6 +81,7 @@ def clone(self):
|
||||
viewId=self.id)).createViewResult.viewId
|
||||
return self.case().view(view_id)
|
||||
|
||||
|
||||
@add_method(View)
|
||||
def set_time_step(self, time_step):
|
||||
"""Set the time step for current view"""
|
||||
@ -85,6 +89,7 @@ def set_time_step(self, time_step):
|
||||
return self._execute_command(setTimeStep=Cmd.SetTimeStepParams(
|
||||
caseId=case_id, viewId=self.id, timeStep=time_step))
|
||||
|
||||
|
||||
@add_method(View)
|
||||
def export_sim_well_fracture_completions(self, time_step,
|
||||
simulation_well_names, file_split,
|
||||
@ -129,6 +134,7 @@ def export_sim_well_fracture_completions(self, time_step,
|
||||
fileSplit=file_split,
|
||||
compdatExport=compdat_export))
|
||||
|
||||
|
||||
@add_method(View)
|
||||
def export_visible_cells(self,
|
||||
export_keyword='FLUXNUM',
|
||||
@ -154,6 +160,7 @@ def export_visible_cells(self,
|
||||
hiddenActiveCellsValue=hidden_active_cells_value,
|
||||
inactiveCellsValue=inactive_cells_value))
|
||||
|
||||
|
||||
@add_method(View)
|
||||
def export_property(self, undefined_value=0.0):
|
||||
""" Export the current Eclipse property from the view
|
||||
@ -168,6 +175,7 @@ def export_property(self, undefined_value=0.0):
|
||||
viewIds=[self.id],
|
||||
undefinedValue=undefined_value))
|
||||
|
||||
|
||||
@add_method(ViewWindow)
|
||||
def case(self):
|
||||
"""Get the case the view belongs to"""
|
||||
@ -175,6 +183,7 @@ def case(self):
|
||||
assert(mycase is not None)
|
||||
return mycase
|
||||
|
||||
|
||||
@add_method(ViewWindow)
|
||||
def export_snapshot(self, prefix='', export_folder=''):
|
||||
""" Export snapshot for the current view
|
||||
|
@ -9,6 +9,7 @@ from rips.pdmobject import PdmObject
|
||||
from rips.generated.pdm_objects import WellLogPlot
|
||||
from rips.pdmobject import add_method
|
||||
|
||||
|
||||
@add_method(WellLogPlot)
|
||||
def export_data_as_las(self, export_folder, file_prefix='', export_tvdrkb=False, capitalize_file_names=False, resample_interval=0.0, convert_to_standard_units=False):
|
||||
""" Export LAS file(s) for the current plot
|
||||
@ -33,6 +34,7 @@ def export_data_as_las(self, export_folder, file_prefix='', export_tvdrkb=False,
|
||||
convertCurveUnits=convert_to_standard_units))
|
||||
return res.exportWellLogPlotDataResult.exportedFiles
|
||||
|
||||
|
||||
@add_method(WellLogPlot)
|
||||
def export_data_as_ascii(self, export_folder, file_prefix='', capitalize_file_names=False):
|
||||
""" Export LAS file(s) for the current plot
|
||||
|
@ -18,142 +18,147 @@ AllWells
|
||||
========
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/all_wells.py
|
||||
|
||||
========
|
||||
============
|
||||
AlterWbsPlot
|
||||
========
|
||||
============
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/alter_wbs_plot.py
|
||||
|
||||
========
|
||||
=============
|
||||
CaseGridGroup
|
||||
========
|
||||
=============
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/case_grid_group.py
|
||||
|
||||
========
|
||||
CaseInfoStreamingExample
|
||||
========
|
||||
=================
|
||||
CaseInfoStreaming
|
||||
=================
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/case_info_streaming_example.py
|
||||
|
||||
========
|
||||
==============
|
||||
CellResultData
|
||||
========
|
||||
==============
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/cell_result_data.py
|
||||
|
||||
========
|
||||
==============
|
||||
CommandExample
|
||||
========
|
||||
==============
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/command_example.py
|
||||
|
||||
========
|
||||
===============
|
||||
Create WBS Plot
|
||||
========
|
||||
===============
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/create_wbs_plot.py
|
||||
|
||||
========
|
||||
=============
|
||||
ErrorHandling
|
||||
========
|
||||
=============
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/error_handling.py
|
||||
|
||||
========
|
||||
=================
|
||||
ExportContourMaps
|
||||
========
|
||||
=================
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/export_contour_maps.py
|
||||
|
||||
========
|
||||
===========
|
||||
ExportPlots
|
||||
========
|
||||
===========
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/export_plots.py
|
||||
|
||||
========
|
||||
===============
|
||||
ExportSnapshots
|
||||
========
|
||||
===============
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/export_snapshots.py
|
||||
|
||||
========
|
||||
===============
|
||||
GridInformation
|
||||
========
|
||||
===============
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/grid_information.py
|
||||
|
||||
========
|
||||
=================
|
||||
Import Well Paths
|
||||
========
|
||||
=================
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/import_well_paths_and_logs.py
|
||||
|
||||
========
|
||||
==================
|
||||
InputPropTestAsync
|
||||
========
|
||||
==================
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/input_prop_test_async.py
|
||||
|
||||
========
|
||||
=================
|
||||
InputPropTestSync
|
||||
========
|
||||
=================
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/input_prop_test_sync.py
|
||||
|
||||
========
|
||||
===============
|
||||
InstanceExample
|
||||
========
|
||||
===============
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/instance_example.py
|
||||
|
||||
========
|
||||
============================
|
||||
LaunchWithCommandLineOptions
|
||||
========
|
||||
============================
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/launch_with_commandline_options.py
|
||||
|
||||
========
|
||||
=================================
|
||||
Launch Using Command Line Options
|
||||
========
|
||||
=================================
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/launch_with_commandline_options.py
|
||||
|
||||
========
|
||||
==============
|
||||
NewSummaryPlot
|
||||
========
|
||||
==============
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/new_summary_plot.py
|
||||
|
||||
========
|
||||
==============
|
||||
SelectedCases
|
||||
========
|
||||
==============
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/selected_cases.py
|
||||
|
||||
========
|
||||
==============
|
||||
SelectedCells
|
||||
========
|
||||
==============
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/selected_cells.py
|
||||
|
||||
========
|
||||
==============
|
||||
SetCellResult
|
||||
========
|
||||
==============
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/set_cell_result.py
|
||||
|
||||
========
|
||||
========================
|
||||
SetFlowDiagnosticsResult
|
||||
========
|
||||
========================
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/set_flow_diagnostics_result.py
|
||||
|
||||
========
|
||||
==================
|
||||
SetGridProperties
|
||||
========
|
||||
==================
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/set_grid_properties.py
|
||||
|
||||
========
|
||||
==================================
|
||||
SoilAverageAsync
|
||||
========
|
||||
==================================
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/soil_average_async.py
|
||||
|
||||
========
|
||||
==================================
|
||||
SoilAverageSync
|
||||
========
|
||||
==================================
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/soil_average_sync.py
|
||||
|
||||
========
|
||||
==================================
|
||||
SoilPorvAsync
|
||||
========
|
||||
==================================
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/soil_porv_async.py
|
||||
|
||||
========
|
||||
==================================
|
||||
SoilPorvSync
|
||||
========
|
||||
==================================
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/soil_porv_sync.py
|
||||
|
||||
========
|
||||
==================================
|
||||
SummaryVectors
|
||||
==================================
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/summary_vectors.py
|
||||
|
||||
==================================
|
||||
ViewExample
|
||||
========
|
||||
==================================
|
||||
.. literalinclude:: ../../ApplicationCode/GrpcInterface/Python/rips/PythonExamples/view_example.py
|
||||
|
@ -4,12 +4,13 @@ ResInsight Python API
|
||||
The ResInsight Python API allows you to interact with a running ResInsight instance from `Python 3 <https://www.python.org/download/releases/3.0/>`_.
|
||||
This enables you to:
|
||||
|
||||
* start ResInsight from Python
|
||||
* communicate with an a running ResInsight instance
|
||||
* load a ResInsight project file
|
||||
* load data files such as Eclipse EGRID files and summary files
|
||||
* extract data to Python for further processing and automation
|
||||
* export snapshots of graphics
|
||||
* Start ResInsight from Python.
|
||||
* Communicate with a running ResInsight instance.
|
||||
* Load a ResInsight project file.
|
||||
* Load data files such as Eclipse EGRID files and summary files.
|
||||
* Extract data to Python for further processing and automation.
|
||||
* Export snapshots of graphics.
|
||||
* And lots of other things...
|
||||
|
||||
Documentation Sites
|
||||
===================
|
||||
|
Loading…
Reference in New Issue
Block a user