Comments (6)
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.
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.
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.
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.
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.
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)
- Dx not working with 1D mixed function space HOT 4
- Issue on Stokes equations with doubly periodic boundary conditions. HOT 2
- Error when evaluating derivatives for nonstandard domain HOT 7
- Installation problem: error in "cimport fastgl_wrap" HOT 2
- Old shenfun script for 2D Poisson equation dosn't work with new version HOT 2
- 1d poisson HOT 1
- Bug in FunctionSpace with bc as dictionary HOT 4
- Solve DGL with non-constant (discrete) variable? HOT 5
- AttributeError: 'tuple' object has no attribute 'copy' HOT 1
- Install problem HOT 1
- problems in solving 2D Allen Cahn equation HOT 2
- Two questions in the demo MixedPoisson.py HOT 7
- How to compute the numerical solution on the general points HOT 4
- 1. Solver for multidimensional problem 2. Product with variable coefficients HOT 4
- Two questions about the Legendre-Galerkin method for the Cahn-Hilliard equation HOT 2
- How to compute the integral about the nonlinear term in the Navier-Stokes equation? HOT 2
- How to assemble the right-hand side vector? HOT 3
- Understanding the chebyshev solver in poisson2ND.py HOT 3
- Time dependent boundary conditions in segments for Rayleigh-Benard 2D HOT 2
- Implementing the one-dimensional Kuramoto-Sivashinsky system HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shenfun.