35#include <boost/core/ignore_unused.hpp>
60 : m_linsys(plinsys), m_preconType(pLocToGloMap->GetPreconType()),
61 m_locToGloMap(pLocToGloMap)
86 boost::ignore_unused(pInput, pOutput, IsLocal);
102 assMap->Assemble(pInput, pOutput);
105 int nDir = assMap->GetNumGlobalDirBndCoeffs();
108 assMap->GlobalToLocal(pOutput, pOutput);
112 assMap->AssembleBnd(pInput, pOutput);
115 int nDir = assMap->GetNumGlobalDirBndCoeffs();
118 assMap->GlobalToLocalBnd(pOutput, pOutput);
131 boost::ignore_unused(pInput, pOutput, pNonVertOutput, pVertForce);
141 boost::ignore_unused(pInOut);
150 boost::ignore_unused(pInOut);
159 boost::ignore_unused(pInput, pOutput);
168 boost::ignore_unused(pInput, pOutput);
181 int offset,
int bnd_offset,
const std::shared_ptr<DNekScalMat> &loc_mat)
183 boost::ignore_unused(offset, bnd_offset);
195 int nGlobalBnd = asmMap->GetNumGlobalBndCoeffs();
196 int nDirBnd = asmMap->GetNumGlobalDirBndCoeffs();
197 int rows = nGlobalBnd - nDirBnd;
201 int sign1, sign2, gid1, gid2, i, j, n, cnt;
206 for (cnt = n = 0; n <
m_linsys.lock()->GetNumBlocks(); ++n)
209 loc_mat = (
m_linsys.lock())->GetStaticCondBlock(n);
212 bnd_mat = loc_mat->GetBlock(0, 0);
215 int bnd_row = bnd_mat->GetRows();
217 for (i = 0; i < bnd_row; ++i)
219 gid1 = asmMap->GetLocalToGlobalBndMap(cnt + i) - nDirBnd;
220 sign1 = asmMap->GetLocalToGlobalBndSign(cnt + i);
227 for (j = 0; j < bnd_row; ++j)
229 gid2 = asmMap->GetLocalToGlobalBndMap(cnt + j) - nDirBnd;
230 sign2 = asmMap->GetLocalToGlobalBndSign(cnt + j);
234 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
The above copyright notice and this permission notice shall be included.
std::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
std::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
void Zero(int n, T *x, const int incx)
Zero vector.