FSH
object.
- *
- * @param[in,out] h FSH
object. Following a call
- * to function fsh_destroy(), the pointer is
- * invalid.
- */
-void
-fsh_destroy(struct fsh_data *h);
-
-
-/**
- * Construct compressible hybrid flow-solver data object for a
- * given grid and well pattern.
- *
- * @param[in] G Grid.
- * @param[in] W Well topology. Ignored.
- * @return Fully formed data object suitable for use in a
- * compressible pressure solver. @c NULL in case of construction
- * failure.
- */
-struct fsh_data *
-cfsh_construct(struct UnstructuredGrid *G, well_t *W);
-
-
-
-/**
- * Form Schur-complement system of simultaneous linear equations
- * arising in compressible flow using a hybridized formulation.
- *
- * Upon returning from function cfsh_assemble(), the resulting
- * system of simultaneous linear equations is stored in
- * h->A
and h->b
.
- *
- * @param[in] bc Boundary conditions.
- * @param[in] src Explicit source terms.
- * @param[in] Binv Inverse of block-diagonal matrix \f$B\f$
- * Typically computed using functions
- * mim_ip_simple_all() and
- * mim_ip_mobility_update().
- * @param[in] Biv \f$B^{-1}v\f$.
- * @param[in] P Compressible accumulation term.
- * @param[in] gpress Gravity pressure.
- * @param[in] wctrl Well controls. Ignored.
- * @param[in] WI Well indices. Ignored.
- * @param[in] BivW \f$B^{-1}v\f$ for wells. Ignored.
- * @param[in] wdp Gravity pressure along well track. Ignored.
- * @param[in,out] h Data object.
- */
-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);
-
-
-/**
- * Construct incompressible hybrid flow-solver data object for a
- * given grid and well pattern.
- *
- * @param G Grid.
- * @param W Well topology.
- * @return Fully formed data object suitable for use in an
- * incompressible pressure solver. @c NULL in case of construction
- * failure.
- */
-struct fsh_data *
-ifsh_construct(struct UnstructuredGrid *G, well_t *W);
-
-
-/**
- * Form Schur-complement system of simultaneous linear equations
- * arising in compressible flow using a hybridized formulation.
- *
- * Upon returning from function cfsh_assemble(), the resulting
- * system of simultaneous linear equations is stored in
- * h->A
and h->b
.
- *
- * @param[in] bc Boundary conditions.
- * @param[in] src Explicit source terms.
- * @param[in] Binv Inverse of block-diagonal matrix \f$B\f$
- * Typically computed using functions
- * mim_ip_simple_all() and
- * mim_ip_mobility_update().
- * @param[in] gpress Gravity pressure.
- * @param[in] wctrl Well controls.
- * @param[in] WI Well indices.
- * @param[in] wdp Gravity pressure along well track.
- * @param[in,out] h Data object.
- */
-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);
-
-
-
-
-/**
- * Compute cell pressures (cpress) and interface fluxes (fflux) from
- * current solution of system of linear equations, h->x
.
- * Back substitution process, projected half-contact fluxes.
- *
- * @param[in] G Grid.
- * @param[in] Binv Inverse of block-diagonal matrix \f$B\f$
- * Must coincide with the matrix used to
- * form the system of linear equations
- * currently stored in the data object.
- * @param[in] gpress Gravity pressure. Must coincide with
- * the array used to form the system of
- * linear equations.
- * @param[in] h Data object.
- * @param[out] cpress Cell pressure.
- * @param[out] fflux Interface fluxes.
- * @param[out] wpress Well pressure.
- * @param[out] wflux Well perforation fluxes.
- */
-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);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* OPM_FSH_HEADER_INCLUDED */
diff --git a/opm/core/pressure/fsh_common_impl.c b/opm/core/pressure/fsh_common_impl.c
deleted file mode 100644
index 463d5455..00000000
--- a/opm/core/pressure/fsh_common_impl.c
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- Copyright 2010 SINTEF ICT, Applied Mathematics.
-
- This file is part of the Open Porous Media project (OPM).
-
- OPM is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OPM is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with OPM. If not, see nc + 1
if successful.
- * @param[out] cwells Cell-to-well mapping. Points to array
- * of size W->well_connpos[
- * W->number_of_wells]
if successful.
- * @return Positive number (size of *cwells
)
- * if successful. Zero in case of allocation failure.
- */
-int
-allocate_cell_wells(int nc, well_t *W, int **cwpos, int **cwells);
-
-/**
- * Dispose of memory resources allocated using function
- * allocate_cell_wells().
- *
- * Following a call to deallocate_cell_wells(), the input pointers
- * are no longer valid.
- *
- * @param[in,out] cvpos Cell-to-well start pointers.
- * @param[in,out] cwells Cell-to-well mapping.
- */
-void
-deallocate_cell_wells(int *cvpos, int *cwells);
-
-/**
- * Construct cell-to-well mapping (i.e., transpose the
- * well-to-cell mapping represented by W->well_cells
).
- *
- * @param[in] nc Total number of cells.
- * @param[in] W Well topology (well-to-cell mapping).
- * @param[out] cwpos Cell-to-well start pointers.
- * @param[out] cwells Cell-to-well mapping.
- */
-void
-derive_cell_wells(int nc, well_t *W, int *cwpos, int *cwells);
-
-
#ifdef __cplusplus
}
#endif
diff --git a/opm/core/pressure/mimetic/hybsys.c b/opm/core/pressure/mimetic/hybsys.c
deleted file mode 100644
index 694c5616..00000000
--- a/opm/core/pressure/mimetic/hybsys.c
+++ /dev/null
@@ -1,694 +0,0 @@
-/*
- Copyright 2010 SINTEF ICT, Applied Mathematics.
-
- This file is part of the Open Porous Media project (OPM).
-
- OPM is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OPM is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with OPM. If not, see hybsys_free(NULL)
does nothing.
- *
- * @param[in,out] sys Previously allocated hybrid system management
- * structure (or @c NULL).
- */
-void
-hybsys_free(struct hybsys *sys);
-
-/**
- * Dispose of memory resources previously obtained through one of the
- * allocation functions, hybsys_well_allocate_symm() or
- * hybsys_well_allocate_unsymm().
- *
- * Following a call to hybsys_well_free(), the input pointer is
- * no longer valid. hybsys_well_free(NULL)
does nothing.
- *
- * @param[in,out] wsys Previously allocated hybrid system management
- * structure (or @c NULL).
- */
-void
-hybsys_well_free(struct hybsys_well *wsys);
-
-
-/**
- * Perform post-construction dynamic initialisation of system
- * structure obtained from function hybsys_allocate_symm() or
- * hybsys_allocate_unsymm().
- *
- * @param[in] max_nconn Maximum number of single cell faces.
- * Must coincide with the equally named
- * parameter of functions hybsys_allocate_symm()
- * or hybsys_allocate_unsymm().
- * @param[in,out] sys Previously allocated hybrid system management
- * structure.
- */
-void
-hybsys_init(int max_nconn, struct hybsys *sys);
-
-/**
- * Compute elemental (per-cell) contributions to symmetric Schur
- * system of simultaneous linear equations.
- *
- * This function assumes that the coefficient matrix of the hybrid
- * system of linear equations is that of the introduction with the
- * additional provision that \f$C_1=C_2=C\f$ and that \f$P=0\f$.
- * In other words, this function assumes that the coefficient matrix
- * is of the form
- * \f[
- * \begin{pmatrix}
- * B & C & D \\
- * C^\mathsf{T} & 0 & 0 \\
- * D^\mathsf{T} & 0 & 0
- * \end{pmatrix}.
- * \f]
- * This function fills the @c F1 and @c L fields of the management
- * structure.
- *
- * @param[in] nc Total number of grid cells.
- * @param[in] pconn Cell-to-face start pointers.
- * @param[in] Binv Inverse inner product results, usually
- * computed using mim_ip_simple_all() and
- * mim_ip_mobility_update().
- * @param[in,out] sys Hybrid system management structure allocated
- * using hybsys_allocate_symm() and initialised
- * using hybsys_init().
- */
-void
-hybsys_schur_comp_symm(int nc, const int *pconn,
- const double *Binv, struct hybsys *sys);
-
-
-/**
- * Compute elemental (per-cell) contributions to unsymmetric Schur
- * system of simultaneous linear equations.
- *
- * This function assumes that the coefficient matrix of the hybrid
- * system of linear equations is that of the introduction with the
- * additional provision that \f$C_2=C_1-V\f$. In other words, this
- * function assumes that the coefficient matrix is of the form
- * \f[
- * \begin{pmatrix}
- * B & C & D \\
- * (C-V)^\mathsf{T} & P & 0 \\
- * D^\mathsf{T} & 0 & 0
- * \end{pmatrix}.
- * \f]
- * This matrix arises in the ``\f$v^2\f$'' phase compressibility
- * formulation of the compressible black-oil model. This function
- * fills the @c F1, @c F2 and @c L fields of the management structure.
- *
- * @param[in] nc Total number of grid cells.
- * @param[in] pconn Cell-to-face start pointers.
- * @param[in] Binv Inverse inner product results, usually
- * computed using mim_ip_simple_all() and
- * mim_ip_mobility_update().
- * @param[in] BIV \f$B^{-1}v\f$ in which \f$v\f$ is the flux
- * field of a previous time step or non-linear
- * iteration.
- * @param[in] P Per cell compressible accumulation term. One
- * scalar per cell.
- * @param[in,out] sys Hybrid system management structure allocated
- * using hybsys_allocate_symm() and initialised
- * using hybsys_init().
- */
-void
-hybsys_schur_comp_unsymm(int nc, const int *pconn,
- const double *Binv, const double *BIV,
- const double *P, struct hybsys *sys);
-
-
-/**
- * Compute elemental (per-cell) contributions to unsymmetric Schur
- * system of simultaneous linear equations.
- *
- * This function assumes that the coefficient matrix of the hybrid
- * system of linear equations is that of the introduction with no
- * additional provisions. In other words, this
- * function assumes that the coefficient matrix is of the form
- * \f[
- * \begin{pmatrix}
- * B & C_1 & D \\
- * C_2^\mathsf{T} & P & 0 \\
- * D^\mathsf{T} & 0 & 0
- * \end{pmatrix}.
- * \f]
- * This function fills the @c F1, @c F2 and @c L fields of
- * the management structure.
- *
- * @param[in] nc Total number of grid cells.
- * @param[in] pconn Cell-to-face start pointers.
- * @param[in] Binv Inverse inner product results, usually
- * computed using mim_ip_simple_all() and
- * mim_ip_mobility_update().
- * @param[in] C2 Explicit representation of the \f$C_2\f$
- * matrix as a linear array. Assumed to only
- * contain the (structurally) non-zero matrix
- * elements (that correspond to the non-zero
- * structure of \f$C_1\f$).
- * @param[in] P Per cell compressible accumulation term. One
- * scalar per cell.
- * @param[in,out] sys Hybrid system management structure allocated
- * using hybsys_allocate_symm() and initialised
- * using hybsys_init().
- */
-void
-hybsys_schur_comp_gen(int nc, const int *pconn,
- const double *Binv, const double *C2,
- const double *P, struct hybsys *sys);
-
-/**
- * Compute elemental contributions to global, symmetric system of
- * simultaneous linear equations from cell<->well connections.
- *
- * Specifically, for a well @c w intersecting a cell @c c, this function
- * computes the elemental contributions
- * \f[
- * (F_1)_{wc} = C_{wc}^\mathsf{T} B_{wc}^{-1} D_{wc} = \mathit{WI}_{wc}
- * \f]
- * and
- * \f[
- * L_{wc} = C_{wc}^\mathsf{T} B_{wc}^{-1} C_{wc} = \mathit{WI}_{wc}
- * \f]
- * and incorporates the contributions into the global system quantities
- * as appropriate.
- *
- * This function modifies sys->L
and wsys->F1
.
- *
- * @param[in] nc Total number of grid cells.
- * @param[in] cwpos Indirection array that defines each cell's
- * connecting wells. Values typically computed
- * using function derive_cell_wells().
- * @param[in] WI Peaceman well connection indices. Array of
- * size cwpos[nc]
. Must incorporate
- * effects of multiple phases (i.e., total mobility)
- * if applicable.
- * @param[in,out] sys Hybrid system management structure allocated
- * using hybsys_allocate_symm() and initialised
- * using hybsys_init() and/or filled using function
- * hybsys_schur_comp_symm().
- * @param[in,out] wsys Hybrid well-system management structure obtained
- * from function hybsys_well_allocate_symm().
- */
-void
-hybsys_well_schur_comp_symm(int nc, const int *cwpos,
- double *WI,
- struct hybsys *sys,
- struct hybsys_well *wsys);
-
-/**
- * Compute final (symmetric) Schur complement contributions to
- * global system of simultaneous linear equations.
- *
- * This function forms the coefficient matrix
- * \f[
- * S_c = D^\mathsf{T}B_c^{-1}D - F_c^\mathsf{T}L_c^{-1}F_c
- * \f]
- * and similar right-hand side \f$r_c\f$ elemental contributions.
- * These values must be subsequently assembled into the global system
- * using function hybsys_global_assemble_cell() after imposing any
- * applicable boundary conditions.
- *
- * This function overwrites the fields @c S and @c r of the hybrid system
- * structure.
- *
- * @param[in] c Cell for which to compute local contributions.
- * @param[in] nconn Number of connections (faces) of cell @c c.
- * @param[in] p1 Start address (into @c gpress) of the gravity
- * contributions of cell @c c.
- * @param[in] p2 Start address (into @c Binv) of the inverse
- * inner product of cell @c c.
- * @param[in] gpress Gravity contributions of all cells. Must
- * include effects of multiple phases if applicable.
- * @param[in] src Explicit source terms for all cells.
- * @param[in] Binv Inverse inner products for all cells. Must
- * include effects of multiple phases if applicable.
- * @param[in,out] sys Hybrid system management structure allocated
- * using hybsys_allocate_symm() and initialised
- * using hybsys_init() and/or filled using function
- * hybsys_schur_comp_symm() and
- * hybsys_well_schur_comp_symm() if applicable.
- */
-void
-hybsys_cellcontrib_symm(int c, int nconn, int p1, int p2,
- const double *gpress, const double *src,
- const double *Binv, struct hybsys *sys);
-
-
-/**
- * Compute final (non-symmetric) Schur complement contributions to
- * global system of simultaneous linear equations.
- *
- * This function forms the coefficient matrix
- * \f[
- * S_c = D^\mathsf{T}B_c^{-1}D - (F_1)_c^\mathsf{T}L_c^{-1}(F_2)_c
- * \f]
- * and similar right-hand side \f$r_c\f$ elemental contributions.
- * These values must be subsequently assembled into the global system
- * using function hybsys_global_assemble_cell() after imposing any
- * applicable boundary conditions.
- *
- * This function overwrites the fields @c S and @c r of the hybrid system
- * structure.
- *
- * @param[in] c Cell for which to compute local contributions.
- * @param[in] nconn Number of connections (faces) of cell @c c.
- * @param[in] p1 Start address (into @c gpress) of the gravity
- * contributions of cell @c c.
- * @param[in] p2 Start address (into @c Binv) of the inverse
- * inner product of cell @c c.
- * @param[in] gpress Gravity contributions of all cells. Must
- * include effects of multiple phases if applicable.
- * @param[in] src Explicit source terms for all cells.
- * @param[in] Binv Inverse inner products for all cells. Must
- * include effects of multiple phases if applicable.
- * @param[in,out] sys Hybrid system management structure allocated
- * using hybsys_allocate_symm() and initialised
- * using hybsys_init() and/or filled using functions
- * hybsys_schur_comp_unsymm() or hybsys_schur_comp_gen().
- */
-void
-hybsys_cellcontrib_unsymm(int c, int nconn, int p1, int p2,
- const double *gpress, const double *src,
- const double *Binv, struct hybsys *sys);
-
-
-/**
- * Form elemental direct contributions to global system of simultaneous linear
- * equations from cell<->well interactions.
- *
- * Plays a role similar to function hybsys_cellcontrib_symm(), but for wells.
- *
- * @param[in] c Cell for which to compute cell<->well Schur complement
- * @param[in] ngconn Number of inter-cell connections (faces) of cell @c c.
- * @param[in] p1 Start index (into sys->F1
) of cell @c c.
- * @param[in] cwpos Indirection array that defines each cell's connecting
- * wells. Must coincide with equally named parameter of
- * function hybsys_well_schur_comp_symm().
- * @param[in] WI Peaceman well connection indices. Array of
- * size pwconn[nc]
. Must coincide with
- * equally named parameter of contribution function
- * hybsys_well_schur_comp_symm().
- * @param[in] wdp Well connection gravity pressure adjustments.
- * One scalar for each well connection in an array of size
- * pwconn[nc]
.
- * @param[in,out] sys Hybrid system management structure filled using
- * functions hybsys_schur_comp_unsymm() or
- * hybsys_schur_comp_gen().
- * @param[in,out] wsys Hybrid well-system management structure filled using
- * function hybsys_well_schur_comp_symm().
- */
-void
-hybsys_well_cellcontrib_symm(int c, int ngconn, int p1,
- const int *cwpos,
- const double *WI, const double *wdp,
- struct hybsys *sys, struct hybsys_well *wsys);
-
-
-/**
- * Recover cell pressures and outward fluxes (with respect to cells--i.e., the
- * ``half-face fluxes'') through back substitution after solving a symmetric
- * (i.e., incompressible) Schur complement system of simultaneous linear
- * equations.
- *
- * Specifically, given the solution \f$\pi\f$ to the global system of
- * simultaneous linear equations, \f$A\pi=b\f$, that arises as a result of the
- * Schur complement analysis, this function recovers the cell pressures \f$p\f$
- * and outward fluxes \f$v\f$ defined by
- * \f[
- * \begin{aligned}
- * Lp &= g - C_2^\mathsf{T}B^{-1}G + F_2\pi \\
- * Bv &= G + C_1p - D\pi
- * \end{aligned}.
- * \f]
- *
- * @param[in] nc Total number of grid cells.
- * @param[in] pconn Cell-to-face start pointers.
- * @param[in] conn Cell-to-face mapping.
- * @param[in] gpress Gravity contributions of all cells. Must coincide with
- * equally named parameter in calls to cell contribution
- * functions such as hybsys_cellcontrib_symm().
- * @param[in] Binv Inverse inner products for all cells. Must coincide
- * with equally named parameter in calls to contribution
- * functions such as hybsys_cellcontrib_symm().
- * @param[in] sys Hybrid system management structure coinciding with
- * equally named parameter in contribution functions such
- * as hybsys_cellcontrib_symm() or
- * hybsys_cellcontrib_unsymm().
- * @param[in] pi Solution (interface/contact pressure) obtained from
- * solving the global system \f$A\pi = b\f$.
- * @param[out] press Cell pressures, \f$p\f$. Array of size @c nc.
- * @param[out] flux Outward interface fluxes, \f$v\f$. Array of size
- * pconn[nc]
.
- * @param[in,out] work Scratch array for temporary results. Array of size at
- * least \f$\max_c \{ \mathit{pconn}_{c + 1}
- * - \mathit{pconn}_c \} \f$.
- */
-void
-hybsys_compute_press_flux(int nc, const int *pconn, const int *conn,
- const double *gpress,
- const double *Binv, const struct hybsys *sys,
- const double *pi, double *press, double *flux,
- double *work);
-
-
-/**
- * Recover well pressures (i.e., bottom-hole pressure values) and well
- * connection (perforation) fluxes.
- *
- * Specifically, this function performs the same role (i.e., back-substitution)
- * for wells as function hybsys_compute_press_flux() does for grid cells and
- * grid contacts (interfaces).
- *
- * @param[in] nc Total number of grid cells.
- * @param[in] pgconn Cell-to-face start pointers.
- * @param[in] nf Total number of grid faces.
- * @param[in] nw Total number of wells.
- * @param[in] pwconn Cell-to-well start pointers. If nw > 0
,
- * then this parameter must coincide with the @c cwpos
- * array used in call to hybsys_well_schur_comp_symm().
- * @param[in] wconn Cell-to-well mapping.
- * @param[in] Binv Inverse inner products for all cells. Must coincide
- * with equally named parameter in calls to contribution
- * functions such as hybsys_well_cellcontrib_symm().
- * @param[in] WI Peaceman well connection indices. Array of
- * size pwconn[nc]
. Must coincide with
- * equally named parameter of contribution function
- * hybsys_well_cellcontrib_symm().
- * @param[in] wdp Well connection gravity pressure adjustments.
- * @param[in] sys Hybrid system management structure coinciding with
- * equally named parameter in contribution functions such
- * as hybsys_cellcontrib_symm() and
- * hybsys_well_cellcontrib_symm().
- * @param[in] wsys Hybrid well-system management structure. Must coincide
- * with equally named paramter of contribution function
- * hybsys_well_cellcontrib_symm().
- * @param[in] pi Solution (interface/contact pressure and well BHPs)
- * obtained from solving the global system \f$A\pi = b\f$.
- * @param[in] cpress Cell pressures, \f$p\f$, obtained from a previous call
- * to function hybsys_compute_press_flux().
- * @param[in] cflux Outward fluxes, \f$v\f$, obtained from a previous call
- * to function hybsys_compute_press_flux().
- * @param[out] wpress Well (i.e., bottom-hole) pressures. Array of size
- * @c nw.
- * @param[out] wflux Well connection (perforation) fluxes. Array of size
- * pwconn[nw]
.
- * @param[in,out] work Scratch array for storing intermediate results. Array
- * of size at least \f$\max_w \{ \mathit{pwconn}_{w + 1}
- * - \mathit{pwconn}_w\}\f$.
- */
-void
-hybsys_compute_press_flux_well(int nc, const int *pgconn, int nf,
- int nw, const int *pwconn, const int *wconn,
- const double *Binv,
- const double *WI,
- const double *wdp,
- const struct hybsys *sys,
- const struct hybsys_well *wsys,
- const double *pi,
- double *cpress, double *cflux,
- double *wpress, double *wflux,
- double *work);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* OPM_HYBSYS_HEADER_INCLUDED */
diff --git a/opm/core/pressure/mimetic/hybsys_global.c b/opm/core/pressure/mimetic/hybsys_global.c
deleted file mode 100644
index 33a352e0..00000000
--- a/opm/core/pressure/mimetic/hybsys_global.c
+++ /dev/null
@@ -1,418 +0,0 @@
-/*
- Copyright 2010 SINTEF ICT, Applied Mathematics.
-
- This file is part of the Open Porous Media project (OPM).
-
- OPM is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OPM is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with OPM. If not, see G->number_of_faces
)
- * plus the number of wells (W->number_of_wells
).
- */
-struct CSRMatrix *
-hybsys_define_globconn(struct UnstructuredGrid *G, well_t *W);
-
-
-/**
- * Assemble local contributions into global system of simultaneous
- * linear equations.
- *
- * The contributions will typically have been computed using
- * function hybsys_schur_comp_symm() and function
- * hybsys_cellcontrib_symm() or some of the related functions.
- *
- * @param[in] nconn Number of cell faces.
- * @param[in] l2g Local-to-global mapping of cell's primary
- * degrees of freedom (i.e., the faces).
- * @param[in] S Single cell local contribution to global
- * coefficient matrix. An
- * \f$\mathit{nconn}\times\mathit{nconn}\f$
- * dense matrix in column major (Fortran) order.
- * @param[in] r Single cell local contribution to global
- * system right-hand side. An
- * \f$\mathit{nconn}\times 1\f$ dense vector.
- * @param[in,out] A Global coefficient matrix (of Schur
- * complement system).
- * @param[in,out] b Global system right-hand side (of Schur
- * complement system).
- */
-void
-hybsys_global_assemble_cell(int nconn, int *l2g,
- const double *S,
- const double *r,
- struct CSRMatrix *A,
- double *b);
-
-
-/**
- * Assemble local contributions from single cell's well connections
- * (perforations) into global system of simultaneous linear equations.
- *
- * This function assumes that the connection strength from cell to well
- * equals the connection strength from well to cell. In other words,
- * that the numerical values of the well contributions are symmetric.
- *
- * The contributions are typically computed using functions
- * hybsys_well_schur_comp_symm() and hybsys_well_cellcontrib_symm().
- *
- * @param[in] ngconn_tot Total number of grid connections.
- * Expected to equal
- * G->number_of_faces
- * when @c G is the grid used to form the
- * original matrix in
- * hybsys_define_globconn().
- * @param[in] ngconn Number of grid connections referenced by
- * given cell.
- * @param[in] gconn Actual grid connections (DOFs) referenced
- * by given cell. Pointer to @c ngconn
- * consecutive DOF indices.
- * @param[in] nwconn Number of well connections intersecting
- * given cell. Typically \f$\mathit{ngconn} = 1\f$.
- * @param[in] wconn Actual well connections (DOFs) intersecting
- * given cell. Pointer to @c nwconn consecutive
- * DOF indices.
- * @param[in] r2w Reservoir-to-well connection strengths.
- * @param[in] w2w Well-to-well-connection strenghts.
- * @param[in] r Single cell local contribution to global
- * system right-hand side. An
- * \f$(\mathit{ngconn} + \mathit{nwconn})
- * \times 1\f$ dense vector.
- * @param[in,out] A Global coefficient matrix (of Schur
- * complement system).
- * @param[in,out] b Global system right-hand side (of Schur
- * complement system).
- */
-void
-hybsys_global_assemble_well_sym(int ngconn_tot,
- int ngconn, const int *gconn,
- int nwconn, const int *wconn,
- const double *r2w,
- const double *w2w,
- const double *r,
- struct CSRMatrix *A,
- double *b);
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* OPM_HYBSYS_GLOBAL_HEADER_INCLUDED */
diff --git a/opm/core/pressure/msmfem/coarse_conn.c b/opm/core/pressure/msmfem/coarse_conn.c
deleted file mode 100644
index 065bece5..00000000
--- a/opm/core/pressure/msmfem/coarse_conn.c
+++ /dev/null
@@ -1,626 +0,0 @@
-/*
- Copyright 2010 SINTEF ICT, Applied Mathematics.
-
- This file is part of the Open Porous Media project (OPM).
-
- OPM is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OPM is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with OPM. If not, see > i);
- }
-
- return m + 1;
-}
-
-
-/* Hash element 'k' into table of size 'm' (multiplication method) */
-/* ---------------------------------------------------------------------- */
-static size_t
-hash_set_idx(int k, size_t m)
-/* ---------------------------------------------------------------------- */
-{
- double x = fmod(k * GOLDEN_RAT, 1.0);
- double y = floor(m * x);
- return y;
-}
-
-
-/* Insert element 'k' into set 's' of size 'm'
- * (open addressing, double probing). */
-/* ---------------------------------------------------------------------- */
-static size_t
-hash_set_insert_core(int k, size_t m, int *s)
-/* ---------------------------------------------------------------------- */
-{
- size_t h1, h2, i, j;
-
- assert ((0 < m) && (m < (size_t)(-1)));
- assert (IS_POW2(m));
-
- j = h1 = hash_set_idx(k, m);
- assert (h1 < m);
-
- if (s[j] == -1) { s[j] = k; }
- if (s[j] == k) { return j; }
-
- /* Double hash probing. h2 relatively prime to 'm' */
- h2 = 2 * hash_set_idx(k, MAX(m >> 1, 1)) + 1;
-
- for (i = 1; (s[j] != -1) && (s[j] != k) && (i < m); i++) {
- j += h2;
- j &= m - 1; /* Modulo m since IS_POW2(m). */
- }
-
- if ((s[j] == -1) || (s[j] == k)) {
- s[j] = k; /* Possibly no-op. */
- } else {
- j = m + 1; /* Invalid. Caveat emptor. */
- }
-
- return j;
-}
-
-
-/* Increase size of hash set 't' to hold 'm' elements whilst copying
- * existing elements. This is typically fairly expensive. */
-/* ---------------------------------------------------------------------- */
-static int
-hash_set_expand(size_t m, struct hash_set *t)
-/* ---------------------------------------------------------------------- */
-{
- int ret, *s, *p;
- size_t i;
-
- assert (m > t->m);
-
- s = malloc(m * sizeof *s);
- if (s != NULL) {
- for (i = 0; i < m; i++) { s[i] = -1; }
-
- for (i = 0; i < t->m; i++) {
- ret = hash_set_insert_core(t->s[i], m, s);
- assert ((size_t) ret < m);
- }
-
- p = t->s;
- t->s = s;
- t->m = m;
-
- free(p);
-
- ret = m;
- } else {
- ret = -1;
- }
-
- return ret;
-}
-
-
-/* Release dynamic memory resources for hash set 't'. */
-/* ---------------------------------------------------------------------- */
-void
-hash_set_deallocate(struct hash_set *t)
-/* ---------------------------------------------------------------------- */
-{
- if (t != NULL) {
- free(t->s);
- }
-
- free(t);
-}
-
-
-/* Construct an emtpy hash set capable of holding 'm' elements */
-/* ---------------------------------------------------------------------- */
-struct hash_set *
-hash_set_allocate(int m)
-/* ---------------------------------------------------------------------- */
-{
- size_t i, sz;
- struct hash_set *new;
-
- new = malloc(1 * sizeof *new);
- if (new != NULL) {
- sz = hash_set_size(m);
- new->s = malloc(sz * sizeof *new->s);
-
- if (new->s == NULL) {
- hash_set_deallocate(new);
-
- new = NULL;
- } else {
- for (i = 0; i < sz; i++) { new->s[i] = -1; }
- new->m = sz;
- }
- }
-
- return new;
-}
-
-
-/* Insert element 'k' into hash set 't'. */
-/* ---------------------------------------------------------------------- */
-int
-hash_set_insert(int k, struct hash_set *t)
-/* ---------------------------------------------------------------------- */
-{
- int ret;
- size_t i;
-
- assert (k >= 0);
- assert (t != NULL);
- assert (IS_POW2(t->m));
-
- i = hash_set_insert_core(k, t->m, t->s);
- if (i == t->m + 1) {
- /* Table full. Preferable an infrequent occurrence. Expand
- * table and re-insert key (if possible). */
- ret = hash_set_expand(t->m << 1, t);
-
- if (ret > 0) {
- i = hash_set_insert_core(k, t->m, t->s);
- assert (i < t->m);
-
- ret = k;
- }
- } else {
- ret = k;
- }
-
- return ret;
-}
-
-
-/* ---------------------------------------------------------------------- */
-size_t
-hash_set_count_elms(const struct hash_set *set)
-/* ---------------------------------------------------------------------- */
-{
- size_t i, n;
-
- n = 0;
- for (i = 0; i < set->m; i++) {
- n += set->s[i] != -1;
- }
-
- return n;
-}
diff --git a/opm/core/pressure/msmfem/hash_set.h b/opm/core/pressure/msmfem/hash_set.h
deleted file mode 100644
index 1edfd1ce..00000000
--- a/opm/core/pressure/msmfem/hash_set.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- Copyright 2010 SINTEF ICT, Applied Mathematics.
-
- This file is part of the Open Porous Media project (OPM).
-
- OPM is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OPM is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with OPM. If not, see
- * compr_quantities_gen_deallocate(NULL)
- *
- * is supported and benign (i.e., this statement behaves as
- * free(NULL)
).
- *
- * @param[in,out] cq On input - compressible quantity management structure
- * obtained through a previous call to construction function
- * compr_quantities_gen_allocate(). On output - invalid pointer.
- */
-void
-compr_quantities_gen_deallocate(struct compr_quantities_gen *cq);
-
#ifdef __cplusplus
}
#endif
diff --git a/opm/core/pressure/tpfa/compr_source.c b/opm/core/pressure/tpfa/compr_source.c
deleted file mode 100644
index eef23bb7..00000000
--- a/opm/core/pressure/tpfa/compr_source.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/*===========================================================================
-//
-// File: compr_source.c
-//
-// Created: 2011-10-19 19:22:24+0200
-//
-// Authors: Ingeborg S. Ligaarden np > 0
and
- * allocation success. @c NULL otherwise. The resources must be released using
- * destructor function compr_src_deallocate().
- */
-struct compr_src *
-compr_src_allocate(int np, int nsrc);
-
-
-/**
- * Release memory resources acquired in a previous call to constructor function
- * compr_src_allocate() and, possibly, source term insertion function
- * append_compr_source_term().
- *
- * @param[in,out] src On input - source term management structure obtained
- * through a previous call to construction function compr_src_allocate().
- * On output - invalid pointer.
- */
-void
-compr_src_deallocate(struct compr_src *src);
-
-
-/**
- * Insert a new explicit source term into an existing collection.
- *
- * @param[in] c Cell influenced by this source term.
- * @param[in] np Number of fluid phases. Used for consistency checking
- * only.
- * @param[in] v Source term total reservoir volume Darcy flux. Positive
- * if the source term is to be interpreted as an injection
- * source and negative otherwise.
- * @param[in] sat Injection composition for this source term. Array of size
- * @c np. Copied to internal storage, but the actual numbers
- * are not inspected unless v > 0.0
.
- * @param[in,out] src On input - source term management structure obtained
- * through a previous call to construction function compr_src_allocate() and,
- * possibly, another call to function append_compr_source_term(). On output -
- * source term collection that includes the new source term if successful and
- * unchanged if not.
- *
- * @return One (1, true) if successful (i.e., if the new source term could be
- * included in the existing collection) and zero (0, false) if not.
- */
-int
-append_compr_source_term(int c ,
- int np ,
- double v ,
- const double *sat,
- struct compr_src *src);
-
-
-/**
- * Empty source term collection while maintaining existing capacity.
- *
- * @param[in,out] src On input - an existing source term collection with a
- * given number of sources and source capacity. On output - an empty source
- * term collection (i.e., src->nsrc == 0
) with an unchanged
- * capacity.
- */
-void
-clear_compr_source_term(struct compr_src *src);
-
-
#ifdef __cplusplus
}
#endif
diff --git a/opm/core/transport/minimal/spu_explicit.c b/opm/core/transport/minimal/spu_explicit.c
deleted file mode 100644
index 38a62b29..00000000
--- a/opm/core/transport/minimal/spu_explicit.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright 2010 (c) SINTEF ICT, Applied Mathematics.
- * Jostein R. Natvig