ESYS13  Revision_
Options.h
Go to the documentation of this file.
00001 
00002 /*******************************************************
00003 *
00004 * Copyright (c) 2003-2012 by University of Queensland
00005 * Earth Systems Science Computational Center (ESSCC)
00006 * http://www.uq.edu.au/esscc
00007 *
00008 * Primary Business: Queensland, Australia
00009 * Licensed under the Open Software License version 3.0
00010 * http://www.opensource.org/licenses/osl-3.0.php
00011 *
00012 *******************************************************/
00013 
00014 
00015 /**************************************************************/
00016 
00017 /*   Paso: Options */
00018 
00019 /**************************************************************/
00020 
00021 /*   Copyrights by ACcESS Australia 2003,2004,2005 */
00022 /*   Author: Lutz Gross, l.gross@uq.edu.au */
00023 
00024 /**************************************************************/
00025 
00026 #ifndef INC_PASO_OPTIONS
00027 #define INC_PASO_OPTIONS
00028 
00029 #include "esysUtils/Esys_MPI.h"
00030 
00031 /* solver options */
00032 
00033 #define PASO_DEFAULT 0
00034 #define PASO_DIRECT 1
00035 #define PASO_CHOLEVSKY 2
00036 #define PASO_PCG 3
00037 #define PASO_CR 4
00038 #define PASO_CGS 5
00039 #define PASO_BICGSTAB 6
00040 #define PASO_ILU0 8
00041 #define PASO_ILUT 9
00042 #define PASO_JACOBI 10
00043 #define PASO_GMRES 11
00044 #define PASO_PRES20 12
00045 #define PASO_LUMPING 13
00046 #define PASO_NO_REORDERING 17
00047 #define PASO_MINIMUM_FILL_IN 18
00048 #define PASO_NESTED_DISSECTION 19
00049 #define PASO_MKL 15
00050 #define PASO_UMFPACK 16
00051 #define PASO_ITERATIVE 20
00052 #define PASO_PASO 21
00053 #define PASO_AMG 22
00054 #define PASO_REC_ILU  23
00055 #define PASO_TRILINOS  24
00056 #define PASO_NONLINEAR_GMRES  25
00057 #define PASO_TFQMR  26
00058 #define PASO_MINRES  27
00059 #define PASO_GAUSS_SEIDEL 28
00060 #define PASO_GS PASO_GAUSS_SEIDEL
00061 #define PASO_RILU 29
00062 #define PASO_DEFAULT_REORDERING 30
00063 #define PASO_SUPER_LU 31
00064 #define PASO_PASTIX 32
00065 #define PASO_STANDARD_COARSENING 39
00066 #define PASO_YAIR_SHAPIRA_COARSENING 33
00067 #define PASO_RUGE_STUEBEN_COARSENING 34
00068 #define PASO_AGGREGATION_COARSENING 35
00069 #define PASO_NO_PRECONDITIONER 36
00070 #define PASO_MIN_COARSE_MATRIX_SIZE 37
00071 #define PASO_AMLI 38
00072 #define PASO_CLASSIC_INTERPOLATION_WITH_FF_COUPLING 50
00073 #define PASO_CLASSIC_INTERPOLATION 51
00074 #define PASO_DIRECT_INTERPOLATION 52
00075 #define PASO_BOOMERAMG 60
00076 #define PASO_CIJP_FIXED_RANDOM_COARSENING 61
00077 #define PASO_CIJP_COARSENING 62
00078 #define PASO_FALGOUT_COARSENING 63
00079 #define PASO_PMIS_COARSENING 64
00080 #define PASO_HMIS_COARSENING 65
00081 
00082 #define PASO_LINEAR_CRANK_NICOLSON 66
00083 #define PASO_CRANK_NICOLSON 67
00084 #define PASO_BACKWARD_EULER 68
00085 
00086 
00087 
00088 
00089 #define PASO_SMOOTHER 99999999
00090 
00091 typedef struct {
00092     index_t method;
00093     index_t package;
00094     bool_t symmetric;
00095     double tolerance;
00096     double absolute_tolerance;
00097     double inner_tolerance;
00098     bool_t adapt_inner_tolerance;
00099     bool_t verbose;
00100     bool_t reordering;
00101     index_t preconditioner;
00102     dim_t iter_max;
00103     dim_t inner_iter_max;
00104     double drop_tolerance;
00105     double drop_storage;
00106     index_t truncation;
00107     index_t restart;
00108     dim_t sweeps;
00109     dim_t pre_sweeps;
00110     dim_t post_sweeps;
00111     dim_t cycle_type;
00112     dim_t level_max;
00113     dim_t min_coarse_matrix_size;
00114     dim_t smoother;
00115     double coarsening_threshold;
00116     bool_t accept_failed_convergence;
00117     index_t coarsening_method;
00118     double relaxation_factor;
00119     bool_t use_local_preconditioner;
00120     double min_coarse_sparsity;
00121     dim_t refinements;
00122     dim_t coarse_matrix_refinements;
00123     double diagonal_dominance_threshold;
00124     bool_t usePanel;
00125     index_t interpolation_method;
00126     index_t ode_solver;
00127     
00128     /* diagnostic values */
00129     dim_t num_iter;
00130     dim_t num_level;
00131     dim_t num_inner_iter;
00132     double time;
00133     double set_up_time;
00134     double coarsening_selection_time;
00135     double coarsening_matrix_time;
00136     double net_time;
00137     double residual_norm;
00138     bool_t converged;
00139     double preconditioner_size; /* in Mbytes */
00140     bool_t time_step_backtracking_used;
00141     double coarse_level_sparsity;
00142     dim_t num_coarse_unknowns;
00143 
00144 } Paso_Options;
00145 
00146 /*  interfaces: */
00147 
00148 
00149 PASO_DLL_API
00150 void Paso_Options_setDefaults(Paso_Options* in);
00151 
00152 PASO_DLL_API
00153 void Paso_Options_show(const Paso_Options* options);
00154 
00155 PASO_DLL_API
00156 void Paso_Options_showDiagnostics(const Paso_Options* options);
00157 const char* Paso_Options_name(const index_t key);
00158 index_t Paso_Options_getPackage(index_t solver,index_t package, bool_t symmetry, Esys_MPIInfo *mpi_info);
00159 
00160 index_t Paso_Options_getSolver(index_t solver,index_t package, bool_t symmetry, Esys_MPIInfo *mpi_info);
00161 
00162 #define Paso_Options_copy(in,out) memcpy((Paso_Options*)out,(Paso_Options*)in,sizeof(Paso_Options))
00163 
00164 #endif /* #ifndef INC_PASO_OPTIONS */