Fixed setting the _initialized flag on restored Python OneD objects

This commit is contained in:
Ray Speth 2012-05-30 16:02:48 +00:00
parent 84dfde0295
commit 2f9f2abf5e
6 changed files with 3 additions and 5 deletions

View file

@ -38,7 +38,6 @@ class BurnerDiffFlame(Stack):
self.flame.setupGrid(grid)
Stack.__init__(self, [self.burner, self.flame, self.outlet])
self.setRefineCriteria()
self._initialized = 0
def init(self):

View file

@ -38,7 +38,6 @@ class BurnerFlame(Stack):
self.flame.setupGrid(grid)
Stack.__init__(self, [self.burner, self.flame, self.outlet])
self.setRefineCriteria()
self._initialized = 0
def init(self):

View file

@ -52,7 +52,6 @@ class CounterFlame(Stack):
Stack.__init__(self, [self.fuel_inlet, self.flame,
self.oxidizer_inlet])
self.setRefineCriteria()
self._initialized = 0
def init(self, fuel = '', oxidizer = 'O2', stoich = -1.0):

View file

@ -31,7 +31,6 @@ class FreeFlame(Stack):
self.flame.setupGrid(grid)
Stack.__init__(self, [self.inlet, self.flame, self.outlet])
self.setRefineCriteria()
self._initialized = 0
self.tfix = tfix

View file

@ -31,7 +31,7 @@ class StagnationFlow(Stack):
self.flow.setupGrid(grid)
Stack.__init__(self, [self.inlet, self.flow, self.surface])
self.setRefineCriteria()
self._initialized = 0
def init(self, products = 'inlet'):
"""Set the initial guess for the solution. If products = 'equil',

View file

@ -477,6 +477,7 @@ class Stack:
hndls[n] = domains[n].domain_hndl()
self._hndl = _cantera.sim1D_new(hndls)
self._domains = domains
self._initialized = False
def __del__(self):
_cantera.sim1D_del(self._hndl)
@ -633,6 +634,7 @@ class Stack:
>>> s.restore(file = 'save.xml', id = 'energy_off')
"""
self._initialized = True
return _cantera.sim1D_restore(self._hndl, file, id)
def showStats(self, printTime = 1):