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.
This commit is contained in:
Håkon Hægland
2023-09-08 19:40:42 +02:00
parent e2f62644ae
commit ac927d997b
8 changed files with 121 additions and 64 deletions

View File

@@ -0,0 +1,12 @@
import os
from contextlib import contextmanager
@contextmanager
def pushd(path):
cwd = os.getcwd()
if not os.path.isdir(path):
os.makedirs(path)
os.chdir(path)
yield
os.chdir(cwd)