[ Launch: Mach cone ] 6747592 by cbellei
[ Launch: 2D Random Walk ] 8144040 by cbellei
[ Launch: 2D Random Walk ] 8247103 by cbellei[ Launch: 2D Random Walk ] 8144040 by cbellei
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
## Tri Diagonal Matrix Algorithm(a.k.a Thomas algorithm) solver | |
def TDMAsolver(a, b, c, d): | |
''' | |
TDMA solver, a b c d can be NumPy array type or Python list type. | |
refer to http://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm | |
and to http://www.cfd-online.com/Wiki/Tridiagonal_matrix_algorithm_-_TDMA_(Thomas_algorithm) | |
''' | |
nf = len(d) # number of equations |
I hereby claim:
- I am cbellei on github.
- I am cbellei (https://keybase.io/cbellei) on keybase.
- I have a public key ASAyGWQroc6kFtWrNq4gVB6rl92IGDLCVb_-fOISkrnspAo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GNU GENERAL PUBLIC LICENSE | |
Version 3, 29 June 2007 | |
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> | |
Everyone is permitted to copy and distribute verbatim copies | |
of this license document, but changing it is not allowed. | |
Preamble | |
The GNU General Public License is a free, copyleft license for |