Added verbose class option + removed empty output lines
This commit is contained in:
@ -457,8 +457,9 @@ class PyLammps(object):
|
|||||||
:vartype run: list
|
:vartype run: list
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, name="", cmdargs=None, ptr=None, comm=None):
|
def __init__(self, name="", cmdargs=None, ptr=None, comm=None, verbose=False):
|
||||||
self.has_echo = False
|
self.has_echo = False
|
||||||
|
self.verbose = verbose
|
||||||
|
|
||||||
if cmdargs:
|
if cmdargs:
|
||||||
if '-echo' in cmdargs:
|
if '-echo' in cmdargs:
|
||||||
@ -869,8 +870,8 @@ class PyLammps(object):
|
|||||||
if comm:
|
if comm:
|
||||||
output = self.lmp.comm.bcast(output, root=0)
|
output = self.lmp.comm.bcast(output, root=0)
|
||||||
|
|
||||||
if 'verbose' in kwargs and kwargs['verbose']:
|
if self.verbose or ('verbose' in kwargs and kwargs['verbose']):
|
||||||
print(output)
|
print(output, end = '')
|
||||||
|
|
||||||
lines = output.splitlines()
|
lines = output.splitlines()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user