-
Notifications
You must be signed in to change notification settings - Fork 322
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
Including derivatives of non-linear terms in PDELibrary #170
Comments
Hey there, @znicolaou can show you how this can be done if you want to keep it as you wrote. Note however that (u^3){1111} is just 3u^2 u{1111}, which can already be generated with the PDE or WeakPDE libraries in the code. Simply use "derivative_order = 4" and include candidate library terms up to quadratic polynomials. By default, the library will take all combinations of the derivative terms and the polynomial terms, generating a term like u^2 u_{1111} |
Hey thanks for the quick response, you are absolutely right. Here, I am not sure if this actually holds for u(x,y) and if I want to include the squared laplace operator on the u³ : |
Sure thing! I will share a little example some time in the next week I think, but the gist is its a little complicated and experimental still. You will need to calculate the derivatives of your input data "by hand" with pysindy's FiniteDifference class, then apply whatever nonlinear transformation you want to it and reshape it correctly. You can then create a CustomLibrary with that feature and add it to a GeneralizedLibrary along with a PDELibrary. One kind of nonlinearities that has to be handled this way is something like (u_x)^n*(u_xx)^m, except in special cases (for example, in the Kuramoto-Sivashinki equation, a clever change of variables converts (u_x)^2 to a term u*u_x). Anyway, would be good to add an example to a notebook. I also need to finish cleaning up the new WeakPDELibrary to merge with master, and include it in that push (incidentally, note that including general nonlinear derivative terms in the weak form is an open problem still...) |
bump version to 1.4.1
Hi all,
I would like to include a non-linear term in the PDELibrary that means I want to use e.g. u³ in the form of (u³)_1111. There was already a feature request from November last year by @znicolaou for this and an other feature ([https:/github.com//issues/134]) . It seemed like you have fixed that so it can be included, but I am bit stuck and do not know how exactly it can be done. Would you mind giving a brief example on that?
Thank you in advance for your help,
Best wishes,
Bartosz
The text was updated successfully, but these errors were encountered: