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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7011 - (show annotations)
Wed Jul 22 04:13:34 2020 UTC (8 weeks, 4 days ago) by uqaeller
File MIME type: text/plain
File size: 4205 byte(s)
Prototype for the builtin MUMPS solver.


1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2020 by The University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Apache License, version 2.0
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development 2012-2013 by School of Earth Sciences
13 * Development from 2014-2017 by Centre for Geoscience Computing (GeoComp)
14 * Development from 2019 by School of Earth and Environmental Sciences
15 **
16 *****************************************************************************/
17
18
19 /****************************************************************************/
20
21 /* Paso: Options */
22
23 /****************************************************************************/
24
25 /* Copyrights by ACcESS Australia 2003,2004,2005 */
26 /* Author: Lutz Gross, l.gross@uq.edu.au */
27
28 /****************************************************************************/
29
30 #ifndef __PASO_OPTIONS_H__
31 #define __PASO_OPTIONS_H__
32
33 #include "Paso.h"
34
35 #include <boost/python/object.hpp>
36
37 // valid solver options
38 #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 #define PASO_MKL 15
51 #define PASO_UMFPACK 16
52 #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 #define PASO_MUMPS 22
58 #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 #define PASO_CLASSIC_INTERPOLATION_WITH_FF_COUPLING 50
69 #define PASO_CLASSIC_INTERPOLATION 51
70 #define PASO_DIRECT_INTERPOLATION 52
71 #define PASO_LINEAR_CRANK_NICOLSON 66
72 #define PASO_CRANK_NICOLSON 67
73 #define PASO_BACKWARD_EULER 68
74
75 #define PASO_SMOOTHER 99999999
76
77 namespace paso {
78
79 struct Options
80 {
81 Options() { setDefaults(); }
82
83 /// constructor that fills values from an escript SolverBuddy instance
84 Options(const boost::python::object& options);
85
86 /// 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 /// 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 static const char* name(int key);
102
103 static int getPackage(int solver, int package, bool symmetry,
104 const escript::JMPI& mpi_info);
105
106 /// returns the solver to be used with given combination
107 static int getSolver(int solver, int package, bool symmetry,
108 const escript::JMPI& mpi_info);
109
110 int method;
111 int package;
112 bool symmetric;
113 bool hermitian;
114 double tolerance;
115 double absolute_tolerance;
116 double inner_tolerance;
117 bool adapt_inner_tolerance;
118 bool verbose;
119 bool reordering;
120 int preconditioner;
121 dim_t iter_max;
122 dim_t inner_iter_max;
123 double drop_tolerance;
124 double drop_storage;
125 index_t truncation;
126 index_t restart;
127 int sweeps;
128 bool accept_failed_convergence;
129 double relaxation_factor;
130 bool use_local_preconditioner;
131 dim_t refinements;
132 int ode_solver;
133
134 // diagnostic values
135 dim_t num_iter;
136 dim_t num_level;
137 dim_t num_inner_iter;
138 double time;
139 double set_up_time;
140 double coarsening_selection_time;
141 double coarsening_matrix_time;
142 double net_time;
143 double residual_norm;
144 bool converged;
145 double preconditioner_size; // in Mbytes
146 bool time_step_backtracking_used;
147 double coarse_level_sparsity;
148 dim_t num_coarse_unknowns;
149 };
150
151 } // namespace paso
152
153 #endif // __PASO_OPTIONS_H__
154

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26