Skip to content
Snippets Groups Projects
Commit e36c40c7 authored by Markus Holzer's avatar Markus Holzer
Browse files

Fix import try

parent 9e03f794
No related branches found
No related tags found
1 merge request!66Fix package requires
try:
import pyximport
except ImportError:
print("pyximport could not be imported. nphase_nestler can only be used if Cython is installed")
raise
import pyximport
pyximport.install(language_level=3)
from lbmpy.phasefield.simplex_projection import simplex_projection_2d # NOQA
except:
try:
from lbmpy.phasefield.simplex_projection import simplex_projection_2d # NOQA
except:
raise ImportError("neither pyximport nor binary module available")
import sympy as sp
......@@ -10,14 +14,11 @@ from lbmpy.creationfunctions import create_lb_update_rule
from lbmpy.macroscopic_value_kernels import pdf_initialization_assignments
from lbmpy.phasefield.analytical import chemical_potentials_from_free_energy, force_from_phi_and_mu
from lbmpy.phasefield.cahn_hilliard_lbm import cahn_hilliard_lb_method
from lbmpy.phasefield.simplex_projection import simplex_projection_2d # NOQA
from lbmpy.stencils import get_stencil
from pystencils import Assignment, create_data_handling, create_kernel
from pystencils.fd import Diff, discretize_spatial, expand_diff_full
from pystencils.fd.derivation import FiniteDifferenceStencilDerivation
pyximport.install(language_level=3)
def forth_order_isotropic_discretize(field):
second_neighbor_stencil = [(i, j)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment