MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / MultAdd

Method MultAdd

linalg/sparsematrix_impl.hpp:968–983  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

966
967 template <class TM, class TV>
968 void SparseMatrixSymmetric<TM,TV> ::
969 MultAdd (double s, const BaseVector & x, BaseVector & y) const
970 {
971 static Timer timer("SparseMatrixSymmetric::MultAdd");
972 RegionTimer reg (timer);
973 timer.AddFlops (2*this->nze);
974
975 const FlatVector<TV_ROW> fx = x.FV<TV_ROW>();
976 FlatVector<TV_COL> fy = y.FV<TV_COL>();
977
978 for (int i = 0; i < this->Height(); i++)
979 {
980 fy(i) += s * RowTimesVector (i, fx);
981 AddRowTransToVectorNoDiag (i, s * fx(i), fy);
982 }
983 }
984
985 template <class TM, class TV>
986 void SparseMatrixSymmetric<TM,TV> ::

Callers

nothing calls this directly

Calls 3

RowTimesVectorFunction · 0.85
HeightMethod · 0.45

Tested by

no test coverage detected