Git Product home page Git Product logo

Comments (6)

mikaem avatar mikaem commented on July 23, 2024

Hej Sean-Christophe
Thanks a lot for your feedback:-) Have you seen this 2D demo with 2 inhomogeneous directions? The problem with 2 inhomogeneous directions is to create good linear algebra solvers. I have created one for two Dirichlet Legendre bases, but that's about it. Everything else should work out of the box, like transforms and projections, but the solvers are quite a bit more complicated than in 1D. See Shen's papers and the sections about 2D. The solver implemented for the demo corresponds to sec 2.2 in the first Shen reference. So there's no technical issue or problem really, it's just to find the time to actually do it:-)

from shenfun.

mikaem avatar mikaem commented on July 23, 2024

Hi,

Just wanted to make a note that with PR #21 there is now a generic solver for 2 inhomogeneous directions (see link). The solver makes use of sparse linear algebra from scipy, but is not highly optimized for speed. The solver is direct but the factorizations are (for now) not stored as would be efficient for multiple solves. Can be easily added later.

Some demos are::

from shenfun.

loiseaujc avatar loiseaujc commented on July 23, 2024

Happy New Year!

Awesome! Thanks a lot for the update! Haven't had time to keep working on my Rayleigh-Benard code, but I'll keep you updated once I have a working version.

from shenfun.

mikaem avatar mikaem commented on July 23, 2024

Great:-) I have also (slowly) been adding some more documentation, which may be of help in understanding how things actually work:-)
I also have a new Rayleigh-Bénard video. It's actually a 3D simulation using an optimized spectralDNS solver (which is using shenfun), and I'm waiting to get more CPU-hours such that I can run it with higher resolution. This one is 128x256x256.

from shenfun.

stefmech avatar stefmech commented on July 23, 2024

Hey Mikael,

thank you for providing such a cool package! For me it would be quite interesting to have a solver for 3 non-periodic directions (Legendre, Chebyshev). Are there any plans to extend this functionality?

from shenfun.

mikaem avatar mikaem commented on July 23, 2024

Hi @stefmech

Three non-periodic directions are actually already possible. There may be limited possibilities in terms of linear algebra, but I just verified that this works:

from shenfun import *
import matplotlib.pyplot as plt
D = FunctionSpace(16, 'L', bc=(0, 0))
T = TensorProductSpace(comm, (D, D, D))
u = TrialFunction(T)
v = TestFunction(T)
B = inner(u, v)
Bd = B.diags()
plt.spy(Bd, markersize=0.5)

from shenfun.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.