Difference between revisions of "Ttclass/amensolve.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Normalise sequential blank lines)
(Update function See also links and function index membership)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
−
{{DISPLAYTITLE:ttclass/amensolve.m}}
+
{{DISPLAYTITLE:ttclass/amensolve.m}} __NOTOC__
 
Solves the linear system Ax=y using the AMEn iteration.
 
Solves the linear system Ax=y using the AMEn iteration.
  
 
==Syntax==
 
==Syntax==
  
−
     x = amensolve(A,y,tol,opts,x0)
+
     x=amensolve(A,y,tol,opts,x0)
  
−
==Description==
+
==Parameters==
−
A very experimental tensor train format solver - see papers by Savostyanov and Dolgov.
 
−
 
 
−
==Arguments==
 
  
−
  A   - ttclass representing a square matrix
+
    A                   - ttclass representing a square matrix
 
   
 
   
−
  y   - ttclass representing the right hand side
+
    y                   - ttclass representing the right hand side
 
   
 
   
−
  tol - relative approximation and stopping tolerance,
+
    tol                 - relative approximation and stopping tolerance,
−
          1e-6 is a good start
+
                            1e-6 is a good start
 
   
 
   
−
  x0   - ttclass representing the initial guess
+
    x0                   - ttclass representing the initial guess
 
   
 
   
−
Options (pass empty array for defaults):
+
    Options (pass empty array for defaults):
 
   
 
   
−
  opts.nswp - maximum number of AMEn sweeps
+
    opts.nswp           - maximum number of AMEn sweeps
 
   
 
   
−
  opts.init_guess_rank - the rank of the initial guess
+
    opts.init_guess_rank - the rank of the initial guess
 
   
 
   
−
  opts.enrichment_rank - the rank of the residual and  
+
    opts.enrichment_rank - the rank of the residual and
−
                          enrichment
+
                            enrichment
 
   
 
   
−
  opts.resid_damp - local accuracy gap
+
    opts.resid_damp     - local accuracy gap
 
   
 
   
−
  opts.rmax - maximum TT rank limit for the solution
+
    opts.rmax           - maximum TT rank limit for the solution
 
   
 
   
−
  opts.max_full_size - direct vs iterative solver switch-
+
    opts.max_full_size   - direct vs iterative solver switch-
−
                        over dimension
+
                            over dimension
 
   
 
   
−
  opts.local_iters - maximum number of bicgstab iterations
+
    opts.local_iters     - maximum number of bicgstab iterations
−
                      for local problems
+
                            for local problems
 
   
 
   
−
  opts.verb - Verbosity level: silent (0), sweep (1) or full (2)
+
    opts.verb           - Verbosity level: silent (0), sweep (1) or full (2)
  
 
==Outputs==
 
==Outputs==
  
−
  x   - ttclass representing the solution such that  
+
    x - ttclass representing the solution such that
−
          |x-X| < tol |X| in Frobenius norm, where X is
+
        |x-X| < tol |X| in Frobenius norm, where X is
−
          the exact solution.
+
        the exact solution.
  
 
==Notes==
 
==Notes==
 
A, y and x0 should have ntrains==1. Call [[ttclass/shrink.m]] on all three if that is not the case.
 
A, y and x0 should have ntrains==1. Call [[ttclass/shrink.m]] on all three if that is not the case.
 +
 +
A very experimental tensor train format solver - see papers by Savostyanov and Dolgov.
  
 
==See also==
 
==See also==
−
[[ttclass.m]], [[ttclass/amensum.m]]
+
[[ttclass.m]], [[ttclass/amensum.m]], [[ttclass/shrink.m]], [[ttclass/clearcoeff.m]], [[ttclass/conj.m]], [[ttclass/ctranspose.m]], [[ttclass/diag.m]], [[ttclass/dot.m]], [[ttclass/full.m]], [[ttclass/hdot.m]], [[ttclass/ismatrix.m]], [[ttclass/isnumeric.m]], [[ttclass/isreal.m]], [[ttclass/kron.m]], [[ttclass/mean.m]], [[ttclass/minus.m]], [[ttclass/mldivide.m]], [[ttclass/mrdivide.m]], [[ttclass/mtimes.m]], [[ttclass/nnz.m]], [[ttclass/norm.m]], [[ttclass/numel.m]], [[ttclass/pack.m]], [[ttclass/plus.m]], [[ttclass/rand.m]], [[ttclass/ranks.m]], [[ttclass/rdivide.m]], [[ttclass/revert.m]], [[ttclass/size.m]], [[ttclass/sizes.m]], [[ttclass/subsref.m]], [[ttclass/sum.m]], [[ttclass/trace.m]], [[ttclass/transpose.m]], [[ttclass/truncate.m]], [[ttclass/ttort.m]], [[ttclass/unit_like.m]], [[ttclass/vec.m]], [[Tensor_train_module]]
  
 
''Version 2.1, authors: [[Dmitry Savostyanov]], [[Sergey Dolgov]]''
 
''Version 2.1, authors: [[Dmitry Savostyanov]], [[Sergey Dolgov]]''

Latest revision as of 19:42, 6 June 2026

Solves the linear system Ax=y using the AMEn iteration.

Syntax

    x=amensolve(A,y,tol,opts,x0)

Parameters

    A                    - ttclass representing a square matrix

    y                    - ttclass representing the right hand side

    tol                  - relative approximation and stopping tolerance,
                           1e-6 is a good start

    x0                   - ttclass representing the initial guess

    Options (pass empty array for defaults):

    opts.nswp            - maximum number of AMEn sweeps

    opts.init_guess_rank - the rank of the initial guess

    opts.enrichment_rank - the rank of the residual and
                           enrichment

    opts.resid_damp      - local accuracy gap

    opts.rmax            - maximum TT rank limit for the solution

    opts.max_full_size   - direct vs iterative solver switch-
                           over dimension

    opts.local_iters     - maximum number of bicgstab iterations
                           for local problems

    opts.verb            - Verbosity level: silent (0), sweep (1) or full (2)

Outputs

    x - ttclass representing the solution such that
        |x-X| < tol |X| in Frobenius norm, where X is
        the exact solution.

Notes

A, y and x0 should have ntrains==1. Call ttclass/shrink.m on all three if that is not the case.

A very experimental tensor train format solver - see papers by Savostyanov and Dolgov.

See also

ttclass.m, ttclass/amensum.m, ttclass/shrink.m, ttclass/clearcoeff.m, ttclass/conj.m, ttclass/ctranspose.m, ttclass/diag.m, ttclass/dot.m, ttclass/full.m, ttclass/hdot.m, ttclass/ismatrix.m, ttclass/isnumeric.m, ttclass/isreal.m, ttclass/kron.m, ttclass/mean.m, ttclass/minus.m, ttclass/mldivide.m, ttclass/mrdivide.m, ttclass/mtimes.m, ttclass/nnz.m, ttclass/norm.m, ttclass/numel.m, ttclass/pack.m, ttclass/plus.m, ttclass/rand.m, ttclass/ranks.m, ttclass/rdivide.m, ttclass/revert.m, ttclass/size.m, ttclass/sizes.m, ttclass/subsref.m, ttclass/sum.m, ttclass/trace.m, ttclass/transpose.m, ttclass/truncate.m, ttclass/ttort.m, ttclass/unit_like.m, ttclass/vec.m, Tensor_train_module

Version 2.1, authors: Dmitry Savostyanov, Sergey Dolgov