Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions python/moose/moose_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,9 @@
"""

__author__ = "Dilawar Singh"
__copyright__ = "Copyright 2013, Dilawar Singh, NCBS Bangalore"
__credits__ = ["NCBS Bangalore"]
__license__ = "GNU GPL"
__version__ = "1.0.0"
__maintainer__ = "Dilawar Singh"
__email__ = "[email protected]"
__status__ = "Development"

## for Ca Pool
# FARADAY = 96154.0
Expand Down Expand Up @@ -66,4 +62,3 @@
LOOKUPCLOCK = 6
STIMCLOCK = 7
PLOTCLOCK = 8

4 changes: 4 additions & 0 deletions python/moose/moose_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ def run(self, timeout, **kwargs):
try:
timer.start()
output, errors = self.process.communicate()
try:
errors = errors.decode('utf8')
except Exception:
pass
logging.warn('%s %s' % (output, errors))
finally:
timer.cancel()
Expand Down
7 changes: 5 additions & 2 deletions python/moose/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import re

import logging
logger = logging.getLogger('moose')
logger_ = logging.getLogger('moose')

from moose.moose_constants import *
from moose.print_utils import *
Expand Down Expand Up @@ -523,8 +523,11 @@ def assignDefaultTicks(modelRoot='/model', dataRoot='/data', solver='hsolve'):
if len(tab.neighbors['input']) == 0:
moose.useClock(9, tab.path, 'process')

def stepRun(simtime, steptime, verbose=True):
def stepRun(simtime, steptime, verbose=True, logger=None):
"""Run the simulation in steps of `steptime` for `simtime`."""
global logger_
if logger is None:
logger = logger_
clock = moose.element('/clock')
if verbose:
msg = 'Starting simulation for %g' % (simtime)
Expand Down