#include <upscale.hpp>
|
| VertEqUpscaler (const TopSurf &topSurf) |
|
void | gather (int col, double *buf, const double *data, int stride, int offset) const |
|
void | wgt_dpt (int col, const double *val, rlw_double &res) const |
|
double | dpt_avg (int col, const double *val) const |
|
double | sum (int col, const double *val) const |
|
int | num_rows (int col) const |
|
Elevation | bottom (int col) const |
|
double | eval (int col, const rlw_double &dpt, const Elevation zeta) const |
|
Elevation | find (int col, const double *dpt, const double target) const |
|
Extension of the top surface that does integration across columns. The extension is done by aggregation since these methods really are orthogonal to how the grid is created.
Opm::VertEqUpscaler::VertEqUpscaler |
( |
const TopSurf & |
topSurf | ) |
|
|
inline |
Create a layer on top of a top surface that can upscale properties in columns.
- Parameters
-
topSurf | Grid that provides the weights in the integrations. |
Elevation Opm::VertEqUpscaler::bottom |
( |
int |
col | ) |
const |
Get the elevation of the bottom of a column. This is usable when we want to get the depth-average for the entire column.
double Opm::VertEqUpscaler::dpt_avg |
( |
int |
col, |
|
|
const double * |
val |
|
) |
| const |
Depth-average of a property discretized for each block.
This is the same as the last item written in the column wih wgt_dpt, except this method returns the single result instead of all values down the column.
- Parameters
-
col | Index of the column for which values should be averaged. |
val | Value for each block in the column. |
- Returns
- Values weighted by the depth in each block, divided by the total depth of the column.
double Opm::VertEqUpscaler::eval |
( |
int |
col, |
|
|
const rlw_double & |
dpt, |
|
|
const Elevation |
zeta |
|
) |
| const |
Perform table lookup in an array of depth-averaged values.
Given a height in the form of a discretized elevation, quickly find the depth-averaged value at this point.
- Parameters
-
col | Column that the elevation is specified for. |
dpt | Depth fractions weighted with a certain property. This should be calculated with wgt_dpt(). |
zeta | The elevation to find. Use the interp() routine to get an elevation for an upscaled saturation. |
- Returns
- Depth-weighted value of the property from the top down to the specified height.
Elevation Opm::VertEqUpscaler::find |
( |
int |
col, |
|
|
const double * |
dpt, |
|
|
const double |
target |
|
) |
| const |
Find the elevation where an integrated property has a certain value.
The method solves the equation \int_{elevation}^{top} property dz = target
with respect to elevation, where the dpt argument contains precalculated values for the integral down to and including each block in the column.
- Parameters
-
col | Index of the column to search, this is the coarse grid block number |
dpt | Depth fractions weighted with a certain property. This should be calculated with wgt_dpt(). |
target | Value the integral from top down to the goal height should have. |
- Returns
- Elevation where the integral specified in dpt down to this point becomes the target.
void Opm::VertEqUpscaler::gather |
( |
int |
col, |
|
|
double * |
buf, |
|
|
const double * |
data, |
|
|
int |
stride, |
|
|
int |
offset |
|
) |
| const |
Retrieve a property from the fine grid for a certain column of blocks.
The property is stored in records of 'stride' length, 'offset' elements from the start. (This is used to index into a permeability tensor).
- Parameters
-
col | Index of the column to retrieve. This must be a valid cell number in the top surface. |
buf | Array that will receive the data. It is assumed that this is preallocated, and is large enough to hold the data for this column. |
data | Array that contains the property for the entire fine grid. This is typically something that was retrieved from a fluid object associated with the fine grid. |
stride | Number of values (not bytes!) between each entry for the property. Use one for simple arrays. |
offset | Number of values (not bytes!) before the first entry for this property. Use zero for simple arrays. |
int Opm::VertEqUpscaler::num_rows |
( |
int |
col | ) |
const |
Number of rows in a specified column. Use this method to get the expected length of arrays containing properties for it. (However, use ts.max_vert_res to preallocate space!)
double Opm::VertEqUpscaler::sum |
( |
int |
col, |
|
|
const double * |
val |
|
) |
| const |
Sum a property such as a source term down the column.
Use this method for upscaling things that are specified independent of the block size (source terms is specified as a volumetric flux (see computePorevolume in opm/core/utility/miscUtilities.cpp)).
- Parameters
-
col | Index of the column for which values should be summed. |
val | Value for each block in the entire grid, same as the data argument to gather(). The reason for using this method is to avoid the extra copy. |
- Returns
- Sum of values for this block, regardless of depth.
void Opm::VertEqUpscaler::wgt_dpt |
( |
int |
col, |
|
|
const double * |
val, |
|
|
rlw_double & |
res |
|
) |
| const |
Depth fraction weighted by an expression specified as piecewise values downwards a column from the top.
Returned for each block is the integral from the top down to and including each block, divided by the total height of the column. The last value will thus contain the average for the entire column.
- Parameters
-
col | Index of the column for which the expression should be integrated. |
val | Integrand values for each block in the column. |
res | Array that will receive the result. The caller must preallocate storage and pass it as input here. Only the column specified with col will be filled. |
const TopSurf& Opm::VertEqUpscaler::ts |
|
protected |
The documentation for this struct was generated from the following file:
|