Projekt aufgeräumt, gha1 getestet, Runge-Kutta angepasst (gha2_num sollte jetzt deutlich schneller sein)
This commit is contained in:
31
test.py
31
test.py
@@ -1,29 +1,14 @@
|
||||
import numpy as np
|
||||
from scipy.special import factorial as fact
|
||||
from math import comb
|
||||
import matplotlib.pyplot as plt
|
||||
import ellipsoide
|
||||
from GHA_triaxial.panou import pq
|
||||
|
||||
J = np.array([
|
||||
[2, 3, 0],
|
||||
[0, 3, 0],
|
||||
[6, 0, 4]
|
||||
])
|
||||
ell = ellipsoide.EllipsoidTriaxial.init_name("Eitschberger1978")
|
||||
|
||||
xi = np.array([1, 2, 3])
|
||||
xi_col = xi.reshape(-1, 1)
|
||||
print(xi_col)
|
||||
xi_row = xi_col.reshape(1, -1).flatten()
|
||||
print(xi_row)
|
||||
x, y, z = ell.para2cart(0.5, 0.7)
|
||||
|
||||
# Spaltenvektor-Variante
|
||||
res_col = xi[:, None] - J @ xi[:, None]
|
||||
|
||||
# Zeilenvektor-Variante
|
||||
res_row = xi[None, :] - xi[None, :] @ J
|
||||
|
||||
print("Spaltenvektor:")
|
||||
print(res_col[0,0])
|
||||
print("Zeilenvektor:")
|
||||
print(res_row)
|
||||
t = 5
|
||||
l = 2
|
||||
print(fact(t+1-l) / (fact(t+1-l) * fact(l-1)), comb(l-1, t+1-l))
|
||||
x1 = pq(ell, x, y, z)
|
||||
x2 = ell.p_q(x, y, z)
|
||||
pass
|
||||
Reference in New Issue
Block a user