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

Method DevBlockJacobiMatrix

ngscuda/dev_blockjacobi.cpp:92–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90
91
92 DevBlockJacobiMatrix :: DevBlockJacobiMatrix (const BlockJacobiPrecond<double> & mat)
93 : h(mat.Height()), w(mat.Width()),
94 matrices(mat.MatrixData()), indices(mat.GetBlockTable()->AsArray())
95 {
96 const Array<FlatMatrix<double>> & inverses = mat.GetInverses();
97
98 Array<BlockJacobiCtr> hostctrs(inverses.Size());
99 Dev<double> * matptr = matrices.Data();
100 Dev<int> * indexptr = indices.Data();
101 for (size_t i = 0; i < inverses.Size(); i++)
102 {
103 size_t s = inverses[i].Height();
104 new (&hostctrs[i].mat) SliceMatrix<Dev<double>> (s, s, s, matptr);
105 hostctrs[i].indices = indexptr;
106 matptr += s*s;
107 indexptr += s;
108 }
109
110 ctrstructs = Array<Dev<BlockJacobiCtr>> (hostctrs);
111 }
112
113
114 void DevBlockJacobiMatrix :: MultAdd (double s, const BaseVector & x, BaseVector & y) const

Callers

nothing calls this directly

Calls 5

AsArrayMethod · 0.80
HeightMethod · 0.45
WidthMethod · 0.45
SizeMethod · 0.45
DataMethod · 0.45

Tested by

no test coverage detected