You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This really depends where we want to take this abstraction.
One possibility is to develop "four-dimensional fields". This is sort of what the design reflects now (ie we subtype AbstractField, etc).
Another possibility is to ditch that and cement Fields as 3 dimensional and less, and commit the FieldTimeSeries abstraction to look like a 1D vector of 3D fields.
It seems like a subtle distinction, but is has some important consequences. For example, what should
first(fts::FieldTimeSeries)
return? If FieldTimeSeries is 4D then this is either parent(fts)[1, 1, 1, 1] or fts.data[1, 1, 1 ,1]. But if FieldTimeSeries is 1D this is fts[1] --- the first Field. I think it's nice to have first(fts) and last(fts) return fields --- we use stuff like that a lot, but right now we are forced to write stuff like
Nt =length(fts.times)
fts[Nt]
kind of annoying.
Right now the API is hybrid; ie we have getindex(fts, i)andgetindex(fts, i, j, k, n). But we use the "vector" abstraction more than the "4D field mode" a lot more I think.
One downside is that this might preclude defining a ∂t abstract operation.
I don't think this impacts support for reductions, but I have to think about that.
The text was updated successfully, but these errors were encountered:
This really depends where we want to take this abstraction.
One possibility is to develop "four-dimensional fields". This is sort of what the design reflects now (ie we subtype
AbstractField
, etc).Another possibility is to ditch that and cement
Fields
as 3 dimensional and less, and commit theFieldTimeSeries
abstraction to look like a 1D vector of 3D fields.It seems like a subtle distinction, but is has some important consequences. For example, what should
return? If
FieldTimeSeries
is 4D then this is eitherparent(fts)[1, 1, 1, 1]
orfts.data[1, 1, 1 ,1]
. But ifFieldTimeSeries
is 1D this isfts[1]
--- the first Field. I think it's nice to havefirst(fts)
andlast(fts)
return fields --- we use stuff like that a lot, but right now we are forced to write stuff likekind of annoying.
Right now the API is hybrid; ie we have
getindex(fts, i)
andgetindex(fts, i, j, k, n)
. But we use the "vector" abstraction more than the "4D field mode" a lot more I think.One downside is that this might preclude defining a
∂t
abstract operation.I don't think this impacts support for reductions, but I have to think about that.
The text was updated successfully, but these errors were encountered: