Skip to content

How to define the Galerkin method for a general case? #81

Closed Answered by jipolanco
leocastel asked this question in Q&A
Discussion options

You must be logged in to vote

Update: this will be easier to do after #82 is merged.

In your example, you would do:

using BSplineKit
B = BSplineBasis(...)
f(x) = 1/x^2
L = galerkin_matrix(f, B, (Derivative(0), Derivative(1)))

One can also change the number of quadrature nodes to make sure that things converge. For example:

L = galerkin_matrix(f, B, (Derivative(0), Derivative(1)); quadrature = Galerkin.gausslegendre(Val(8)))

But l me know if you have any comments or if you find another approach.

Replies: 4 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@leocastel
Comment options

Comment options

You must be logged in to vote
1 reply
@leocastel
Comment options

Answer selected by leocastel
Comment options

You must be logged in to vote
5 replies
@jipolanco
Comment options

@leocastel
Comment options

@jipolanco
Comment options

@leocastel
Comment options

@jipolanco
Comment options

Comment options

You must be logged in to vote
1 reply
@leocastel
Comment options

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