Derivative Workflows
Use solver derivatives to study how result data changes when a value in a JCMsuite
project changes. First declare the derivative parameters in the project, then run
solve and select the result data that contains the derivatives.
Choose A Workflow
Set up derivatives when you need to declare
DerivativeParameterblocks, or enable derivative order.Export derivative data when you need dictionaries, pandas DataFrames, or xarray data for tabular and field-export results.
Use Torch Integration when a solver result must participate in a PyTorch objective and receive autograd gradients.
Workflow Steps
Declare each solver derivative parameter in the input files. A derivative output name can differ from the project keys used to fill a template.
Set the derivative order in the project file and call
solvewith the required project keys.Select derivative data through
result.postprocesses.Export ordinary derivative data with
to_dict(),to_df(), orto_xarray().Alternatively, pass gradient-enabled Torch tensors to
jcmsuite.torch.solvewith explicit derivative bindings.
Tutorials
Run the Derivative Tutorials for complete Torch autograd, export, gradient-check, and binding-validation examples.