Arne Morten Kvarving
2a9d81227b
changed: subclass Main for python
...
move the initFlowBlackoil method into it
in particular we then avoid the FlowMainType type alias
in Main.hpp
2024-09-09 14:28:20 +02:00
Håkon Hægland
6c3f3af4b4
Docstring fixes
2024-05-02 11:24:58 +02:00
Håkon Hægland
a1b7d4b5dd
Allow Python bindings to setup MPI
...
Allows the Python bindings to control whether MPI_Init() and
MPI_Finalize() will be called when creating an OPM::Main object.
2024-05-02 11:14:07 +02:00
Arne Morten Kvarving
3475da7d8c
Rename ebos_simulator members/parameters to simulator
2024-03-06 10:53:00 +01:00
Arne Morten Kvarving
d5748b6c55
Drop ebos in function names
2024-03-06 10:13:01 +01:00
Håkon Hægland
e20faa255c
Add docstrings for Python bindings
2024-03-05 10:18:54 +01:00
Håkon Hægland
757c67f284
Return vectors by value
...
Return vectors by value instead of unique pointers to arrays.
2024-03-01 14:22:37 +01:00
Håkon Hægland
55aab60549
Get primary variables and fluid state from Python
...
Added methods to Python module opm.simulators.BlackOilSimulator to
access primary variables and fluid state variables.
2024-03-01 14:22:35 +01:00
Arne Morten Kvarving
f8b22631b0
fixed: don't link python module to flow_libblackoil
...
this leads to ODR violations which causes all sorts
of havoc. this was done to reuse a trivial method,
duplicate it in the python source instead.
2024-02-29 09:24:07 +01:00
Arne Morten Kvarving
4aa6dc355f
rename TTag::EclFlowProblemTPFA to TTag::FlowProblemTPFA
2024-02-23 09:27:48 +01:00
Arne Morten Kvarving
b09c70213b
FlowMainEbos: rename to FlowMain
2024-02-06 10:42:23 +01:00
Håkon Hægland
ac927d997b
Added a get_dt() method
...
Added a get_dt() to the opm.simulators.BlackOilSimulator Python module.
This will return the size of the previous simulator time step.
2023-09-08 19:40:42 +02:00
Håkon Hægland
e2f62644ae
Get cell volumes from Python
...
Adds a new method get_cell_volumes() to the opm.simulators Python module
that returns a python list of the cell volumes in the black oil
simulator.
2023-09-08 09:39:24 +02:00
Arne Morten Kvarving
c7016854d9
changed: make the deck an implementation detail in Opm::readDeck
2022-11-24 13:00:38 +01:00
Atgeirr Flø Rasmussen
a7a5a7a98d
Make the Python interface use the TpfaLinearizer.
2022-10-04 11:44:35 +02:00
Håkon Hægland
91ac3a2a32
Dynamically update schedule from Python
...
Adds some methods that enables Opm::Schedule to be dynamically modified
from Python. A test case in test_schedule.py illustrates the use case.
2022-05-05 13:10:39 +02:00
Joakim Hove
6b92443cb4
Downstream filesystem reorganisation in opm-common
2022-01-02 14:33:34 +01:00
Arne Morten Kvarving
7f7fbab2f4
remove FLOW_BLACKOIL_ONLY hack from Main.hpp
...
now that the python simulator uses runStatic, the
runDynamic template is never instanced, and thus there
are no linker issues.
2021-11-10 10:07:11 +01:00
Arne Morten Kvarving
3a512c0f20
changed: use runStatic in python simulator
2021-11-10 09:51:17 +01:00
Håkon Hægland
7a394df43f
Include <stdexcept> header to use std::logic_error()
...
And some minor stylistic changes.
2021-09-23 13:13:23 +02:00
Håkon Hægland
4c5245196b
Changed calling convention for shared pointers.
...
Expect non-reference type shared pointers arguments instead of references
to shared pointer. This will make it clear to the caller that the called
function is making a copy of the pointer for its own use and not trying
to modify the original pointer of the caller.
2021-09-22 23:49:13 +02:00
Håkon Hægland
5ad65c70ee
Initialize blackoil simulator from schedule shared with Python.
...
Adds a new constructor to Main.hpp that takes shared pointers to Deck,
EclipseState, Schedule, and SummaryConfig. This makes it possible to
share these variables with Python without worrying about lifetime issues
of the underlying C++ objects. For example, a Python script can first
create an opm.io.schedule.Schedule object which is modified from Python.
Then, assume the same Python script creates an
opm.simulators.BlackOilSimulator which is initialized with the same
schedule object. Since the underlying C++ object is a shared pointer,
the Schedule object in Python may go out of scope (get deleted by Python)
without having the C++ schedule object being deleted. And the Python
BlackOilSimulator may continue to be used after the Python Schedule object
has been deleted since it still has a valid C++ schedule object.
2021-09-21 15:52:59 +02:00