Nektar++
|
#include <DriverModifiedArnoldi.h>
Static Public Member Functions | |
static DriverSharedPtr | create (const LibUtilities::SessionReaderSharedPtr &pSession) |
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) | |
Constructor. More... | |
virtual | ~DriverModifiedArnoldi () |
Destructor. More... | |
virtual void | v_InitObject (std::ostream &out=std::cout) |
Virtual function for initialisation implementation. More... | |
virtual void | v_Execute (std::ostream &out=std::cout) |
Virtual function for solve implementation. More... | |
Protected Member Functions inherited from Nektar::SolverUtils::DriverArnoldi | |
DriverArnoldi (const LibUtilities::SessionReaderSharedPtr pSession) | |
Constructor. More... | |
virtual | ~DriverArnoldi () |
Destructor. 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) |
virtual Array< OneD, NekDouble > | v_GetRealEvl (void) |
virtual Array< OneD, NekDouble > | v_GetImagEvl (void) |
Protected Member Functions inherited from Nektar::SolverUtils::Driver | |
Driver (const LibUtilities::SessionReaderSharedPtr pSession) | |
Initialises EquationSystem class members. More... | |
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, 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, const 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) |
Static Private Attributes | |
static std::string | driverLookupId |
Friends | |
class | MemoryManager< DriverModifiedArnoldi > |
Definition at line 47 of file DriverModifiedArnoldi.h.
|
protected |
Constructor.
Definition at line 58 of file DriverModifiedArnoldi.cpp.
|
protectedvirtual |
|
inlinestatic |
Creates an instance of this class.
Definition at line 53 of file DriverModifiedArnoldi.h.
References Nektar::MemoryManager< DataType >::AllocateSharedPtr().
|
private |
Compute estimates of the eigenvalues/eigenvectors of the original system.
Definition at line 545 of file DriverModifiedArnoldi.cpp.
References Vmath::Ddot(), Nektar::SolverUtils::Driver::m_comm, Nektar::LibUtilities::ReduceSum, Vmath::Smul(), 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 495 of file DriverModifiedArnoldi.cpp.
References ASSERTL0, EV_big(), Nektar::SolverUtils::Driver::m_equ, Nektar::SolverUtils::Driver::m_session, 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 331 of file DriverModifiedArnoldi.cpp.
References ASSERTL0, Vmath::Ddot(), Vmath::Dot(), Nektar::SolverUtils::Driver::m_comm, Nektar::LibUtilities::ReduceSum, Vmath::Smul(), 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 458 of file DriverModifiedArnoldi.cpp.
References 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 394 of file DriverModifiedArnoldi.cpp.
References Vmath::Dot(), EV_sort(), Nektar::SolverUtils::Driver::m_comm, Nektar::SolverUtils::DriverArnoldi::m_evtol, Nektar::SolverUtils::DriverArnoldi::m_timeSteppingAlgorithm, 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 300 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().
|
protectedvirtual |
Virtual function for solve implementation.
Implements Nektar::SolverUtils::Driver.
Reimplemented in Nektar::SolverUtils::DriverSteadyState.
Definition at line 101 of file DriverModifiedArnoldi.cpp.
References Nektar::SolverUtils::DriverArnoldi::CopyFieldToArnoldiArray(), Vmath::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_nfields, Nektar::SolverUtils::DriverArnoldi::m_nits, Nektar::SolverUtils::DriverArnoldi::m_nvec, Nektar::SolverUtils::DriverArnoldi::m_real_evl, Nektar::SolverUtils::Driver::m_session, Nektar::LibUtilities::ReduceSum, Vmath::Smul(), Vmath::Vcopy(), and WARNINGL0.
Referenced by Nektar::SolverUtils::DriverSteadyState::v_Execute().
|
protectedvirtual |
Virtual function for initialisation implementation.
Reimplemented from Nektar::SolverUtils::DriverArnoldi.
Reimplemented in Nektar::SolverUtils::DriverSteadyState.
Definition at line 76 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 50 of file DriverModifiedArnoldi.h.
|
static |
Name of the class.
Definition at line 63 of file DriverModifiedArnoldi.h.
|
staticprivate |
Definition at line 132 of file DriverModifiedArnoldi.h.