コード例 #1
0
    'name': 'A',
    'phys': 2,
    'union': 1,
}, {
    'name': 'B',
    'phys': 4,
    'union': 2,
}, {
    'name': 'C',
    'phys': 16,
    'union': 3,
}]

mtf = MultiTrace(kRef, meshname, dd, 'CSC')

At, X, J, iJ = mtf.tolinop()

shape = mtf.shape

A = 2.0 * At
A2 = A * iJ * A

Ce = 0.5 * J - At
Ci = 0.5 * J + At

Ce2 = Ce * iJ * Ce
Ci2 = Ci * iJ * Ci

x = np.random.rand(shape[0]) + 1j * np.random.rand(shape[0])
xr = np.random.rand(shape[0])
コード例 #2
0
ファイル: eg-dist2sph.py プロジェクト: zimoun/mtf
myd = Domains(doms)
myd.write2dot('graph.dot')
call(['dot', '-Teps', 'graph.dot'], stdout=open('graph.eps', 'wb'))

dd = myd

print(N)

##################################

meshname = "./geo/all.msh"


mtf = MultiTrace(kRef, meshname, dd)

At, X, J, iJ = mtf.tolinop()

shape = mtf.shape

A = 2.0 * At
A2 = A * iJ * A

Ce = 0.5 * J - At
Ci = 0.5 * J + At

Ce2 = Ce * iJ * Ce
Ci2 = Ci * iJ * Ci

x = np.random.rand(shape[0]) + 1j * np.random.rand(shape[0])
xr = np.random.rand(shape[0])