PLaSK library
|
Functions | |
evaluate (expr, args) | |
evaluate_matrix (expr) | |
evaluate_vector (expr) | |
_print_Indexed (self, expr) | |
cpp (v) | |
_print_cpp (kij, kvals, fvals, file=sys.stdout) | |
print_cpp (KK, FF, fname=None) | |
La (i, x, z) | |
Variables | |
msize = mpi.Get_size() | |
mrank = mpi.Get_rank() | |
_print_Indexed | |
str | sidx = lambda i: "e.i{}{}".format(*idx[i]) |
x | |
y | |
X | |
Y | |
ξ = x / X | |
ζ = y / Y | |
Φ = np.linalg.inv(np.array([[1, 0, 0, 0], [0, 1, 0, 0], [1, 1, 1, 1], [0, 1, 2, 3]])).T | |
list | φx = [sum(int(c) * ξ**i for i, c in enumerate(p)) for p in Φ] |
list | φy = [sum(int(c) * ζ**i for i, c in enumerate(p)) for p in Φ] |
list | idx = [(0,0), (0,1), (1,0), (0,2), (0,3), (1,2), (2,0), (2,1), (3,0), (2,2), (2,3), (3,2)] |
φ = np.array([φx[idx[i][0]] * φy[idx[i][1]] for i in range(12)]) | |
dφx = np.array([sym.expand(sym.diff(a, x)) for a in φ]) | |
dφy = np.array([sym.expand(sym.diff(a, y)) for a in φ]) | |
U = sym.IndexedBase('U', shape=(4, 4)) | |
u0 = sum(U[idx[k]] * φ[k] for k in range(12)) | |
sep | |
zx = np.array([0, X]) | |
zy = np.array([0, Y]) | |
J = sym.IndexedBase('J', shape=(2, 2)) | |
Jxy = sym.simplify(sum(J[i,j] * La(i, x, zx) * La(j, y, zy) for i in range(len(zx)) for j in range(len(zy)))) | |
KD | |
end | |
KA | |
KB | |
u02 = sym.expand(u0**2) | |
u03 = sym.expand(u0**3) | |
KC | |
KK = KD, KA, KB, KC | |
FB | |
FC | |
F0 | |
FF = FB, FC, F0 | |
P = sym.IndexedBase('P', shape=(2,2,2)) | |
G = sym.IndexedBase('G', shape=(2,)) | |
dG = sym.IndexedBase('dG', shape=(2,)) | |
ug = sym.symbols('Ug') | |
list | Pxy = [sym.simplify(sum(P[i, j, c] * La(i, x, zx) * La(j, y, zy) for i in range(len(zx)) for j in range(len(zy)))) for c in range(2)] |
KL | |
FL | |
|
protected |
Definition at line 83 of file diffusion2.py.
|
protected |
Definition at line 55 of file diffusion2.py.
diffusion2.cpp | ( | v | ) |
Definition at line 66 of file diffusion2.py.
diffusion2.evaluate | ( | expr, | |
args | |||
) |
Definition at line 22 of file diffusion2.py.
diffusion2.evaluate_matrix | ( | expr | ) |
Definition at line 33 of file diffusion2.py.
diffusion2.evaluate_vector | ( | expr | ) |
Definition at line 45 of file diffusion2.py.
diffusion2.La | ( | i, | |
x, | |||
z | |||
) |
Definition at line 143 of file diffusion2.py.
diffusion2.print_cpp | ( | KK, | |
FF, | |||
fname = None |
|||
) |
Definition at line 90 of file diffusion2.py.
diffusion2.Φ = np.linalg.inv(np.array([[1, 0, 0, 0], [0, 1, 0, 0], [1, 1, 1, 1], [0, 1, 2, 3]])).T |
Definition at line 112 of file diffusion2.py.
Definition at line 110 of file diffusion2.py.
Definition at line 109 of file diffusion2.py.
Definition at line 125 of file diffusion2.py.
Definition at line 114 of file diffusion2.py.
Definition at line 119 of file diffusion2.py.
|
protected |
Definition at line 63 of file diffusion2.py.
Definition at line 127 of file diffusion2.py.
Definition at line 128 of file diffusion2.py.
diffusion2.dG = sym.IndexedBase('dG', shape=(2,)) |
Definition at line 211 of file diffusion2.py.
diffusion2.end |
Definition at line 157 of file diffusion2.py.
diffusion2.F0 |
Definition at line 193 of file diffusion2.py.
diffusion2.FB |
Definition at line 183 of file diffusion2.py.
diffusion2.FC |
Definition at line 188 of file diffusion2.py.
Definition at line 199 of file diffusion2.py.
diffusion2.FL |
Definition at line 221 of file diffusion2.py.
diffusion2.G = sym.IndexedBase('G', shape=(2,)) |
Definition at line 210 of file diffusion2.py.
list diffusion2.idx = [(0,0), (0,1), (1,0), (0,2), (0,3), (1,2), (2,0), (2,1), (3,0), (2,2), (2,3), (3,2)] |
Definition at line 124 of file diffusion2.py.
diffusion2.J = sym.IndexedBase('J', shape=(2, 2)) |
Definition at line 140 of file diffusion2.py.
diffusion2.Jxy = sym.simplify(sum(J[i,j] * La(i, x, zx) * La(j, y, zy) for i in range(len(zx)) for j in range(len(zy)))) |
Definition at line 151 of file diffusion2.py.
diffusion2.KA |
Definition at line 159 of file diffusion2.py.
diffusion2.KB |
Definition at line 164 of file diffusion2.py.
diffusion2.KC |
Definition at line 172 of file diffusion2.py.
diffusion2.KD |
Definition at line 154 of file diffusion2.py.
diffusion2.KL |
Definition at line 216 of file diffusion2.py.
diffusion2.mrank = mpi.Get_rank() |
Definition at line 19 of file diffusion2.py.
diffusion2.msize = mpi.Get_size() |
Definition at line 18 of file diffusion2.py.
diffusion2.P = sym.IndexedBase('P', shape=(2,2,2)) |
Definition at line 209 of file diffusion2.py.
list diffusion2.Pxy = [sym.simplify(sum(P[i, j, c] * La(i, x, zx) * La(j, y, zy) for i in range(len(zx)) for j in range(len(zy)))) for c in range(2)] |
Definition at line 214 of file diffusion2.py.
diffusion2.sep |
Definition at line 135 of file diffusion2.py.
str diffusion2.sidx = lambda i: "e.i{}{}".format(*idx[i]) |
Definition at line 81 of file diffusion2.py.
diffusion2.U = sym.IndexedBase('U', shape=(4, 4)) |
Definition at line 130 of file diffusion2.py.
Definition at line 131 of file diffusion2.py.
diffusion2.u02 = sym.expand(u0**2) |
Definition at line 169 of file diffusion2.py.
diffusion2.u03 = sym.expand(u0**3) |
Definition at line 170 of file diffusion2.py.
diffusion2.ug = sym.symbols('Ug') |
Definition at line 212 of file diffusion2.py.
diffusion2.x |
Definition at line 106 of file diffusion2.py.
diffusion2.X |
Definition at line 107 of file diffusion2.py.
diffusion2.y |
Definition at line 106 of file diffusion2.py.
diffusion2.Y |
Definition at line 107 of file diffusion2.py.
diffusion2.zx = np.array([0, X]) |
Definition at line 137 of file diffusion2.py.
diffusion2.zy = np.array([0, Y]) |
Definition at line 138 of file diffusion2.py.