hrittich / lfa-lab Goto Github PK
View Code? Open in Web Editor NEWFlexible local Fourier analysis library.
License: GNU General Public License v2.0
Flexible local Fourier analysis library.
License: GNU General Public License v2.0
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?
This particular test seems to be broken:
======================================================================
ERROR: test_fw_restriction_2 (gallery_test.GalleryTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lfa-lab/test/gallery_test.py", line 62, in test_fw_restriction_2
s = fw_restriction_stencil(grid)
TypeError: fw_restriction_stencil() takes exactly 2 arguments (1 given)
======================================================================
ERROR: test_fw_restriction_3 (gallery_test.GalleryTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lfa-lab/test/gallery_test.py", line 74, in test_fw_restriction_3
s = fw_restriction_stencil(grid)
TypeError: fw_restriction_stencil() takes exactly 2 arguments (1 given)
======================================================================
ERROR: test_ml_interpolation_2 (gallery_test.GalleryTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lfa-lab/test/gallery_test.py", line 29, in test_ml_interpolation_2
s = ml_interpolation_stencil(grid)
TypeError: ml_interpolation_stencil() takes exactly 2 arguments (1 given)
======================================================================
ERROR: test_ml_interpolation_3 (gallery_test.GalleryTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "lfa-lab/test/gallery_test.py", line 40, in test_ml_interpolation_3
s = ml_interpolation_stencil(grid)
TypeError: ml_interpolation_stencil() takes exactly 2 arguments (1 given)
----------------------------------------------------------------------
(This is a support question not a bug or other real issue.)
Suppose I define an operator but not a smoother (splitting):
from lfa_lab import *
fine = Grid(2, [1.0/32, 1.0/32])
L = gallery.poisson_2d(fine)
I want the h-ellipticity as defined by Trottenberg et al seciton 4.7, i.e. E_h(L) = min(|lshigh|) / max(|ls|) where ls is the symbol of L and lshigh is the symbol over the high-frequency modes.
I can imagine various awkward methods for computing E_h(L) but I wonder what you would suggest?
PS Just found your nice library!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.