Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow block-diagonal linear operators with diagonalize=True #4

Open
hippalectryon-0 opened this issue May 10, 2023 · 1 comment
Open

Comments

@hippalectryon-0
Copy link

Use case: we have a lot of degrees of freedom (e.g. N=30000, for example a 3D grid 20x20x20 with 4 fields), but the linear step is diagonal by block with small blocks.

Example equation: homogeneous Rayleigh-Bénard system with variables $u_x,u_y,u_z,\theta$:
$\partial_t u_i + u_j\partial_ju_i + \nabla P = Pr\Delta u_i + RaPr \theta\delta_{i=z}$
$\partial\theta+u_j\partial_j\theta=\Delta \theta+u_z$.

In this system, the linear term for $\theta$ is extremely simple $\mathcal{L}(k_x,k_y,k_z)\theta=-k^2\theta+u_z$. It is block-diagonal with blocks of size 4 (the number of equations).

However, if we use (for instance) EDT35, we have to compute the NxN full matrix of the operator, which is way too big (1e10 elements !!).

Moreover, looking at the code of _ETD35_Diagonalized, it seems to me that all the quantities involved are stable by block diagonalization, so I expect that we could handle gracefully those cases (maybe using scipy.sparse ?).

@whalenpt
Copy link
Owner

whalenpt commented May 10, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants