ifsh_ms.h
Go to the documentation of this file.
1 /*
2  Copyright 2010 SINTEF ICT, Applied Mathematics.
3 
4  This file is part of the Open Porous Media project (OPM).
5 
6  OPM is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  OPM is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with OPM. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef OPM_IFSH_MS_HEADER_INCLUDED
21 #define OPM_IFSH_MS_HEADER_INCLUDED
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #include <stddef.h>
28 
29 #include <opm/core/grid.h>
31 
32 struct CSRMatrix;
33 struct ifsh_ms_impl;
34 
35 struct ifsh_ms_data {
36  /* Linear system */
37  struct CSRMatrix *A; /* Coefficient matrix */
38  double *b; /* System RHS */
39  double *x; /* Solution */
40 
41  /* Private implementational details. */
42  struct ifsh_ms_impl *pimpl;
43 };
44 
45 
46 struct ifsh_ms_data *
48  const int *p,
49  const double *perm,
50  const double *src,
51  const double *totmob,
52  LocalSolver linsolve);
53 
54 void
55 ifsh_ms_destroy(struct ifsh_ms_data *h);
56 
57 void
58 ifsh_ms_assemble(const double *src,
59  const double *totmob,
60  struct ifsh_ms_data *h);
61 
62 void
64  double *cpress, double *fflux);
65 
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
71 #endif /* OPM_IFSH_MS_HEADER_INCLUDED */
Definition: ifsh_ms.h:35
struct ifsh_ms_impl * pimpl
Definition: ifsh_ms.h:42
Definition: sparse_sys.h:38
Definition: grid.h:98
void ifsh_ms_press_flux(struct UnstructuredGrid *G, struct ifsh_ms_data *h, double *cpress, double *fflux)
void(* LocalSolver)(struct CSRMatrix *A, double *b, double *x)
Definition: coarse_sys.h:49
double * x
Definition: ifsh_ms.h:39
void ifsh_ms_assemble(const double *src, const double *totmob, struct ifsh_ms_data *h)
double * b
Definition: ifsh_ms.h:38
void ifsh_ms_destroy(struct ifsh_ms_data *h)
struct ifsh_ms_data * ifsh_ms_construct(struct UnstructuredGrid *G, const int *p, const double *perm, const double *src, const double *totmob, LocalSolver linsolve)
struct CSRMatrix * A
Definition: ifsh_ms.h:37