diff --git a/doc/notebooks/00_tutorial_lbmpy_walberla_overview.ipynb b/doc/notebooks/00_tutorial_lbmpy_walberla_overview.ipynb index c9ade9495ba519e8214353edb8f7032e6a1e2948..3046074f46e9b859857c4668fb5fc10109195ed4 100644 --- a/doc/notebooks/00_tutorial_lbmpy_walberla_overview.ipynb +++ b/doc/notebooks/00_tutorial_lbmpy_walberla_overview.ipynb @@ -1,5 +1,15 @@ { "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import pytest\n", + "pytest.importorskip('pycuda')" + ] + }, { "cell_type": "code", "execution_count": 2, diff --git a/doc/notebooks/01_tutorial_predefinedScenarios.ipynb b/doc/notebooks/01_tutorial_predefinedScenarios.ipynb index f7bd479c0ff8921750676c2bfb8833b4ca23b7ba..ec02bff6eb754f92c1a0aa33ce432df8e782fc7f 100644 --- a/doc/notebooks/01_tutorial_predefinedScenarios.ipynb +++ b/doc/notebooks/01_tutorial_predefinedScenarios.ipynb @@ -1,5 +1,15 @@ { "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import pytest\n", + "pytest.importorskip('pycuda')" + ] + }, { "cell_type": "code", "execution_count": 1, diff --git a/doc/notebooks/demo_moments_cumulants_and_maxwellian_equilibrium.ipynb b/doc/notebooks/demo_moments_cumulants_and_maxwellian_equilibrium.ipynb index 2a3f401a9816338a0812ab54de343ccf958a26bd..3b147a96e9176179fdc516a6a99f4b367a7c7c2e 100644 --- a/doc/notebooks/demo_moments_cumulants_and_maxwellian_equilibrium.ipynb +++ b/doc/notebooks/demo_moments_cumulants_and_maxwellian_equilibrium.ipynb @@ -695,6 +695,16 @@ "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", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import pytest\n", + "pytest.importorskip('ipy_table')" + ] + }, { "cell_type": "code", "execution_count": 19, diff --git a/lbmpy_tests/test_boundary_handling.py b/lbmpy_tests/test_boundary_handling.py index 25589c2cd76a91c6f0b0db90e0fff58ce2c7433b..cc88ffa696c0c881321ee6a0d373365b70c87592 100644 --- a/lbmpy_tests/test_boundary_handling.py +++ b/lbmpy_tests/test_boundary_handling.py @@ -1,5 +1,7 @@ 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')