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

Method MultAdd2

linalg/sparsematrix_impl.hpp:1025–1052  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1023
1024 template <class TM, class TV>
1025 void SparseMatrixSymmetric<TM,TV> ::
1026 MultAdd2 (double s, const BaseVector & x, BaseVector & y,
1027 const BitArray * inner,
1028 const Array<int> * cluster) const
1029 {
1030 static Timer timer("SparseMatrixSymmetric::MultAdd2");
1031 RegionTimer reg (timer);
1032 timer.AddFlops (this->NZE());
1033
1034 const FlatVector<TV_ROW> fx = x.FV<TV_ROW> ();
1035 FlatVector<TV_COL> fy = y.FV<TV_COL> ();
1036
1037 if (inner)
1038 {
1039 for (int i = 0; i < this->Height(); i++)
1040 if (inner->Test(i))
1041 AddRowTransToVector (i, s * fx(i), fy);
1042 }
1043 else if (cluster)
1044 {
1045 for (int i = 0; i < this->Height(); i++)
1046 if ( (*cluster)[i])
1047 AddRowTransToVector (i, s * fx(i), fy);
1048 }
1049 else
1050 for (int i = 0; i < this->Height(); i++)
1051 AddRowTransToVector (i, s * fx(i), fy);
1052 }
1053
1054
1055

Callers

nothing calls this directly

Calls 3

AddRowTransToVectorFunction · 0.85
NZEMethod · 0.45
HeightMethod · 0.45

Tested by

no test coverage detected