Documentation updates

This commit is contained in:
Magne Sjaastad 2019-08-23 11:42:10 +02:00
parent 45b53af1be
commit d6c80f52a7
3 changed files with 44 additions and 53 deletions

View File

@ -1,40 +1,26 @@
Instance Module Instance Module
================ ===============
.. autoclass:: rips.Instance .. autoclass:: rips.Instance
:members: :members:
Example Example
-------- -------
.. literalinclude:: ../../rips/examples/InstanceExample.py .. literalinclude:: ../../rips/PythonExamples/InstanceExample.py
:language: python :language: python
:lines: 5- :lines: 5-
:emphasize-lines: 3 :emphasize-lines: 3
App Module
===========
.. autoclass:: rips.App
:members:
Example
--------
.. literalinclude:: ../../rips/examples/AppInfo.py
:language: python
:lines: 5-
:emphasize-lines: 5
Case Module Case Module
============ ===========
.. autoclass:: rips.Case .. autoclass:: rips.Case
:members: :members:
Example Example
------- -------
.. literalinclude:: ../../rips/examples/AllCases.py .. literalinclude:: ../../rips/PythonExamples/AllCases.py
:language: python :language: python
:lines: 5- :lines: 5-
:emphasize-lines: 5 :emphasize-lines: 5
@ -47,8 +33,8 @@ Commands Module
:undoc-members: :undoc-members:
Example Example
-------- -------
.. literalinclude:: ../../rips/examples/CommandExample.py .. literalinclude:: ../../rips/PythonExamples/CommandExample.py
:language: python :language: python
:lines: 5- :lines: 5-
@ -72,7 +58,7 @@ Example
print(dimensions.k) print(dimensions.k)
GridCaseGroup Module GridCaseGroup Module
=========== ====================
.. autoclass:: rips.GridCaseGroup .. autoclass:: rips.GridCaseGroup
:members: :members:
@ -91,18 +77,18 @@ Properties Module
:members: :members:
View Module View Module
================= ===========
.. autoclass:: rips.View .. autoclass:: rips.View
:members: :members:
Synchronous Example Synchronous Example
-------------------- -------------------
Read two properties, multiply them together and push the results back to ResInsight in a naïve way, by reading PORO into a list, then reading PERMX into a list, then multiplying them both in a resulting list and finally transferring back the list. Read two properties, multiply them together and push the results back to ResInsight in a naïve way, by reading PORO into a list, then reading PERMX into a list, then multiplying them both in a resulting list and finally transferring back the list.
This is slow and inefficient, but works. This is slow and inefficient, but works.
.. literalinclude:: ../../rips/examples/InputPropTestSync.py .. literalinclude:: ../../rips/PythonExamples/InputPropTestSync.py
:language: python :language: python
:lines: 5- :lines: 5-
@ -112,7 +98,7 @@ Read two properties at the same time chunk by chunk, multiply each chunk togethe
This is far more efficient. This is far more efficient.
.. literalinclude:: ../../rips/examples/InputPropTestAsync.py .. literalinclude:: ../../rips/PythonExamples/InputPropTestAsync.py
:language: python :language: python
:lines: 5- :lines: 5-

View File

@ -62,18 +62,16 @@ class Properties:
"""Get a list of available properties """Get a list of available properties
Arguments: Arguments:
propertyType (str): string corresponding to propertyType enum. propertyType (str): string corresponding to propertyType enum. Can be one of the following:
- DYNAMIC_NATIVE
- STATIC_NATIVE
- SOURSIMRL
- GENERATED
- INPUT_PROPERTY
- FORMATION_NAMES
- FLOW_DIAGNOSTICS
- INJECTION_FLOODING
Can be one of the following:
'DYNAMIC_NATIVE'
'STATIC_NATIVE'
'SOURSIMRL'
'GENERATED'
'INPUT_PROPERTY'
'FORMATION_NAMES'
'FLOW_DIAGNOSTICS'
'INJECTION_FLOODING'
porosityModel(str): 'MATRIX_MODEL' or 'FRACTURE_MODEL'. porosityModel(str): 'MATRIX_MODEL' or 'FRACTURE_MODEL'.
""" """

View File

@ -34,12 +34,18 @@ class View (PdmObject):
def applyCellResult(self, resultType, resultVariable): def applyCellResult(self, resultType, resultVariable):
"""Apply a regular cell result """Apply a regular cell result
Arguments: Arguments:
resultType [str]: String representing the result category resultType (str): String representing the result category. The valid values are
The valid values are: "DYNAMIC_NATIVE", "STATIC_NATIVE", "SOURSIMRL", - DYNAMIC_NATIVE
"GENERATED", "INPUT_PROPERTY", "FORMATION_NAMES", - STATIC_NATIVE
"FLOW_DIAGNOSTICS" and "INJECTION_FLOODING" - SOURSIMRL
resultVariable [str]: String representing the result value. - GENERATED
- INPUT_PROPERTY
- FORMATION_NAMES
- FLOW_DIAGNOSTICS
- INJECTION_FLOODING
resultVariable (str): String representing the result variable.
""" """
cellResult = self.cellResult() cellResult = self.cellResult()
cellResult.setValue("ResultType", resultType) cellResult.setValue("ResultType", resultType)
@ -54,17 +60,18 @@ class View (PdmObject):
"""Apply a flow diagnostics cell result """Apply a flow diagnostics cell result
Arguments: Arguments:
resultVariable [str]: String representing the result value resultVariable (str): String representing the result value
The valid values are 'TOF', 'Fraction', 'MaxFractionTracer' and 'Communication'. The valid values are 'TOF', 'Fraction', 'MaxFractionTracer' and 'Communication'.
selectionMode [str]: String specifying which tracers to select. selectionMode (str): String specifying which tracers to select.
The valid values are FLOW_TR_INJ_AND_PROD (all injector and producer tracers) The valid values are
FLOW_TR_PRODUCERS (all producers) - FLOW_TR_INJ_AND_PROD (all injector and producer tracers),
FLOW_TR_INJECTORS (all injectors) - FLOW_TR_PRODUCERS (all producers)
FLOW_TR_BY_SELECTION (specify individual tracers in the - FLOW_TR_INJECTORS (all injectors),
- FLOW_TR_BY_SELECTION (specify individual tracers in the
injectorTracers and producerTracers variables) injectorTracers and producerTracers variables)
injectorTracers [list]: List of injector names (strings) to select. injectorTracers (list): List of injector names (strings) to select.
Requires selectionMode to be 'FLOW_TR_BY_SELECTION'. Requires selectionMode to be 'FLOW_TR_BY_SELECTION'.
producerTracers [list]: List of producer tracers (strings) to select. producerTracers (list): List of producer tracers (strings) to select.
Requires selectionMode to be 'FLOW_TR_BY_SELECTION'. Requires selectionMode to be 'FLOW_TR_BY_SELECTION'.
""" """
cellResult = self.cellResult() cellResult = self.cellResult()