nrek_control_type structure#

#include <galahad_nrek.h>

struct nrek_control_type {
    // fields

    bool f_indexing;
    ipc_ error;
    ipc_ out;
    ipc_ print_level;
    ipc_ eks_max;
    ipc_ it_max;
    rpc_ f;
    rpc_ increase;
    rpc_ stop_residual;
    bool reorthogonalize;
    bool s_version_52;
    bool perturb_c;
    bool stop_check_all_orders;
    bool new_weight;
    bool new_values;
    bool space_critical;
    bool deallocate_error_fatal;
    char linear_solver[31];
    char linear_solver_for_s[31];
    char prefix[31];
    struct sls_control_type sls_control;
    struct sls_control_type sls_s_control;
    struct rqs_control_type rqs_control;
};

detailed documentation#

control derived type as a C struct

components#

bool f_indexing

use C or Fortran sparse matrix indexing

ipc_ error

unit for error messages

ipc_ out

unit for monitor output

ipc_ print_level

controls level of diagnostic output

ipc_ eks_max

maximum dimension of the extended Krylov space employed. If a negative value is given, the value 100 will be used instead

ipc_ it_max

the maximum number of iterations allowed. If a negative value is given, the value 100 will be used instead

rpc_ f

the value of \(f\) in the objective function. This value has no effect on the computed \(x\), and takes the value 0.0 by default

rpc_ increase

the value of the increase factor for a suggested subsequent regularization weight, see control[‘next_weight’]. The suggested weight will be increase times thecurrent weight.

rpc_ stop_residual

the value of the stopping tolerance used by the algorithm. The iteration stops as soon as \(x\) and \(\lambda\) are found to satisfy \(\| ( H + \lambda S ) x + c \| <\) stop_residual \(\times \max( 1, \|c\| )\).

bool reorthogonalize

should be set to true if the generated basis of the extended-Krylov subspace is to be reorthogonalized at every iteration. This can be very expensive, and is generally not warranted

bool s_version_52

should be set to true if Algorithm 5.2 in the paper is used to generate the extended Krylov space recurrences when a non-unit \(S\) is given, and false if those from Algorithm B.3 ares used instead. In practice, there is very little difference in performance and accuracy

bool perturb_c

should be set to true if the user wishes to make a tiny pseudo-random perturbations to the components of the term \(c\) to try to protect from the so-called (probability zero) “hard” case. Perturbations are generally not needed, and should only be used in very exceptional cases

bool stop_check_all_orders

should be set to true if the algorithm checks for termination for each new member of the extended Krylov space. Such checks incur some extra cost, and experience shows that testing every second member is sufficient

bool new_weight

should be set to true if the call retains the previous \(H\), \(S\) and \(c\), but with a new, larger weight

bool new_values

should be set to true if the any of the values of \(H\), \(S\) and \(c\) has changed since a previous call

bool space_critical

if space is critical, ensure allocated arrays are no bigger than needed

bool deallocate_error_fatal

exit if any deallocation fails

char linear_solver[31]

the name of the linear equation solver used to solve any symmetric positive-definite linear system involving \(H\) that might arise. Possible choices are currently: ‘sils’, ‘ma27’, ‘ma57’, ‘ma77’, ‘ma86’, ‘ma87’, ‘ma97’, ssids, ‘pardiso’, ‘wsmp’, ‘sytr’, ‘potr’ and ‘pbtr’ although only ‘sytr’, ‘potr’, ‘pbtr’ and, for OMP 4.0-compliant compilers, ‘ssids’ are installed by default; others are easily installed (see README.external). More details of the capabilities of each solver are provided in the documentation for galahad_sls.

char linear_solver_for_s[31]

the name of the linear equation solver used to solve any symmetric positive-definite linear system involving the optional \(S\) that might arise. Possible choices are currently: ‘sils’, ‘ma27’, ‘ma57’, ‘ma77’, ‘ma86’, ‘ma87’, ‘ma97’, ssids, ‘pardiso’, ‘wsmp’, ‘sytr’, ‘potr’ and ‘pbtr’ although only ‘sytr’, ‘potr’, ‘pbtr’ and, for OMP 4.0-compliant compilers, ‘ssids’ are installed by default; others are easily installed (see README.external). More details of the capabilities of each solver are provided in the documentation for galahad_sls.

char prefix[31]

all output lines will be prefixed by prefix(2:LEN(TRIM(.prefix))-1) where prefix contains the required string enclosed in quotes, e.g. “string” or ‘string’

struct sls_control_type sls_control

control parameters for the Cholesky factorization and solution (see sls_c documentation)

struct sls_control_type sls_s_control

control parameters for the Cholesky factorization and solution when applied to \(S\) (see sls_c documentation)

struct rqs_control_type rqs_control

control parameters for the diagonal subproblem solve (see rqs_c documentation)