Skip to content

Commit

Permalink
fixup! solver
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Jul 14, 2017
1 parent 33e8603 commit a8633b4
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions rmgpy/solver/simple.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ cdef class SimpleReactor(ReactionSystem):

"""
specificColliderSpecies:
a list that contains Species classes of species which are specific third body colliders
a list that contains object references to species which are specific third body colliders
in the respective reactions in pdepSpecificColliderReactionIndices.
"""
cdef public list specificColliderSpecies
Expand Down Expand Up @@ -155,7 +155,7 @@ cdef class SimpleReactor(ReactionSystem):
if filterReactions:
ReactionSystem.set_initial_reaction_thresholds(self)

self.set_colliders(coreReactions, edgeReactions, coreSpecies, edgeSpecies)
self.set_colliders(coreReactions, edgeReactions, coreSpecies)

ReactionSystem.compute_network_variables(self, pdepNetworks)

Expand Down Expand Up @@ -210,7 +210,7 @@ cdef class SimpleReactor(ReactionSystem):
self.kb[j] = self.kf[j] / self.Keq[j]


def set_colliders(self, coreReactions, edgeReactions, coreSpecies, edgeSpecies):
def set_colliders(self, coreReactions, edgeReactions, coreSpecies):
"""
Store collider efficiencies and reaction indices for pdep reactions that have collider efficiencies,
and store specific collider indices
Expand All @@ -229,13 +229,10 @@ cdef class SimpleReactor(ReactionSystem):
pdepColliderReactionIndices.append(j)
self.pdepColliderKinetics.append(rxn.kinetics)
colliderEfficiencies.append(rxn.kinetics.getEffectiveColliderEfficiencies(coreSpecies))
if rxn.specificCollider is not None:
j = self.reactionIndex[rxn]
pdepSpecificColliderReactionIndices.append(j)
if rxn.specificCollider:
pdepSpecificColliderReactionIndices.append(self.reactionIndex[rxn])
self.pdepSpecificColliderKinetics.append(rxn.kinetics)
for spc in itertools.chain(coreSpecies, edgeSpecies):
if spc == rxn.specificCollider:
self.specificColliderSpecies.append(spc)
self.specificColliderSpecies.append(rxn.specificCollider)

self.pdepColliderReactionIndices = numpy.array(pdepColliderReactionIndices, numpy.int)
self.colliderEfficiencies = numpy.array(colliderEfficiencies, numpy.float64)
Expand Down

0 comments on commit a8633b4

Please sign in to comment.