Class xlifepp::BlockKrylovSchurSolMgr#

template<class ScalarType, class MV, class OP>
class BlockKrylovSchurSolMgr : public xlifepp::SolverManager<ScalarType, MV, OP>#

Inheritence diagram for xlifepp::BlockKrylovSchurSolMgr:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "1" [label="xlifepp::BlockKrylovSchurSolMgr< ScalarType, MV, OP >" tooltip="xlifepp::BlockKrylovSchurSolMgr< ScalarType, MV, OP >" fillcolor="#BFBFBF"] "2" [label="xlifepp::SolverManager< ScalarType, MV, OP >" tooltip="xlifepp::SolverManager< ScalarType, MV, OP >"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for xlifepp::BlockKrylovSchurSolMgr:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "11" [label="CheckingPolicy< StoragePolicy< T >::StoredType >" tooltip="CheckingPolicy< StoragePolicy< T >::StoredType >"] "30" [label="CheckingPolicy< StoragePolicy< xlifepp::BasicOutputManager< ScalarType > >::StoredType >" tooltip="CheckingPolicy< StoragePolicy< xlifepp::BasicOutputManager< ScalarType > >::StoredType >"] "6" [label="CheckingPolicy< StoragePolicy< xlifepp::EigenProblem< ScalarType, MV, OP > >::StoredType >" tooltip="CheckingPolicy< StoragePolicy< xlifepp::EigenProblem< ScalarType, MV, OP > >::StoredType >"] "15" [label="CheckingPolicy< StoragePolicy< xlifepp::SortManager< MagnitudeType > >::StoredType >" tooltip="CheckingPolicy< StoragePolicy< xlifepp::SortManager< MagnitudeType > >::StoredType >"] "26" [label="CheckingPolicy< StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >::StoredType >" tooltip="CheckingPolicy< StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >::StoredType >"] "7" [label="ConversionPolicy" tooltip="ConversionPolicy"] "19" [label="xlifepp::NumTraits< ScalarType >" tooltip="xlifepp::NumTraits< ScalarType >"] "10" [label="OwnershipPolicy< StoragePolicy< T >::InitPointerType >" tooltip="OwnershipPolicy< StoragePolicy< T >::InitPointerType >"] "29" [label="OwnershipPolicy< StoragePolicy< xlifepp::BasicOutputManager< ScalarType > >::InitPointerType >" tooltip="OwnershipPolicy< StoragePolicy< xlifepp::BasicOutputManager< ScalarType > >::InitPointerType >"] "5" [label="OwnershipPolicy< StoragePolicy< xlifepp::EigenProblem< ScalarType, MV, OP > >::InitPointerType >" tooltip="OwnershipPolicy< StoragePolicy< xlifepp::EigenProblem< ScalarType, MV, OP > >::InitPointerType >"] "14" [label="OwnershipPolicy< StoragePolicy< xlifepp::SortManager< MagnitudeType > >::InitPointerType >" tooltip="OwnershipPolicy< StoragePolicy< xlifepp::SortManager< MagnitudeType > >::InitPointerType >"] "25" [label="OwnershipPolicy< StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >::InitPointerType >" tooltip="OwnershipPolicy< StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >::InitPointerType >"] "27" [label="xlifepp::SmartPtr< xlifepp::BasicOutputManager< ScalarType > >" tooltip="xlifepp::SmartPtr< xlifepp::BasicOutputManager< ScalarType > >"] "3" [label="xlifepp::SmartPtr< xlifepp::EigenProblem< ScalarType, MV, OP > >" tooltip="xlifepp::SmartPtr< xlifepp::EigenProblem< ScalarType, MV, OP > >"] "12" [label="xlifepp::SmartPtr< xlifepp::SortManager< MagnitudeType > >" tooltip="xlifepp::SmartPtr< xlifepp::SortManager< MagnitudeType > >"] "23" [label="xlifepp::SmartPtr< xlifepp::StatusTest< ScalarType, MV, OP > >" tooltip="xlifepp::SmartPtr< xlifepp::StatusTest< ScalarType, MV, OP > >"] "9" [label="StoragePolicy< T >" tooltip="StoragePolicy< T >"] "28" [label="StoragePolicy< xlifepp::BasicOutputManager< ScalarType > >" tooltip="StoragePolicy< xlifepp::BasicOutputManager< ScalarType > >"] "4" [label="StoragePolicy< xlifepp::EigenProblem< ScalarType, MV, OP > >" tooltip="StoragePolicy< xlifepp::EigenProblem< ScalarType, MV, OP > >"] "13" [label="StoragePolicy< xlifepp::SortManager< MagnitudeType > >" tooltip="StoragePolicy< xlifepp::SortManager< MagnitudeType > >"] "24" [label="StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >" tooltip="StoragePolicy< xlifepp::StatusTest< ScalarType, MV, OP > >"] "17" [label="std::basic_string< char >" tooltip="std::basic_string< char >"] "18" [label="std::basic_string< Char >" tooltip="std::basic_string< Char >"] "16" [label="std::string" tooltip="std::string"] "22" [label="std::vector< T >" tooltip="std::vector< T >"] "21" [label="std::vector< xlifepp::ValueEigenSolver< ScalarType > >" tooltip="std::vector< xlifepp::ValueEigenSolver< ScalarType > >"] "1" [label="xlifepp::BlockKrylovSchurSolMgr< ScalarType, MV, OP >" tooltip="xlifepp::BlockKrylovSchurSolMgr< ScalarType, MV, OP >" fillcolor="#BFBFBF"] "20" [label="xlifepp::NumTraits< K >" tooltip="xlifepp::NumTraits< K >"] "8" [label="xlifepp::SmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy, ConstnessPolicy >" tooltip="xlifepp::SmartPtr< T, OwnershipPolicy, ConversionPolicy, CheckingPolicy, StoragePolicy, ConstnessPolicy >"] "2" [label="xlifepp::SolverManager< ScalarType, MV, OP >" tooltip="xlifepp::SolverManager< ScalarType, MV, OP >"] "19" -> "20" [dir=forward tooltip="template-instance"] "27" -> "28" [dir=forward tooltip="public-inheritance"] "27" -> "29" [dir=forward tooltip="public-inheritance"] "27" -> "30" [dir=forward tooltip="public-inheritance"] "27" -> "7" [dir=forward tooltip="public-inheritance"] "27" -> "8" [dir=forward tooltip="template-instance"] "3" -> "4" [dir=forward tooltip="public-inheritance"] "3" -> "5" [dir=forward tooltip="public-inheritance"] "3" -> "6" [dir=forward tooltip="public-inheritance"] "3" -> "7" [dir=forward tooltip="public-inheritance"] "3" -> "8" [dir=forward tooltip="template-instance"] "12" -> "13" [dir=forward tooltip="public-inheritance"] "12" -> "14" [dir=forward tooltip="public-inheritance"] "12" -> "15" [dir=forward tooltip="public-inheritance"] "12" -> "7" [dir=forward tooltip="public-inheritance"] "12" -> "8" [dir=forward tooltip="template-instance"] "23" -> "24" [dir=forward tooltip="public-inheritance"] "23" -> "25" [dir=forward tooltip="public-inheritance"] "23" -> "26" [dir=forward tooltip="public-inheritance"] "23" -> "7" [dir=forward tooltip="public-inheritance"] "23" -> "8" [dir=forward tooltip="template-instance"] "17" -> "18" [dir=forward tooltip="template-instance"] "16" -> "17" [dir=forward tooltip="public-inheritance"] "21" -> "22" [dir=forward tooltip="template-instance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "3" [dir=forward tooltip="usage"] "1" -> "12" [dir=forward tooltip="usage"] "1" -> "16" [dir=forward tooltip="usage"] "1" -> "19" [dir=forward tooltip="usage"] "1" -> "21" [dir=forward tooltip="usage"] "1" -> "23" [dir=forward tooltip="usage"] "1" -> "27" [dir=forward tooltip="usage"] "8" -> "9" [dir=forward tooltip="public-inheritance"] "8" -> "10" [dir=forward tooltip="public-inheritance"] "8" -> "11" [dir=forward tooltip="public-inheritance"] "8" -> "7" [dir=forward tooltip="public-inheritance"] }

The BlockKrylovSchurSolMgr provides a flexible solver manager over the BlockKrylovSchur eigensolver.

The solver manager provides to the solver a StatusTestCombo object constructed as follows:combo = globaltest _OR debugtest where

  • globaltest

    terminates computation when global convergence has been detected.

    It is encapsulated in a

    StatusTestWithOrdering

    object, to ensure that computation is terminated only after the most significant eigenvalues/eigenvectors have met the convergence criteria.

    If not specified via

    setGlobalStatusTest(), this test is a StatusTestResNorm object which tests the 2-norms of the Ritz residuals relative to the Ritz values.
  • debugtest allows a user to specify additional monitoring of the iteration, encapsulated in a StatusTest

    object

    If not specified via

    setDebugStatusTest(), debugtest

    is ignored.

    In most cases, it should return

    _failed; if it returns _passed, solve() will throw an XlifeppError exception.

Additionally, the solver manager will terminate solve() after a specified number of restarts.

Much of this behavior is controlled via parameters and options passed to the solver manager. For more information, see BlockKrylovSchurSolMgr().

Solver application methods

virtual ComputationInfo solve()#

This method performs possibly repeated calls to the underlying eigensolver’s iterate() routine until the problem has been solved (as decided by the solver manager) or the solver manager decides to quit.

This method calls BlockKrylovSchur::iterate(), which will return either because a specially constructed status test evaluates to _passed or an exception is thrown.

A return from BlockKrylovSchur::iterate() signifies one of the following scenarios:

  • the maximum number of restarts has been exceeded. In this scenario, the solver manager will place

    all converged eigenpairs into the eigenproblem and return

    _noConvergence.
  • global convergence has been met. In this case, the most significant NEV eigenpairs in the solver and locked storage

    have met the convergence criterion. (Here, NEV refers to the number of eigenpairs requested by the

    EigenProblem

    .)

    In this scenario, the solver manager will return

    _success.
Returns:

ComputationInfo specifying:

  • _success: the eigenproblem was solved to the specification required by the solver manager.

  • _noConvergence: the eigenproblem was not solved to the specification desired by the solver manager.

void setGlobalStatusTest(const SmartPtr<StatusTest<ScalarType, MV, OP>> &global)#

Set the status test defining global convergence.

const SmartPtr<StatusTest<ScalarType, MV, OP>> &getGlobalStatusTest() const#

Get the status test defining global convergence.

void setDebugStatusTest(const SmartPtr<StatusTest<ScalarType, MV, OP>> &debug)#

Set the status test for debugging.

const SmartPtr<StatusTest<ScalarType, MV, OP>> &getDebugStatusTest() const#

Get the status test for debugging.

Constructors/Destructor

BlockKrylovSchurSolMgr(const SmartPtr<EigenProblem<ScalarType, MV, OP>> &problem, Parameters &pl)#

Basic constructor for BlockKrylovSchurSolMgr.

This constructor accepts the EigenProblem to be solved in addition to a parameter list of options for the solver manager. These options include the following:

  • Solver parameters

    • "Which" - a string specifying the desired eigenvalues: SM, LM, SR or LR. Default: “LM”

    • "Block Size" - a int specifying the block size to be used by the underlying block Krylov-Schur solver. Default: 1

    • "Num Blocks" - a int specifying the number of blocks allocated for the Krylov basis. Default: 3*nev

    • "Extra NEV Blocks" - a int specifying the number of extra blocks the solver should keep in addition to those required to compute the number of eigenvalues requested. Default: 0

    • "Maximum Restarts" - a int specifying the maximum number of restarts the underlying solver is allowed to perform. Default: 20

    • "Orthogonalization" - a string specifying the desired orthogonalization: DGKS and SVQB. Default: “SVQB”

    • "Verbosity" - a sum of MsgType specifying the verbosity. Default: xlifepp::_errorsEigen

  • Convergence parameters

    • "Convergence Tolerance" - a MagnitudeType specifying the level that residual norms must reach to decide convergence. Default: machine precision.

    • "Relative Convergence Tolerance" - a bool specifying whether residuals norms should be scaled by their eigenvalues for the purposing of deciding convergence. Default: true

inline virtual ~BlockKrylovSchurSolMgr()#

Destructor.

Accessor methods

inline virtual const EigenProblem<ScalarType, MV, OP> &getProblem() const#

Return the eigenvalue problem.

inline virtual int getNumIters() const#

Get the iteration count for the most recent call to solve().

inline std::vector<ValueEigenSolver<ScalarType>> getRitzValues() const#

Return the Ritz values from the most recent solve.