Skip to content

fix(pdesystem): parameters are vector of Num instead of vector of pairs when analytic is also passed #2431

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

Merged
merged 2 commits into from
Feb 10, 2024

Conversation

sathvikbhagavan
Copy link
Member

Parameters are vector of Nums. If we pass a vector of Nums when we pass analytic as well, it fails.

MWE:

using ModelingTookit, DomainSets

@variables x t u(..)
@parameters D

Dxx = Differential(x)
Dt = Differential(t)
eqs = [Dt(u(t, x)) ~ D * Dxx(u(t, x))]
bcs = [u(0, x) ~ sin(2pi * x), u(t, 0) ~ 0.0, u(t, 1) ~ 0.0]

domains = [t  Interval(0.0, 1.0), x  Interval(0.0, 1.0)]

analytic = [u(t, x) ~ exp(-4pi^2 * D * t) * sin(2pi * x)]
@named heat_1d1 = PDESystem(eqs, bcs, domains, [t, x], [u(t, x)], [D], analytic = analytic) # fails
@named heat_1d1 = PDESystem(eqs, bcs, domains, [t, x], [u(t, x)], [D => 1.0], analytic = analytic) # passes
@named heat_1d1 = PDESystem(eqs, bcs, domains, [t, x], [u(t, x)], [D]) # passes

@sathvikbhagavan
Copy link
Member Author

@ChrisRackauckas, can this be merged?

@ChrisRackauckas ChrisRackauckas merged commit ff6c8ab into SciML:master Feb 10, 2024
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

Successfully merging this pull request may close these issues.

2 participants