ParMooN
Main Page
Related Pages
Classes
Files
File List
All
Classes
Functions
Variables
Friends
Pages
include
AMG
amg_solve.h
1
/****************************************************************************/
2
/* */
3
/* File: amg_solve.h */
4
/* */
5
/* Purpose: solvers for AMG */
6
/* */
7
/* Author: Peter Bastian */
8
/* Institut fuer Computeranwendungen III */
9
/* Universitaet Stuttgart */
10
/* Pfaffenwaldring 27 */
11
/* 70550 Stuttgart */
12
/* email: peter@ica3.uni-stuttgart.de */
13
/* phone: 0049-(0)711-685-7003 */
14
/* fax : 0049-(0)711-685-7000 */
15
/* */
16
/* History: 05 FEB 1996 Begin */
17
/* 02 OKT 1997 redesign */
18
/* */
19
/* Remarks: */
20
/* */
21
/* Author: Volker John */
22
/* Otto--von--Guericke Universitaet Magdeburg */
23
/* Institut fuer Analysis und Numerik */
24
/* Postfach 4120 */
25
/* 39016 Magdeburg */
26
/* email : volker.john@mathematik.uni-magdeburg.de */
27
/* */
28
/* History: 1998/02/19 start using this library for MooN_MD */
29
/* */
30
/* Remarks: */
31
/* */
32
/****************************************************************************/
33
34
/****************************************************************************/
35
/* */
36
/* auto include mechanism and other include files */
37
/* */
38
/****************************************************************************/
39
40
#ifndef __AMG_SOLVE__
41
#define __AMG_SOLVE__
42
43
#include "amg_coarsen.h"
44
45
/****************************************************************************/
46
/* */
47
/* defines in the following order */
48
/* */
49
/* compile time constants defining static data size (i.e. arrays) */
50
/* other constants */
51
/* macros */
52
/* */
53
/****************************************************************************/
54
55
/****************************************************************************/
56
/* */
57
/* data structures exported by the corresponding source file */
58
/* */
59
/****************************************************************************/
60
61
#define AMG_DJAC 1
/* smoother types */
62
#define AMG_SOR 2
63
#define AMG_SSOR 3
64
#define AMG_ILU 4
65
#define AMG_MGC 5
66
#define AMG_ILUT 6
67
#define AMG_SCHUR_COMPLEMENT 7
68
#define AMG_EX 17
/* same as solver */
69
70
#define AMG_LS 11
/* solver types */
71
#define AMG_CG 12
72
#define AMG_BCGS 13
73
#define AMG_GMRES_LEFT 14
74
#define AMG_GMRES_RIGHT 15
75
#define AMG_GMRES_FLEX 16
76
#define AMG_EXACT 17
77
78
#define SCALAR 0
79
#define SADDLE_1 1
80
#define SADDLE_2_TYPE_1 2
81
#define SADDLE_3 3
82
83
#define ILUT_SELECTION_SORT 0
84
#define ILUT_BUBBLE_SORT 1
85
86
#define AMG_MAX_GMRES_RESTART 1000
87
88
#define AMG_CONV_RATE_BACK 10
89
90
typedef
struct
91
{
/* parameters for solver */
92
int
verbose;
/* be verbose */
93
int
system_type;
/* type of the system */
94
95
/* fine grid solver */
96
int
solver;
/* type of solver to be used */
97
int
preconditioner;
/* type of preconditioner */
98
int
maxit;
/* max number of iterations */
99
int
ex_maxit;
/* 1 to execute exactly maxit iterations */
100
double
red_factor;
/* required reduction in residual norm */
101
double
res_norm_min;
/* convergence limit */
102
int
amg_prec_it;
/* number preconditioner of iterations */
103
double
amg_prec_red_factor;
/* required reduction in residual norm for preconditioner*/
104
int
gmres_restart;
/* restart parameter in gmres, also used in lcd */
105
int
lcd_start_vector;
/* choose starting lcd vector */
106
107
/* coarse grid solver */
108
int
coarse_smoother;
/* type of smoother on coarse grid */
109
int
coarse_maxit;
/* iteration number for coarse grid sol */
110
double
coarse_red_factor;
/* required reduction in residual norm */
111
double
omega_coarse[AMG_MAX_COMP];
/* damping factor per component */
112
113
/* multigrid cycle */
114
int
n1,n2;
/* pre and post smoothing */
115
int
gamma;
/* cycle form */
116
double
omega_p[AMG_MAX_COMP];
/* damping factor for interpolation */
117
118
/* smoother */
119
int
smoother;
/* type of smoother to be used */
120
double
smoother_red_factor;
/* required reduction in residual norm */
121
double
omega[AMG_MAX_COMP];
/* damping factor per component */
122
int
step_length_control_fine;
/* step length control on the finest level */
123
int
step_length_control_all;
/* step length control on all levels */
124
double
ilu_beta;
/* parameter for ilu(beta) */
125
126
/*ilut*/
127
double
ilut_tol;
/* tolerance for first dropping criterion */
128
int
ilut_fillin;
/* number of additional fill in's */
129
int
ilut_sort;
/* sorting strategy for ilut */
130
131
/* saddle point problems parameter */
132
int
schur_inv_of_A;
/* method to approximate inv(A) */
133
double
schur_iteration_damp;
/* damping factor in schur complement iteration */
134
int
schur_iteration_maxit;
/* maximal number of it. in schur complement iteration */
135
136
}
AMG_SolverContext
;
137
138
139
/****************************************************************************/
140
/* */
141
/* functions */
142
/* */
143
/****************************************************************************/
144
145
int
AMG (
AMG_SolverContext
*sc,
AMG_CoarsenContext
*cc,
AMG_MATRIX
*A,
AMG_MATRIX
**B,
146
AMG_VECTOR
*x,
AMG_VECTOR
*b,
char
*OutFileName);
147
148
#endif
149
AMG_CoarsenContext
Definition:
amg_coarsen.h:66
amg_vector
Definition:
amg_sp.h:70
amg_matrix
Definition:
amg_sp.h:96
AMG_SolverContext
Definition:
amg_solve.h:90
Generated on Tue May 10 2016 09:07:57 for ParMooN by
1.8.5