mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-11-02 20:30:55 -06:00
replace std::fill with std::fill_n where appropriate
more expressive
This commit is contained in:
1 parent
f00ab30268
commit
5e13b84f9c
2 files changed
+3
-3
No files matched your search
@@ -138,7 +138,7 @@ void csrPatternToCsc(const int* CSRColIndices,
|
||||
int nnz = CSRRowPointers[Nb];
|
||||
|
||||
// compute number of nnzs per column
|
||||
std::fill(CSCColPointers, CSCColPointers + Nb, 0);
|
||||
std::fill_n(CSCColPointers, Nb, 0);
|
||||
|
||||
for (int n = 0; n < nnz; ++n) {
|
||||
CSCColPointers[CSRColIndices[n]]++;
|
||||
|
||||
@@ -108,7 +108,7 @@ calcInjCoeff(const RegionId r, const int pvtRegionIdx, Coeff& coeff) const
|
||||
const int io = phaseIdx<FluidSystem>(FluidSystem::oilPhaseIdx);
|
||||
const int ig = phaseIdx<FluidSystem>(FluidSystem::gasPhaseIdx);
|
||||
|
||||
std::fill(& coeff[0], & coeff[0] + FluidSystem::numActivePhases(), 0.0);
|
||||
std::fill_n(&coeff[0], FluidSystem::numActivePhases(), 0.0);
|
||||
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
|
||||
// q[w]_r = q[w]_s / bw
|
||||
@@ -184,7 +184,7 @@ calcCoeff(const int pvtRegionIdx,
|
||||
const int io = phaseIdx<FluidSystem>(FluidSystem::oilPhaseIdx);
|
||||
const int ig = phaseIdx<FluidSystem>(FluidSystem::gasPhaseIdx);
|
||||
|
||||
std::fill(& coeff[0], & coeff[0] + FluidSystem::numActivePhases(), 0.0);
|
||||
std::fill_n(&coeff[0], FluidSystem::numActivePhases(), 0.0);
|
||||
|
||||
// Determinant of 'R' matrix
|
||||
const Scalar detRw = 1.0 - (Rsw * Rvw);
|
||||
|
||||
Reference in new issue
Block a user