17 lines
413 B
Python
17 lines
413 B
Python
import subprocess as sp
|
|
import logging
|
|
|
|
def blockmesh(case_dir):
|
|
blockmesh_log = logging.getLogger('blockMesh')
|
|
proc = sp.Popen(
|
|
('blockMesh'),
|
|
cwd=case_dir,
|
|
stdout=sp.PIPE,
|
|
stderr=sp.PIPE,
|
|
text=True,
|
|
)
|
|
for line in proc.stdout:
|
|
blockmesh_log.info(line[:-1])
|
|
for line in proc.stderr:
|
|
blockmesh_log.error(line[:-1])
|
|
return proc.wait()
|