mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add interface for updating stored parameters in linearizers.
Implement for the TpfaLinearizer to update transmissibilities.
This commit is contained in:
parent
11c9c34dcc
commit
477acf0c6c
@ -282,6 +282,11 @@ public:
|
||||
return linearizationType_;
|
||||
};
|
||||
|
||||
void updateDiscretizationParameters()
|
||||
{
|
||||
// This linearizer stores no such parameters.
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns the map of constraint degrees of freedom.
|
||||
*
|
||||
|
@ -265,6 +265,11 @@ public:
|
||||
return linearizationType_;
|
||||
};
|
||||
|
||||
void updateDiscretizationParameters()
|
||||
{
|
||||
updateStoredTransmissibilities();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Returns the map of constraint degrees of freedom.
|
||||
*
|
||||
@ -498,6 +503,22 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
void updateStoredTransmissibilities()
|
||||
{
|
||||
unsigned numCells = model_().numTotalDof();
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for
|
||||
#endif
|
||||
for (unsigned globI = 0; globI < numCells; globI++) {
|
||||
auto nbInfos = neighborInfo_[globI]; // nbInfos will be a SparseTable<...>::mutable_iterator_range.
|
||||
for (auto& nbInfo : nbInfos) {
|
||||
unsigned globJ = nbInfo.neighbor;
|
||||
nbInfo.trans = problem_().transmissibility(globI, globJ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Simulator *simulatorPtr_;
|
||||
|
||||
// the jacobian matrix
|
||||
|
Loading…
Reference in New Issue
Block a user