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

Work out weaklaplacian(::DirichletPolynomial) for non-evenly spaced points #39

Open
dlfivefifty opened this issue Jul 28, 2023 · 3 comments

Comments

@dlfivefifty
Copy link
Member

I think the only thing that's not trivial is the A block. The D blocks should just be changing step(r) to diff(r)

@dlfivefifty
Copy link
Member Author

Note the A block is just standard FEM with hat functions. @ioannisPApapadopoulos do you know this off the top of your head?

@ioannisPApapadopoulos
Copy link
Member

Yeah should be quite simply, something like -1/r for the off-diagonal and 1/r0 + 1/r1 for the main diagonal, where r0 and r1 are the interval lengths on the left and right hand side of the hats.

E.g. if a hat was scaled onto -1/2..0, 0..5, then the off diagonals are

(2 * -2)/2 = -2. = -1/r0 (left)
(-1/5 * 1/5)* 5 = -1/5 = =1/r1 (right).

the main diagonal is
(2*2)/2 + (-1/5 * -1/5)*5 = 2 + 1/5 = 1/r0 + 1/r1 = 11/5.

@dlfivefifty
Copy link
Member Author

Ah ok so it’ll be something like 1 ./ diff(r)[1:end-1] + 1 ./ diff(r)[2:end] ? I think the dimensions match at least

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

2 participants