Ejemplo n.º 1
0
 def test_with_given_geometry_and_stencil(self):
     geom = pyLBM.Geometry({'box': {'x': [0, 1]}})
     sten = pyLBM.Stencil({
         'dim': 1,
         'schemes': [{
             'velocities': list(range(3))
         }]
     })
     dom = pyLBM.Domain(geometry=geom, stencil=sten, space_step=.25)
Ejemplo n.º 2
0
from __future__ import print_function
from __future__ import division
# Authors:
#     Loic Gouarin <*****@*****.**>
#     Benjamin Graille <*****@*****.**>
#
# License: BSD 3 clause
"""
Example of a 2 velocities scheme in 1D
"""
from six.moves import range
import pyLBM
dsten = {
    'dim': 1,
    'schemes': [
        {
            'velocities': range(1, 3)
        },
    ],
}
s = pyLBM.Stencil(dsten)
print(s)
s.visualize()
Ejemplo n.º 3
0
def test_1D():
    dsten = {
        'dim':1,
        'schemes':[{'velocities':list(range(5))}, {'velocities':[2,1,0,5,0,6]}, {'velocities':list(range(6))}],
    }
    s = pyLBM.Stencil(dsten)
Ejemplo n.º 4
0
def test_2D():
    dsten = {
        'dim':2,
        'schemes':[{'velocities':list(range(9))}, {'velocities':[3,1,0,5,0,7]}, {'velocities':list(range(6))}],
    }
    s = pyLBM.Stencil(dsten)