/[escript]/trunk/paso/src/Options.h
ViewVC logotype

Annotation of /trunk/paso/src/Options.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7011 - (hide annotations)
Wed Jul 22 04:13:34 2020 UTC (2 months, 1 week ago) by uqaeller
File MIME type: text/plain
File size: 4205 byte(s)
Prototype for the builtin MUMPS solver.


1 ksteube 1312
2 jfenwick 3981 /*****************************************************************************
3 ksteube 1811 *
4 uqaeller 6939 * Copyright (c) 2003-2020 by The University of Queensland
5 jfenwick 3981 * http://www.uq.edu.au
6 ksteube 1811 *
7     * Primary Business: Queensland, Australia
8 jfenwick 6112 * Licensed under the Apache License, version 2.0
9     * http://www.apache.org/licenses/LICENSE-2.0
10 ksteube 1811 *
11 jfenwick 3981 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 jfenwick 4657 * Development 2012-2013 by School of Earth Sciences
13 uqaeller 6939 * Development from 2014-2017 by Centre for Geoscience Computing (GeoComp)
14     * Development from 2019 by School of Earth and Environmental Sciences
15     **
16 jfenwick 3981 *****************************************************************************/
17 dhawcroft 631
18 ksteube 1811
19 caltinay 4846 /****************************************************************************/
20 jgs 150
21 caltinay 3642 /* Paso: Options */
22 jgs 150
23 caltinay 4846 /****************************************************************************/
24 jgs 150
25     /* Copyrights by ACcESS Australia 2003,2004,2005 */
26 jfenwick 2608 /* Author: Lutz Gross, l.gross@uq.edu.au */
27 jgs 150
28 caltinay 4846 /****************************************************************************/
29 jgs 150
30 caltinay 4846 #ifndef __PASO_OPTIONS_H__
31     #define __PASO_OPTIONS_H__
32 jgs 150
33 caltinay 5948 #include "Paso.h"
34 gross 2315
35 caltinay 5929 #include <boost/python/object.hpp>
36    
37 caltinay 4846 // valid solver options
38 jgs 150 #define PASO_DEFAULT 0
39     #define PASO_DIRECT 1
40     #define PASO_CHOLEVSKY 2
41     #define PASO_PCG 3
42     #define PASO_CR 4
43     #define PASO_CGS 5
44     #define PASO_BICGSTAB 6
45     #define PASO_ILU0 8
46     #define PASO_ILUT 9
47     #define PASO_JACOBI 10
48     #define PASO_GMRES 11
49     #define PASO_PRES20 12
50 caltinay 4846 #define PASO_MKL 15
51     #define PASO_UMFPACK 16
52 jgs 150 #define PASO_NO_REORDERING 17
53     #define PASO_MINIMUM_FILL_IN 18
54     #define PASO_NESTED_DISSECTION 19
55     #define PASO_ITERATIVE 20
56     #define PASO_PASO 21
57 uqaeller 7011 #define PASO_MUMPS 22
58 gross 2474 #define PASO_REC_ILU 23
59     #define PASO_TRILINOS 24
60     #define PASO_NONLINEAR_GMRES 25
61     #define PASO_TFQMR 26
62     #define PASO_MINRES 27
63     #define PASO_GAUSS_SEIDEL 28
64     #define PASO_GS PASO_GAUSS_SEIDEL
65     #define PASO_RILU 29
66     #define PASO_DEFAULT_REORDERING 30
67     #define PASO_NO_PRECONDITIONER 36
68 gross 3440 #define PASO_CLASSIC_INTERPOLATION_WITH_FF_COUPLING 50
69     #define PASO_CLASSIC_INTERPOLATION 51
70     #define PASO_DIRECT_INTERPOLATION 52
71 gross 3650 #define PASO_LINEAR_CRANK_NICOLSON 66
72     #define PASO_CRANK_NICOLSON 67
73     #define PASO_BACKWARD_EULER 68
74 gross 3283
75 caltinay 4846 #define PASO_SMOOTHER 99999999
76 gross 3440
77 caltinay 4846 namespace paso {
78 gross 3650
79 caltinay 4846 struct Options
80     {
81     Options() { setDefaults(); }
82 gross 3283
83 caltinay 5929 /// constructor that fills values from an escript SolverBuddy instance
84     Options(const boost::python::object& options);
85    
86 caltinay 4846 /// sets the default values for solver options
87     void setDefaults();
88    
89     /// prints current option values
90     void show() const;
91    
92     /// prints diagnostic data
93     void showDiagnostics() const;
94    
95 caltinay 5929 /// updates SolverBuddy diagnostics from this
96     void updateEscriptDiagnostics(boost::python::object& options) const;
97    
98     /// returns the corresponding paso option code for an escript option code
99     static int mapEscriptOption(int escriptOption);
100    
101 caltinay 5179 static const char* name(int key);
102 caltinay 4846
103 caltinay 5179 static int getPackage(int solver, int package, bool symmetry,
104 caltinay 5997 const escript::JMPI& mpi_info);
105 caltinay 4846
106     /// returns the solver to be used with given combination
107 caltinay 5179 static int getSolver(int solver, int package, bool symmetry,
108 caltinay 5997 const escript::JMPI& mpi_info);
109 caltinay 4846
110 caltinay 5179 int method;
111     int package;
112 jfenwick 4521 bool symmetric;
113 aellery 6799 bool hermitian;
114 jgs 150 double tolerance;
115 gross 1476 double absolute_tolerance;
116     double inner_tolerance;
117 jfenwick 4521 bool adapt_inner_tolerance;
118     bool verbose;
119     bool reordering;
120 caltinay 5179 int preconditioner;
121 jgs 150 dim_t iter_max;
122 gross 1476 dim_t inner_iter_max;
123 jgs 150 double drop_tolerance;
124     double drop_storage;
125 gross 2474 index_t truncation;
126     index_t restart;
127 caltinay 5179 int sweeps;
128 jfenwick 4521 bool accept_failed_convergence;
129 gross 2474 double relaxation_factor;
130 jfenwick 4521 bool use_local_preconditioner;
131 gross 3283 dim_t refinements;
132 caltinay 5179 int ode_solver;
133 caltinay 4873
134 caltinay 4846 // diagnostic values
135 gross 2474 dim_t num_iter;
136 gross 2446 dim_t num_level;
137     dim_t num_inner_iter;
138     double time;
139 gross 2474 double set_up_time;
140 gross 3283 double coarsening_selection_time;
141     double coarsening_matrix_time;
142 lgao 2596 double net_time;
143 gross 2474 double residual_norm;
144 jfenwick 4521 bool converged;
145 caltinay 4846 double preconditioner_size; // in Mbytes
146 jfenwick 4521 bool time_step_backtracking_used;
147 gross 3402 double coarse_level_sparsity;
148     dim_t num_coarse_unknowns;
149 caltinay 4846 };
150 gross 2446
151 caltinay 4846 } // namespace paso
152 jgs 150
153 caltinay 4846 #endif // __PASO_OPTIONS_H__
154 jgs 150

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26