|
template<class M > |
using | FieldFunct = std::function< typename M::field_type(const typename M::field_type &)> |
|
|
template<class GridView > |
std::size_t | countLocalInteriorCellsGridView (const GridView &gridView) |
| Get the number of local interior cells in a grid view. More...
|
|
template<class Grid > |
std::size_t | countLocalInteriorCells (const Grid &grid) |
| Get the number of local interior cells in a grid. More...
|
|
template<class Grid > |
std::size_t | countGlobalCells (const Grid &grid) |
| Get the number of cells of a global grid. More...
|
|
void | checkAllMPIProcesses () |
|
void | mergeParallelLogFiles (std::string_view output_dir, std::string_view deck_filename, bool enableLoggingFalloutWarning) |
|
void | handleExtraConvergenceOutput (SimulatorReport &report, std::string_view option, std::string_view optionName, std::string_view output_dir, std::string_view base_name) |
|
void | detectOscillations (const std::vector< std::vector< double > > &residualHistory, const int it, const int numPhases, const double relaxRelTol, bool &oscillate, bool &stagnate) |
| Detect oscillation or stagnation in a given residual history. More...
|
|
template<class BVector > |
void | stabilizeNonlinearUpdate (BVector &dx, BVector &dxOld, const double omega, NonlinearRelaxType relaxType) |
|
template<class Grid , class CartMapper , class W > |
void | setWellConnections (const Grid &grid, const CartMapper &cartMapper, const W &wells, bool useWellConn, std::vector< std::set< int > > &wellGraph, int numJacobiBlocks) |
| Find cell IDs for wells contained in local grid. More...
|
|
template<class Grid , class Mapper > |
void | findOverlapAndInterior (const Grid &grid, const Mapper &mapper, std::vector< int > &overlapRows, std::vector< int > &interiorRows) |
| Find the rows corresponding to overlap cells. More...
|
|
template<class Grid > |
std::size_t | numMatrixRowsToUseInSolver (const Grid &grid, bool ownerFirst) |
| If ownerFirst=true, returns the number of interior cells in grid, else just numCells(). More...
|
|
void | copyParValues (std::any ¶llelInformation, std::size_t size, Dune::OwnerOverlapCopyCommunication< int, int > &comm) |
| Copy values in parallel. More...
|
|
template<class Matrix > |
void | makeOverlapRowsInvalid (Matrix &matrix, const std::vector< int > &overlapRows) |
|
template<class Matrix , class Grid > |
std::unique_ptr< Matrix > | blockJacobiAdjacency (const Grid &grid, const std::vector< int > &cell_part, std::size_t nonzeroes, const std::vector< std::set< int > > &wellConnectionsGraph) |
|
template<typename T > |
T | identityFunctor (const T &) |
|
template<typename T > |
T | oneFunctor (const T &) |
|
template<typename T > |
T | signFunctor (const T &) |
|
template<typename T > |
T | isPositiveFunctor (const T &) |
|
template<typename T > |
T | absFunctor (const T &) |
|
template<typename M > |
void | milu0_decomposition (M &A, FieldFunct< M > absFunctor=signFunctor< typename M::field_type >, FieldFunct< M > signFunctor=oneFunctor< typename M::field_type >, std::vector< typename M::block_type > *diagonal=nullptr) |
|
template<class M > |
void | milu0_decomposition (M &A, std::vector< typename M::block_type > *diagonal) |
|
template<class M > |
void | milun_decomposition (const M &A, int n, MILU_VARIANT milu, M &ILU, Reorderer &ordering, Reorderer &inverseOrdering) |
|
template<class M > |
void | ghost_last_bilu0_decomposition (M &A, std::size_t interiorSize) |
| Compute Blocked ILU0 decomposition, when we know junk ghost rows are located at the end of A. More...
|
|
template<class M , class CRS , class InvVector > |
void | convertToCRS (const M &A, CRS &lower, CRS &upper, InvVector &inv) |
| compute ILU decomposition of A. A is overwritten by its decomposition More...
|
|
template<class TA , class TB , class TC , class PositiveSign > |
static void | multMatrixImpl (const TA &A, const TB &B, TC &ret, const PositiveSign) |
| calculates ret = A * B More...
|
|
template<class TA , class TB , class TC , class PositiveSign > |
static void | multMatrixTransposedImpl (const TA &A, const TB &B, TC &ret, const PositiveSign) |
|
template<class DenseMatrixA , class DenseMatrixB , class DenseMatrixC > |
static void | multMatrixTransposed (const DenseMatrixA &A, const DenseMatrixB &B, DenseMatrixC &ret) |
| calculates ret = A^T * B More...
|
|
template<class DenseMatrixA , class DenseMatrixB , class DenseMatrixC > |
static void | negativeMultMatrixTransposed (const DenseMatrixA &A, const DenseMatrixB &B, DenseMatrixC &ret) |
| calculates ret = -A^T * B More...
|
|
template<class K > |
static void | multMatrix (const Dune::DynamicMatrix< K > &A, const Dune::DynamicMatrix< K > &B, Dune::DynamicMatrix< K > &ret) |
| calculates ret = A * B More...
|
|
void | logTimer (const AdaptiveSimulatorTimer &substepTimer) |
|
std::set< std::string > | consistentlyFailingWells (const std::vector< StepReport > &sr) |
|
template<class Scalar > |
Scalar | pressureAverage (const Scalar pressurePvHydrocarbon, const Scalar pvHydrocarbon, const Scalar pressurePv, const Scalar pv, const bool hydrocarbon) |
| Calculates average pressure value. More...
|
|
template<class Scalar > |
std::vector< Scalar > | pressureAverage (const std::vector< Scalar > &pressurePvHydrocarbon, const std::vector< Scalar > &pvHydrocarbon, const std::vector< Scalar > &pressurePv, const std::vector< Scalar > &pv, const bool hydrocarbon) |
| Calculates average pressure value for a vector. More...
|
|
template<typename T > |
T | getFlo (const VFPProdTable &table, const T &aqua, const T &liquid, const T &vapour) |
|
template<typename T > |
T | getFlo (const VFPInjTable &table, const T &aqua, const T &liquid, const T &vapour) |
|
template<typename T > |
T | getWFR (const VFPProdTable &table, const T &aqua, const T &liquid, const T &vapour) |
|
template<typename T > |
T | getGFR (const VFPProdTable &table, const T &aqua, const T &liquid, const T &vapour) |
|
InterpData | findInterpData (const double value_in, const std::vector< double > &values) |
|
VFPEvaluation | operator+ (VFPEvaluation lhs, const VFPEvaluation &rhs) |
|
VFPEvaluation | operator- (VFPEvaluation lhs, const VFPEvaluation &rhs) |
|
VFPEvaluation | operator* (double lhs, const VFPEvaluation &rhs) |
|
VFPEvaluation | interpolate (const VFPProdTable &table, const InterpData &flo_i, const InterpData &thp_i, const InterpData &wfr_i, const InterpData &gfr_i, const InterpData &alq_i) |
|
VFPEvaluation | interpolate (const VFPInjTable &table, const InterpData &flo_i, const InterpData &thp_i) |
|
VFPEvaluation | bhp (const VFPProdTable &table, const double aqua, const double liquid, const double vapour, const double thp, const double alq, const double explicit_wfr, const double explicit_gfr, const bool use_vfpexplicit) |
|
VFPEvaluation | bhp (const VFPInjTable &table, const double aqua, const double liquid, const double vapour, const double thp) |
|
template<typename T > |
const T & | getTable (const std::map< int, std::reference_wrapper< const T > > &tables, int table_id) |
|
template<typename T > |
bool | hasTable (const std::map< int, std::reference_wrapper< const T > > &tables, int table_id) |
|
template<typename TYPE , typename TABLE > |
TYPE | getType (const TABLE &table) |
|
double | findTHP (const std::vector< double > &bhp_array, const std::vector< double > &thp_array, double bhp) |
|
std::pair< double, double > | getMinimumBHPCoordinate (const VFPProdTable &table, const double thp, const double wfr, const double gfr, const double alq) |
|
std::optional< std::pair< double, double > > | intersectWithIPR (const VFPProdTable &table, const double thp, const double wfr, const double gfr, const double alq, const double ipr_a, const double ipr_b, const std::function< double(const double)> &adjust_bhp) |
|
◆ FieldFunct
◆ absFunctor()
template<typename T >
T Opm::detail::absFunctor |
( |
const T & |
| ) |
|
◆ bhp() [1/2]
VFPEvaluation Opm::detail::bhp |
( |
const VFPInjTable & |
table, |
|
|
const double |
aqua, |
|
|
const double |
liquid, |
|
|
const double |
vapour, |
|
|
const double |
thp |
|
) |
| |
◆ bhp() [2/2]
VFPEvaluation Opm::detail::bhp |
( |
const VFPProdTable & |
table, |
|
|
const double |
aqua, |
|
|
const double |
liquid, |
|
|
const double |
vapour, |
|
|
const double |
thp, |
|
|
const double |
alq, |
|
|
const double |
explicit_wfr, |
|
|
const double |
explicit_gfr, |
|
|
const bool |
use_vfpexplicit |
|
) |
| |
Referenced by Opm::StandardWell< TypeTag >::allDrawDownWrongDirection(), Opm::StandardWell< TypeTag >::calculateSinglePerf(), Opm::StandardWell< TypeTag >::canProduceInjectWithCurrentBhp(), Opm::MultisegmentWell< TypeTag >::computeBhpAtThpLimitInj(), Opm::StandardWell< TypeTag >::computeBhpAtThpLimitInj(), Opm::MultisegmentWell< TypeTag >::computeBhpAtThpLimitProdWithAlq(), Opm::StandardWell< TypeTag >::computeBhpAtThpLimitProdWithAlq(), Opm::StandardWell< TypeTag >::computeCurrentWellRates(), Opm::StandardWell< TypeTag >::computePerfRate(), Opm::StandardWell< TypeTag >::computeWellPotentials(), Opm::StandardWell< TypeTag >::computeWellPotentialWithTHP(), Opm::MultisegmentWell< TypeTag >::computeWellPotentialWithTHP(), Opm::StandardWell< TypeTag >::computeWellRatesAndBhpWithThpAlqProd(), Opm::MultisegmentWell< TypeTag >::computeWellRatesWithBhp(), Opm::StandardWell< TypeTag >::computeWellRatesWithBhp(), Opm::StandardWell< TypeTag >::computeWellRatesWithBhpIterations(), Opm::MultisegmentWell< TypeTag >::computeWellRatesWithBhpIterations(), Opm::StandardWell< TypeTag >::getMobility(), Opm::WellInterface< TypeTag >::solveWellWithBhp(), Opm::WellInterface< TypeTag >::solveWellWithTHPConstraint(), Opm::StandardWell< TypeTag >::updateWaterMobilityWithPolymer(), Opm::WellInterface< TypeTag >::updateWellControlAndStatusLocalIteration(), and Opm::WellInterface< TypeTag >::updateWellStateWithTarget().
◆ blockJacobiAdjacency()
template<class Matrix , class Grid >
std::unique_ptr< Matrix > Opm::detail::blockJacobiAdjacency |
( |
const Grid & |
grid, |
|
|
const std::vector< int > & |
cell_part, |
|
|
std::size_t |
nonzeroes, |
|
|
const std::vector< std::set< int > > & |
wellConnectionsGraph |
|
) |
| |
Create sparsity pattern for block-Jacobi matrix based on partitioning of grid. Do not initialize the values, that is done in copyMatToBlockJac()
◆ checkAllMPIProcesses()
void Opm::detail::checkAllMPIProcesses |
( |
| ) |
|
◆ consistentlyFailingWells()
std::set< std::string > Opm::detail::consistentlyFailingWells |
( |
const std::vector< StepReport > & |
sr | ) |
|
◆ convertToCRS()
template<class M , class CRS , class InvVector >
void Opm::detail::convertToCRS |
( |
const M & |
A, |
|
|
CRS & |
lower, |
|
|
CRS & |
upper, |
|
|
InvVector & |
inv |
|
) |
| |
◆ copyParValues()
void Opm::detail::copyParValues |
( |
std::any & |
parallelInformation, |
|
|
std::size_t |
size, |
|
|
Dune::OwnerOverlapCopyCommunication< int, int > & |
comm |
|
) |
| |
◆ countGlobalCells()
template<class Grid >
std::size_t Opm::detail::countGlobalCells |
( |
const Grid & |
grid | ) |
|
◆ countLocalInteriorCells()
template<class Grid >
std::size_t Opm::detail::countLocalInteriorCells |
( |
const Grid & |
grid | ) |
|
Get the number of local interior cells in a grid.
- Template Parameters
-
- Parameters
-
[in] | grid | Grid for which to count interior cells. |
- Returns
- The number of interior cells in the partition of the grid stored on this process.
References countLocalInteriorCellsGridView().
◆ countLocalInteriorCellsGridView()
template<class GridView >
std::size_t Opm::detail::countLocalInteriorCellsGridView |
( |
const GridView & |
gridView | ) |
|
◆ detectOscillations()
void Opm::detail::detectOscillations |
( |
const std::vector< std::vector< double > > & |
residualHistory, |
|
|
const int |
it, |
|
|
const int |
numPhases, |
|
|
const double |
relaxRelTol, |
|
|
bool & |
oscillate, |
|
|
bool & |
stagnate |
|
) |
| |
◆ findInterpData()
InterpData Opm::detail::findInterpData |
( |
const double |
value_in, |
|
|
const std::vector< double > & |
values |
|
) |
| |
Helper function to find indices etc. for linear interpolation and extrapolation - Parameters
-
value_in | Value to find in values |
values | Sorted list of values to search for value in. |
- Returns
- Data required to find the interpolated value
◆ findOverlapAndInterior()
template<class Grid , class Mapper >
void Opm::detail::findOverlapAndInterior |
( |
const Grid & |
grid, |
|
|
const Mapper & |
mapper, |
|
|
std::vector< int > & |
overlapRows, |
|
|
std::vector< int > & |
interiorRows |
|
) |
| |
Find the rows corresponding to overlap cells.
Loop over grid and store cell ids of rows corresponding to overlap cells. - Template Parameters
-
The | type of the DUNE grid. |
- Parameters
-
grid | The grid where we look for overlap cells. |
overlapRows | List where overlap rows are stored. |
interiorRows | List where overlap rows are stored. |
Referenced by Opm::ISTLSolver< TypeTag >::initialize().
◆ findTHP()
double Opm::detail::findTHP |
( |
const std::vector< double > & |
bhp_array, |
|
|
const std::vector< double > & |
thp_array, |
|
|
double |
bhp |
|
) |
| |
This function finds the value of THP given a specific BHP. Essentially: Given the function f(thp_array(x)) = bhp_array(x), which is piecewise linear, find thp so that f(thp) = bhp.
◆ getFlo() [1/2]
template<typename T >
T Opm::detail::getFlo |
( |
const VFPInjTable & |
table, |
|
|
const T & |
aqua, |
|
|
const T & |
liquid, |
|
|
const T & |
vapour |
|
) |
| |
Computes the flo parameter according to the flo_type_ for injection tables - Returns
- Production rate of oil, gas or liquid.
◆ getFlo() [2/2]
template<typename T >
T Opm::detail::getFlo |
( |
const VFPProdTable & |
table, |
|
|
const T & |
aqua, |
|
|
const T & |
liquid, |
|
|
const T & |
vapour |
|
) |
| |
Computes the flo parameter according to the flo_type_ for production tables - Returns
- Production rate of oil, gas or liquid.
◆ getGFR()
template<typename T >
T Opm::detail::getGFR |
( |
const VFPProdTable & |
table, |
|
|
const T & |
aqua, |
|
|
const T & |
liquid, |
|
|
const T & |
vapour |
|
) |
| |
◆ getMinimumBHPCoordinate()
std::pair< double, double > Opm::detail::getMinimumBHPCoordinate |
( |
const VFPProdTable & |
table, |
|
|
const double |
thp, |
|
|
const double |
wfr, |
|
|
const double |
gfr, |
|
|
const double |
alq |
|
) |
| |
Get (flo, bhp) at minimum bhp for given thp,wfr,gfr,alq
◆ getTable()
template<typename T >
const T & Opm::detail::getTable |
( |
const std::map< int, std::reference_wrapper< const T > > & |
tables, |
|
|
int |
table_id |
|
) |
| |
Returns the table from the map if found, or throws an exception
◆ getType()
template<typename TYPE , typename TABLE >
TYPE Opm::detail::getType |
( |
const TABLE & |
table | ) |
|
◆ getWFR()
template<typename T >
T Opm::detail::getWFR |
( |
const VFPProdTable & |
table, |
|
|
const T & |
aqua, |
|
|
const T & |
liquid, |
|
|
const T & |
vapour |
|
) |
| |
◆ ghost_last_bilu0_decomposition()
template<class M >
void Opm::detail::ghost_last_bilu0_decomposition |
( |
M & |
A, |
|
|
std::size_t |
interiorSize |
|
) |
| |
◆ handleExtraConvergenceOutput()
void Opm::detail::handleExtraConvergenceOutput |
( |
SimulatorReport & |
report, |
|
|
std::string_view |
option, |
|
|
std::string_view |
optionName, |
|
|
std::string_view |
output_dir, |
|
|
std::string_view |
base_name |
|
) |
| |
◆ hasTable()
template<typename T >
bool Opm::detail::hasTable |
( |
const std::map< int, std::reference_wrapper< const T > > & |
tables, |
|
|
int |
table_id |
|
) |
| |
Check whether we have a table with the table number
◆ identityFunctor()
template<typename T >
T Opm::detail::identityFunctor |
( |
const T & |
| ) |
|
◆ interpolate() [1/2]
This basically models interpolate(VFPProdTable::array_type, ...) which performs 5D interpolation, but here for the 2D case only
◆ interpolate() [2/2]
Helper function which interpolates data using the indices etc. given in the inputs.
◆ intersectWithIPR()
std::optional< std::pair< double, double > > Opm::detail::intersectWithIPR |
( |
const VFPProdTable & |
table, |
|
|
const double |
thp, |
|
|
const double |
wfr, |
|
|
const double |
gfr, |
|
|
const double |
alq, |
|
|
const double |
ipr_a, |
|
|
const double |
ipr_b, |
|
|
const std::function< double(const double)> & |
adjust_bhp |
|
) |
| |
Get (flo, bhp) at largest occuring stable vfp/ipr-intersection if it exists
◆ isPositiveFunctor()
template<typename T >
T Opm::detail::isPositiveFunctor |
( |
const T & |
| ) |
|
◆ logTimer()
◆ makeOverlapRowsInvalid()
template<class Matrix >
void Opm::detail::makeOverlapRowsInvalid |
( |
Matrix & |
matrix, |
|
|
const std::vector< int > & |
overlapRows |
|
) |
| |
◆ mergeParallelLogFiles()
void Opm::detail::mergeParallelLogFiles |
( |
std::string_view |
output_dir, |
|
|
std::string_view |
deck_filename, |
|
|
bool |
enableLoggingFalloutWarning |
|
) |
| |
◆ milu0_decomposition() [1/2]
template<typename M >
void Opm::detail::milu0_decomposition |
( |
M & |
A, |
|
|
FieldFunct< M > |
absFunctor = signFunctor< typename M::field_type > , |
|
|
FieldFunct< M > |
signFunctor = oneFunctor< typename M::field_type > , |
|
|
std::vector< typename M::block_type > * |
diagonal = nullptr |
|
) |
| |
◆ milu0_decomposition() [2/2]
template<class M >
void Opm::detail::milu0_decomposition |
( |
M & |
A, |
|
|
std::vector< typename M::block_type > * |
diagonal |
|
) |
| |
◆ milun_decomposition()
◆ multMatrix()
template<class K >
static void Opm::detail::multMatrix |
( |
const Dune::DynamicMatrix< K > & |
A, |
|
|
const Dune::DynamicMatrix< K > & |
B, |
|
|
Dune::DynamicMatrix< K > & |
ret |
|
) |
| |
|
inlinestatic |
◆ multMatrixImpl()
template<class TA , class TB , class TC , class PositiveSign >
static void Opm::detail::multMatrixImpl |
( |
const TA & |
A, |
|
|
const TB & |
B, |
|
|
TC & |
ret, |
|
|
const |
PositiveSign |
|
) |
| |
|
inlinestatic |
◆ multMatrixTransposed()
template<class DenseMatrixA , class DenseMatrixB , class DenseMatrixC >
static void Opm::detail::multMatrixTransposed |
( |
const DenseMatrixA & |
A, |
|
|
const DenseMatrixB & |
B, |
|
|
DenseMatrixC & |
ret |
|
) |
| |
|
inlinestatic |
◆ multMatrixTransposedImpl()
template<class TA , class TB , class TC , class PositiveSign >
static void Opm::detail::multMatrixTransposedImpl |
( |
const TA & |
A, |
|
|
const TB & |
B, |
|
|
TC & |
ret, |
|
|
const |
PositiveSign |
|
) |
| |
|
inlinestatic |
◆ negativeMultMatrixTransposed()
template<class DenseMatrixA , class DenseMatrixB , class DenseMatrixC >
static void Opm::detail::negativeMultMatrixTransposed |
( |
const DenseMatrixA & |
A, |
|
|
const DenseMatrixB & |
B, |
|
|
DenseMatrixC & |
ret |
|
) |
| |
|
inlinestatic |
◆ numMatrixRowsToUseInSolver()
template<class Grid >
std::size_t Opm::detail::numMatrixRowsToUseInSolver |
( |
const Grid & |
grid, |
|
|
bool |
ownerFirst |
|
) |
| |
If ownerFirst=true, returns the number of interior cells in grid, else just numCells().
If cells in grid is ordered so that interior/owner cells come before overlap/copy cells, the method returns the number of interior cells numInterior. In the linear solver only the first numInterior rows of the matrix are needed.
Referenced by Opm::ISTLSolver< TypeTag >::initialize().
◆ oneFunctor()
template<typename T >
T Opm::detail::oneFunctor |
( |
const T & |
| ) |
|
◆ operator*()
◆ operator+()
◆ operator-()
◆ pressureAverage() [1/2]
template<class Scalar >
Scalar Opm::detail::pressureAverage |
( |
const Scalar |
pressurePvHydrocarbon, |
|
|
const Scalar |
pvHydrocarbon, |
|
|
const Scalar |
pressurePv, |
|
|
const Scalar |
pv, |
|
|
const bool |
hydrocarbon |
|
) |
| |
Calculates average pressure value.
◆ pressureAverage() [2/2]
template<class Scalar >
std::vector< Scalar > Opm::detail::pressureAverage |
( |
const std::vector< Scalar > & |
pressurePvHydrocarbon, |
|
|
const std::vector< Scalar > & |
pvHydrocarbon, |
|
|
const std::vector< Scalar > & |
pressurePv, |
|
|
const std::vector< Scalar > & |
pv, |
|
|
const bool |
hydrocarbon |
|
) |
| |
Calculates average pressure value for a vector.
◆ setWellConnections()
template<class Grid , class CartMapper , class W >
void Opm::detail::setWellConnections |
( |
const Grid & |
grid, |
|
|
const CartMapper & |
cartMapper, |
|
|
const W & |
wells, |
|
|
bool |
useWellConn, |
|
|
std::vector< std::set< int > > & |
wellGraph, |
|
|
int |
numJacobiBlocks |
|
) |
| |
Find cell IDs for wells contained in local grid.
Cell IDs of wells stored in a graph, so it can be used to create an adjacency pattern. Only relevant when the UseWellContribusion option is set to true - Template Parameters
-
The | type of the DUNE grid. |
Well | vector type |
- Parameters
-
grid | The grid where we look for overlap cells. |
wells | List of wells contained in grid. |
useWellConn | Boolean that is true when UseWellContribusion is true |
wellGraph | Cell IDs of well cells stored in a graph. |
◆ signFunctor()
template<typename T >
T Opm::detail::signFunctor |
( |
const T & |
| ) |
|
◆ stabilizeNonlinearUpdate()
template<class BVector >
void Opm::detail::stabilizeNonlinearUpdate |
( |
BVector & |
dx, |
|
|
BVector & |
dxOld, |
|
|
const double |
omega, |
|
|
NonlinearRelaxType |
relaxType |
|
) |
| |
|