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)
93 Loki::SingleThreaded> Type;
94 return Type::Instance();
149 Vmath::Smul(pInput.num_elements(), 1.0, pInput, 1, pInput, 1);
181 int offset,
const boost::shared_ptr<DNekScalMat> &loc_mat)
195 int rows = nGlobalBnd - nDirBnd;
199 int sign1, sign2, gid1, gid2, i, j, n, cnt;
204 for (cnt = n = 0; n <
m_linsys.lock()->GetNumBlocks(); ++n)
207 loc_mat = (
m_linsys.lock())->GetStaticCondBlock(n);
210 bnd_mat = loc_mat->GetBlock(0, 0);
213 int bnd_row = bnd_mat->GetRows();
215 for (i = 0; i < bnd_row; ++i)
226 for (j = 0; j < bnd_row; ++j)
234 diagonals[gid1] += sign1 * sign2 * (*bnd_mat)(i, j);
static std::string lookupIds[]
boost::shared_ptr< AssemblyMap > m_locToGloMap
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mod...
virtual void v_DoMultiplybyInverseTransposedTransformationMatrix(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput)
Multiply by the block transposed inverse transformation matrix.
static std::string RegisterEnumValue(std::string pEnum, std::string pString, int pEnumValue)
Registers an enumeration value.
boost::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
Preconditioner(const boost::shared_ptr< GlobalLinSys > &plinsys, const AssemblyMapSharedPtr &pLocToGloMap)
virtual void v_DoPreconditioner(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput)
Apply a preconditioner to the conjugate gradient method.
LibUtilities::NekFactory< std::string, Preconditioner, const boost::shared_ptr< GlobalLinSys > &, const boost::shared_ptr< AssemblyMap > & > PreconFactory
PreconFactory & GetPreconFactory()
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...
virtual void v_DoMultiplybyInverseTransformationMatrix(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput)
Multiply by the block inverse transformation matrix.
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
const boost::weak_ptr< GlobalLinSys > m_linsys
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*y.
virtual void v_DoTransformFromLowEnergy(Array< OneD, NekDouble > &pInput)
Transform from low energy basis to orignal basis.
Array< OneD, NekDouble > AssembleStaticCondGlobalDiagonals()
Performs global assembly of diagonal entries to global Schur complement matrix.
boost::shared_ptr< DNekScalBlkMat > DNekScalBlkMatSharedPtr
virtual DNekScalMatSharedPtr v_TransformedSchurCompl(int offset, const boost::shared_ptr< DNekScalMat > &loc_mat)
Get block elemental transposed transformation matrix .
No Solution type specified.
virtual void v_DoTransformToLowEnergy(Array< OneD, NekDouble > &pInOut, int offset)
Transform from original basis to low energy basis.
virtual void v_BuildPreconditioner()
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_InitObject()
Provides a generic Factory class.