mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-11-01 17:03:06 -06:00
Make updateNonzeroValues method use direct transfer where possible
This commit is contained in:
1 parent
67c51d6941
commit
628785fa70
3 files changed
+4
-4
No files matched your search
@@ -125,7 +125,7 @@ void
|
||||
GpuSeqILU0<M, X, Y, l>::update()
|
||||
{
|
||||
if constexpr (is_gpu_matrix_v<M>) {
|
||||
m_LU.updateNonzeroValues(detail::makeMatrixWithNonzeroDiagonal(m_underlyingMatrix));
|
||||
m_LU.updateNonzeroValues(detail::makeMatrixWithNonzeroDiagonal(m_underlyingMatrix), true);
|
||||
} else {
|
||||
m_LU.updateNonzeroValues(m_underlyingMatrix);
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ private:
|
||||
m_gpuSolver = std::make_unique<SolverType>(
|
||||
*m_matrix, parallel, m_propertyTree, pressureIndex, weightsCalculator, m_forceSerial, nullptr);
|
||||
} else {
|
||||
m_matrix->updateNonzeroValues(M);
|
||||
m_matrix->updateNonzeroValues(M, true);
|
||||
m_gpuSolver->update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
{
|
||||
// TODO: Can we do this without reimplementing the other function?
|
||||
// TODO: [perf] Do we need to update the matrix every time? Probably yes
|
||||
m_matrix.updateNonzeroValues(m_opOnCPUWithMatrix.getmat());
|
||||
m_matrix.updateNonzeroValues(m_opOnCPUWithMatrix.getmat(), true);
|
||||
|
||||
if (!m_inputBuffer) {
|
||||
m_inputBuffer.reset(new XGPU(b.dim()));
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
virtual void apply(X& x, X& b, Dune::InverseOperatorResult& res) override
|
||||
{
|
||||
// TODO: [perf] Do we need to update the matrix every time? Probably yes
|
||||
m_matrix.updateNonzeroValues(m_opOnCPUWithMatrix.getmat());
|
||||
m_matrix.updateNonzeroValues(m_opOnCPUWithMatrix.getmat(), true);
|
||||
|
||||
if (!m_inputBuffer) {
|
||||
m_inputBuffer.reset(new XGPU(b.dim()));
|
||||
|
||||
Reference in new issue
Block a user