| 1078 | |
| 1079 | template <class TM, class TV> |
| 1080 | void BlockJacobiPrecondSymmetric<TM,TV> :: |
| 1081 | MultAdd (TSCAL s, const BaseVector & x, BaseVector & y) const |
| 1082 | { |
| 1083 | static Timer timer("BlockJacobiSymmetric::MultAdd"); |
| 1084 | RegionTimer reg (timer); |
| 1085 | |
| 1086 | x.Cumulate(); |
| 1087 | y.Cumulate(); |
| 1088 | |
| 1089 | FlatVector<TVX> fx = x.FV<TVX> (); |
| 1090 | FlatVector<TVX> fy = y.FV<TVX> (); |
| 1091 | |
| 1092 | Vector<TVX> hxmax(maxbs); |
| 1093 | Vector<TVX> hymax(maxbs); |
| 1094 | |
| 1095 | for (size_t i = 0; i < blocktable->Size(); i++) |
| 1096 | { |
| 1097 | int bs = (*blocktable)[i].Size(); |
| 1098 | if (!bs) continue; |
| 1099 | |
| 1100 | FlatVector<TVX> hx = hxmax.Range (0, bs); |
| 1101 | FlatVector<TVX> hy = hymax.Range (0, bs); |
| 1102 | |
| 1103 | for (int j = 0; j < bs; j++) |
| 1104 | hx(j) = fx((*blocktable)[i][j]); |
| 1105 | |
| 1106 | InvDiag(i).Mult (hx, hy); |
| 1107 | |
| 1108 | for (int j = 0; j < bs; j++) |
| 1109 | fy((*blocktable)[i][j]) += s * hy(j); |
| 1110 | } |
| 1111 | } |
| 1112 | |
| 1113 | |
| 1114 | template <class TM, class TV> |