I’m having a hard time understanding exactly how a PDESystem with independent array variables differs from a PDESystem initialized with other independent variables. For example, suppose I have the following two PDESystems
@parameters t z1 z2 z[1:2]
pde_system1 = PDESystem(eq, bcs, domains, [t, z1, z2], [u(t, z1, z2)])
pde_system2 = PDESystem(eqs, bcs, domains, [t, z...], [u(t, z...)])
I can look at the independent variables and I would get
In: pde_system1.indvars
Out: Num[t, z1, z2]
In: pde_system2.indvars
Out: Num[t, z[1], z[2]]
and both of these have type Vector{Num}. However, when I call ModelingToolkit.getname, I get
In: ModelingToolkit.getname(pde_system1.indvars)
Out: [:t, :z1, :z2]
In: ModelingToolkit.getname(pde_system2.indvars)
Out: [:t, :z, :z]
It seems to me that getname in the case of pde_system2 returns the name of the entire array instead of the name of the particular entry. I have two questions about this. First, why is this happening? Naively, it seems like because pde_system1.indvars and pde_system2.indvars have the same type, ModelingToolkit.getname should return names for each entry of the vector in both cases.
My second question is about how to address this. Is there a way to unpack the independent variables of pde_system2 so that ModelingToolkit.getname returns a vector of symbols where each symbol corresponds to the entry of the array variables?