@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:
A-core
X-core
f-core
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.
Update current core using only the node information
Flow though the edge (QR)
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.
@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:
In the presense of preconditioner it can be increased.
Operations that are required for the ALS.
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?