Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lbmpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
lbmpy
Commits
e36c40c7
Commit
e36c40c7
authored
4 years ago
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
Fix import try
parent
9e03f794
No related branches found
No related tags found
1 merge request
!66
Fix package requires
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lbmpy/phasefield/nphase_nestler.py
+8
-7
8 additions, 7 deletions
lbmpy/phasefield/nphase_nestler.py
with
8 additions
and
7 deletions
lbmpy/phasefield/nphase_nestler.py
+
8
−
7
View file @
e36c40c7
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment