# LINSOL_USER_DEFINED_PARAMETER_FILE
#
# File with important parameters and definitions for LINSOL
# that HAS TO BE modified by the user!

# Specify if input-matrix is given
#   in  binary LINSOL-format  (0)
#   in  LINSOL-format         (1)
#   in  Harwell/Boeing-format (2)
#   as  random-matrix         (3)

INPUT_FORMAT = 2


# If the input-matrix is given as random-matrix then specify the necessary
# parameters in the file RANDOM_PARAMETER_FILENAME

RANDOM_PARAMETER_FILENAME =


# If the input-matrix is already distributed in multiple files then
# set the variable MATRIX_DISTRIBUTED = 1, else set
# MATRIX_DISTRIBUTED = 0

MATRIX_DISTRIBUTED = 0


# Specify the file-name of the input-matrix with path:
# the file-names of distributed matrices have the following form :
#    matrix_0001   matrix_0002   matrix_0003  ...
# E.g. for 16 procs specify the filename without the suffices _{0001...0016}

MATRIX_INPUT_FILENAME = $LINSOL_FILES_DIR/matrices/gre512.rua


# If you want to save the original input-matrix in another format
# then you have to specify :
#   1) the new matrix-output-format
#   2) the filename for the output-matrix with path

#
#  there are 3 possible output-formats :
#
#   MATRIX_OUTPUT_FORMAT = 0   no saving in another format
#   MATRIX_OUTPUT_FORMAT = 1   for LINSOL-format
#   MATRIX_OUTPUT_FORMAT = 2   for binary LINSOL-format
#   MATRIX_OUTPUT_FORMAT = 3   for Harwell/Boeing-format (not available)

MATRIX_OUTPUT_FORMAT = 0
MATRIX_OUTPUT_FILENAME = $LINSOL_FILES_DIR/matrices/gre512.lsol


# Specify the Number of Right-Hand-Sides
# NUMBER_RHS > 0  means that NRHS right-hand-sides are computed
#                 taking it from file $RHS_INPUT_FILENAME
# NUMBER_RHS = 0  means that the right-hand-side is taken from
#                 the same file as the matrix (works only with matrices
#                 stored in Harwell/Boeing-format - not available)
# NUMBER_RHS = -1 means that the right-hand-side is computed
#                 automatically.

NUMBER_RHS = -1


# Specify the filename with the Right Hand Side with path
# Must be specified only, if NUMBER_RHS > 0

RHS_INPUT_FILENAME = $LINSOL_FILES_DIR/matrices/right_hand_side



# If you want to use a initial guess, set INITGUESS = 1 else set
# INITGUESS = 0

INITGUESS = 0


# Specify the filename with the initial guess Must be specified only,
# if INITGUESS = 1

INITGUESS_INPUT_FILENAME = $LINSOL_FILES_DIR/matrices/initguess


# Specify the name of the file with the solution-vector with path

SOLUTIONS_FILENAME = $LINSOL_FILES_DIR/matrices/solution


# Method selection (see also parameter ilin(1) in manual page LSOLP)
#
#   METHOD =   1    :    PRES20
#   METHOD =   2    :    BICO
#   METHOD =   3    :    Bi-CGSTAB
#   METHOD =   4    :    AT-PRES
#   METHOD =   5    :    CGS
#   METHOD =   6    :    QMR-Simulator
#   METHOD =   7    :    Bi-CGSTAB(2)
#   METHOD =   9    :    CG-AT for non-symmetric matrices
#   METHOD =  15    :    GMERR5
#   METHOD =  16    :    GMERR20
#   METHOD = 100    :    Classical CG for symmetric matrices
#   METHOD = 101    :    GMERRS for symmetric matrices
#   METHOD = 200    :    Polyalgorithm PRES20 -> BICO -> AT-PRES
#   METHOD = 201    :    Polyalgorithm PRES20 <-> BICO <-> AT-PRES
#   METHOD = 202    :    Polyalgorithm PRES20 -> BICO -> GMERR5 -> AT-PRES
#   METHOD = 203    :    Polyalgorithm PRES20 -> BICO -> GMERR5 <-> AT-PRES
#   METHOD = 204    :    Polyalgorithm PRES20 -> BICO -> GMERR20 -> AT-PRES
#   METHOD = 210    :    Polyalgorithm GMERR5 -> AT-PRES
#   METHOD = 211    :    Polyalgorithm GMERR5 <-> AT-PRES
#   METHOD = 212    :    Polyalgorithm GMERR20 -> AT-PRES
#   METHOD = 220    :    Polyalgorithm GMERRS -> CG for symmetric matrices
#   METHOD = 221    :    Polyalgorithm GMERRS <-> CG for symmetric matrices

METHOD = 4


# Select the method of normalization
# (see also parameter ilin(15) in manual page LSOLP)
#   NORMALIZATION_METHOD =  0  :  no normalization
#   NORMALIZATION_METHOD =  1  :  normalization by row sum
#   NORMALIZATION_METHOD =  2  :  normalization by main diagonal
#   NORMALIZATION_METHOD =  3  :  normalization by square sum
#   NORMALIZATION_METHOD =  4  :  Froboenius normalization
#   NORMALIZATION_METHOD = 11  :  \
#   NORMALIZATION_METHOD = 12  :   | same as 1-4, but with square root
#                                  | of preconditioning matrix from left
#   NORMALIZATION_METHOD = 13  :   | and right (automatically selected if
#   NORMALIZATION_METHOD = 14  :  /             matrix is symmetric)

NORMALIZATION_METHOD = 3


# Specify the method of preconditioning
# Lsym = .false. -->    GAUSS algorithm
# Lsym = .true.  -->    CHOLESKY algorithm
#   PRECONDITIONING_METHOD = 0  :  no preconditioning
#   PRECONDITIONING_METHOD = 63 :  preconditioning by GAUSS/CHOLESKY (middle)
#   PRECONDITIONING_METHOD = 66 :  preconditioning by GAUSS/CHOLESKY (right)
#   PRECONDITIONING_METHOD = 69 :  preconditioning by GAUSS/CHOLESKY (left)

PRECONDITIONING_METHOD = 0


# Specify the fill in factor for the preconditioning by GAUSS/CHOLESKY.
# GAUSS_FACTOR = 2.0 means that the preconditioning matrix can
# enlarged by factor 2.0 by fill in

GAUSS_FACTOR =


# Specify the 1st threshold value if you use preconditioning by GAUSS/CHOLESKY
# GAUSS_THRES1 = 0.0      :  full copy of matrix into preconditioning
#                            matrix
# GAUSS_THRES1 = x > 0.0  :  about x percent are being dropped

GAUSS_THRES1 =


# Specify the 2nd threshold value if you use preconditioning by GAUSS/CHOLESKY
# GAUSS_THRES2 = 0.0      :  full fill in during factorization
# GAUSS_THRES2 = x > 0.0  :  values < x*|maximal value of pre-
#                            conditioning matrix| are being dropped
# GAUSS_THRES2 = 0.0      :  no fill in (factorization works on the

GAUSS_THRES2 =


# Specify if the matrix is already normalized.
#   MATRIX_NORMALIZED = 0  :  matrix is not normalized
#   MATRIX_NORMALIZED = 1  :  matrix is normalized

MATRIX_NORMALIZED = 0


# Specify which system is considered for checking of stopping criterion
# (see also parameter ilin(9) in manual pages LSOLP)
#   CHECK_SYSTEM = 0  :  normalized system is considered
#                        for checking of stopping criterion
#   CHECK_SYSTEM = 1  :  original system is considered
#                        for checking of stopping criterion

CHECK_SYSTEM = 0


# Specify if smoothed solution should be returned
#   SMOOTHED  = 0  :  LINSOL returns the non-smoothed solution
#   SMOOTHED <> 0  :  LINSOL returns the smoothed solution

SMOOTHED = 1


# Maximal number of iteration steps
# (see also parameter ilin(2) in manual page LSOLP)

ITERATION_MAXIMUM = 10000


# Specify if messages are printed to
#   6 : stdout
#   7 : file with filename linout{_0001..._0016} (e.g. for 16 procs)

