00001 00002 /******************************************************* 00003 * 00004 * Copyright (c) 2003-2009 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: SystemMatrix and SystemVector */ 00018 00019 /**************************************************************/ 00020 00021 /* Copyrights by ACcESS Australia 2003,2004,2005 */ 00022 /* Author: gross@access.edu.au */ 00023 00024 /**************************************************************/ 00025 00026 #ifndef INC_PASO_OPTIONS 00027 #define INC_PASO_OPTIONS 00028 00029 #include "Paso_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_SSOR 7 00041 #define PASO_ILU0 8 00042 #define PASO_ILUT 9 00043 #define PASO_JACOBI 10 00044 #define PASO_GMRES 11 00045 #define PASO_PRES20 12 00046 #define PASO_LUMPING 13 00047 #define PASO_NO_REORDERING 17 00048 #define PASO_MINIMUM_FILL_IN 18 00049 #define PASO_NESTED_DISSECTION 19 00050 #define PASO_MKL 15 00051 #define PASO_UMFPACK 16 00052 #define PASO_ITERATIVE 20 00053 #define PASO_PASO 21 00054 #define PASO_AMG 22 00055 #define PASO_REC_ILU 23 00056 #define PASO_TRILINOS 24 00057 #define PASO_NONLINEAR_GMRES 25 00058 #define PASO_TFQMR 26 00059 #define PASO_MINRES 27 00060 #define PASO_GAUSS_SEIDEL 28 00061 #define PASO_GS PASO_GAUSS_SEIDEL 00062 #define PASO_RILU 29 00063 #define PASO_DEFAULT_REORDERING 30 00064 #define PASO_SUPER_LU 31 00065 #define PASO_PASTIX 32 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 00072 typedef struct { 00073 index_t method; 00074 index_t package; 00075 bool_t symmetric; 00076 double tolerance; 00077 double absolute_tolerance; 00078 double inner_tolerance; 00079 bool_t adapt_inner_tolerance; 00080 bool_t verbose; 00081 bool_t reordering; 00082 index_t preconditioner; 00083 dim_t iter_max; 00084 dim_t inner_iter_max; 00085 double drop_tolerance; 00086 double drop_storage; 00087 index_t truncation; 00088 index_t restart; 00089 dim_t sweeps; 00090 dim_t pre_sweeps; 00091 dim_t post_sweeps; 00092 dim_t level_max; 00093 dim_t min_coarse_matrix_size; 00094 double coarsening_threshold; 00095 bool_t accept_failed_convergence; 00096 index_t coarsening_method; 00097 double relaxation_factor; 00098 00099 /* diagnostic values */ 00100 dim_t num_iter; 00101 dim_t num_level; 00102 dim_t num_inner_iter; 00103 double time; 00104 double set_up_time; 00105 double net_time; 00106 double residual_norm; 00107 bool_t converged; 00108 00109 } Paso_Options; 00110 00111 /* interfaces: */ 00112 00113 00114 PASO_DLL_API 00115 void Paso_Options_setDefaults(Paso_Options* in); 00116 00117 PASO_DLL_API 00118 void Paso_Options_show(const Paso_Options* options); 00119 00120 PASO_DLL_API 00121 void Paso_Options_showDiagnostics(const Paso_Options* options); 00122 const char* Paso_Options_name(const index_t key); 00123 index_t Paso_Options_getPackage(index_t solver,index_t package, bool_t symmetry, Paso_MPIInfo *mpi_info); 00124 00125 index_t Paso_Options_getSolver(index_t solver,index_t package, bool_t symmetry, Paso_MPIInfo *mpi_info); 00126 00127 #define Paso_Options_copy(in,out) memcpy((Paso_Options*)out,(Paso_Options*)in,sizeof(Paso_Options)) 00128 00129 #endif /* #ifndef INC_PASO_OPTIONS */