__init__.py 1.56 KB
Newer Older
1
"""Module to generate stencil kernels in C or CUDA using sympy expressions and call them as Python functions"""
Martin Bauer's avatar
Martin Bauer committed
2
3
4
from . import fd
from . import stencil as stencil
from .assignment import Assignment, assignment_from_stencil
5
from .data_types import TypedSymbol
Martin Bauer's avatar
Martin Bauer committed
6
from .datahandling import create_data_handling
7
from .display_utils import show_code, get_code_obj, get_code_str, to_dot
Martin Bauer's avatar
Martin Bauer committed
8
9
10
from .field import Field, FieldType, fields
from .kernel_decorator import kernel
from .kernelcreation import create_indexed_kernel, create_kernel, create_staggered_kernel
11
from .simp import AssignmentCollection
Martin Bauer's avatar
Martin Bauer committed
12
from .slicing import make_slice
13
from .sympyextensions import SymbolCreator
Stephan Seitz's avatar
Stephan Seitz committed
14
15
from .spatial_coordinates import (x_, x_staggered, x_staggered_vector, x_vector,
                                  y_, y_staggered, z_, z_staggered)
16

Stephan Seitz's avatar
Stephan Seitz committed
17
18
19
20
21
22
try:
    import pystencils_autodiff
    autodiff = pystencils_autodiff
except ImportError:
    pass

23

24
__all__ = ['Field', 'FieldType', 'fields',
Martin Bauer's avatar
Martin Bauer committed
25
           'TypedSymbol',
Martin Bauer's avatar
Martin Bauer committed
26
           'make_slice',
Martin Bauer's avatar
Martin Bauer committed
27
           'create_kernel', 'create_indexed_kernel', 'create_staggered_kernel',
28
           'show_code', 'to_dot', 'get_code_obj', 'get_code_str',
29
           'AssignmentCollection',
Martin Bauer's avatar
Martin Bauer committed
30
           'Assignment',
31
           'assignment_from_stencil',
32
           'SymbolCreator',
33
           'create_data_handling',
Martin Bauer's avatar
Martin Bauer committed
34
           'kernel',
Stephan Seitz's avatar
Stephan Seitz committed
35
36
37
           'x_', 'y_', 'z_',
           'x_staggered', 'y_staggered', 'z_staggered',
           'x_vector', 'x_staggered_vector',
38
           'fd',
39
           'stencil']
Markus Holzer's avatar
Markus Holzer committed
40
41
42
43

from ._version import get_versions
__version__ = get_versions()['version']
del get_versions