A Module For Storing The Parameters For Iterative Solvers.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=NTREAL), | public, | parameter | :: | CONVERGENCE_DIFF_CONST | = | 1e-6 | The default convergence difference. |
| integer, | public, | parameter | :: | MAX_ITERATIONS_CONST | = | 1000 | The default maximum number of iterations. |
Construct a data type which stores iterative solver parameters.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=NTREAL), | intent(in), | optional | :: | converge_diff_in | Converge_diff_in the difference between iterations to consider a calculation converged. |
|
| real(kind=NTREAL), | intent(in), | optional | :: | threshold_in | The zero threshold |
|
| integer, | intent(in), | optional | :: | max_iterations_in | The maximum number of iterations to perform |
|
| logical, | intent(in), | optional | :: | be_verbose_in | Whether to print during the calculation (default = False) |
|
| type(Permutation_t), | intent(in), | optional | :: | BalancePermutation_in | For load balancing |
|
| integer, | intent(in), | optional | :: | dac_base_size_in | Base size for the divided and conquer solvers. |
|
| real(kind=NTREAL), | intent(in), | optional | :: | dac_base_sparsity_in | Base sparsity for the divide and conquer solvers. |
A class for passing parameters to an iterative solver.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=NTREAL), | public | :: | converge_diff | When do we consider a calculation converged. |
|||
| integer, | public | :: | max_iterations | Maximum number of iterations of a solver before termination. |
|||
| real(kind=NTREAL), | public | :: | threshold | Threshold for sparse multiplication and addition. |
|||
| logical, | public | :: | be_verbose | If true, the sparse solver prints out information each loop iteration. |
|||
| logical, | public | :: | do_load_balancing | If true, the sparse solver will try and load balance before calculation. |
|||
| type(Permutation_t), | public | :: | BalancePermutation | The permutation used for load balancing. |
|||
| integer, | public | :: | dac_base_size | For the divide and conquer solvers when to switch to a dense solver. |
|||
| real(kind=NTREAL), | public | :: | dac_base_sparsity | For the divide and conquer solvers when to switch to a dense solver. |
| private pure function SolverParameters_init(converge_diff_in, threshold_in, max_iterations_in, be_verbose_in, BalancePermutation_in, dac_base_size_in, dac_base_sparsity_in) | Construct a data type which stores iterative solver parameters. |
Set the value of the convergence difference.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(SolverParameters_t), | intent(inout) | :: | this | The parameter object. |
||
| real(kind=NTREAL), | intent(in) | :: | new_value | Value to set it to. |
Set the value of the max iterations.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(SolverParameters_t), | intent(inout) | :: | this | The parameter object. |
||
| integer, | intent(in) | :: | new_value | Value to set it to. |
Set the value of the threshold.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(SolverParameters_t), | intent(inout) | :: | this | The parameter object. |
||
| real(kind=NTREAL), | intent(in) | :: | new_value | Value to set it to. |
Set the value of the verbosity.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(SolverParameters_t), | intent(inout) | :: | this | The parameter object. |
||
| logical, | intent(in) | :: | new_value | Value to set it to. |
Set the value of the load balance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(SolverParameters_t), | intent(inout) | :: | this | The parameter object. |
||
| type(Permutation_t), | intent(in) | :: | new_value | Value to set it to. |
Set the value of the divide and conquer base size.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(SolverParameters_t), | intent(inout) | :: | this | The parameter object. |
||
| integer, | intent(in) | :: | new_value | Value to set it to. |
Set the value of the divide and conquer base sparsity.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(SolverParameters_t), | intent(inout) | :: | this | The parameter object. |
||
| real(kind=NTREAL), | intent(in) | :: | new_value | Value to set it to. |
Print out the iterative solver parameter values.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(SolverParameters_t), | intent(in) | :: | this | The parameter object. |
Cleanup the solver parameters datastructure.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(SolverParameters_t), | intent(inout) | :: | this | The parameter object. |