linear_solver{ }

Calling sequence

currents{ linear_solver{ } }

Properties

  • usage: optional

  • items: maximum 1

Dependencies

Functionality

This group allows modifying parameters impacting algorithm of linear equation solver in current equation.

Examples

currents{
    recombination_model{}
    linear_solver{}
}
currents{
    recombination_model{}
    linear_solver{
        extended_accuracy = 1
    }
}

global{
    simulate1D{}
}

Nested keywords


iterations

Calling sequence

currents{ linear_solver{ iterations } }

Properties

  • usage: optional

  • type: integer

  • unit:

  • values: z1

  • default: z=10000

Functionality

Maximum number of iterations

Example

currents{
    recombination_model{}
    linear_solver{
        iterations = 50000
    }
}

abs_accuracy

Calling sequence

currents{ linear_solver{ abs_accuracy } }

Properties

  • usage: optional

  • type: real number

  • unit:

  • values: [0.0, ...)

  • default: r=1e30

Functionality

Example

currents{
    recombination_model{}
    linear_solver{
        abs_accuracy = 1e-32
    }
}

rel_accuracy

Calling sequence

currents{ linear_solver{ rel_accuracy } }

Properties

  • usage: optional

  • type: real number

  • unit:

  • values: 0.0r106

  • default: r=1e13

Functionality

Example

currents{
    recombination_model{}
    linear_solver{
        rel_accuracy = 1e-15
    }
}

dkr_value

Calling sequence

currents{ linear_solver{ dkr_value } }

Properties

  • usage: optional

  • type: real number

  • unit:

  • values: 0.0r0.5

  • default: r=1.0

Functionality

A parameter to speed up calculations, affects preconditioning

Note

Negative values are ignored but will switch to a slightly slower but more stable preconditioning.

Example

currents{
    recombination_model{}
    linear_solver{
        dkr_value = 0.1
    }
}

use_cscg

Calling sequence

currents{ linear_solver{ use_cscg } }

Properties

  • usage: optional

  • type: choice

  • values: yes or no

  • default: no

Functionality

Forces the slower but occasionally more robust CSCG (Composite Step Conjugate Gradient) linear solver to be used rather than the cg (Conjugate Gradient) linear solver. May occasionally prevent a diagonalization failure.

Example

currents{
    recombination_model{}
    linear_solver{
        use_cscg = yes
    }
}

force_diagonal_preconditioner

Calling sequence

currents{ linear_solver{ force_diagonal_preconditioner } }

Properties

  • usage: optional

  • type: choice

  • values: yes or no

  • default: no

Functionality

Only for debugging purposes, enabling will make code much slower or prevent convergence. Forces the use of a slower but more robust diagonal preconditioner.

This keyword should be used only for debugging purposes. Enabling the diagonal preconditioner makes algorithm much slower or prevent convergence. It can be enabled in case when then default preconditioning fails or the linear solver diverges. In such circumstances, also iterations may require further increasing.

Example

currents{
    recombination_model{}
    linear_solver{
        force_diagonal_preconditioner = yes
    }
}

force_iteration

Calling sequence

currents{ linear_solver{ force_iteration } }

Properties

  • usage: optional

  • type: choice

  • values: yes or no

  • default: no

Functionality

The keyword should be used only for debugging purposes. It will force iteration to reach maximum set by iterations regardless of whether the requested accuracy was reached or not.

Example

currents{
    recombination_model{}
    linear_solver{
        force_iteration = yes
    }
}

extended_accuracy

Calling sequence

currents{ linear_solver{ extended_accuracy } }

Properties

  • usage: optional

  • type: integer

  • unit:

  • values: z=0 or z=1

  • default: z=0

Functionality

If set to 1, then current equation is solved using slower but more accurate solver. It is only implemented for not periodic 1D simulations.

Warning

This feature is at the prototyping stage and may not bring expected improvements.

Example

currents{
    recombination_model{}
    linear_solver{
        extended_accuracy = 1
    }
}


Last update: 02/04/2025