56 : m_linsys(plinsys), m_preconType(pLocToGloMap->GetPreconType()),
57 m_locToGloMap(pLocToGloMap)
81 [[maybe_unused]]
const bool &IsLocal)
98 assMap->Assemble(pInput, pOutput);
101 int nDir = assMap->GetNumGlobalDirBndCoeffs();
104 assMap->GlobalToLocal(pOutput, pOutput);
108 assMap->AssembleBnd(pInput, pOutput);
111 int nDir = assMap->GetNumGlobalDirBndCoeffs();
114 assMap->GlobalToLocalBnd(pOutput, pOutput);
175 [[maybe_unused]]
int offset, [[maybe_unused]]
int bnd_offset,
176 const std::shared_ptr<DNekScalMat> &loc_mat)
189 int nGlobalBnd = asmMap->GetNumGlobalBndCoeffs();
190 int nDirBnd = asmMap->GetNumGlobalDirBndCoeffs();
191 int rows = nGlobalBnd - nDirBnd;
195 int sign1, sign2, gid1, gid2, i, j, n, cnt;
200 for (cnt = n = 0; n <
m_linsys.lock()->GetNumBlocks(); ++n)
203 loc_mat = (
m_linsys.lock())->GetStaticCondBlock(n);
206 bnd_mat = loc_mat->GetBlock(0, 0);
209 int bnd_row = bnd_mat->GetRows();
211 for (i = 0; i < bnd_row; ++i)
213 gid1 = asmMap->GetLocalToGlobalBndMap(cnt + i) - nDirBnd;
214 sign1 = asmMap->GetLocalToGlobalBndSign(cnt + i);
221 for (j = 0; j < bnd_row; ++j)
223 gid2 = asmMap->GetLocalToGlobalBndMap(cnt + j) - nDirBnd;
224 sign2 = asmMap->GetLocalToGlobalBndSign(cnt + j);
228 diagonals[gid1] += sign1 * sign2 * (*bnd_mat)(i, j);
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
Provides a generic Factory class.
static std::string RegisterDefaultSolverInfo(const std::string &pName, const std::string &pValue)
Registers the default string value of a solver info property.
virtual void v_DoPreconditioner(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const bool &isLocal=false)
Apply a preconditioner to the conjugate gradient method.
virtual void v_DoTransformBasisToLowEnergy(Array< OneD, NekDouble > &pInOut)
Transform from original basis to low energy basis.
const std::weak_ptr< GlobalLinSys > m_linsys
virtual void v_DoPreconditionerWithNonVertOutput(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const Array< OneD, NekDouble > &pNonVertOutput, Array< OneD, NekDouble > &pVertForce)
Apply a preconditioner to the conjugate gradient method with an output for non-vertex degrees of free...
Array< OneD, NekDouble > AssembleStaticCondGlobalDiagonals()
Performs global assembly of diagonal entries to global Schur complement matrix.
void DoAssembleLoc(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const bool &ZeroDir)
Apply an assembly and scatter back to lcoal array.
std::weak_ptr< AssemblyMap > m_locToGloMap
virtual void v_DoTransformBasisFromLowEnergy(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput)
Multiply by the block transposed inverse transformation matrix.
Preconditioner(const std::shared_ptr< GlobalLinSys > &plinsys, const AssemblyMapSharedPtr &pLocToGloMap)
virtual void v_DoTransformCoeffsFromLowEnergy(Array< OneD, NekDouble > &pInOut)
Transform from low energy coeffs to orignal basis.
virtual DNekScalMatSharedPtr v_TransformedSchurCompl(int offset, int bndoffset, const std::shared_ptr< DNekScalMat > &loc_mat)
Get block elemental transposed transformation matrix .
virtual void v_BuildPreconditioner()
virtual void v_InitObject()
virtual void v_DoTransformCoeffsToLowEnergy(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput)
Multiply by the block inverse transformation matrix.
PreconFactory & GetPreconFactory()
std::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
void Zero(int n, T *x, const int incx)
Zero vector.