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