Opm::Elevation Struct Reference

#include <upscale.hpp>

Inheritance diagram for Opm::Elevation:
Inheritance graph

Public Member Functions

 Elevation (int aBlock, double aFraction)
 
int block () const
 
double fraction () const
 
bool operator< (const Elevation &rhs) const
 

Detailed Description

Elevation is a discretized version of height.

Instead of having the height is absolute units, it is more efficient to store the number of blocks so that we can find the appropriate property with a simple table lookup.

Note that an Elevation object will refer to two different heights in two different columns; the top surface is not located at the same z, and the heights of the blocks may be different.

Constructor & Destructor Documentation

Opm::Elevation::Elevation ( int  aBlock,
double  aFraction 
)
inline

Initialize an elevation carrier from its parts.

Parameters
aBlockNumber of whole blocks skipped before the height.
aFractionFractional part of the last block. The invariant 0. <= fraction < 1. should be observed.

Member Function Documentation

int Opm::Elevation::block ( ) const
inline

Number of whole blocks that should be skipped before reaching this height. The height is in the block associated with row number returned from this function.

double Opm::Elevation::fraction ( ) const
inline

Fraction of the block in which the height is. Although the sides of the block may not be perfectly vertical, we assume that the fraction was generated by scanning some property and can thus be used to find the amount to include of another property at the same height.

bool Opm::Elevation::operator< ( const Elevation rhs) const

Compare whether this elevation is above another elevation.

Parameters
rhsElevation to compare to. Assumes normalized elevation objects (0 <= fraction < 1).
Returns
True if this elevation is higher above rhs.

The documentation for this struct was generated from the following file: