Commit a8636b7f authored by Michael Kuron's avatar Michael Kuron
Browse files

Fix more tests on Ubuntu

parent d62d6806
%% Cell type:code id: tags:
 
``` python
import pytest
pytest.importorskip('pycuda')
```
%% Cell type:code id: tags:
``` python
from lbmpy.session import *
```
 
%% Cell type:markdown id: tags:
 
......
%% Cell type:code id: tags:
 
``` python
import pytest
pytest.importorskip('pycuda')
```
%% Cell type:code id: tags:
``` python
from lbmpy.session import *
```
 
%% Cell type:markdown id: tags:
 
......@@ -443,10 +443,17 @@
This method for deriving a discrete equilibrium works well for "full stencils" i.e. with $3^d$ directions, where $d$ is the dimension.
%% Cell type:code id: tags:
``` python
import pytest
pytest.importorskip('ipy_table')
```
%% Cell type:code id: tags:
``` python
moment_equality_table(get_stencil("D2Q9"), truncate_order=2)
```
%%%% Output: execute_result
......
import numpy as np
import pytest
from lbmpy.boundaries import UBB, NeumannByCopy, NoSlip, StreamInConstant
from lbmpy.boundaries.boundaryhandling import LatticeBoltzmannBoundaryHandling
from lbmpy.creationfunctions import create_lb_function
......@@ -8,9 +10,12 @@ from lbmpy.lbstep import LatticeBoltzmannStep
from pystencils import create_data_handling, make_slice
def test_simple():
@pytest.mark.parametrize("gpu", [True, False])
def test_simple(gpu):
import pytest
pytest.importorskip('pycuda')
dh = create_data_handling((10, 5), parallel=False)
dh.add_array('pdfs', values_per_cell=9, cpu=True, gpu=True)
dh.add_array('pdfs', values_per_cell=9, cpu=True, gpu=gpu)
lb_func = create_lb_function(stencil='D2Q9', compressible=False, relaxation_rate=1.8)
bh = LatticeBoltzmannBoundaryHandling(lb_func.method, dh, 'pdfs')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment