Fix copying of State object with mixtures

need to keep phase imposed
This commit is contained in:
Ian Bell
2023-07-26 22:43:50 -04:00
parent 8066bc0a38
commit 1c5f1768e5

View File

@@ -1130,8 +1130,9 @@ cdef class State:
"""
Make a copy of this State class
"""
cdef State S = State(self.Fluid,dict(T=self.T_,D=self.rho_))
S.phase = self.phase
cdef State S = State(self.Fluid, None, phase=self.phase.decode('ascii')) # None is for the state variables, which we leave empty in order to set the phase
# Now we update the state
S.update(dict(T=self.T_,D=self.rho_))
return S
def rebuildState(d):