SyTen
syten::Krylov::TensorNetworks< Matrix, Vector, OrthoPolicy, HEffPolicy, SolverPolicy, ApplicationPolicy > Class Template Reference

Krylov implementation optimised for tensor network applications where calculating \( x^T \cdot A \cdot y \) does not require a matrix-vector application. More...

#include <tn_krylov.h>

+ Inheritance diagram for syten::Krylov::TensorNetworks< Matrix, Vector, OrthoPolicy, HEffPolicy, SolverPolicy, ApplicationPolicy >:
+ Collaboration diagram for syten::Krylov::TensorNetworks< Matrix, Vector, OrthoPolicy, HEffPolicy, SolverPolicy, ApplicationPolicy >:

Public Types

using Matrix_type = Matrix
 type of the supplied matrix More...
 
using Vector_type = Vector
 type of the supplied vector More...
 

Public Member Functions

template<typename... Args>
IterativeExit solve (IterativeConfig const &conf, Vector &result, Args...args)
 Solves the problem once the input vector is known. More...
 
template<typename... Args>
auto solve (Vector &v, Args...args)
 Solves the problem using only the currently existing Krylov space. More...
 
template<typename... Args>
IterativeExit solve (Vector v, IterativeConfig const &conf, Vector &result, Args...args)
 Initialises the starting vector and solves the problem. More...
 
template<typename... Args>
std::tuple< IterativeExit, std::vector< Vector >, DenseTensor< 2, SDef > > solve_kss (Vector v, IterativeConfig const &conf, Vector &result, Args...args)
 
 TensorNetworks ()=default
 Default ctor. More...
 
 TensorNetworks (Matrix m)
 Standard ctor: Pass in the matrix to be solved. More...
 
template<typename... Params>
void wrapup (Params &&... params)
 Hook to evaluate data at completion of the current Krylov space calculation. More...
 

Private Member Functions

bool solveAtThisStep (IterativeConfig const &conf)
 Returns true if one should attempt a solution at this step, depending on the configuration. More...
 

Private Attributes

Matrix H
 The input matrix to be solved. More...
 
SRDef initialNorm {1.}
 Norm of the input vector stored here. More...
 
std::vector< Vector > krylov
 Set of Krylov vectors constituting the Krylov subspace. More...
 

Detailed Description

template<typename Matrix, typename Vector, typename OrthoPolicy, typename HEffPolicy, typename SolverPolicy, typename ApplicationPolicy = TensorNetworksImpl::ApplyThenOrtho>
class syten::Krylov::TensorNetworks< Matrix, Vector, OrthoPolicy, HEffPolicy, SolverPolicy, ApplicationPolicy >

Krylov implementation optimised for tensor network applications where calculating \( x^T \cdot A \cdot y \) does not require a matrix-vector application.

Template Parameters
Matrixtype of the input matrix
Vectortype of the input vector
OrthoPolicypolicy class used to orthogonalise the Krylov space
HEffPolicypolicy class which returns the projected effective matrix
SolverPolicypolicy class which tests for convergence and returns the solution once the projected effective matrix is known.

The documentation for this class was generated from the following file: