mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Update python doc (#5803)
Several improvement and adjustments to the Python documentation - applied autopep8 - add summary example - use references to reference other classes and methods
This commit is contained in:
@@ -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
|
||||
@@ -45,6 +68,7 @@ from rips.view import View
|
||||
from rips.generated.pdm_objects import WellBoreStabilityPlot, WbsParameters
|
||||
from rips.simulation_well import SimulationWell
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def __custom_init__(self, pb2_object, channel):
|
||||
self.__case_stub = Case_pb2_grpc.CaseStub(self._channel)
|
||||
@@ -55,6 +79,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 +90,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 +107,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 +128,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 +136,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 +168,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 +180,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 +206,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 +252,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 +274,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 +331,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 +357,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 +424,7 @@ def export_well_path_completions(
|
||||
combinationMode=combination_mode,
|
||||
))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def export_msw(self, well_path):
|
||||
"""
|
||||
@@ -364,6 +436,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 +481,7 @@ def create_multiple_fractures(
|
||||
action=action,
|
||||
))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def create_lgr_for_completion(
|
||||
self,
|
||||
@@ -454,6 +528,7 @@ def create_lgr_for_completion(
|
||||
splitType=split_type,
|
||||
))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def create_saturation_pressure_plots(self):
|
||||
"""
|
||||
@@ -464,6 +539,7 @@ def create_saturation_pressure_plots(self):
|
||||
createSaturationPressurePlots=Cmd.CreateSatPressPlotRequest(
|
||||
caseIds=case_ids))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def export_flow_characteristics(
|
||||
self,
|
||||
@@ -505,23 +581,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 +605,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 +636,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 +664,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 +695,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 +723,7 @@ def selected_cell_property(self,
|
||||
all_values.append(value)
|
||||
return all_values
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def grid_property_async(
|
||||
self,
|
||||
@@ -657,14 +732,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 +758,7 @@ def grid_property_async(
|
||||
for chunk in self.__properties_stub.GetGridProperty(request):
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def grid_property(
|
||||
self,
|
||||
@@ -691,14 +767,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 +788,7 @@ def grid_property(
|
||||
all_values.append(value)
|
||||
return all_values
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def set_active_cell_property_async(
|
||||
self,
|
||||
@@ -720,14 +797,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 +820,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 +829,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 +853,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 +863,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 +889,7 @@ def set_grid_property(
|
||||
if reply.accepted_value_count < len(values):
|
||||
raise IndexError
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def export_property(
|
||||
self,
|
||||
@@ -836,6 +916,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 +926,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 +941,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 +958,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 +989,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 +1009,7 @@ def active_cell_centers(
|
||||
cell_centers.append(value)
|
||||
return cell_centers
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def active_cell_corners_async(
|
||||
self,
|
||||
@@ -941,6 +1028,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 +1038,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 +1060,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 +1071,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 +1086,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 +1097,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 +1125,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 +1140,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 +1149,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 +1159,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 +1173,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 +1186,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 +1200,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 +1213,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 +1227,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 +1240,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 +1260,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
|
||||
@@ -343,4 +384,3 @@ def import_formation_names(self, formation_files=None):
|
||||
|
||||
self._execute_command(importFormationNames=Cmd.ImportFormationNamesRequest(formationFiles=formation_files,
|
||||
applyToCaseId=-1))
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -45,6 +68,7 @@ from rips.view import View
|
||||
from rips.generated.pdm_objects import WellBoreStabilityPlot, WbsParameters
|
||||
from rips.simulation_well import SimulationWell
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def __custom_init__(self, pb2_object, channel):
|
||||
self.__case_stub = Case_pb2_grpc.CaseStub(self._channel)
|
||||
@@ -55,6 +79,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 +90,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 +107,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 +128,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 +136,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 +168,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 +180,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 +206,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 +252,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 +274,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 +331,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 +357,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 +424,7 @@ def export_well_path_completions(
|
||||
combinationMode=combination_mode,
|
||||
))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def export_msw(self, well_path):
|
||||
"""
|
||||
@@ -364,6 +436,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 +481,7 @@ def create_multiple_fractures(
|
||||
action=action,
|
||||
))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def create_lgr_for_completion(
|
||||
self,
|
||||
@@ -454,6 +528,7 @@ def create_lgr_for_completion(
|
||||
splitType=split_type,
|
||||
))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def create_saturation_pressure_plots(self):
|
||||
"""
|
||||
@@ -464,6 +539,7 @@ def create_saturation_pressure_plots(self):
|
||||
createSaturationPressurePlots=Cmd.CreateSatPressPlotRequest(
|
||||
caseIds=case_ids))
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def export_flow_characteristics(
|
||||
self,
|
||||
@@ -505,23 +581,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 +605,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 +636,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 +664,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 +695,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 +723,7 @@ def selected_cell_property(self,
|
||||
all_values.append(value)
|
||||
return all_values
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def grid_property_async(
|
||||
self,
|
||||
@@ -657,14 +732,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 +758,7 @@ def grid_property_async(
|
||||
for chunk in self.__properties_stub.GetGridProperty(request):
|
||||
yield chunk
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def grid_property(
|
||||
self,
|
||||
@@ -691,14 +767,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 +788,7 @@ def grid_property(
|
||||
all_values.append(value)
|
||||
return all_values
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def set_active_cell_property_async(
|
||||
self,
|
||||
@@ -720,14 +797,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 +820,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 +829,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 +853,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 +863,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 +889,7 @@ def set_grid_property(
|
||||
if reply.accepted_value_count < len(values):
|
||||
raise IndexError
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def export_property(
|
||||
self,
|
||||
@@ -836,6 +916,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 +926,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 +941,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 +958,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 +989,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 +1009,7 @@ def active_cell_centers(
|
||||
cell_centers.append(value)
|
||||
return cell_centers
|
||||
|
||||
|
||||
@add_method(Case)
|
||||
def active_cell_corners_async(
|
||||
self,
|
||||
@@ -941,6 +1028,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 +1038,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 +1060,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 +1071,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 +1086,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 +1097,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 +1125,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 +1140,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 +1149,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 +1159,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 +1173,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 +1186,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 +1200,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 +1213,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 +1227,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 +1240,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 +1260,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
|
||||
@@ -168,7 +171,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 +179,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 +205,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 +220,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 +254,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 +262,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 +301,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 +318,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 +335,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 +344,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 +365,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 +372,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 +394,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 +409,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 +457,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 +466,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 +475,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 +486,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 +494,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 +502,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 +526,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 +537,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 +580,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 +604,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 +612,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 +620,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 +634,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 +648,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 +675,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 +721,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
|
||||
@@ -343,4 +384,3 @@ def import_formation_names(self, formation_files=None):
|
||||
|
||||
self._execute_command(importFormationNames=Cmd.ImportFormationNamesRequest(formationFiles=formation_files,
|
||||
applyToCaseId=-1))
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user