Compare commits

..

2 Commits

Author SHA1 Message Date
e607a4abf9 Ensure that init_flow is used in conjunction with init 2025-02-01 12:15:56 -05:00
6f0f1749a4 Document flow_init in readme 2025-02-01 12:10:50 -05:00
2 changed files with 11 additions and 0 deletions

View File

@@ -161,6 +161,11 @@ should be a `;` sperated list of `key=value` pairs. The possible keys are
be `RK4` for Runge-Kutta 4 (default) or `RK2` for Runge-Kutta 2. Adaptive be `RK4` for Runge-Kutta 4 (default) or `RK2` for Runge-Kutta 2. Adaptive
step algorithms cannot be used for the tangent flow. step algorithms cannot be used for the tangent flow.
* `init_flow` (`identity` or `file` (default)): if set to `file`, then read the
initial condition for the tangent flow (used for the Lyapunov exponent
computation) from the init file (the same as for `init`, which needs to be
specified). Otherwise, the flow is initialized as the identity matrix.
# Interrupting and resuming the computation # Interrupting and resuming the computation

View File

@@ -686,6 +686,12 @@ int read_params(
parameters->lyapunov_reset=parameters->print_freq; parameters->lyapunov_reset=parameters->print_freq;
} }
// check that if flow_init is used, then so is init
if(parameters->init_flow_file && parameters->init!=INIT_FILE){
fprintf(stderr, "error: cannot use 'init_flow:file' if 'init' is not a binary file\n");
return(-1);
}
return(0); return(0);
} }