43 namespace MultiRegions
47 "Preconditioner",
"Null",
eNull),
51 "Preconditioner",
"FullLinearSpaceWithDiagonal",
54 "Preconditioner",
"FullLinearSpace",
eLinear),
56 "Preconditioner",
"LowEnergyBlock",
eLowEnergy),
58 "Preconditioner",
"FullLinearSpaceWithLowEnergyBlock",
61 "Preconditioner",
"Block",
eBlock),
67 "Preconditioner",
"Diagonal");
77 const boost::shared_ptr<GlobalLinSys> &plinsys,
80 m_preconType(pLocToGloMap->GetPreconType()),
81 m_locToGloMap(pLocToGloMap)
92 Loki::NoDestroy > Type;
93 return Type::Instance();
105 const Array<OneD, NekDouble>& pInput,
106 Array<OneD, NekDouble>& pOutput)
116 const Array<OneD, NekDouble> &pInput,
117 Array<OneD, NekDouble> &pOutput,
118 const Array<OneD, NekDouble> &pNonVertOutput,
119 Array<OneD, NekDouble>& pVertForce)
128 Array<OneD, NekDouble>& pInOut,
137 const Array<OneD, NekDouble> &pInOut,
138 Array<OneD, NekDouble> &pOutput)
146 Array<OneD, NekDouble>& pInput)
148 Vmath::Smul(pInput.num_elements(), 1.0, pInput, 1, pInput, 1);
155 const Array<OneD, NekDouble> &pInput,
156 Array<OneD, NekDouble> &pOutput)
165 const Array<OneD, NekDouble> &pInput,
166 Array<OneD, NekDouble> &pOutput)
180 int offset,
const boost::shared_ptr<DNekScalMat> &loc_mat)
189 Array<OneD, NekDouble>
194 int rows = nGlobalBnd - nDirBnd;
198 int sign1, sign2, gid1, gid2, i, j, n, cnt;
199 Array<OneD, NekDouble> diagonals(rows,0.0);
203 for (cnt = n = 0; n <
m_linsys.lock()->GetNumBlocks(); ++n)
206 loc_mat = (
m_linsys.lock())->GetStaticCondBlock(n);
209 bnd_mat = loc_mat->GetBlock(0, 0);
212 int bnd_row = bnd_mat->GetRows();
214 for (i = 0; i < bnd_row; ++i)
225 for (j = 0; j < bnd_row; ++j)
233 diagonals[gid1] += sign1 * sign2 * (*bnd_mat)(i, j);