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

Stochastic Galerkin for ODESystem and PDESystem #38

Closed
wants to merge 108 commits into from
Closed

Stochastic Galerkin for ODESystem and PDESystem #38

wants to merge 108 commits into from

Conversation

bowenszhu
Copy link
Member

@bowenszhu bowenszhu commented Oct 26, 2022

@bowenszhu bowenszhu changed the title Stochastic Galerkin for PDESystem Stochastic Galerkin for ODESystem and PDESystem Nov 6, 2022
Comment on lines +260 to +265
# X => x₀ + x₁ψ₁(X)
# where x₀ and x₁ are affince PCE coefficients of X
# ψ₁(x) = x - α₀ is the first-order monic basis polynomial of X
# TODO: Use mean and std of the distribution of X to compute x₀ and x₁
x_dict = Dict(x => op.α[1] + Ψ[i + 1]
for (i, (x, op)) in enumerate(zip(parameters, uni_basis)))
Copy link
Member Author

@bowenszhu bowenszhu Nov 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create a struct for otho poly basis $Ψ_α$ (something similar to SemiMonomial in Symbolics.semipolynomial_form).
Evaluate tensor scalar products conveniently by defining arithmetic operations for this struct.

Use term rewriter to deal with differential operators @rule ~D(~C * ~Ψ) => ~Ψ * ~D(~C) especially for PDESystem.

Copy link
Contributor

@FHoltorf FHoltorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this idea A LOT! That will make the projection code quite a bit less cumbersome to read/write!

That said, I am not sure I like the notation/nomenclature as is. Because "inner product * inner product" is not a mathematically well-defined notion.

I think it may be a good idea to rename "Inner" to something like "BasisMonomial" or so and represent the PCE ansatz in those terms. That way we can save ourselves a lot of book-keeping and rely simply on a few arithmetic rules. Let's chat about this in more detail soon!

@bowenszhu
Copy link
Member Author

Great. Thanks for the quick feedback! @FHoltorf

@bowenszhu bowenszhu closed this by deleting the head repository Apr 28, 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.

Polynomial Chaos Expansion Model Order Reduction Code generation for random ODEs
2 participants