from __future__ import print_function from __future__ import division # Authors: # Loic Gouarin <*****@*****.**> # Benjamin Graille <*****@*****.**> # # License: BSD 3 clause """ Example of a 3D geometry: the cube [0,1] x [0,1] x [0,1] """ from six.moves import range import pyLBM dico = { 'box': { 'x': [0, 1], 'y': [0, 1], 'z': [0, 1], 'label': list(range(6)) }, } geom = pyLBM.Geometry(dico) print(geom) geom.visualize(viewlabel=True)
# Authors: # Loic Gouarin <*****@*****.**> # Benjamin Graille <*****@*****.**> # # License: BSD 3 clause """ Example of a 2D geometry: the square [0,1]x[0,1] with a triangular hole """ import pyLBM d = { 'box': { 'x': [0, 1], 'y': [0, 1], 'label': 0 }, 'elements': [pyLBM.Triangle((0., 0.), (0., .5), (.5, 0.), label=1)], } g = pyLBM.Geometry(d) g.visualize(viewlabel=True)
from __future__ import print_function from __future__ import division # Authors: # Loic Gouarin <*****@*****.**> # Benjamin Graille <*****@*****.**> # # License: BSD 3 clause """ Example of a 1D geometry: the segment [0,1] """ import pyLBM dgeom = {'box':{'x': [0, 1], 'label': [0,1]},} geom = pyLBM.Geometry(dgeom) geom.visualize(viewlabel = True)