Files
ResInsight/ApplicationCode/GrpcInterface/Python/doc/source/rips.rst
Magne Sjaastad e3aa160265 Python doc adjustments (#4756)
* Doc and adjustments of project.py

* Doc and adjustments view.py

* Python doc cleanup

* Python : Add copy of files to deployment folder

* Python : Several updates to doc

* Python : Limit line lenghts

* Minor adjustments
2019-09-24 11:06:24 +02:00

87 lines
1.8 KiB
ReStructuredText

Instance Module
===============
.. autoclass:: rips.instance.Instance
:members:
Example
-------
.. literalinclude:: ../../rips/PythonExamples/InstanceExample.py
:language: python
:lines: 5-
:emphasize-lines: 3
Case Module
===========
.. autoclass:: rips.case.Case
:members:
Example
-------
.. literalinclude:: ../../rips/PythonExamples/AllCases.py
:language: python
:lines: 5-
:emphasize-lines: 5
Grid Module
===========
.. autoclass:: rips.grid.Grid
:members:
Example
-------
.. code-block:: python
case = rips_instance.project.loadCase(path=casePath)
print (case.gridCount())
if case.gridCount() > 0:
grid = case.grid(index=0)
dimensions = grid.dimensions()
print(dimensions.i)
print(dimensions.j)
print(dimensions.k)
GridCaseGroup Module
====================
.. autoclass:: rips.gridcasegroup.GridCaseGroup
:members:
Project Module
==============
.. autoclass:: rips.project.Project
:members:
View Module
===========
.. autoclass:: rips.view.View
:members:
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.
This is slow and inefficient, but works.
.. literalinclude:: ../../rips/PythonExamples/InputPropTestSync.py
:language: python
:lines: 5-
Asynchronous Example
--------------------
Read two properties at the same time chunk by chunk, multiply each chunk together and start transferring the result back to ResInsight as soon as the chunk is finished.
This is far more efficient.
.. literalinclude:: ../../rips/PythonExamples/InputPropTestAsync.py
:language: python
:lines: 5-