Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# Copyright 2011-2013 Kwant authors. 

2# 

3# This file is part of Kwant. It is subject to the license terms in the file 

4# LICENSE.rst found in the top-level directory of this distribution and at 

5# https://kwant-project.org/license. A list of Kwant authors can be found in 

6# the file AUTHORS.rst at the top-level directory of this distribution and at 

7# https://kwant-project.org/authors. 

8 

9__all__ = ['smatrix', 'ldos', 'wave_function', 'greens_function'] 

10 

11# MUMPS usually works best. Use SciPy as fallback. 

12import warnings 

13try: 

14 from . import mumps as smodule 

15except ImportError: 

16 warnings.warn("MUMPS is not available, " 

17 "SciPy built-in solver will be used as a fallback. " 

18 "Performance can be very poor in this case.", RuntimeWarning) 

19 from . import sparse as smodule 

20 

21hidden_instance = smodule.Solver() 

22 

23smatrix = hidden_instance.smatrix 

24ldos = hidden_instance.ldos 

25wave_function = hidden_instance.wave_function 

26greens_function = hidden_instance.greens_function