GEOS
|
#include "common/DataTypes.hpp"
Go to the source code of this file.
Namespaces | |
geos | |
Functions | |
template<typename VEC > | |
GEOS_HOST_DEVICE void | geos::compositionalMultiphaseUtilities::shiftBlockElementsAheadByOneAndReplaceFirstElementWithSum (integer const numRowsToShift, integer const numRowsInBlock, integer const numBlocks, VEC &&v) |
In each block, shift the elements from 0 to numRowsToShift-1 one position ahead and replaces the first element with the sum of all elements from 0 to numRowsToShift-1 of the input block one-dimensional array of values. More... | |
template<typename VEC > | |
GEOS_HOST_DEVICE void | geos::compositionalMultiphaseUtilities::shiftElementsAheadByOneAndReplaceFirstElementWithSum (integer const numRows, VEC &&v) |
Shifts all elements one position ahead and replaces the first element with the sum of all elements in the input one-dimensional array of values. More... | |
template<typename MATRIX , typename VEC > | |
GEOS_HOST_DEVICE void | geos::compositionalMultiphaseUtilities::shiftBlockRowsAheadByOneAndReplaceFirstRowWithColumnSum (integer const numRowsToShift, integer const numRowsInBlock, integer const numColsInBlock, integer const numBlocks, MATRIX &&mat, VEC &&work) |
In each block, shift the elements from 0 to numRowsToShift-1, shifts all rows one position ahead and replaces the first row with the sum of all rows from 0 to numRowsToShift-1 of the input block row two-dimensional array of values. More... | |
template<typename MATRIX , typename VEC > | |
GEOS_HOST_DEVICE void | geos::compositionalMultiphaseUtilities::shiftRowsAheadByOneAndReplaceFirstRowWithColumnSum (integer const numRowsInBlock, integer const numColsInBlock, MATRIX &&mat, VEC &&work) |
Shifts all rows one position ahead and replaces the first row with the sum of all rows in the input block row two-dimensional array of values. More... | |
GEOS_HOST_DEVICE void geos::compositionalMultiphaseUtilities::shiftBlockElementsAheadByOneAndReplaceFirstElementWithSum | ( | integer const | numRowsToShift, |
integer const | numRowsInBlock, | ||
integer const | numBlocks, | ||
VEC && | v | ||
) |
In each block, shift the elements from 0 to numRowsToShift-1 one position ahead and replaces the first element with the sum of all elements from 0 to numRowsToShift-1 of the input block one-dimensional array of values.
VEC | type of one-dimensional array of values |
numRowsToShift | number of rows to shift in each block |
numRowsInBlock | block size |
numBlocks | number of blocks |
v | block one-dimensional array of values |
@detail numRowsToShift is different from numRowsInBlock if there is an equation that we do not want to modify, like the energy flux for thermal simulations. In that specific case, numRowsToShift is set to numRowsInBlock-1 to make sure that we don't modify the last row of each block (the energy flux)
Let's consider the following blocks arising when computing the localFlux in the thermal compositional solver (for two-component flow)
(mass_comp_1)_1 \ (mass_comp_2)_1 |=> block 1 (energy)_1 /
(mass_comp_1)_2 \ (mass_comp_2)_2 |=> block 2 (energy)_2 /
In this case:
Definition at line 63 of file CompositionalMultiphaseUtilities.hpp.
GEOS_HOST_DEVICE void geos::compositionalMultiphaseUtilities::shiftBlockRowsAheadByOneAndReplaceFirstRowWithColumnSum | ( | integer const | numRowsToShift, |
integer const | numRowsInBlock, | ||
integer const | numColsInBlock, | ||
integer const | numBlocks, | ||
MATRIX && | mat, | ||
VEC && | work | ||
) |
In each block, shift the elements from 0 to numRowsToShift-1, shifts all rows one position ahead and replaces the first row with the sum of all rows from 0 to numRowsToShift-1 of the input block row two-dimensional array of values.
MATRIX | type of two-dimensional array of values |
VEC | type of one-dimensional array of values |
numRowsToShift | number of rows to shift in each block |
numRowsInBlock | block number of rows |
numColsInBlock | block number of columns |
numBlocks | number of row blocks |
mat | block row two-dimensional array of values |
work | one-dimensional working array of values of size numColsInBlock |
@detail numRowsToShift is different from numRowsInBlock if there is an equation that we do not want to modify, like the energy flux for thermal simulations. In that specific case, numRowsToShift is set to numRowsInBlock-1 to make sure that we don't modify the last row of each block (the energy flux)
Let's consider the following blocks arising when computing the localFluxJacobian in the thermal compositional solver (for two-component flow)
p \rho_1 \rho_2 T
(mass_comp_1)_1 . . . . \ (mass_comp_2)_1 . . . . |=> block 1 (energy)_1 . . . . /
(mass_comp_1)_2 . . . . \ (mass_comp_2)_2 . . . . |=> block 2 (energy)_2 . . . . /
In this case:
Definition at line 136 of file CompositionalMultiphaseUtilities.hpp.
GEOS_HOST_DEVICE void geos::compositionalMultiphaseUtilities::shiftElementsAheadByOneAndReplaceFirstElementWithSum | ( | integer const | numRows, |
VEC && | v | ||
) |
Shifts all elements one position ahead and replaces the first element with the sum of all elements in the input one-dimensional array of values.
VEC | type of one-dimensional array of values |
numRows | vector size |
v | one-dimensional array of values |
Definition at line 91 of file CompositionalMultiphaseUtilities.hpp.
GEOS_HOST_DEVICE void geos::compositionalMultiphaseUtilities::shiftRowsAheadByOneAndReplaceFirstRowWithColumnSum | ( | integer const | numRowsInBlock, |
integer const | numColsInBlock, | ||
MATRIX && | mat, | ||
VEC && | work | ||
) |
Shifts all rows one position ahead and replaces the first row with the sum of all rows in the input block row two-dimensional array of values.
MATRIX | type of two-dimensional array of values |
VEC | type of one-dimensional array of values |
numRowsInBlock | number of rows |
numColsInBlock | number of columns |
mat | block row two-dimensional array of values |
work | one-dimensional working array of values of size numColsInBlock |
Definition at line 179 of file CompositionalMultiphaseUtilities.hpp.