Nektar++
|
#include <Preconditioner.h>
Protected Member Functions | |
virtual DNekScalMatSharedPtr | v_TransformedSchurCompl (int offset, int bndoffset, const std::shared_ptr< DNekScalMat > &loc_mat) |
Get block elemental transposed transformation matrix \(\mathbf{R}^{T}\). More... | |
virtual void | v_InitObject () |
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. More... | |
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 freedom. More... | |
virtual void | v_DoTransformBasisToLowEnergy (Array< OneD, NekDouble > &pInOut) |
Transform from original basis to low energy basis. More... | |
virtual void | v_DoTransformCoeffsFromLowEnergy (Array< OneD, NekDouble > &pInOut) |
Transform from low energy coeffs to orignal basis. More... | |
virtual void | v_DoTransformCoeffsToLowEnergy (const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput) |
Multiply by the block inverse transformation matrix. More... | |
virtual void | v_DoTransformBasisFromLowEnergy (const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput) |
Multiply by the block transposed inverse transformation matrix. More... | |
virtual void | v_BuildPreconditioner () |
Protected Attributes | |
const std::weak_ptr< GlobalLinSys > | m_linsys |
std::string | m_preconType |
DNekMatSharedPtr | m_preconditioner |
std::weak_ptr< AssemblyMap > | m_locToGloMap |
Private Member Functions | |
void | NullPreconditioner (void) |
Static Private Attributes | |
static std::string | lookupIds [] |
static std::string | def |
This class implements preconditioning for the conjugate gradient matrix solver.
This class implements diagonal preconditioning for the conjugate gradient matrix solver.
Definition at line 63 of file Preconditioner.h.
Nektar::MultiRegions::Preconditioner::Preconditioner | ( | const std::shared_ptr< GlobalLinSys > & | plinsys, |
const AssemblyMapSharedPtr & | pLocToGloMap | ||
) |
Definition at line 54 of file Preconditioner.cpp.
|
inlinevirtual |
Definition at line 71 of file Preconditioner.h.
Array< OneD, NekDouble > Nektar::MultiRegions::Preconditioner::AssembleStaticCondGlobalDiagonals | ( | ) |
Performs global assembly of diagonal entries to global Schur complement matrix.
Definition at line 185 of file Preconditioner.cpp.
References m_linsys, and m_locToGloMap.
Referenced by Nektar::MultiRegions::PreconditionerDiagonal::StaticCondDiagonalPreconditionerSum().
|
inline |
Definition at line 238 of file Preconditioner.h.
References v_BuildPreconditioner().
void Nektar::MultiRegions::Preconditioner::DoAssembleLoc | ( | const Array< OneD, NekDouble > & | pInput, |
Array< OneD, NekDouble > & | pOutput, | ||
const bool & | ZeroDir | ||
) |
Apply an assembly and scatter back to lcoal array.
Definition at line 89 of file Preconditioner.cpp.
References Nektar::MultiRegions::eIterativeFull, m_locToGloMap, and Vmath::Zero().
|
inline |
Definition at line 180 of file Preconditioner.h.
References v_DoPreconditioner().
|
inline |
Definition at line 190 of file Preconditioner.h.
References v_DoPreconditionerWithNonVertOutput().
|
inline |
Definition at line 229 of file Preconditioner.h.
References v_DoTransformBasisFromLowEnergy().
|
inline |
Definition at line 202 of file Preconditioner.h.
References v_DoTransformBasisToLowEnergy().
|
inline |
Definition at line 211 of file Preconditioner.h.
References v_DoTransformCoeffsFromLowEnergy().
|
inline |
Definition at line 220 of file Preconditioner.h.
References v_DoTransformCoeffsToLowEnergy().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 163 of file Preconditioner.h.
References v_InitObject().
|
inline |
Definition at line 171 of file Preconditioner.h.
References v_TransformedSchurCompl().
|
protectedvirtual |
Reimplemented in Nektar::MultiRegions::PreconditionerBlock, Nektar::MultiRegions::PreconditionerDiagonal, Nektar::MultiRegions::PreconditionerNull, Nektar::MultiRegions::PreconditionerJacobi, Nektar::MultiRegions::PreconditionerLinear, Nektar::MultiRegions::PreconditionerLinearWithBlock, Nektar::MultiRegions::PreconditionerLinearWithDiag, Nektar::MultiRegions::PreconditionerLinearWithLowEnergy, and Nektar::MultiRegions::PreconditionerLowEnergy.
Definition at line 166 of file Preconditioner.cpp.
Referenced by BuildPreconditioner().
|
protectedvirtual |
Apply a preconditioner to the conjugate gradient method.
Reimplemented in Nektar::MultiRegions::PreconditionerBlock, Nektar::MultiRegions::PreconditionerDiagonal, Nektar::MultiRegions::PreconditionerNull, Nektar::MultiRegions::PreconditionerJacobi, Nektar::MultiRegions::PreconditionerLinear, Nektar::MultiRegions::PreconditionerLinearWithBlock, Nektar::MultiRegions::PreconditionerLinearWithDiag, Nektar::MultiRegions::PreconditionerLinearWithLowEnergy, and Nektar::MultiRegions::PreconditionerLowEnergy.
Definition at line 78 of file Preconditioner.cpp.
References Nektar::ErrorUtil::efatal, and NEKERROR.
Referenced by DoPreconditioner().
|
protectedvirtual |
Apply a preconditioner to the conjugate gradient method with an output for non-vertex degrees of freedom.
Reimplemented in Nektar::MultiRegions::PreconditionerLinear.
Definition at line 122 of file Preconditioner.cpp.
References Nektar::ErrorUtil::efatal, and NEKERROR.
Referenced by DoPreconditionerWithNonVertOutput().
|
protectedvirtual |
Multiply by the block transposed inverse transformation matrix.
Reimplemented in Nektar::MultiRegions::PreconditionerLinearWithLowEnergy, and Nektar::MultiRegions::PreconditionerLowEnergy.
Definition at line 159 of file Preconditioner.cpp.
References Nektar::ErrorUtil::efatal, and NEKERROR.
Referenced by DoTransformBasisFromLowEnergy().
|
protectedvirtual |
Transform from original basis to low energy basis.
Reimplemented in Nektar::MultiRegions::PreconditionerLinearWithLowEnergy, and Nektar::MultiRegions::PreconditionerLowEnergy.
Definition at line 134 of file Preconditioner.cpp.
Referenced by DoTransformBasisToLowEnergy().
|
protectedvirtual |
Transform from low energy coeffs to orignal basis.
Reimplemented in Nektar::MultiRegions::PreconditionerLinearWithLowEnergy, and Nektar::MultiRegions::PreconditionerLowEnergy.
Definition at line 142 of file Preconditioner.cpp.
Referenced by DoTransformCoeffsFromLowEnergy().
|
protectedvirtual |
Multiply by the block inverse transformation matrix.
Reimplemented in Nektar::MultiRegions::PreconditionerLinearWithLowEnergy, and Nektar::MultiRegions::PreconditionerLowEnergy.
Definition at line 150 of file Preconditioner.cpp.
Referenced by DoTransformCoeffsToLowEnergy().
|
protectedvirtual |
Reimplemented in Nektar::MultiRegions::PreconditionerBlock, Nektar::MultiRegions::PreconditionerDiagonal, Nektar::MultiRegions::PreconditionerNull, Nektar::MultiRegions::PreconditionerJacobi, Nektar::MultiRegions::PreconditionerLinear, Nektar::MultiRegions::PreconditionerLinearWithBlock, Nektar::MultiRegions::PreconditionerLinearWithDiag, Nektar::MultiRegions::PreconditionerLinearWithLowEnergy, and Nektar::MultiRegions::PreconditionerLowEnergy.
Definition at line 70 of file Preconditioner.cpp.
References Nektar::ErrorUtil::efatal, and NEKERROR.
Referenced by InitObject().
|
protectedvirtual |
Get block elemental transposed transformation matrix \(\mathbf{R}^{T}\).
Reimplemented in Nektar::MultiRegions::PreconditionerLinearWithLowEnergy, and Nektar::MultiRegions::PreconditionerLowEnergy.
Definition at line 174 of file Preconditioner.cpp.
Referenced by TransformedSchurCompl().
|
staticprivate |
Definition at line 156 of file Preconditioner.h.
|
staticprivate |
Definition at line 155 of file Preconditioner.h.
|
protected |
Definition at line 120 of file Preconditioner.h.
Referenced by AssembleStaticCondGlobalDiagonals(), Nektar::MultiRegions::PreconditionerBlock::BlockPreconditionerCG(), Nektar::MultiRegions::PreconditionerBlock::BlockPreconditionerHDG(), Nektar::MultiRegions::PreconditionerDiagonal::DiagonalPreconditionerSum(), Nektar::MultiRegions::PreconditionerLowEnergy::SetupBlockTransformationMatrix(), Nektar::MultiRegions::PreconditionerLowEnergy::SetUpReferenceElements(), Nektar::MultiRegions::PreconditionerBlock::v_BuildPreconditioner(), Nektar::MultiRegions::PreconditionerJacobi::v_BuildPreconditioner(), Nektar::MultiRegions::PreconditionerLinear::v_BuildPreconditioner(), Nektar::MultiRegions::PreconditionerLowEnergy::v_BuildPreconditioner(), Nektar::MultiRegions::PreconditionerJacobi::v_DoPreconditioner(), Nektar::MultiRegions::PreconditionerLinearWithBlock::v_InitObject(), Nektar::MultiRegions::PreconditionerLinearWithDiag::v_InitObject(), Nektar::MultiRegions::PreconditionerLinearWithLowEnergy::v_InitObject(), Nektar::MultiRegions::PreconditionerLowEnergy::v_InitObject(), and Nektar::MultiRegions::PreconditionerLowEnergy::v_TransformedSchurCompl().
|
protected |
Definition at line 123 of file Preconditioner.h.
Referenced by AssembleStaticCondGlobalDiagonals(), Nektar::MultiRegions::PreconditionerBlock::BlockPreconditionerCG(), Nektar::MultiRegions::PreconditionerBlock::BlockPreconditionerHDG(), Nektar::MultiRegions::PreconditionerLowEnergy::CreateVariablePMask(), Nektar::MultiRegions::PreconditionerDiagonal::DiagonalPreconditionerSum(), DoAssembleLoc(), Nektar::MultiRegions::PreconditionerLowEnergy::SetupBlockTransformationMatrix(), Nektar::MultiRegions::PreconditionerDiagonal::StaticCondDiagonalPreconditionerSum(), Nektar::MultiRegions::PreconditionerDiagonal::v_BuildPreconditioner(), Nektar::MultiRegions::PreconditionerJacobi::v_BuildPreconditioner(), Nektar::MultiRegions::PreconditionerLinear::v_BuildPreconditioner(), Nektar::MultiRegions::PreconditionerLowEnergy::v_BuildPreconditioner(), Nektar::MultiRegions::PreconditionerBlock::v_DoPreconditioner(), Nektar::MultiRegions::PreconditionerDiagonal::v_DoPreconditioner(), Nektar::MultiRegions::PreconditionerNull::v_DoPreconditioner(), Nektar::MultiRegions::PreconditionerJacobi::v_DoPreconditioner(), Nektar::MultiRegions::PreconditionerLinearWithLowEnergy::v_DoPreconditioner(), Nektar::MultiRegions::PreconditionerLowEnergy::v_DoPreconditioner(), Nektar::MultiRegions::PreconditionerLinear::v_DoPreconditionerWithNonVertOutput(), Nektar::MultiRegions::PreconditionerLowEnergy::v_DoTransformBasisFromLowEnergy(), Nektar::MultiRegions::PreconditionerLowEnergy::v_DoTransformBasisToLowEnergy(), Nektar::MultiRegions::PreconditionerLowEnergy::v_DoTransformCoeffsFromLowEnergy(), Nektar::MultiRegions::PreconditionerLowEnergy::v_DoTransformCoeffsToLowEnergy(), Nektar::MultiRegions::PreconditionerBlock::v_InitObject(), Nektar::MultiRegions::PreconditionerLinearWithBlock::v_InitObject(), Nektar::MultiRegions::PreconditionerLinearWithDiag::v_InitObject(), Nektar::MultiRegions::PreconditionerLinearWithLowEnergy::v_InitObject(), and Nektar::MultiRegions::PreconditionerLowEnergy::v_InitObject().
|
protected |
Definition at line 122 of file Preconditioner.h.
|
protected |
Definition at line 121 of file Preconditioner.h.