hrittich / lfa-lab

Flexible local Fourier analysis library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Restriction and Interpolation for Systems of Equations

jonas-schmitt opened this issue · comments

Hi,

as there is already support for systems of equations with the the SystemNode class, it should be also possible to define restriction and interpolation operators that can be applied to a system. It is although not obvious to me how to do this.

As a concrete example consider the following biharmonic system:

from lfa_lab import *

fine = Grid(2, [1.0, 1.0])
coarse = fine.coarse((2, 2))

# Create a poisson operator.
L = gallery.poisson_2d(fine)
Z = L.matching_zero()
A = system([[L, Z], [operator.from_stencil([((0, 0), -1)], fine), L]])
R = gallery.fw_restriction(fine, coarse)
P = gallery.ml_interpolation(fine, coarse)
A_c = R * A * P # does obviously not work
A_c = system([[R, R * Z], [R * Z, R]]) * A * system([[P, Z * P], [Z * P, P]]) # does not work either
A_c.symbol()

How can one for example define the Galerkin coarse grid operator for this system?

There were a few bugs in the SystemSymbol class and in the Python two_grid module and a few missing functions. The commit 36b9661 should fix this issues.

I have added the file biharmonic_twogrid.py in the demo directory, which should make clear, how to make a two grid system analysis.

Please check if these changes fix your problems. Be aware that I did not check thoroughly the implementation for systems. Treat the results with some skepticism.

In case you have any problems, feel free to reopen the issue.

Thank you! :)