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

how to get the spatial discretization? + solution at spatial boundary not included right? #12

Closed
SimonEnsemble opened this issue Nov 18, 2021 · 5 comments

Comments

@SimonEnsemble
Copy link

regarding the heat eqn examples:

  • can we get the spatial discretization from MOLFiniteDifference somehow instead of xs = 0:Δx:ℓ each time? to warrant this I do:
	Nₓ = length(prob.u0) + 2
	@assert (length(0:Δx:ℓ) == Nₓ)
  • [think this should be in the docs or explained on this page] am I right that the solution to the PDE on the points on the spatial boundary are not included in the solution (regardless of the boundary condition)? right now I manually infer these so I can do an integration over the spatial domain.

THANK YOU for this package.

@ChrisRackauckas
Copy link
Member

sol[u] should do it. I think it might be broken until a few packages update though? @YingboMa

@valentinsulzer
Copy link

can we get the spatial discretization from MOLFiniteDifference somehow instead of xs = 0:Δx:ℓ each time?

Would be great to have sol.x in the same way as ODE solutions have sol.t. This means the prob that gets returned from discretize needs to save what mesh was used, then pass it to the solution. What's the best way of going about this? Could we make a new struct DiscretizedPDESystem which subtypes ODESystem and saves the mesh?

@ChrisRackauckas
Copy link
Member

@YingboMa would it be a bad idea to add array symbolic expressions x ~ 0:Δx:ℓ as observed variables so that sol[x] works?

@ChrisRackauckas ChrisRackauckas transferred this issue from SciML/DiffEqOperators.jl Dec 21, 2021
@xtalax
Copy link
Member

xtalax commented Mar 14, 2022

@YingboMa would it be a bad idea to add array symbolic expressions x ~ 0:Δx:ℓ as observed variables so that sol[x] works?

@YingboMa is this a bad idea?

@YingboMa
Copy link
Member

MTK doesn't really support array variables right now, and I think we should be careful on designing it.

@xtalax xtalax closed this as completed Dec 1, 2022
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

5 participants