OUTPUT_DEVICE = 6


# Specify verbose level (amount of output)
# (see also parameter ilin(13) in manual page LSOLP)
#   VERBOSE_LEVEL =    0  :  print only error messages
#   VERBOSE_LEVEL =    1  :  print further informations, but no
#                            output during iteration
#   VERBOSE_LEVEL =  i>1  :  output always after i iteration-steps
#                            on the process(or) number 1
#   VERBOSE_LEVEL = -i<0  :  it holds the same as for idoku>0 with
#                            the difference of output on all
#                            processors

VERBOSE_LEVEL = 20


# Miscellaneous
# (see also parameter ilin(19) in manual page LSOLP)
#   MISC = 00000  :  Standard LINSOL
#   MISC = 00001  :  Printing and checking - as far as possible - of vector
#                    terms after all optimization steps (see OPTIMIZE)
#   MISC = 00002  :  Printing and checking - as far as possible - of vector
#                    terms after all optimization steps (see OPTIMIZE)
#                    and normalization and cache optimization
#   MISC = 00003  :  MISC = 00001 + MISC = 00002
#   MISC = 00010  :  Check, if recursions emerge (only relevant on vector
#                    computers - not available)
#   MISC = 00100  :  Storing of matrix MAT in LINSOL-format
#   MISC = 00200  :  Storing of matrix MAT in binary LINSOL-format
#   MISC = 01000  :  Output of error
#   MISC = 10000  :  Print residuals (and errors, if the output of errors
#                    is enabled) in file plot_<date>_<time>

MISC = 00000


# Specify optimization strategies
# (see also parameter ilin(20) in manual pages LSOLP)
#   OPTIMIZE = 0000000 :  No optimization
#   OPTIMIZE = 0000001 :  Time statistics
#   OPTIMIZE = 0000010 :  Printing of statistics regarding the data structures
#   OPTIMIZE = 0000100 :  Safe cache reuse, i.e. arrays MAT and INDEX do not
#                         change
#   OPTIMIZE = 0000200 :  Unsafe cache reuse, i.e. arrays MAT and INDEX do
#                         change
#   OPTIMIZE = 0001000 :  Remove zero entries in matrix MAT
#   OPTIMIZE = 0010000 :  Restore matrix MAT completely in storage pattern
#                         'packed row'
#   OPTIMIZE = 0100000 :  Search single entries in rows and store them on the
#                         main diagonal by permuting the matrix MAT rowwise;
#                         if the matrix is not symmetric, then the matrix
#                         size is reduced by shifting entries of known solution
#                         components to the right hand side
#   OPTIMIZE = 0200000 :  Bandwidth optimizer
#   OPTIMIZE = 0300000 :  OPTIMIZE = 100000 + OPTIMIZE = 200000
#   OPTIMIZE = 1000000 :  Optimization of data strucures; matrix will be
#                         restored in storage patterns 'full diagonal',
#                         'packed diagonal' and 'starry sky'
#                         (not yet available)

OPTIMIZE = 0001001


# Runtime acceleration parameter
#   RUNACC = 0 :  version with minimum storage requirements is used
#   RUNACC = 1 :  runtime is accelerated, but additional storage
#                 is allocated

RUNTIME_ACCELERATION = 0


# Bandwidth optimization algorithm
#   1 - Gibbs-Poole-Stockmeyer
#   2 - Schoenauer
#   3 - Reverse Cuthill-McKee
#   4 - Reverse Cuthill-McKee (no iteration)

BANDW_ALG =


# Specify threshold value for LINSOL

THRESHOLD = 1.e-8


# Specify temporary directory for scratch files

TEMP_DIR = /tmp


# Specify buffer size in MB for temporary buffers

BUFFER_SIZE = 20


# Specify by which factor the matrix size to be read in from file
# is enlarged

MATRIX_FACTOR = 1.0


# Specify by which factor the size of the index array to be read in
# from file is enlarged

INDEX_FACTOR = 1.0


# Specify by which factor the first dimension of the info array
# to be read in from file is enlarged

INFO_FACTOR = 1.0
