Code Generation
JAFF can turn any loaded network into ready-to-compile/run source files in C, C++, Fortran, Python, Rust, Julia, or R. The generation pipeline is template-driven: you write ordinary source files that contain special JAFF directives, and JAFF expands them into network-specific code.
-
Template Syntax
Learn the
$JAFFdirective language:SUB,REPEAT,REDUCE,GET,HAS,END, and the optionalREPLACEmodifier. -
Configuration File
Configure
jaffgenruns declaratively with ajaff.tomlfile: set network paths, template names, output directories, radiation bands, and data-table conversions. -
jaffgen CLI
Run the code-generation pipeline from the command line. Combine predefined templates, custom input directories, and individual files in a single invocation.
-
Table Interpolation
Use precomputed lookup tables in rates and cooling: how
interpfunctions in.jfuncare preserved through codegen, how their Jacobian derivatives become_partial_Ncalls, and how[[table]]emits the data.