Nektar++
|
#include <DriverModifiedArnoldi.h>
Static Public Member Functions | |
static DriverSharedPtr | create (const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph) |
Creates an instance of this class. More... | |
Static Public Attributes | |
static std::string | className |
Name of the class. More... | |
Protected Member Functions | |
DriverModifiedArnoldi (const LibUtilities::SessionReaderSharedPtr pSession, const SpatialDomains::MeshGraphSharedPtr pGraph) | |
Constructor. More... | |
~DriverModifiedArnoldi () override=default | |
Destructor. More... | |
void | v_InitObject (std::ostream &out=std::cout) override |
Virtual function for initialisation implementation. More... | |
void | v_Execute (std::ostream &out=std::cout) override |
Virtual function for solve implementation. More... | |
Protected Member Functions inherited from Nektar::SolverUtils::DriverArnoldi | |
DriverArnoldi (const LibUtilities::SessionReaderSharedPtr pSession, const SpatialDomains::MeshGraphSharedPtr pGraph) | |
Constructor. More... | |
~DriverArnoldi () override=default | |
Destructor. More... | |
void | v_InitObject (std::ostream &out=std::cout) override |
Virtual function for initialisation implementation. More... | |
void | v_Execute (std::ostream &out=std::cout) override |
Virtual function for solve implementation. More... | |
void | CopyArnoldiArrayToField (Array< OneD, NekDouble > &array) |
Copy Arnoldi storage to fields. More... | |
void | CopyFieldToArnoldiArray (Array< OneD, NekDouble > &array) |
Copy fields to Arnoldi storage. More... | |
void | CopyFwdToAdj () |
Copy the forward field to the adjoint system in transient growth calculations. More... | |
void | WriteFld (std::string file, std::vector< Array< OneD, NekDouble > > coeffs) |
Write coefficients to file. More... | |
void | WriteFld (std::string file, Array< OneD, NekDouble > coeffs) |
void | WriteEvs (std::ostream &evlout, const int k, const NekDouble real, const NekDouble imag, NekDouble resid=NekConstants::kNekUnsetDouble, bool DumpInverse=true) |
void | MaskInit () |
Init mask. More... | |
void | GetMaskInfo (std::vector< std::vector< LibUtilities::EquationSharedPtr > > &selectedDomains, std::set< int > &unselectedVariables) |
SOLVER_UTILS_EXPORT void | ArnoldiSummary (std::ostream &out) |
Protected Member Functions inherited from Nektar::SolverUtils::Driver | |
Driver (const LibUtilities::SessionReaderSharedPtr pSession, const SpatialDomains::MeshGraphSharedPtr pGraph) | |
Initialises EquationSystem class members. More... | |
virtual SOLVER_UTILS_EXPORT void | v_InitObject (std::ostream &out=std::cout) |
Virtual function for initialisation implementation. More... | |
virtual SOLVER_UTILS_EXPORT void | v_Execute (std::ostream &out=std::cout)=0 |
Virtual function for solve implementation. More... | |
Static Protected Attributes | |
static std::string | driverLookupId |
Static Protected Attributes inherited from Nektar::SolverUtils::Driver | |
static std::string | evolutionOperatorLookupIds [] |
static std::string | evolutionOperatorDef |
static std::string | driverDefault |
Private Member Functions | |
void | EV_update (Array< OneD, NekDouble > &src, Array< OneD, NekDouble > &tgt) |
Generates a new vector in the sequence by applying the linear operator. More... | |
void | EV_small (Array< OneD, Array< OneD, NekDouble > > &Kseq, Array< OneD, Array< OneD, NekDouble > > &Kseqcopy, const int ntot, const Array< OneD, NekDouble > &alpha, const int kdim, Array< OneD, NekDouble > &zvec, Array< OneD, NekDouble > &wr, Array< OneD, NekDouble > &wi, NekDouble &resnorm) |
Generates the upper Hessenberg matrix H and computes its eigenvalues. More... | |
int | EV_test (const int itrn, const int kdim, Array< OneD, NekDouble > &zvec, Array< OneD, NekDouble > &wr, Array< OneD, NekDouble > &wi, const NekDouble resnorm, int nvec, std::ofstream &evlout, NekDouble &resid0) |
Tests for convergence of eigenvalues of H. More... | |
void | EV_sort (Array< OneD, NekDouble > &evec, Array< OneD, NekDouble > &wr, Array< OneD, NekDouble > &wi, Array< OneD, NekDouble > &test, const int dim) |
Sorts a sequence of eigenvectors/eigenvalues by magnitude. More... | |
void | EV_post (Array< OneD, Array< OneD, NekDouble > > &Tseq, Array< OneD, Array< OneD, NekDouble > > &Kseq, const int ntot, const int kdim, const int nvec, Array< OneD, NekDouble > &zvec, Array< OneD, NekDouble > &wr, Array< OneD, NekDouble > &wi, const int icon) |
void | EV_big (Array< OneD, Array< OneD, NekDouble > > &bvecs, Array< OneD, Array< OneD, NekDouble > > &evecs, const int ntot, const int kdim, const int nvec, Array< OneD, NekDouble > &zvec, Array< OneD, NekDouble > &wr, Array< OneD, NekDouble > &wi) |
Friends | |
class | MemoryManager< DriverModifiedArnoldi > |
Definition at line 44 of file DriverModifiedArnoldi.h.
|
protected |
Constructor.
Definition at line 55 of file DriverModifiedArnoldi.cpp.
|
overrideprotecteddefault |
Destructor.
|
inlinestatic |
Creates an instance of this class.
Definition at line 50 of file DriverModifiedArnoldi.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and CellMLToNektar.cellml_metadata::p.
|
private |
Compute estimates of the eigenvalues/eigenvectors of the original system.
Definition at line 588 of file DriverModifiedArnoldi.cpp.
References Blas::Ddot(), Nektar::SolverUtils::Driver::m_comm, Nektar::SolverUtils::Driver::m_session, Nektar::SolverUtils::DriverArnoldi::m_useMask, Nektar::LibUtilities::ReduceSum, Vmath::Smul(), tinysimd::sqrt(), Vmath::Svtvp(), and Vmath::Zero().
Referenced by EV_post().
|
private |
Post-process the Ritz eigenvalues/eigenvectors of the matrix H, to compute estimations of the leading eigenvalues and eigenvectors of the original matrix.
Definition at line 533 of file DriverModifiedArnoldi.cpp.
References ASSERTL0, EV_big(), Nektar::SolverUtils::Driver::m_comm, Nektar::SolverUtils::Driver::m_equ, Nektar::SolverUtils::Driver::m_session, Nektar::SolverUtils::DriverArnoldi::m_useMask, Nektar::SolverUtils::DriverArnoldi::WriteEvs(), and Nektar::SolverUtils::DriverArnoldi::WriteFld().
Referenced by v_Execute().
|
private |
Generates the upper Hessenberg matrix H and computes its eigenvalues.
Computes the Ritz eigenvalues and eigenvectors of the Hessenberg matrix constructed from the Krylov sequence.
Definition at line 367 of file DriverModifiedArnoldi.cpp.
References ASSERTL0, Blas::Ddot(), Vmath::Dot(), Nektar::SolverUtils::Driver::m_comm, Nektar::SolverUtils::DriverArnoldi::m_useMask, Nektar::LibUtilities::ReduceSum, Vmath::Smul(), tinysimd::sqrt(), and Vmath::Svtvp().
Referenced by v_Execute().
|
private |
Sorts a sequence of eigenvectors/eigenvalues by magnitude.
Sorts the computed eigenvalues by smallest residual first.
Definition at line 498 of file DriverModifiedArnoldi.cpp.
References Nektar::UnitTests::test(), and Vmath::Vcopy().
Referenced by EV_test().
|
private |
Tests for convergence of eigenvalues of H.
Check for convergence of the residuals of the eigenvalues of H.
Definition at line 437 of file DriverModifiedArnoldi.cpp.
References Vmath::Dot(), EV_sort(), Nektar::SolverUtils::Driver::m_comm, Nektar::SolverUtils::DriverArnoldi::m_evtol, Nektar::SolverUtils::DriverArnoldi::m_timeSteppingAlgorithm, tinysimd::sqrt(), and Nektar::SolverUtils::DriverArnoldi::WriteEvs().
Referenced by v_Execute().
|
private |
Generates a new vector in the sequence by applying the linear operator.
Definition at line 336 of file DriverModifiedArnoldi.cpp.
References Nektar::SolverUtils::DriverArnoldi::CopyArnoldiArrayToField(), Nektar::SolverUtils::DriverArnoldi::CopyFieldToArnoldiArray(), Nektar::SolverUtils::DriverArnoldi::CopyFwdToAdj(), Nektar::SolverUtils::eTransientGrowth, Nektar::SolverUtils::Driver::m_equ, and Nektar::SolverUtils::Driver::m_EvolutionOperator.
Referenced by v_Execute().
|
overrideprotectedvirtual |
Virtual function for solve implementation.
Reimplemented from Nektar::SolverUtils::DriverArnoldi.
Reimplemented in Nektar::SolverUtils::DriverSteadyState.
Definition at line 91 of file DriverModifiedArnoldi.cpp.
References Nektar::SolverUtils::DriverArnoldi::CopyFieldToArnoldiArray(), Blas::Ddot(), EV_post(), EV_small(), EV_test(), EV_update(), Vmath::FillWhiteNoise(), Nektar::SolverUtils::Driver::m_comm, Nektar::SolverUtils::Driver::m_equ, Nektar::SolverUtils::DriverArnoldi::m_imag_evl, Nektar::SolverUtils::DriverArnoldi::m_imagShift, Nektar::SolverUtils::DriverArnoldi::m_kdim, Nektar::SolverUtils::DriverArnoldi::m_maskCoeffs, Nektar::SolverUtils::DriverArnoldi::m_nfields, Nektar::SolverUtils::DriverArnoldi::m_nits, Nektar::SolverUtils::DriverArnoldi::m_nvec, Nektar::SolverUtils::DriverArnoldi::m_real_evl, Nektar::SolverUtils::Driver::m_session, Nektar::SolverUtils::DriverArnoldi::m_useMask, Nektar::LibUtilities::ReduceSum, Vmath::Smul(), tinysimd::sqrt(), Vmath::Vcopy(), Vmath::Vmul(), and WARNINGL0.
Referenced by Nektar::SolverUtils::DriverSteadyState::v_Execute().
|
overrideprotectedvirtual |
Virtual function for initialisation implementation.
Reimplemented from Nektar::SolverUtils::DriverArnoldi.
Reimplemented in Nektar::SolverUtils::DriverSteadyState.
Definition at line 65 of file DriverModifiedArnoldi.cpp.
References Nektar::SolverUtils::DriverArnoldi::ArnoldiSummary(), Nektar::SolverUtils::Driver::m_comm, Nektar::SolverUtils::Driver::m_equ, Nektar::SolverUtils::Driver::m_nequ, and Nektar::SolverUtils::DriverArnoldi::v_InitObject().
Referenced by Nektar::SolverUtils::DriverSteadyState::v_InitObject().
|
friend |
Definition at line 1 of file DriverModifiedArnoldi.h.
|
static |
Name of the class.
Definition at line 62 of file DriverModifiedArnoldi.h.
|
staticprotected |
Definition at line 78 of file DriverModifiedArnoldi.h.