mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-18 21:43:27 -06:00
Merged.
This commit is contained in:
commit
ead94905db
@ -35,17 +35,15 @@ namespace Opm
|
||||
|
||||
/// @brief Computes pore volume of all cells in a grid.
|
||||
/// @param[in] grid a grid
|
||||
/// @param[in] props rock and fluid properties
|
||||
/// @param[in] porosity array of grid.number_of_cells porosity values
|
||||
/// @param[out] porevol the pore volume by cell.
|
||||
void computePorevolume(const UnstructuredGrid& grid,
|
||||
const Opm::IncompPropertiesInterface& props,
|
||||
const double* porosity,
|
||||
std::vector<double>& porevol)
|
||||
{
|
||||
int num_cells = grid.number_of_cells;
|
||||
ASSERT(num_cells == props.numCells());
|
||||
porevol.resize(num_cells);
|
||||
const double* poro = props.porosity();
|
||||
std::transform(poro, poro + num_cells,
|
||||
std::transform(porosity, porosity + num_cells,
|
||||
grid.cell_volumes,
|
||||
porevol.begin(),
|
||||
std::multiplies<double>());
|
||||
@ -54,22 +52,20 @@ namespace Opm
|
||||
|
||||
/// @brief Computes pore volume of all cells in a grid, with rock compressibility effects.
|
||||
/// @param[in] grid a grid
|
||||
/// @param[in] props rock and fluid properties
|
||||
/// @param[in] porosity array of grid.number_of_cells porosity values
|
||||
/// @param[in] rock_comp rock compressibility properties
|
||||
/// @param[in] pressure pressure by cell
|
||||
/// @param[out] porevol the pore volume by cell.
|
||||
void computePorevolume(const UnstructuredGrid& grid,
|
||||
const IncompPropertiesInterface& props,
|
||||
const double* porosity,
|
||||
const RockCompressibility& rock_comp,
|
||||
const std::vector<double>& pressure,
|
||||
std::vector<double>& porevol)
|
||||
{
|
||||
int num_cells = grid.number_of_cells;
|
||||
ASSERT(num_cells == props.numCells());
|
||||
porevol.resize(num_cells);
|
||||
const double* poro = props.porosity();
|
||||
for (int i = 0; i < num_cells; ++i) {
|
||||
porevol[i] = poro[i]*grid.cell_volumes[i]*rock_comp.poroMult(pressure[i]);
|
||||
porevol[i] = porosity[i]*grid.cell_volumes[i]*rock_comp.poroMult(pressure[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,21 +34,21 @@ namespace Opm
|
||||
|
||||
/// @brief Computes pore volume of all cells in a grid.
|
||||
/// @param[in] grid a grid
|
||||
/// @param[in] props rock and fluid properties
|
||||
/// @param[in] porosity array of grid.number_of_cells porosity values
|
||||
/// @param[out] porevol the pore volume by cell.
|
||||
void computePorevolume(const UnstructuredGrid& grid,
|
||||
const Opm::IncompPropertiesInterface& props,
|
||||
const double* porosity,
|
||||
std::vector<double>& porevol);
|
||||
|
||||
|
||||
/// @brief Computes pore volume of all cells in a grid, with rock compressibility effects.
|
||||
/// @param[in] grid a grid
|
||||
/// @param[in] props rock and fluid properties
|
||||
/// @param[in] porosity array of grid.number_of_cells porosity values
|
||||
/// @param[in] rock_comp rock compressibility properties
|
||||
/// @param[in] pressure pressure by cell
|
||||
/// @param[out] porevol the pore volume by cell.
|
||||
void computePorevolume(const UnstructuredGrid& grid,
|
||||
const IncompPropertiesInterface& props,
|
||||
const double* porosity,
|
||||
const RockCompressibility& rock_comp,
|
||||
const std::vector<double>& pressure,
|
||||
std::vector<double>& porevol);
|
||||
|
Loading…
Reference in New Issue
Block a user