-
Notifications
You must be signed in to change notification settings - Fork 42
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
Dx not working with 1D mixed function space #100
Comments
Hi The MixedFunctionSpace has not really been kept up to date and should probably be used with care. I noticed that it did not even have a get_dealiased function and I have now added that to the master branch in order for this to work. I need to fix it even more, but with dealiasing in place (you need the master branch) I think you can implement your equations with something like:
|
Thanks for the quick reply @mikaem! Would you kindly be able to explain the steps
in the implementation, is this some form of backwards euler? |
Yes, this is supposed to be Backwards Euler. But please note I've not tested it. I actually just realised that the last line should be
and not
because the |
So sorry, got confused. Please disregard the last comment. It was correct in the first place. Please note that you can also put parts of the (now) nonlinear term in the linear |
I am trying to solve the 1D Brusselator Reaction-diffusion equation:
![image](https://private-user-images.githubusercontent.com/60778417/284027504-b67e44f6-6115-4994-b22e-2efd15983d32.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzMDg3NTcsIm5iZiI6MTcyNDMwODQ1NywicGF0aCI6Ii82MDc3ODQxNy8yODQwMjc1MDQtYjY3ZTQ0ZjYtNjExNS00OTk0LWIyMmUtMmVmZDE1OTgzZDMyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIyVDA2MzQxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZiOTYzYTA2NzgwNmU3MTI2OTU4Y2E2NjIyMTJhNDU4NjkxZjY3ZjhlY2QyNGRiNWFhZjRiMWVkZGI3ZmM5OGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._2_sDy_M6IZIX478BqCy5taJeWZ9x33lg-koL7ZF86c)
However I am having issues trying to take the derivative of my trial function. Here is my code:
However I get the following error:
This seems to be a bug(?) in the way
Dx
works as my trial function has two components however the coordinates of my function space are only 1d so psi only has one component so there is an index error in the loop here:shenfun/shenfun/forms/operators.py
Lines 225 to 227 in 7bad4fe
The text was updated successfully, but these errors were encountered: