https://github.com/daskol/nls
Non-linear Schrodinger Equation Solver
https://github.com/daskol/nls
equation nls physics-simulation quantum-mechanics schrodinger-equation
Last synced: 3 months ago
JSON representation
Non-linear Schrodinger Equation Solver
- Host: GitHub
- URL: https://github.com/daskol/nls
- Owner: daskol
- License: mit
- Created: 2016-01-01T10:47:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-05-07T08:20:06.000Z (about 1 year ago)
- Last Synced: 2024-10-18T19:07:22.426Z (8 months ago)
- Topics: equation, nls, physics-simulation, quantum-mechanics, schrodinger-equation
- Language: Python
- Homepage:
- Size: 244 KB
- Stars: 11
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/nls/nls)
[](https://coveralls.io/r/nls/nls)
[](https://pypi.python.org/pypi/nls/)
[](https://pypi.python.org/pypi/nls/)# Non-linear Schrodinger Equation Solver(NLS)
## Description
Package to solve non-linear Schrodinger equation written with Fortran 95 and Python 2.
NLS is scientific package that provides ability to solve effeffectively non-linear schrodinger equation with reservoir. These equation describes exciton-polariton condensation in microcavities. NLS is built on native fortran code and is based on certain natural abstraction layer that wraps native solver. These features are reason that makes calcualtions with NLS fast.
### Features
- core written with native Fortran
- wrapped with Python interaface
- [DEV] executables written with native Fortran
- [DEV] support for multithreading computation
- [DEV] support for distributed computation
## Usage
### Fortran executable
1. Change directory to `src/`
2. Run `make`
3. Change directory to `test/`
4. Run `make` and then run `./test_nls`
5. Change directory to `bin/`
6. Run `./solve` in order to start calculation
7. Visualize solution with `python2 src/visualize.py`### Python module
1. Change directory to `src/`
2. Run `make glue` in order to build python lib in `bin/` directory that incapsulate native code
3. Use python to import native module in a way```python
from nls.native import nls
print(nls.version())
```4. Or use python to import python wrap in a way
```python
from nls import Problem
model = Problem().model()
model.report()
model.solve()
model.visualize()
model.show()
```## Testing
## Requirements
1. Fortran compiler
2. Python libraries `numpy` with `f2py` extension, `matplotlib`, and `scipy`.## Credits
© [Daniel Bershatsky](mailto:[email protected]), 2015-2016