Commit fe36b5a3 authored by Frederik Hennig's avatar Frederik Hennig
Browse files

Fixed test notebooks

parent 51165277
Pipeline #27470 failed with stage
in 21 minutes and 46 seconds
%% Cell type:code id: tags:
```
%load_ext autoreload
%autoreload 2
```
%% Cell type:code id: tags:
```
import numpy as np
import sympy as sp
import matplotlib.pyplot as plt
from pystencils.datahandling import create_data_handling
from pystencils import create_kernel
from pystencils.slicing import slice_from_direction, make_slice
from pystencils.plot import scalar_field, vector_field, vector_field_magnitude
from lbmpy.creationfunctions import create_lb_collision_rule, create_lb_function
from lbmpy.macroscopic_value_kernels import flexible_macroscopic_values_getter, flexible_macroscopic_values_setter
from lbmpy.stencils import get_stencil
from lbmpy.plot import boundary_handling as plot_boundaries
from lbmpy.advanced_streaming import PeriodicityHandling
from lbmpy.boundaries import LatticeBoltzmannBoundaryHandling, NoSlip, UBB
from lbmpy.boundaries.boundaryhandling import create_advanced_streaming_boundary_kernel
from lbmpy.advanced_streaming.utility import is_inplace
from numpy.testing import assert_allclose, assert_array_equal
from test_periodic_pipe_with_force import PeriodicPipeFlow
```
%%%% Output: error
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-ff52ef3f43e1> in <module>
9
10 from lbmpy.creationfunctions import create_lb_collision_rule, create_lb_function
---> 11 from lbmpy.macroscopic_value_kernels import flexible_macroscopic_values_getter, flexible_macroscopic_values_setter
12 from lbmpy.stencils import get_stencil
13 from lbmpy.plot import boundary_handling as plot_boundaries
ImportError: cannot import name 'flexible_macroscopic_values_getter' from 'lbmpy.macroscopic_value_kernels' (/home/rzlin/da15siwa/pycodegen/python_includes/lbmpy/macroscopic_value_kernels.py)
%% Cell type:code id: tags:
```
stencil = get_stencil('D2Q9')
streaming_pattern = 'push'
noslip = NoSlip()
ubb = UBB((0.0, 0.0))
noslip_flow = PeriodicPipeFlow(stencil, streaming_pattern, noslip)
ubb_flow = PeriodicPipeFlow(stencil, streaming_pattern, ubb)
noslip_flow.init()
ubb_flow.init()
```
%% Cell type:code id: tags:
```
noslip_flow.run(1)
ubb_flow.run(1)
# The array retrieval somehow stabilizes the simulations
# Without it, they diverge, although they should be functionally equivalent!
noslip_u = noslip_flow.get_trimmed_velocity_array()
ubb_u = ubb_flow.get_trimmed_velocity_array()
```
%% Cell type:code id: tags:
```
noslip_flow.run(100)
noslip_u = noslip_flow.get_trimmed_velocity_array()
vector_field_magnitude(noslip_u)
```
%%%% Output: execute_result
<matplotlib.image.AxesImage at 0x7f0390310a90>
%%%% Output: display_data
![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAOQUlEQVR4nO3dXaxlZX3H8e9vDoMomvA2g1OYdtRMG9HUwZ5QEnqBoGZ8ScELjTQ1XJiOF5pIQtNQbnxJTGhStV4Yk1EIY+obLVCIIa2TaQ01MegZigIZWwgBwZnMGRACQoGZOf9e7DX0OJ4ze5+z91mTZ/P9JCdrr2evvZ//k8n8zpNnrXVWqgpJUnvWnewCJEmrY4BLUqMMcElqlAEuSY0ywCWpUaf02dk555xTW7Zs6bNLSWre3r17n6yqDce39xrgW7ZsYW5urs8uJal5SR5bqt0lFElqlAEuSY0ywCWpUQa4JDXKAJekRhngktQoA1ySGmWAS1KjDHBJapQBLkmNMsAlqVEGuCQ1ygCXpEYZ4JLUKANckhplgEtSowxwSWrU0ABPclqSnyT5WZIHk3yuaz8rye4kD3XbM9e+XEnSMaPMwF8CLquqdwDbgO1JLgauA/ZU1VZgT7cvSerJ0ACvgd90u+u7nwKuAHZ17buAK9eiQEnS0kZaA08yk+Q+YB7YXVX3AOdW1QGAbrtxzaqUJP2OkQK8qo5W1TbgfOCiJG8ftYMkO5LMJZk7dOjQKsuUJB1vRVehVNUzwA+B7cDBJJsAuu38Mp/ZWVWzVT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ml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <!-- Created with matplotlib (https://matplotlib.org/) --> <svg height="248.518125pt" version="1.1" viewBox="0 0 368.925 248.518125" width="368.925pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <metadata> <rdf:RDF xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <cc:Work> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> <dc:date>2020-10-24T15:50:42.744620</dc:date> <dc:format>image/svg+xml</dc:format> <dc:creator> <cc:Agent> <dc:title>Matplotlib v3.3.1, https://matplotlib.org/</dc:title> </cc:Agent> </dc:creator> </cc:Work> </rdf:RDF> </metadata> <defs> <style type="text/css">*{stroke-linecap:butt;stroke-linejoin:round;}</style> </defs> <g id="figure_1"> <g id="patch_1"> <path d="M -0 248.518125 L 368.925 248.518125 L 368.925 0 L -0 0 z " style="fill:none;"/> </g> <g id="axes_1"> <g id="patch_2"> <path d="M 26.925 224.64 L 361.725 224.64 L 361.725 7.2 L 26.925 7.2 z " style="fill:#ffffff;"/> </g> <g clip-path="url(#pfdac325dee)"> <image height="168" id="imageb2e301d242" transform="scale(1 -1)translate(0 -168)" width="335" x="26.925" xlink:href="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAU8AAACoCAYAAABg+2x8AAAC70lEQVR4nO3cMWoUUBSG0ZnJC0pEEEQhQkoLsUvjBlyBuE73YZNOLFIGDCiCIAYlZMY1zNc8Hpyzglt9/NXdvt9+PGwAOMpu9gEAKxJPgEA8AQLxBAjEEyAYdx/ezb4BYDmWJ0AgngCBeAIE4gkQjO+X+glwLOUECMQTIBBPgEA8AQLxBAjG5vWf2TcALMfyBAjEEyAQT4BAPAGC8fb8dvYNAMuxPAEC8QQIxBMgEE+AQDwBgnH57Gb2DQDLsTwBAvEECMQTIBBPgEA8AYLx5vG32TcALMfyBAjEEyAQT4BAPAGCcXH6c/YNAMuxPAEC8QQIxBMgEE+AQDwBgvFi92/2DQDLsTwBAvEECMQTIBBPgGA83W1n3wCwHMsTIBBPgEA8AQLxBAjEEyAYZ9vT2TcALMfyBAjEEyAQT4BAPAEC8QQIxun2ZPYNAMuxPAEC8QQIxBMgEE+AYOw2niEDHMvyBAjEEyAQT4BAPAEC8QQIxslWPwGOpZwAgXgCBOIJEIgnQCCeAIF4AgTiCRCIJ0AgngCBeAIE4gkQiCdAIJ4AgXgCBOIJEIgnQCCeAIF4AgTiCRCIJ0AgngDBeDjsZ98AsBzLEyAQT4BAPAEC8QQIxBMgGPvNYfYNAMuxPAEC8QQIxBMgEE+AYNwfHmbfALAcyxMgEE+AQDwBAvEECMQTIBh3h/vZNwAsx/IECMQTIBBPgEA8AQLxBAjG771nyADHsjwBAvEECMQTIBBPgGD82D+afQPAcixPgEA8AQLxBAjEEyAQT4Bg3Nw/n30DwHIsT4BAPAEC8QQIxBMgGF//vpp9A8ByLE+AQDwBAvEECMQTIBBPgGBc/bqYfQPAcixPgEA8AQLxBAjEEyAQT4BgfLk9n30DwHIsT4BAPAEC8QQIxBMgGJvrJ7NvAFiO5QkQiCdAIJ4AgXgCBOIJEIyXV/vZNwAsx/IECMQTIBBPgEA8AYJx9unz7BsAlmN5AgTiCRCIJ0AgngCBeAIE/wGSsigcpyguswAAAABJRU5ErkJggg==" y="-31.62"/> </g> <g id="matplotlib.axis_1"> <g id="xtick_1"> <g id="line2d_1"> <defs> <path d="M 0 0 L 0 3.5 " id="m3a3c82ede6" style="stroke:#000000;stroke-width:0.8;"/> </defs> <g> <use style="stroke:#000000;stroke-width:0.8;" x="29.715" xlink:href="#m3a3c82ede6" y="224.64"/> </g> </g> <g id="text_1"> <!-- 0 --> <g transform="translate(26.53375 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 31.78125 66.40625 Q 24.171875 66.40625 20.328125 58.90625 Q 16.5 51.421875 16.5 36.375 Q 16.5 21.390625 20.328125 13.890625 Q 24.171875 6.390625 31.78125 6.390625 Q 39.453125 6.390625 43.28125 13.890625 Q 47.125 21.390625 47.125 36.375 Q 47.125 51.421875 43.28125 58.90625 Q 39.453125 66.40625 31.78125 66.40625 z M 31.78125 74.21875 Q 44.046875 74.21875 50.515625 64.515625 Q 56.984375 54.828125 56.984375 36.375 Q 56.984375 17.96875 50.515625 8.265625 Q 44.046875 -1.421875 31.78125 -1.421875 Q 19.53125 -1.421875 13.0625 8.265625 Q 6.59375 17.96875 6.59375 36.375 Q 6.59375 54.828125 13.0625 64.515625 Q 19.53125 74.21875 31.78125 74.21875 z " id="DejaVuSans-48"/> </defs> <use xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="xtick_2"> <g id="line2d_2"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="85.515" xlink:href="#m3a3c82ede6" y="224.64"/> </g> </g> <g id="text_2"> <!-- 10 --> <g transform="translate(79.1525 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 12.40625 8.296875 L 28.515625 8.296875 L 28.515625 63.921875 L 10.984375 60.40625 L 10.984375 69.390625 L 28.421875 72.90625 L 38.28125 72.90625 L 38.28125 8.296875 L 54.390625 8.296875 L 54.390625 0 L 12.40625 0 z " id="DejaVuSans-49"/> </defs> <use xlink:href="#DejaVuSans-49"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="xtick_3"> <g id="line2d_3"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="141.315" xlink:href="#m3a3c82ede6" y="224.64"/> </g> </g> <g id="text_3"> <!-- 20 --> <g transform="translate(134.9525 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 19.1875 8.296875 L 53.609375 8.296875 L 53.609375 0 L 7.328125 0 L 7.328125 8.296875 Q 12.9375 14.109375 22.625 23.890625 Q 32.328125 33.6875 34.8125 36.53125 Q 39.546875 41.84375 41.421875 45.53125 Q 43.3125 49.21875 43.3125 52.78125 Q 43.3125 58.59375 39.234375 62.25 Q 35.15625 65.921875 28.609375 65.921875 Q 23.96875 65.921875 18.8125 64.3125 Q 13.671875 62.703125 7.8125 59.421875 L 7.8125 69.390625 Q 13.765625 71.78125 18.9375 73 Q 24.125 74.21875 28.421875 74.21875 Q 39.75 74.21875 46.484375 68.546875 Q 53.21875 62.890625 53.21875 53.421875 Q 53.21875 48.921875 51.53125 44.890625 Q 49.859375 40.875 45.40625 35.40625 Q 44.1875 33.984375 37.640625 27.21875 Q 31.109375 20.453125 19.1875 8.296875 z " id="DejaVuSans-50"/> </defs> <use xlink:href="#DejaVuSans-50"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="xtick_4"> <g id="line2d_4"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="197.115" xlink:href="#m3a3c82ede6" y="224.64"/> </g> </g> <g id="text_4"> <!-- 30 --> <g transform="translate(190.7525 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 40.578125 39.3125 Q 47.65625 37.796875 51.625 33 Q 55.609375 28.21875 55.609375 21.1875 Q 55.609375 10.40625 48.1875 4.484375 Q 40.765625 -1.421875 27.09375 -1.421875 Q 22.515625 -1.421875 17.65625 -0.515625 Q 12.796875 0.390625 7.625 2.203125 L 7.625 11.71875 Q 11.71875 9.328125 16.59375 8.109375 Q 21.484375 6.890625 26.8125 6.890625 Q 36.078125 6.890625 40.9375 10.546875 Q 45.796875 14.203125 45.796875 21.1875 Q 45.796875 27.640625 41.28125 31.265625 Q 36.765625 34.90625 28.71875 34.90625 L 20.21875 34.90625 L 20.21875 43.015625 L 29.109375 43.015625 Q 36.375 43.015625 40.234375 45.921875 Q 44.09375 48.828125 44.09375 54.296875 Q 44.09375 59.90625 40.109375 62.90625 Q 36.140625 65.921875 28.71875 65.921875 Q 24.65625 65.921875 20.015625 65.03125 Q 15.375 64.15625 9.8125 62.3125 L 9.8125 71.09375 Q 15.4375 72.65625 20.34375 73.4375 Q 25.25 74.21875 29.59375 74.21875 Q 40.828125 74.21875 47.359375 69.109375 Q 53.90625 64.015625 53.90625 55.328125 Q 53.90625 49.265625 50.4375 45.09375 Q 46.96875 40.921875 40.578125 39.3125 z " id="DejaVuSans-51"/> </defs> <use xlink:href="#DejaVuSans-51"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="xtick_5"> <g id="line2d_5"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="252.915" xlink:href="#m3a3c82ede6" y="224.64"/> </g> </g> <g id="text_5"> <!-- 40 --> <g transform="translate(246.5525 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 37.796875 64.3125 L 12.890625 25.390625 L 37.796875 25.390625 z M 35.203125 72.90625 L 47.609375 72.90625 L 47.609375 25.390625 L 58.015625 25.390625 L 58.015625 17.1875 L 47.609375 17.1875 L 47.609375 0 L 37.796875 0 L 37.796875 17.1875 L 4.890625 17.1875 L 4.890625 26.703125 z " id="DejaVuSans-52"/> </defs> <use xlink:href="#DejaVuSans-52"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="xtick_6"> <g id="line2d_6"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="308.715" xlink:href="#m3a3c82ede6" y="224.64"/> </g> </g> <g id="text_6"> <!-- 50 --> <g transform="translate(302.3525 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 10.796875 72.90625 L 49.515625 72.90625 L 49.515625 64.59375 L 19.828125 64.59375 L 19.828125 46.734375 Q 21.96875 47.46875 24.109375 47.828125 Q 26.265625 48.1875 28.421875 48.1875 Q 40.625 48.1875 47.75 41.5 Q 54.890625 34.8125 54.890625 23.390625 Q 54.890625 11.625 47.5625 5.09375 Q 40.234375 -1.421875 26.90625 -1.421875 Q 22.3125 -1.421875 17.546875 -0.640625 Q 12.796875 0.140625 7.71875 1.703125 L 7.71875 11.625 Q 12.109375 9.234375 16.796875 8.0625 Q 21.484375 6.890625 26.703125 6.890625 Q 35.15625 6.890625 40.078125 11.328125 Q 45.015625 15.765625 45.015625 23.390625 Q 45.015625 31 40.078125 35.4375 Q 35.15625 39.890625 26.703125 39.890625 Q 22.75 39.890625 18.8125 39.015625 Q 14.890625 38.140625 10.796875 36.28125 z " id="DejaVuSans-53"/> </defs> <use xlink:href="#DejaVuSans-53"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> </g> <g id="matplotlib.axis_2"> <g id="ytick_1"> <g id="line2d_7"> <defs> <path d="M 0 0 L -3.5 0 " id="mb846f91c38" style="stroke:#000000;stroke-width:0.8;"/> </defs> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#mb846f91c38" y="196.83"/> </g> </g> <g id="text_7"> <!-- 0 --> <g transform="translate(13.5625 200.629219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="ytick_2"> <g id="line2d_8"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#mb846f91c38" y="168.93"/> </g> </g> <g id="text_8"> <!-- 5 --> <g transform="translate(13.5625 172.729219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-53"/> </g> </g> </g> <g id="ytick_3"> <g id="line2d_9"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#mb846f91c38" y="141.03"/> </g> </g> <g id="text_9"> <!-- 10 --> <g transform="translate(7.2 144.829219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-49"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="ytick_4"> <g id="line2d_10"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#mb846f91c38" y="113.13"/> </g> </g> <g id="text_10"> <!-- 15 --> <g transform="translate(7.2 116.929219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-49"/> <use x="63.623047" xlink:href="#DejaVuSans-53"/> </g> </g> </g> <g id="ytick_5"> <g id="line2d_11"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#mb846f91c38" y="85.23"/> </g> </g> <g id="text_11"> <!-- 20 --> <g transform="translate(7.2 89.029219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-50"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="ytick_6"> <g id="line2d_12"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#mb846f91c38" y="57.33"/> </g> </g> <g id="text_12"> <!-- 25 --> <g transform="translate(7.2 61.129219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-50"/> <use x="63.623047" xlink:href="#DejaVuSans-53"/> </g> </g> </g> <g id="ytick_7"> <g id="line2d_13"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#mb846f91c38" y="29.43"/> </g> </g> <g id="text_13"> <!-- 30 --> <g transform="translate(7.2 33.229219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-51"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> </g> <g id="patch_3"> <path d="M 26.925 224.64 L 26.925 7.2 " style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> </g> <g id="patch_4"> <path d="M 361.725 224.64 L 361.725 7.2 " style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> </g> <g id="patch_5"> <path d="M 26.925 224.64 L 361.725 224.64 " style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> </g> <g id="patch_6"> <path d="M 26.925 7.2 L 361.725 7.2 " style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> </g> </g> </g> <defs> <clipPath id="pfdac325dee"> <rect height="217.44" width="334.8" x="26.925" y="7.2"/> </clipPath> </defs> </svg>)
%% Cell type:code id: tags:
```
ubb_flow.run(100)
ubb_u = ubb_flow.get_trimmed_velocity_array()
vector_field_magnitude(ubb_u)
```
%%%% Output: execute_result
<matplotlib.image.AxesImage at 0x7f0390208f70>
%%%% Output: display_data
![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/d3fzzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAOQUlEQVR4nO3dXaxlZX3H8e9vDoMomvA2g1OYdtRMG9HUwZ5QEnqBoGZ8ScELjTQ1XJiOF5pIQtNQbnxJTGhStV4Yk1EIY+obLVCIIa2TaQ01MegZigIZWwgBwZnMGRACQoGZOf9e7DX0OJ4ze5+z91mTZ/P9JCdrr2evvZ//k8n8zpNnrXVWqgpJUnvWnewCJEmrY4BLUqMMcElqlAEuSY0ywCWpUaf02dk555xTW7Zs6bNLSWre3r17n6yqDce39xrgW7ZsYW5urs8uJal5SR5bqt0lFElqlAEuSY0ywCWpUQa4JDXKAJekRhngktQoA1ySGmWAS1KjDHBJapQBLkmNMsAlqVEGuCQ1ygCXpEYZ4JLUKANckhplgEtSowxwSWrU0ABPclqSnyT5WZIHk3yuaz8rye4kD3XbM9e+XEnSMaPMwF8CLquqdwDbgO1JLgauA/ZU1VZgT7cvSerJ0ACvgd90u+u7nwKuAHZ17buAK9eiQEnS0kZaA08yk+Q+YB7YXVX3AOdW1QGAbrtxzaqUJP2OkQK8qo5W1TbgfOCiJG8ftYMkO5LMJZk7dOjQKsuUJB1vRVehVNUzwA+B7cDBJJsAuu38Mp/ZWVWzVTW7YcOG8aqVJL3ilGEHJNkAHK6qZ5K8Fng38HfAncDVwA3d9o5h3/U/ex/hPes+PF7FkiRghAAHNgG7kswwmLHfUlXfT/Jj4JYkHwd+CZjMktSjoQFeVT8HLlyi/Sng8rUoSpI0nHdiSlKjDHBJapQBLkmNGuUk5sQsnHE6L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AC4CrklzQZw1r4GZg+3Ft1wF7qmorsKfbb9UR4NqqeitwMfDJ7t9sGsb4EnBZVb0D2AZsT3Ix0zG2xT4N7Fu0P23je1dVbVt07fe0jW9Zfc/ALwIerqpHqupl4LvAFT3XMFFVdTfw6+OarwB2da93AVf2WdMkVdWBqrq3e/0cgyA4jykYYw38pttd3/0UUzC2Y5KcD3wA+Mai5qkZ3zKmfXyv6DvAzwMeX7T/RNc2bc6tqgMwCEBg40muZyKSbAEuBO5hSsbYLS/cB8wDu6tqasbW+Qfgb4CFRW3TNL4CfpBkb5IdXds0je+ETum5vyzR5nWMDUjyeuBW4JqqejZZ6p+yPVV1FNiW5Azg9iRvP8klTUySDwLzVbU3yaUnuZy1cklV7U+yEdid5Bcnu6A+9T0DfwLYvGj/fGB/zzX04WCSTQDddv4k1zOWJOsZhPe3quq2rnmqxlhVzwA/ZHA+Y1rGdgnw50keZbBceVmSf2R6xkdV7e+288DtDJZpp2Z8w/Qd4D8FtiZ5U5JTgY8Cd/ZcQx/uBK7uXl8N3HESaxlLBlPtG4F9VfWlRW81P8YkG7qZN0leC7wb+AVTMDaAqvrbqjq/qrYw+L/271X1l0zJ+JKcnuQNx14D7wUeYErGN4re78RM8n4G63IzwE1V9YVeC5iwJN8BLmXwJywPAp8B/gW4Bfh94JfAh6vq+BOdTUjyZ8B/Avfz/+uo1zNYB296jEn+mMFJrhkGk5lbqurzSc6m8bEdr1tC+euq+uC0jC/JmxnMumGwHPztqvrCtIxvFN5KL0mN8k5MSWqUAS5JjTLAJalRBrgkNcoAl6RGGeCS1CgDXJIa9X+1Z91CB9IevgAAAABJRU5ErkJggg==)
![](data:image/svg+xml;utf8,<?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <!-- Created with matplotlib (https://matplotlib.org/) --> <svg height="248.518125pt" version="1.1" viewBox="0 0 368.925 248.518125" width="368.925pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <metadata> <rdf:RDF xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <cc:Work> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> <dc:date>2020-10-24T15:50:43.132673</dc:date> <dc:format>image/svg+xml</dc:format> <dc:creator> <cc:Agent> <dc:title>Matplotlib v3.3.1, https://matplotlib.org/</dc:title> </cc:Agent> </dc:creator> </cc:Work> </rdf:RDF> </metadata> <defs> <style type="text/css">*{stroke-linecap:butt;stroke-linejoin:round;}</style> </defs> <g id="figure_1"> <g id="patch_1"> <path d="M -0 248.518125 L 368.925 248.518125 L 368.925 0 L -0 0 z " style="fill:none;"/> </g> <g id="axes_1"> <g id="patch_2"> <path d="M 26.925 224.64 L 361.725 224.64 L 361.725 7.2 L 26.925 7.2 z " style="fill:#ffffff;"/> </g> <g clip-path="url(#p31b15777b7)"> <image height="168" id="image10fd2a1046" transform="scale(1 -1)translate(0 -168)" width="335" x="26.925" xlink:href="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAU8AAACoCAYAAABg+2x8AAAC70lEQVR4nO3cMWoUUBSG0ZnJC0pEEEQhQkoLsUvjBlyBuE73YZNOLFIGDCiCIAYlZMY1zNc8Hpyzglt9/NXdvt9+PGwAOMpu9gEAKxJPgEA8AQLxBAjEEyAYdx/ezb4BYDmWJ0AgngCBeAIE4gkQjO+X+glwLOUECMQTIBBPgEA8AQLxBAjG5vWf2TcALMfyBAjEEyAQT4BAPAGC8fb8dvYNAMuxPAEC8QQIxBMgEE+AQDwBgnH57Gb2DQDLsTwBAvEECMQTIBBPgEA8AYLx5vG32TcALMfyBAjEEyAQT4BAPAGCcXH6c/YNAMuxPAEC8QQIxBMgEE+AQDwBgvFi92/2DQDLsTwBAvEECMQTIBBPgGA83W1n3wCwHMsTIBBPgEA8AQLxBAjEEyAYZ9vT2TcALMfyBAjEEyAQT4BAPAEC8QQIxun2ZPYNAMuxPAEC8QQIxBMgEE+AYOw2niEDHMvyBAjEEyAQT4BAPAEC8QQIxslWPwGOpZwAgXgCBOIJEIgnQCCeAIF4AgTiCRCIJ0AgngCBeAIE4gkQiCdAIJ4AgXgCBOIJEIgnQCCeAIF4AgTiCRCIJ0AgngDBeDjsZ98AsBzLEyAQT4BAPAEC8QQIxBMgGPvNYfYNAMuxPAEC8QQIxBMgEE+AYNwfHmbfALAcyxMgEE+AQDwBAvEECMQTIBh3h/vZNwAsx/IECMQTIBBPgEA8AQLxBAjG771nyADHsjwBAvEECMQTIBBPgGD82D+afQPAcixPgEA8AQLxBAjEEyAQT4Bg3Nw/n30DwHIsT4BAPAEC8QQIxBMgGF//vpp9A8ByLE+AQDwBAvEECMQTIBBPgGBc/bqYfQPAcixPgEA8AQLxBAjEEyAQT4BgfLk9n30DwHIsT4BAPAEC8QQIxBMgGJvrJ7NvAFiO5QkQiCdAIJ4AgXgCBOIJEIyXV/vZNwAsx/IECMQTIBBPgEA8AYJx9unz7BsAlmN5AgTiCRCIJ0AgngCBeAIE/wGSsigcpyguswAAAABJRU5ErkJggg==" y="-31.62"/> </g> <g id="matplotlib.axis_1"> <g id="xtick_1"> <g id="line2d_1"> <defs> <path d="M 0 0 L 0 3.5 " id="m420771e1d7" style="stroke:#000000;stroke-width:0.8;"/> </defs> <g> <use style="stroke:#000000;stroke-width:0.8;" x="29.715" xlink:href="#m420771e1d7" y="224.64"/> </g> </g> <g id="text_1"> <!-- 0 --> <g transform="translate(26.53375 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 31.78125 66.40625 Q 24.171875 66.40625 20.328125 58.90625 Q 16.5 51.421875 16.5 36.375 Q 16.5 21.390625 20.328125 13.890625 Q 24.171875 6.390625 31.78125 6.390625 Q 39.453125 6.390625 43.28125 13.890625 Q 47.125 21.390625 47.125 36.375 Q 47.125 51.421875 43.28125 58.90625 Q 39.453125 66.40625 31.78125 66.40625 z M 31.78125 74.21875 Q 44.046875 74.21875 50.515625 64.515625 Q 56.984375 54.828125 56.984375 36.375 Q 56.984375 17.96875 50.515625 8.265625 Q 44.046875 -1.421875 31.78125 -1.421875 Q 19.53125 -1.421875 13.0625 8.265625 Q 6.59375 17.96875 6.59375 36.375 Q 6.59375 54.828125 13.0625 64.515625 Q 19.53125 74.21875 31.78125 74.21875 z " id="DejaVuSans-48"/> </defs> <use xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="xtick_2"> <g id="line2d_2"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="85.515" xlink:href="#m420771e1d7" y="224.64"/> </g> </g> <g id="text_2"> <!-- 10 --> <g transform="translate(79.1525 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 12.40625 8.296875 L 28.515625 8.296875 L 28.515625 63.921875 L 10.984375 60.40625 L 10.984375 69.390625 L 28.421875 72.90625 L 38.28125 72.90625 L 38.28125 8.296875 L 54.390625 8.296875 L 54.390625 0 L 12.40625 0 z " id="DejaVuSans-49"/> </defs> <use xlink:href="#DejaVuSans-49"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="xtick_3"> <g id="line2d_3"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="141.315" xlink:href="#m420771e1d7" y="224.64"/> </g> </g> <g id="text_3"> <!-- 20 --> <g transform="translate(134.9525 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 19.1875 8.296875 L 53.609375 8.296875 L 53.609375 0 L 7.328125 0 L 7.328125 8.296875 Q 12.9375 14.109375 22.625 23.890625 Q 32.328125 33.6875 34.8125 36.53125 Q 39.546875 41.84375 41.421875 45.53125 Q 43.3125 49.21875 43.3125 52.78125 Q 43.3125 58.59375 39.234375 62.25 Q 35.15625 65.921875 28.609375 65.921875 Q 23.96875 65.921875 18.8125 64.3125 Q 13.671875 62.703125 7.8125 59.421875 L 7.8125 69.390625 Q 13.765625 71.78125 18.9375 73 Q 24.125 74.21875 28.421875 74.21875 Q 39.75 74.21875 46.484375 68.546875 Q 53.21875 62.890625 53.21875 53.421875 Q 53.21875 48.921875 51.53125 44.890625 Q 49.859375 40.875 45.40625 35.40625 Q 44.1875 33.984375 37.640625 27.21875 Q 31.109375 20.453125 19.1875 8.296875 z " id="DejaVuSans-50"/> </defs> <use xlink:href="#DejaVuSans-50"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="xtick_4"> <g id="line2d_4"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="197.115" xlink:href="#m420771e1d7" y="224.64"/> </g> </g> <g id="text_4"> <!-- 30 --> <g transform="translate(190.7525 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 40.578125 39.3125 Q 47.65625 37.796875 51.625 33 Q 55.609375 28.21875 55.609375 21.1875 Q 55.609375 10.40625 48.1875 4.484375 Q 40.765625 -1.421875 27.09375 -1.421875 Q 22.515625 -1.421875 17.65625 -0.515625 Q 12.796875 0.390625 7.625 2.203125 L 7.625 11.71875 Q 11.71875 9.328125 16.59375 8.109375 Q 21.484375 6.890625 26.8125 6.890625 Q 36.078125 6.890625 40.9375 10.546875 Q 45.796875 14.203125 45.796875 21.1875 Q 45.796875 27.640625 41.28125 31.265625 Q 36.765625 34.90625 28.71875 34.90625 L 20.21875 34.90625 L 20.21875 43.015625 L 29.109375 43.015625 Q 36.375 43.015625 40.234375 45.921875 Q 44.09375 48.828125 44.09375 54.296875 Q 44.09375 59.90625 40.109375 62.90625 Q 36.140625 65.921875 28.71875 65.921875 Q 24.65625 65.921875 20.015625 65.03125 Q 15.375 64.15625 9.8125 62.3125 L 9.8125 71.09375 Q 15.4375 72.65625 20.34375 73.4375 Q 25.25 74.21875 29.59375 74.21875 Q 40.828125 74.21875 47.359375 69.109375 Q 53.90625 64.015625 53.90625 55.328125 Q 53.90625 49.265625 50.4375 45.09375 Q 46.96875 40.921875 40.578125 39.3125 z " id="DejaVuSans-51"/> </defs> <use xlink:href="#DejaVuSans-51"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="xtick_5"> <g id="line2d_5"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="252.915" xlink:href="#m420771e1d7" y="224.64"/> </g> </g> <g id="text_5"> <!-- 40 --> <g transform="translate(246.5525 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 37.796875 64.3125 L 12.890625 25.390625 L 37.796875 25.390625 z M 35.203125 72.90625 L 47.609375 72.90625 L 47.609375 25.390625 L 58.015625 25.390625 L 58.015625 17.1875 L 47.609375 17.1875 L 47.609375 0 L 37.796875 0 L 37.796875 17.1875 L 4.890625 17.1875 L 4.890625 26.703125 z " id="DejaVuSans-52"/> </defs> <use xlink:href="#DejaVuSans-52"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="xtick_6"> <g id="line2d_6"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="308.715" xlink:href="#m420771e1d7" y="224.64"/> </g> </g> <g id="text_6"> <!-- 50 --> <g transform="translate(302.3525 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 10.796875 72.90625 L 49.515625 72.90625 L 49.515625 64.59375 L 19.828125 64.59375 L 19.828125 46.734375 Q 21.96875 47.46875 24.109375 47.828125 Q 26.265625 48.1875 28.421875 48.1875 Q 40.625 48.1875 47.75 41.5 Q 54.890625 34.8125 54.890625 23.390625 Q 54.890625 11.625 47.5625 5.09375 Q 40.234375 -1.421875 26.90625 -1.421875 Q 22.3125 -1.421875 17.546875 -0.640625 Q 12.796875 0.140625 7.71875 1.703125 L 7.71875 11.625 Q 12.109375 9.234375 16.796875 8.0625 Q 21.484375 6.890625 26.703125 6.890625 Q 35.15625 6.890625 40.078125 11.328125 Q 45.015625 15.765625 45.015625 23.390625 Q 45.015625 31 40.078125 35.4375 Q 35.15625 39.890625 26.703125 39.890625 Q 22.75 39.890625 18.8125 39.015625 Q 14.890625 38.140625 10.796875 36.28125 z " id="DejaVuSans-53"/> </defs> <use xlink:href="#DejaVuSans-53"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> </g> <g id="matplotlib.axis_2"> <g id="ytick_1"> <g id="line2d_7"> <defs> <path d="M 0 0 L -3.5 0 " id="mfe660f4f5d" style="stroke:#000000;stroke-width:0.8;"/> </defs> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#mfe660f4f5d" y="196.83"/> </g> </g> <g id="text_7"> <!-- 0 --> <g transform="translate(13.5625 200.629219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="ytick_2"> <g id="line2d_8"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#mfe660f4f5d" y="168.93"/> </g> </g> <g id="text_8"> <!-- 5 --> <g transform="translate(13.5625 172.729219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-53"/> </g> </g> </g> <g id="ytick_3"> <g id="line2d_9"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#mfe660f4f5d" y="141.03"/> </g> </g> <g id="text_9"> <!-- 10 --> <g transform="translate(7.2 144.829219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-49"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="ytick_4"> <g id="line2d_10"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#mfe660f4f5d" y="113.13"/> </g> </g> <g id="text_10"> <!-- 15 --> <g transform="translate(7.2 116.929219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-49"/> <use x="63.623047" xlink:href="#DejaVuSans-53"/> </g> </g> </g> <g id="ytick_5"> <g id="line2d_11"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#mfe660f4f5d" y="85.23"/> </g> </g> <g id="text_11"> <!-- 20 --> <g transform="translate(7.2 89.029219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-50"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="ytick_6"> <g id="line2d_12"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#mfe660f4f5d" y="57.33"/> </g> </g> <g id="text_12"> <!-- 25 --> <g transform="translate(7.2 61.129219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-50"/> <use x="63.623047" xlink:href="#DejaVuSans-53"/> </g> </g> </g> <g id="ytick_7"> <g id="line2d_13"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#mfe660f4f5d" y="29.43"/> </g> </g> <g id="text_13"> <!-- 30 --> <g transform="translate(7.2 33.229219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-51"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> </g> <g id="patch_3"> <path d="M 26.925 224.64 L 26.925 7.2 " style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> </g> <g id="patch_4"> <path d="M 361.725 224.64 L 361.725 7.2 " style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> </g> <g id="patch_5"> <path d="M 26.925 224.64 L 361.725 224.64 " style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> </g> <g id="patch_6"> <path d="M 26.925 7.2 L 361.725 7.2 " style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> </g> </g> </g> <defs> <clipPath id="p31b15777b7"> <rect height="217.44" width="334.8" x="26.925" y="7.2"/> </clipPath> </defs> </svg>)
%% Cell type:code id: tags:
```
assert_array_equal(noslip_u, ubb_u)
```
%% Cell type:code id: tags:
```
vector_field_magnitude(ubb_u - noslip_u)
```
%%%% Output: execute_result
<matplotlib.image.AxesImage at 0x7f165ce4dbb0>
%%%% Output: display_data
![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AA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bVF5d9q/0ek2wdzrxJ8hbg/cBTzMHeAKrq76vqiqraztJ/a/9VVX/DnOwvyVuTvO3MfeADwBHmZH/jmPknMZN8iKXrcpuAu6vqczMdYMqSfAO4jqX/heUJ4NPAvwP3An8EPA/cXFUrf9HZQpK/AL4HPMH/X0f9FEvXwVvvMcmfsfRLrk0snczcW1X/kOQPab63lYZLKH9bVR+el/0leQdLZ92wdDn461X1uXnZ3zj8KL0kNeUnMSWpKQMuSU0ZcElqyoBLUlMGXJKaMuCS1JQBl6Sm/g/CxXK0xr0tkAAAAABJRU5ErkJggg==)
![](data:image/svg+xml;utf8,<?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <!-- Created with matplotlib (https://matplotlib.org/) --> <svg height="248.518125pt" version="1.1" viewBox="0 0 368.925 248.518125" width="368.925pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <metadata> <rdf:RDF xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <cc:Work> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> <dc:date>2020-10-24T15:40:40.702635</dc:date> <dc:format>image/svg+xml</dc:format> <dc:creator> <cc:Agent> <dc:title>Matplotlib v3.3.1, https://matplotlib.org/</dc:title> </cc:Agent> </dc:creator> </cc:Work> </rdf:RDF> </metadata> <defs> <style type="text/css">*{stroke-linecap:butt;stroke-linejoin:round;}</style> </defs> <g id="figure_1"> <g id="patch_1"> <path d="M -0 248.518125 L 368.925 248.518125 L 368.925 0 L -0 0 z " style="fill:none;"/> </g> <g id="axes_1"> <g id="patch_2"> <path d="M 26.925 224.64 L 361.725 224.64 L 361.725 7.2 L 26.925 7.2 z " style="fill:#ffffff;"/> </g> <g clip-path="url(#pef3103fe4a)"> <image height="168" id="imageddbc7c28ab" transform="scale(1 -1)translate(0 -168)" width="335" x="26.925" xlink:href="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAU8AAACoCAYAAABg+2x8AAACRklEQVR4nO3UQQ3AIADAQEAbEubfyqaBfsiSOwV9de75vAOAI+t2AMAfmSdAYJ4AgXkCBOYJEJgnQGCeAIF5AgTmCRCYJ0BgngCBeQIE5gkQmCdAYJ4AgXkCBOYJEJgnQGCeAIF5AgTmCRCYJ0BgngCBeQIE5gkQmCdAYJ4AgXkCBOYJEJgnQGCeAIF5AgTmCRCYJ0BgngCBeQIE5gkQmCdAYJ4AgXkCBOYJEJgnQGCeAIF5AgTmCRCYJ0BgngCBeQIE5gkQmCdAYJ4AgXkCBOYJEJgnQGCeAIF5AgTmCRCYJ0BgngCBeQIE5gkQmCdAYJ4AgXkCBOYJEJgnQGCeAIF5AgTmCRCYJ0BgngCBeQIE5gkQmCdAYJ4AgXkCBOYJEJgnQGCeAIF5AgTmCRCYJ0BgngCBeQIE5gkQmCdAYJ4AgXkCBOYJEJgnQGCeAIF5AgTmCRCYJ0BgngCBeQIE5gkQmCdAYJ4AgXkCBOYJEJgnQGCeAIF5AgTmCRCYJ0BgngCBeQIE5gkQmCdAYJ4AgXkCBOYJEJgnQGCeAIF5AgTmCRCYJ0BgngCBeQIE5gkQmCdAYJ4AgXkCBOYJEJgnQGCeAIF5AgTmCRCYJ0BgngCBeQIE5gkQmCdAYJ4AgXkCBOYJEJgnQGCeAIF5AgTmCRCYJ0BgngCBeQIE5gkQmCdAYJ4AgXkCBOYJEJgnQGCeAIF5AgTmCRCYJ0BgngCBeQIE5gkQmCdAYJ4AgXkCBOYJEJgnQGCeAIF5AgTmCRCYJ0BgngDBB/D7AuiURQlnAAAAAElFTkSuQmCC" y="-31.62"/> </g> <g id="matplotlib.axis_1"> <g id="xtick_1"> <g id="line2d_1"> <defs> <path d="M 0 0 L 0 3.5 " id="mb239dd5e83" style="stroke:#000000;stroke-width:0.8;"/> </defs> <g> <use style="stroke:#000000;stroke-width:0.8;" x="29.715" xlink:href="#mb239dd5e83" y="224.64"/> </g> </g> <g id="text_1"> <!-- 0 --> <g transform="translate(26.53375 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 31.78125 66.40625 Q 24.171875 66.40625 20.328125 58.90625 Q 16.5 51.421875 16.5 36.375 Q 16.5 21.390625 20.328125 13.890625 Q 24.171875 6.390625 31.78125 6.390625 Q 39.453125 6.390625 43.28125 13.890625 Q 47.125 21.390625 47.125 36.375 Q 47.125 51.421875 43.28125 58.90625 Q 39.453125 66.40625 31.78125 66.40625 z M 31.78125 74.21875 Q 44.046875 74.21875 50.515625 64.515625 Q 56.984375 54.828125 56.984375 36.375 Q 56.984375 17.96875 50.515625 8.265625 Q 44.046875 -1.421875 31.78125 -1.421875 Q 19.53125 -1.421875 13.0625 8.265625 Q 6.59375 17.96875 6.59375 36.375 Q 6.59375 54.828125 13.0625 64.515625 Q 19.53125 74.21875 31.78125 74.21875 z " id="DejaVuSans-48"/> </defs> <use xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="xtick_2"> <g id="line2d_2"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="85.515" xlink:href="#mb239dd5e83" y="224.64"/> </g> </g> <g id="text_2"> <!-- 10 --> <g transform="translate(79.1525 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 12.40625 8.296875 L 28.515625 8.296875 L 28.515625 63.921875 L 10.984375 60.40625 L 10.984375 69.390625 L 28.421875 72.90625 L 38.28125 72.90625 L 38.28125 8.296875 L 54.390625 8.296875 L 54.390625 0 L 12.40625 0 z " id="DejaVuSans-49"/> </defs> <use xlink:href="#DejaVuSans-49"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="xtick_3"> <g id="line2d_3"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="141.315" xlink:href="#mb239dd5e83" y="224.64"/> </g> </g> <g id="text_3"> <!-- 20 --> <g transform="translate(134.9525 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 19.1875 8.296875 L 53.609375 8.296875 L 53.609375 0 L 7.328125 0 L 7.328125 8.296875 Q 12.9375 14.109375 22.625 23.890625 Q 32.328125 33.6875 34.8125 36.53125 Q 39.546875 41.84375 41.421875 45.53125 Q 43.3125 49.21875 43.3125 52.78125 Q 43.3125 58.59375 39.234375 62.25 Q 35.15625 65.921875 28.609375 65.921875 Q 23.96875 65.921875 18.8125 64.3125 Q 13.671875 62.703125 7.8125 59.421875 L 7.8125 69.390625 Q 13.765625 71.78125 18.9375 73 Q 24.125 74.21875 28.421875 74.21875 Q 39.75 74.21875 46.484375 68.546875 Q 53.21875 62.890625 53.21875 53.421875 Q 53.21875 48.921875 51.53125 44.890625 Q 49.859375 40.875 45.40625 35.40625 Q 44.1875 33.984375 37.640625 27.21875 Q 31.109375 20.453125 19.1875 8.296875 z " id="DejaVuSans-50"/> </defs> <use xlink:href="#DejaVuSans-50"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="xtick_4"> <g id="line2d_4"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="197.115" xlink:href="#mb239dd5e83" y="224.64"/> </g> </g> <g id="text_4"> <!-- 30 --> <g transform="translate(190.7525 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 40.578125 39.3125 Q 47.65625 37.796875 51.625 33 Q 55.609375 28.21875 55.609375 21.1875 Q 55.609375 10.40625 48.1875 4.484375 Q 40.765625 -1.421875 27.09375 -1.421875 Q 22.515625 -1.421875 17.65625 -0.515625 Q 12.796875 0.390625 7.625 2.203125 L 7.625 11.71875 Q 11.71875 9.328125 16.59375 8.109375 Q 21.484375 6.890625 26.8125 6.890625 Q 36.078125 6.890625 40.9375 10.546875 Q 45.796875 14.203125 45.796875 21.1875 Q 45.796875 27.640625 41.28125 31.265625 Q 36.765625 34.90625 28.71875 34.90625 L 20.21875 34.90625 L 20.21875 43.015625 L 29.109375 43.015625 Q 36.375 43.015625 40.234375 45.921875 Q 44.09375 48.828125 44.09375 54.296875 Q 44.09375 59.90625 40.109375 62.90625 Q 36.140625 65.921875 28.71875 65.921875 Q 24.65625 65.921875 20.015625 65.03125 Q 15.375 64.15625 9.8125 62.3125 L 9.8125 71.09375 Q 15.4375 72.65625 20.34375 73.4375 Q 25.25 74.21875 29.59375 74.21875 Q 40.828125 74.21875 47.359375 69.109375 Q 53.90625 64.015625 53.90625 55.328125 Q 53.90625 49.265625 50.4375 45.09375 Q 46.96875 40.921875 40.578125 39.3125 z " id="DejaVuSans-51"/> </defs> <use xlink:href="#DejaVuSans-51"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="xtick_5"> <g id="line2d_5"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="252.915" xlink:href="#mb239dd5e83" y="224.64"/> </g> </g> <g id="text_5"> <!-- 40 --> <g transform="translate(246.5525 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 37.796875 64.3125 L 12.890625 25.390625 L 37.796875 25.390625 z M 35.203125 72.90625 L 47.609375 72.90625 L 47.609375 25.390625 L 58.015625 25.390625 L 58.015625 17.1875 L 47.609375 17.1875 L 47.609375 0 L 37.796875 0 L 37.796875 17.1875 L 4.890625 17.1875 L 4.890625 26.703125 z " id="DejaVuSans-52"/> </defs> <use xlink:href="#DejaVuSans-52"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="xtick_6"> <g id="line2d_6"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="308.715" xlink:href="#mb239dd5e83" y="224.64"/> </g> </g> <g id="text_6"> <!-- 50 --> <g transform="translate(302.3525 239.238437)scale(0.1 -0.1)"> <defs> <path d="M 10.796875 72.90625 L 49.515625 72.90625 L 49.515625 64.59375 L 19.828125 64.59375 L 19.828125 46.734375 Q 21.96875 47.46875 24.109375 47.828125 Q 26.265625 48.1875 28.421875 48.1875 Q 40.625 48.1875 47.75 41.5 Q 54.890625 34.8125 54.890625 23.390625 Q 54.890625 11.625 47.5625 5.09375 Q 40.234375 -1.421875 26.90625 -1.421875 Q 22.3125 -1.421875 17.546875 -0.640625 Q 12.796875 0.140625 7.71875 1.703125 L 7.71875 11.625 Q 12.109375 9.234375 16.796875 8.0625 Q 21.484375 6.890625 26.703125 6.890625 Q 35.15625 6.890625 40.078125 11.328125 Q 45.015625 15.765625 45.015625 23.390625 Q 45.015625 31 40.078125 35.4375 Q 35.15625 39.890625 26.703125 39.890625 Q 22.75 39.890625 18.8125 39.015625 Q 14.890625 38.140625 10.796875 36.28125 z " id="DejaVuSans-53"/> </defs> <use xlink:href="#DejaVuSans-53"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> </g> <g id="matplotlib.axis_2"> <g id="ytick_1"> <g id="line2d_7"> <defs> <path d="M 0 0 L -3.5 0 " id="m13d1965eaa" style="stroke:#000000;stroke-width:0.8;"/> </defs> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#m13d1965eaa" y="196.83"/> </g> </g> <g id="text_7"> <!-- 0 --> <g transform="translate(13.5625 200.629219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="ytick_2"> <g id="line2d_8"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#m13d1965eaa" y="168.93"/> </g> </g> <g id="text_8"> <!-- 5 --> <g transform="translate(13.5625 172.729219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-53"/> </g> </g> </g> <g id="ytick_3"> <g id="line2d_9"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#m13d1965eaa" y="141.03"/> </g> </g> <g id="text_9"> <!-- 10 --> <g transform="translate(7.2 144.829219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-49"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="ytick_4"> <g id="line2d_10"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#m13d1965eaa" y="113.13"/> </g> </g> <g id="text_10"> <!-- 15 --> <g transform="translate(7.2 116.929219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-49"/> <use x="63.623047" xlink:href="#DejaVuSans-53"/> </g> </g> </g> <g id="ytick_5"> <g id="line2d_11"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#m13d1965eaa" y="85.23"/> </g> </g> <g id="text_11"> <!-- 20 --> <g transform="translate(7.2 89.029219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-50"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> <g id="ytick_6"> <g id="line2d_12"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#m13d1965eaa" y="57.33"/> </g> </g> <g id="text_12"> <!-- 25 --> <g transform="translate(7.2 61.129219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-50"/> <use x="63.623047" xlink:href="#DejaVuSans-53"/> </g> </g> </g> <g id="ytick_7"> <g id="line2d_13"> <g> <use style="stroke:#000000;stroke-width:0.8;" x="26.925" xlink:href="#m13d1965eaa" y="29.43"/> </g> </g> <g id="text_13"> <!-- 30 --> <g transform="translate(7.2 33.229219)scale(0.1 -0.1)"> <use xlink:href="#DejaVuSans-51"/> <use x="63.623047" xlink:href="#DejaVuSans-48"/> </g> </g> </g> </g> <g id="patch_3"> <path d="M 26.925 224.64 L 26.925 7.2 " style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> </g> <g id="patch_4"> <path d="M 361.725 224.64 L 361.725 7.2 " style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> </g> <g id="patch_5"> <path d="M 26.925 224.64 L 361.725 224.64 " style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> </g> <g id="patch_6"> <path d="M 26.925 7.2 L 361.725 7.2 " style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/> </g> </g> </g> <defs> <clipPath id="pef3103fe4a"> <rect height="217.44" width="334.8" x="26.925" y="7.2"/> </clipPath> </defs> </svg>)
%% Cell type:code id: tags:
```
noslip_force = noslip_flow.bh.force_on_boundary(noslip)
ubb_force = ubb_flow.bh.force_on_boundary(ubb)
noslip_force
```
%%%% Output: execute_result
array([5.52793967e-02, 1.89735380e-19])
%% Cell type:code id: tags:
```
ubb_force
```
%%%% Output: execute_result
array([5.52793967e-02, 1.89735380e-19])
%% Cell type:code id: tags:
```
import pystencils as ps
from pystencils import Field
from pystencils.boundaries.createindexlist import numpy_data_type_for_boundary_object
ubb_sym_index_field = Field.create_generic('indexField', spatial_dimensions=1,
dtype=numpy_data_type_for_boundary_object(ubb, 2))
noslip_sym_index_field = Field.create_generic('indexField', spatial_dimensions=1,
dtype=numpy_data_type_for_boundary_object(noslip, 2))
```
%% Cell type:code id: tags:
```
ubb_ast = create_advanced_streaming_boundary_kernel(ubb_flow.pdfs, ubb_sym_index_field, ubb_flow.lb_method, ubb,
streaming_pattern=streaming_pattern)
noslip_ast = create_advanced_streaming_boundary_kernel(noslip_flow.pdfs, noslip_sym_index_field, noslip_flow.lb_method,
noslip, streaming_pattern=streaming_pattern)
```
%% Cell type:code id: tags:
```
ind_arr = np.zeros((5,), dtype=numpy_data_type_for_boundary_object(ubb, 2))
ind_arr
```
%%%% Output: execute_result
array([(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
dtype={'names':['x','y','dir'], 'formats':['<i4','<i4','<i4'], 'offsets':[0,4,8], 'itemsize':12, 'aligned':True})
%% Cell type:code id: tags:
```
ind_arr['dir'] = - ind_arr['dir']
ind_arr
```
%%%% Output: execute_result
array([(0, 0, 4), (0, 0, 4), (0, 0, 4), (0, 0, 4), (0, 0, 4)],
dtype={'names':['x','y','dir'], 'formats':['<i4','<i4','<i4'], 'offsets':[0,4,8], 'itemsize':12, 'aligned':True})
%% Cell type:code id: tags:
```
inverse_direction = np.array([4, 3, 2, 1, 0])
ind_arr['dir'] = inverse_direction[ind_arr['dir']]
ind_arr
```
%%%% Output: execute_result
array([(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
dtype={'names':['x','y','dir'], 'formats':['<i4','<i4','<i4'], 'offsets':[0,4,8], 'itemsize':12, 'aligned':True})
%% Cell type:markdown id: tags:
Both generated functions are IDENTICAL:
%% Cell type:code id: tags:
```
ps.show_code(ubb_ast)
```
%%%% Output: display_data
%%%% Output: display_data
%% Cell type:code id: tags:
```
ps.show_code(noslip_ast)
```
%%%% Output: display_data
%%%% Output: display_data
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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