nls
nls copied to clipboard
Non-linear Schrodinger Equation Solver
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
- Change directory to
src/
- Run
make
- Change directory to
test/
- Run
make
and then run./test_nls
- Change directory to
bin/
- Run
./solve
in order to start calculation - Visualize solution with
python2 src/visualize.py
Python module
- Change directory to
src/
- Run
make glue
in order to build python lib inbin/
directory that incapsulate native code - Use python to import native module in a way
from nls.native import nls
print(nls.version())
- Or use python to import python wrap in a way
from nls import Problem
model = Problem().model()
model.report()
model.solve()
model.visualize()
model.show()
Testing
Requirements
- Fortran compiler
- Python libraries
numpy
withf2py
extension,matplotlib
, andscipy
.
Credits
© Daniel Bershatsky, 2015-2016