-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for chemkin duplicate reactions only once.
Previously, every time we wrote a chemkin file (twice per iteration) we checked every reaction in it for to see if it was a duplicate, in a method that scaled with N^2 and ended up taking almost a third of a 7-hour RMG-Py run (See issue #78). This commit changes it so that reactions being added to the core in an enlarge step are checked for duplicate status at that time, and the entire set is checked after adding a seed mechanism or reaction library. This way we should be sure to catch all the duplicates, but only need to check new reactions once at each iteration, instead of *all* reactions twice per iteration. The saveChemkinFile method can now be called without checking for duplicates. Hopefully this speeds things up. If called without the 'checkForDuplicates=False' option, then saveChemkinFile still does the check, so that other utilities (eg. for merging reaction sets) should not be messed up (nor sped up) by this.
- Loading branch information
Showing
2 changed files
with
65 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters