pyjac.core.mech_auxiliary module¶
Writes mechanism header and output testing files
-
pyjac.core.mech_auxiliary.
write_mechanism_initializers
(path, lang, specs, reacs, fwd_spec_mapping, back_spec_mapping, initial_conditions='', cache_optimized=False, last_spec=None, auto_diff=False)[source]¶ Writes mechanism-specific files.
Parameters: - path (str) – Path where files are being written.
- lang ({'c', 'cuda', 'fortran', 'matlab'}) – Language type.
- specs (list of
SpecInfo
) – List of species in the mechanism. - reacs (list of
ReacInfo
) – List of reactions in the mechanism. - fwd_spec_mapping (list of int) – A mapping of the original mechanism to the new species order
- back_spec_mapping (list of int) – A mapping of the new species order to the original mechanism
- initial_conditions (Optional[str]) – A comma separated list of the initial conditions to use in form T,P,X (e.g. ‘800,1,H2=1.0,O2=0.5’). Temperature in K, P in atm.
- cache_optimized (Optional[bool]) – If
True
, use the greedy optimizer to attempt to improve cache hit rates - last_spec (Optional[str]) – If specified, the species to assign to the last index. Typically should be N2, Ar, He or another inert bath gas
- auto_diff (Optional[bool]) – If
True
, generate files for Adept auto_differention library.
Returns: Return type: None