fsh.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_FSH_HEADER_INCLUDED
21 #define OPM_FSH_HEADER_INCLUDED
22 
54 #include <opm/core/grid.h>
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
62 
63 struct CSRMatrix;
64 struct fsh_impl;
65 
72 struct fsh_data {
82 
89  size_t sum_ngconn2;
90 
91  /* Linear system */
92  struct CSRMatrix *A;
93  double *b;
94  double *x;
97  struct fsh_impl *pimpl;
98 };
99 
100 
101 
109 void
110 fsh_destroy(struct fsh_data *h);
111 
112 
123 struct fsh_data *
124 cfsh_construct(struct UnstructuredGrid *G, well_t *W);
125 
126 
127 
151 void
153  const double *src,
154  const double *Binv,
155  const double *Biv,
156  const double *P,
157  const double *gpress,
158  well_control_t *wctrl,
159  const double *WI,
160  const double *BivW,
161  const double *wdp,
162  struct fsh_data *h);
163 
164 
175 struct fsh_data *
176 ifsh_construct(struct UnstructuredGrid *G, well_t *W);
177 
178 
199 void
201  const double *src,
202  const double *Binv,
203  const double *gpress,
204  well_control_t *wctrl,
205  const double *WI,
206  const double *wdp,
207  struct fsh_data *h);
208 
209 
210 
211 
231 void
233  const double *Binv, const double *gpress,
234  struct fsh_data *h,
235  double *cpress, double *fflux,
236  double *wpress, double *wflux);
237 
238 #ifdef __cplusplus
239 }
240 #endif
241 
242 
243 #endif /* OPM_FSH_HEADER_INCLUDED */
Definition: sparse_sys.h:38
Definition: grid.h:98
Definition: flow_bc.h:39
double * b
Definition: fsh.h:93
struct fsh_impl * pimpl
Definition: fsh.h:97
size_t sum_ngconn2
Definition: fsh.h:89
double * x
Definition: fsh.h:94
int max_ngconn
Definition: fsh.h:81
void ifsh_assemble(struct FlowBoundaryConditions *bc, const double *src, const double *Binv, const double *gpress, well_control_t *wctrl, const double *WI, const double *wdp, struct fsh_data *h)
void fsh_destroy(struct fsh_data *h)
Definition: fsh_common_impl.h:25
void cfsh_assemble(struct FlowBoundaryConditions *bc, const double *src, const double *Binv, const double *Biv, const double *P, const double *gpress, well_control_t *wctrl, const double *WI, const double *BivW, const double *wdp, struct fsh_data *h)
Definition: legacy_well.h:61
Definition: fsh.h:72
struct fsh_data * ifsh_construct(struct UnstructuredGrid *G, well_t *W)
struct CSRMatrix * A
Definition: fsh.h:92
void fsh_press_flux(struct UnstructuredGrid *G, const double *Binv, const double *gpress, struct fsh_data *h, double *cpress, double *fflux, double *wpress, double *wflux)
Definition: legacy_well.h:52
struct fsh_data * cfsh_construct(struct UnstructuredGrid *G, well_t *W)