castn / crane-simulator

GNU General Public License v3.0
1 stars 0 forks source link

fix analysis #2

Closed eZSnake closed 1 year ago

eZSnake commented 1 year ago

the analysis function appears to have broken and is currently not functioning should probably be treated with high priority it is also complaining about the lstsq solver which replaced the linear system solver c:\Users\rehwa\OneDrive\Documents\Uni\Semester 4\Projektkurs CE\ce-project\analysis.py:35: FutureWarning:rcondparameter will change to the default of machine precision times ``max(M, N)`` where M and N are the input matrix dimensions. To use the future default and silence this warning we advise to passrcond=None, to keep using the old, explicitly passrcond=-1. Uf = np.linalg.lstsq(Kff, p_flatten) # Internal forces? https://youtu.be/Y-ILnLMZYMw?t=2640 Traceback (most recent call last): File "c:\Users\rehwa\OneDrive\Documents\Uni\Semester 4\Projektkurs CE\ce-project\main.py", line 56, in <module> N, R, U = analysis.analyze(nodes, beams, dof_condition, p, E, A) File "c:\Users\rehwa\OneDrive\Documents\Uni\Semester 4\Projektkurs CE\ce-project\analysis.py", line 37, in analyze U[free_dof] = Uf ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (4,) + inhomogeneous part.

eZSnake commented 1 year ago

appears to be caused by usage of 'lstsq' as it also doesn't work in old versions

eZSnake commented 1 year ago

fixed in d86397229d48cebfaf98215991bdf38fac06bbde just had to add [0] to end of line