Skip to content

Long PDE input / using user_func #355

Answered by david-zwicker
gnorman7 asked this question in Q&A
Discussion options

You must be logged in to vote

This is an interesting use-case and I must admit that we have never tested in detail how the performance of the PDE class scales with the length of the input string. I would not be surprised if it does not perform well for your situation. Basically, the string is parsed by sympy, converted into a python function using lambdify, and compiled by numba for speed. However, every occurrence of laplace(u) and d_dx(u) will trigger a separate evaluation of the differential operators, since variable reuse has not been implemented yet (since it's a bit of a tricky thing to do right). Consequently, I suspect that using the automatic infrastructure provided by the PDE class is less than ideal.

A suit…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@gnorman7
Comment options

@david-zwicker
Comment options

@gnorman7
Comment options

Answer selected by gnorman7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants