escript  Revision_
BOOMERAMG.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2016 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 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16 
17 
18 /****************************************************************************/
19 
20 /* Paso: interface to HYPRE, a software library of high performance
21  * preconditioners and solvers. We use the BoomerAMG part provided
22  * in this library
23  */
24 
25 /****************************************************************************/
26 
27 /* Author: Lin Gao, l.gao@uq.edu.au */
28 
29 /****************************************************************************/
30 
31 #ifndef __PASO_BOOMERAMG_H__
32 #define __PASO_BOOMERAMG_H__
33 
34 #include "SystemMatrix.h"
35 
36 #ifdef ESYS_HAVE_BOOMERAMG
37 #include <HYPRE_krylov.h>
38 #include <HYPRE.h>
39 #include <HYPRE_parcsr_ls.h>
40 #endif
41 
42 namespace paso {
43 
45 {
46 #ifdef ESYS_HAVE_BOOMERAMG
47  HYPRE_IJMatrix A;
48  HYPRE_ParCSRMatrix parcsr_A;
49  HYPRE_IJVector b;
50  HYPRE_ParVector par_b;
51  HYPRE_IJVector x;
52  HYPRE_ParVector par_x;
53  HYPRE_Solver solver;
54 #else
55  void* n;
56 #endif
57 };
58 
61  Options* options);
62 
65  double* x, double * b);
66 
67 
68 } // namespace paso
69 
70 #endif // __PASO_BOOMERAMG_H__
71 
Definition: Options.h:89
Definition: BOOMERAMG.h:44
void * n
Definition: BOOMERAMG.h:55
boost::shared_ptr< SystemMatrix > SystemMatrix_ptr
Definition: SystemMatrix.h:40
Definition: AMG.cpp:45
void Preconditioner_BoomerAMG_free(Preconditioner_BoomerAMG *in)
Definition: BOOMERAMG.cpp:37
void Preconditioner_BoomerAMG_solve(SystemMatrix_ptr A, Preconditioner_BoomerAMG *amg, double *out, double *in)
call the solver
Definition: BOOMERAMG.cpp:230
Preconditioner_BoomerAMG * Preconditioner_BoomerAMG_alloc(SystemMatrix_ptr A, Options *options)
Definition: BOOMERAMG.cpp:51