FD coefficients
The snippet can be accessed without any authentication.
Authored by
Andreas Klöckner
Edited
coeffs.txt 897 B
Second order:
deps h - 2 eps 2 eps deps h + 2 eps
coeffs = [[a = - --------------, b = - -----, c = --------------]]
2 2 2
2 h h 2 h
Fourth order:
deps h - eps 2 deps h - 4 eps 5 eps
coeffs = [[a = ------------, b = - ----------------, c = - -----,
2 2 2
12 h 3 h 2 h
2 deps h + 4 eps deps h + eps
d = ----------------, e = - ------------]]
2 2
3 h 12 h
Please register or sign in to comment