I’ve been having a hard time trying to use vector-valued equations (as opposed to vectors of equations) in Symbolics/ModelingToolkit. I remember reading somewhere in either docs that his feature was somewhat experimental, yet I’ve been unable to find this piece of information again, as well as any tutorial or guidance on how to do this.
Should I just leave this alone? My work involves large ODEs in vector/matrix form and my solver (a PINN) gives me solutions also in vector form; It just feels wrong to have to split both the equation and the solution into their individual lines and link them one by one.
An example of the libraries not working how one (I?) would expect:
using ModelingToolkit
@variables t, u(..), v(..), U(..)[1:2]
#Simple Harmonic Oscillator
Dt = Differential(t)
eqs = [Dt(u(t)) ~ v(t), Dt(v(t)) ~ -u(t)] #Works
vec_eqs = Dt(U(t)) ~ [0 1;-1 0]*U(t) #ERROR: axes of Differential(t)((U(t))[1:2]) not known