コード例 #1
0
ファイル: 3D_cube.py プロジェクト: pp1565156/pylbm
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)
コード例 #2
0
# 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)
コード例 #3
0
ファイル: 1D_segment.py プロジェクト: pp1565156/pylbm
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)