44 namespace MultiRegions
53 "Diagonal Preconditioning");
62 const boost::shared_ptr<GlobalLinSys> &plinsys,
65 m_preconType(pLocToGloMap->GetPreconType())
88 ASSERTL0(0,
"Unsupported solver type");
98 boost::shared_ptr<MultiRegions::ExpList> expList =
99 ((
m_linsys.lock())->GetLocMat()).lock();
103 int i,j,n,cnt,gid1,gid2;
107 int nInt = nGlobal - nDir;
111 Array<OneD, NekDouble> vOutput(nGlobal,0.0);
114 int nElmt = expList->GetNumElmts();
115 for(n = cnt = 0; n < nElmt; ++n)
117 loc_mat = (
m_linsys.lock())->GetBlock(expList->GetOffset_Elmt_Id(n));
118 loc_row = loc_mat->GetRows();
120 for(i = 0; i < loc_row; ++i)
126 for(j = 0; j < loc_row; ++j)
137 value = vOutput[gid1 + nDir]
138 + sign1*sign2*(*loc_mat)(i,j);
139 vOutput[gid1 + nDir] = value;
163 int rows = nGlobalBnd - nDirBnd;
165 Array<OneD, NekDouble> vOutput(nGlobalBnd,0.0);
169 for (
unsigned int i = 0; i < rows; ++i)
171 vOutput[nDirBnd + i] = diagonals[i];
185 const Array<OneD, NekDouble>& pInput,
186 Array<OneD, NekDouble>& pOutput)
195 int nNonDir = nGlobal-nDir;
203 "No Preconditioning");
212 const boost::shared_ptr<GlobalLinSys> &plinsys,
215 m_preconType(pLocToGloMap->GetPreconType())
237 const Array<OneD, NekDouble>& pInput,
238 Array<OneD, NekDouble>& pOutput)
240 Vmath::Vcopy(pInput.num_elements(), pInput, 1, pOutput, 1);