All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
ifsh_ms.h
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>
30 #include <opm/core/pressure/msmfem/coarse_sys.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 *
47 ifsh_ms_construct(struct UnstructuredGrid *G,
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
63 ifsh_ms_press_flux(struct UnstructuredGrid *G, struct ifsh_ms_data *h,
64  double *cpress, double *fflux);
65 
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
71 #endif /* OPM_IFSH_MS_HEADER_INCLUDED */
Basic compressed-sparse row (CSR) matrix data structure.
Definition: sparse_sys.h:38
Definition: ifsh_ms.h:35
Definition: ifsh_ms.c:44