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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6141 - (show annotations)
Wed Apr 6 03:51:30 2016 UTC (2 years, 6 months ago) by caltinay
File MIME type: text/plain
File size: 1977 byte(s)
more namespacing of defines.

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
44 struct Preconditioner_BoomerAMG
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
59 void Preconditioner_BoomerAMG_free(Preconditioner_BoomerAMG* in);
60 Preconditioner_BoomerAMG* Preconditioner_BoomerAMG_alloc(SystemMatrix_ptr A,
61 Options* options);
62
63 void Preconditioner_BoomerAMG_solve(SystemMatrix_ptr A,
64 Preconditioner_BoomerAMG* amg,
65 double* x, double * b);
66
67
68 } // namespace paso
69
70 #endif // __PASO_BOOMERAMG_H__
71

  ViewVC Help
Powered by ViewVC 1.1.26