|
Nektar++
|
Low-order representation (LOR) preconditioner. More...
#include <PreconditionerLOR.h>
Static Public Member Functions | |
| static PreconditionerSharedPtr | create (const std::shared_ptr< GlobalLinSys > &plinsys, const std::shared_ptr< AssemblyMap > &pLocToGloMap) |
| Creates an instance of this class. | |
Static Public Attributes | |
| static std::string | className |
| Name of class. | |
Protected Member Functions | |
| void | v_InitObject () override |
| void | v_DoPreconditioner (const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput, const bool &isLocal=false) override |
| Apply a preconditioner to the conjugate gradient method. | |
| void | v_BuildPreconditioner () override |
Protected Member Functions inherited from Nektar::MultiRegions::Preconditioner | |
| virtual DNekScalMatSharedPtr | v_TransformedSchurCompl (int offset, int bndoffset, const std::shared_ptr< DNekScalMat > &loc_mat) |
| Get block elemental transposed transformation matrix \(\mathbf{R}^{T}\). | |
| 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. | |
| virtual void | v_DoTransformBasisToLowEnergy (Array< OneD, NekDouble > &pInOut) |
| Transform from original basis to low energy basis. | |
| virtual void | v_DoTransformCoeffsFromLowEnergy (Array< OneD, NekDouble > &pInOut) |
| Transform from low energy coeffs to orignal basis. | |
| virtual void | v_DoTransformCoeffsToLowEnergy (const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput) |
| Multiply by the block inverse transformation matrix. | |
| virtual void | v_DoTransformBasisFromLowEnergy (const Array< OneD, NekDouble > &pInput, Array< OneD, NekDouble > &pOutput) |
| Multiply by the block transposed inverse transformation matrix. | |
Private Member Functions | |
| void | CreateInvMultiplicity (void) |
Private Attributes | |
| GlobalLinSysSharedPtr | m_LORLinSys |
| Linear solver for LOR system. | |
| std::string | m_slvType |
| Solution type for LOR space, DirectFull, IterativeFull, PETScFull. | |
| bool | m_equiSpaced = false |
| Flag that determines whether to use equispaced point distributions or GLL. | |
| bool | m_useSimplex = false |
| Use a simplex distribution in the LOR system so that e.g. quadrilaterals are split into triangles. | |
| unsigned int | m_nsplit |
| SpatialDomains::MeshGraphSharedPtr | m_lor_graph |
| MeshGraph for the LOR system. | |
| MultiRegions::ContFieldSharedPtr | m_lor_field |
| Field object for the LOR system. | |
| unsigned int | m_nDir |
| Number of Dirichlet values on original mesh. | |
| Array< OneD, int > | m_ho2lor |
| Map from high-order node numbers to LOR representation. | |
| Array< OneD, NekDouble > | m_invMultiplicity |
| Inverse of multiplicity of each global DOF in the high-order mesh. | |
| Array< OneD, NekDouble > | m_invLinMeshMultiplicity |
| Inverse of multiplicity of each global DOF in the LOR mesh. | |
| bool | m_verboseIter |
| Whether to be verbose. | |
Static Private Attributes | |
| static std::string | lookupIds [] |
| static std::string | def |
Additional Inherited Members | |
Protected Attributes inherited from Nektar::MultiRegions::Preconditioner | |
| const std::weak_ptr< GlobalLinSys > | m_linsys |
| std::string | m_preconType |
| DNekMatSharedPtr | m_preconditioner |
| std::weak_ptr< AssemblyMap > | m_locToGloMap |
Low-order representation (LOR) preconditioner.
This preconditioner works by taking a high-order element and splitting into P1 elements that 'join the dots' of a quadrature distribution on the element.
This class implements LOR preconditioning for the conjugate gradient matrix solver.
Definition at line 55 of file PreconditionerLOR.h.
| Nektar::MultiRegions::PreconditionerLOR::PreconditionerLOR | ( | const std::shared_ptr< GlobalLinSys > & | plinsys, |
| const AssemblyMapSharedPtr & | pLocToGloMap | ||
| ) |
Constructor.
Definition at line 68 of file PreconditionerLOR.cpp.
|
inlineoverride |
Definition at line 78 of file PreconditionerLOR.h.
|
inlinestatic |
Creates an instance of this class.
Definition at line 59 of file PreconditionerLOR.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr().
Create inv multiplicity
Definition at line 427 of file PreconditionerLOR.cpp.
References m_ho2lor, m_invLinMeshMultiplicity, m_invMultiplicity, Nektar::MultiRegions::Preconditioner::m_locToGloMap, and Vmath::Sdiv().
Referenced by v_BuildPreconditioner().
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::Preconditioner.
Definition at line 79 of file PreconditionerLOR.cpp.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), ASSERTL0, ASSERTL1, CreateInvMultiplicity(), Nektar::SpatialDomains::LinearMeshGraph::CreateLinearGraph(), Nektar::ErrorUtil::efatal, Nektar::MultiRegions::eIterativeFull, Nektar::SpatialDomains::LinearMeshGraph::GetLinearGraph(), Nektar::MultiRegions::GlobalSysSolnTypeMap, m_equiSpaced, m_ho2lor, Nektar::MultiRegions::Preconditioner::m_linsys, Nektar::MultiRegions::Preconditioner::m_locToGloMap, m_lor_field, m_lor_graph, m_LORLinSys, m_nDir, m_nsplit, m_slvType, m_useSimplex, m_verboseIter, and NEKERROR.
|
overrideprotectedvirtual |
Apply a preconditioner to the conjugate gradient method.
Reimplemented from Nektar::MultiRegions::Preconditioner.
Definition at line 329 of file PreconditionerLOR.cpp.
References Nektar::StdRegions::eEquiSpacedToCoeffs, Nektar::StdRegions::eGLLToCoeffs, Vmath::Gathr(), m_equiSpaced, m_ho2lor, m_invLinMeshMultiplicity, m_invMultiplicity, Nektar::MultiRegions::Preconditioner::m_linsys, Nektar::MultiRegions::Preconditioner::m_locToGloMap, m_lor_field, m_LORLinSys, m_nDir, m_slvType, Vmath::Scatr(), Vmath::Vcopy(), Vmath::Vmul(), and Vmath::Zero().
|
overrideprotectedvirtual |
Reimplemented from Nektar::MultiRegions::Preconditioner.
Definition at line 75 of file PreconditionerLOR.cpp.
|
static |
Name of class.
Registers the class with the Factory.
Definition at line 71 of file PreconditionerLOR.h.
|
staticprivate |
Definition at line 93 of file PreconditionerLOR.h.
|
staticprivate |
Definition at line 92 of file PreconditionerLOR.h.
|
private |
Flag that determines whether to use equispaced point distributions or GLL.
Definition at line 101 of file PreconditionerLOR.h.
Referenced by v_BuildPreconditioner(), and v_DoPreconditioner().
Map from high-order node numbers to LOR representation.
Definition at line 115 of file PreconditionerLOR.h.
Referenced by CreateInvMultiplicity(), v_BuildPreconditioner(), and v_DoPreconditioner().
Inverse of multiplicity of each global DOF in the LOR mesh.
Definition at line 119 of file PreconditionerLOR.h.
Referenced by CreateInvMultiplicity(), and v_DoPreconditioner().
Inverse of multiplicity of each global DOF in the high-order mesh.
Definition at line 117 of file PreconditionerLOR.h.
Referenced by CreateInvMultiplicity(), and v_DoPreconditioner().
|
private |
Field object for the LOR system.
Definition at line 111 of file PreconditionerLOR.h.
Referenced by v_BuildPreconditioner(), and v_DoPreconditioner().
|
private |
MeshGraph for the LOR system.
Definition at line 109 of file PreconditionerLOR.h.
Referenced by v_BuildPreconditioner().
|
private |
Linear solver for LOR system.
Definition at line 96 of file PreconditionerLOR.h.
Referenced by v_BuildPreconditioner(), and v_DoPreconditioner().
|
private |
Number of Dirichlet values on original mesh.
Definition at line 113 of file PreconditionerLOR.h.
Referenced by v_BuildPreconditioner(), and v_DoPreconditioner().
|
private |
Definition at line 107 of file PreconditionerLOR.h.
Referenced by v_BuildPreconditioner().
|
private |
Solution type for LOR space, DirectFull, IterativeFull, PETScFull.
Definition at line 98 of file PreconditionerLOR.h.
Referenced by v_BuildPreconditioner(), and v_DoPreconditioner().
|
private |
Use a simplex distribution in the LOR system so that e.g. quadrilaterals are split into triangles.
Definition at line 104 of file PreconditionerLOR.h.
Referenced by v_BuildPreconditioner().
|
private |
Whether to be verbose.
Definition at line 121 of file PreconditionerLOR.h.
Referenced by v_BuildPreconditioner().