oseledets / tt-fort

Fortran computing core of the TT-Toolbox
MIT License
10 stars 10 forks source link

Rewriting amr(s) #1

Open oseledets opened 11 years ago

oseledets commented 11 years ago

@dolgov Thanks for starting rewriting amrs and introducing nodes. Have you thought about the design of the node structure In fact, I have taken some time to think about it and write smth with nodes for the KSL scheme.

Basic thought. We have nodes, and the nodes have edges. Edges are associated with phi-matrices, i.e. each node stores its left phi-matrix and its right phi-matrix for the TT-format, and this structure can be used also for more complicated formats (HT, QTT-Tucker and maybe tensor networks).

Second, what do you actually store in the node. The typical storage includes:

  1. A-core
  2. X-core
  3. f-core
  4. Two phi-matrices (and zero pointers for the boundary edges)

In the presense of preconditioner it can be increased.

Operations that are required for the ALS.

  1. Update current core using only the node information
  2. Flow though the edge (QR)
  3. Update edges (recompute phi-matrices)

The best way to add functionality in my opinion is to use inheritance (i.e. add functionality to the top-level edge-flow function). However, I am not sure how to do this in Fortran right away. Second option is to use conditions: if there is the right-hand side, compute corresponding quantities, if not - do not compute. Maybe it is the shortest in terms of programming code.

What do you think?