Пример #1
0
Файл: star.py Проект: zimoun/mtf
#!/usr/bin/env python
# coding: utf8

from subprocess import call

import domains as d

dgens = []

N, tag = 3, 1
conf = d.sanitize_config(Nints=N, init_offset=True, tag=tag)
dgen = d.generate_concentric_dict(conf)
cmds = d.write_params_geo(conf, file_geo='geo/ellipse-concentric.script.geo')
call(cmds)
dgens.append(dgen)

tag += N
N = 3
conf = d.sanitize_config(Nints=N, init_offset=False, tag=tag)
conf['center'] = (3, 0, 0)
dgen = d.generate_concentric_dict(conf)
cmds = d.write_params_geo(conf, file_geo='geo/sphere-concentric.script.geo')
call(cmds)
dgens.append(dgen)

tag += N
N = 3
conf = d.sanitize_config(Nints=N, init_offset=False, tag=tag)
conf['center'] = (-3, 0, 0)
dgen = d.generate_concentric_dict(conf)
cmds = d.write_params_geo(conf, file_geo='geo/sphere-concentric.script.geo')
Пример #2
0

dgens = []
for i in range(N):
    if i == 0:
        truefalse = True
    else:
        truefalse = False
    conf = sanitize_config(init_offset=truefalse,
                           tag=i+1,
                           kRef=kRef,
                           rad=rads[i],
                           phys=phys[i],
                           center=centers[i],
    )
    dgen = generate_concentric_dict(conf)
    cmds = write_params_geo(conf)
    call(cmds)

    dgens.append(dgen)

doms = merge_msh_bubbles(dgens)

myd = Domains(doms)
myd.write2dot('graph.dot')
call(['dot', '-Teps', 'graph.dot'], stdout=open('graph.eps', 'wb'))

dd = myd

print(N)
Пример #3
0
#!/usr/bin/env python
# coding: utf8

from subprocess import call

import domains as d


dgens = []

N, tag = 3, 1
conf = d.sanitize_config(Nints=N, init_offset=True, tag=tag)
conf['center'] = (-2, 0, 0)
dgen = d.generate_concentric_dict(conf)
cmds = d.write_params_geo(conf, file_geo='geo/ellipse-concentric.script.geo')
call(cmds)
dgens.append(dgen)


tag += N
N = 3
conf = d.sanitize_config(Nints=N, init_offset=False, tag=tag)
conf['center'] = (2, 0, 0)
dgen = d.generate_concentric_dict(conf)
cmds = d.write_params_geo(conf, file_geo='geo/sphere-concentric.script.geo')
call(cmds)
dgens.append(dgen)


dicts = d.merge_msh(dgens)