44 namespace MultiRegions
52 "FullLinearSpaceWithLowEnergyBlock",
54 "Full Linear space and low energy block preconditioning");
64 const boost::shared_ptr<GlobalLinSys> &plinsys,
124 int nGlobal = pInput.num_elements();
138 m_linSpacePrecon->DoPreconditionerWithNonVertOutput(InputLinear, OutputLinear, tmp);
140 m_lowEnergyPrecon->DoMultiplybyInverseTransposedTransformationMatrix(OutputLinear,pOutput);
142 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()
static PreconditionerSharedPtr create(const boost::shared_ptr< GlobalLinSys > &plinsys, const boost::shared_ptr< AssemblyMap > &pLocToGloMap)
Creates an instance of this class.
boost::shared_ptr< DNekScalMat > DNekScalMatSharedPtr
PreconditionerLinearWithLowEnergy(const boost::shared_ptr< GlobalLinSys > &plinsys, const AssemblyMapSharedPtr &pLocToGloMap)
const boost::weak_ptr< GlobalLinSys > m_linsys
static std::string className
Name of class.
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.