46 namespace MultiRegions
52 string PreconditionerLinearWithLowEnergy::className
54 "FullLinearSpaceWithLowEnergyBlock",
55 PreconditionerLinearWithLowEnergy::create,
56 "Full Linear space and low energy block preconditioning");
65 PreconditionerLinearWithLowEnergy::PreconditionerLinearWithLowEnergy(
66 const boost::shared_ptr<GlobalLinSys> &plinsys,
126 int nGlobal = pInput.num_elements();
140 m_linSpacePrecon->DoPreconditionerWithNonVertOutput(InputLinear, OutputLinear, tmp);
142 m_lowEnergyPrecon->DoMultiplybyInverseTransposedTransformationMatrix(OutputLinear,pOutput);
144 Vmath::Vadd(nGlobal,pOutput,1,OutputLowEnergy,1,pOutput,1);
boost::shared_ptr< AssemblyMap > m_locToGloMap
virtual void v_DoTransformToLowEnergy(Array< OneD, NekDouble > &pInOut, int offset)
Transform from original basis to low energy basis.
tBaseSharedPtr CreateInstance(tKey idKey BOOST_PP_COMMA_IF(MAX_PARAM) BOOST_PP_ENUM_BINARY_PARAMS(MAX_PARAM, tParam, x))
Create an instance of the class referred to by idKey.
boost::shared_ptr< AssemblyMap > AssemblyMapSharedPtr
PreconFactory & GetPreconFactory()
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
const boost::weak_ptr< GlobalLinSys > m_linsys
virtual void v_InitObject()
virtual void v_DoTransformFromLowEnergy(Array< OneD, NekDouble > &pInput)
Transform from low energy basis to orignal basis.
virtual DNekScalMatSharedPtr v_TransformedSchurCompl(int offset, const boost::shared_ptr< DNekScalMat > &loc_mat)
Get block elemental transposed transformation matrix .
virtual void v_DoPreconditioner(const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput)
Apply a preconditioner to the conjugate gradient method.
PreconditionerSharedPtr m_linSpacePrecon
virtual void v_BuildPreconditioner()
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
PreconditionerSharedPtr m_lowEnergyPrecon
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.