ifsheldon/stannum

How best to use Vector or Matrix fields?

Closed this issue · 1 comments

Is this something worth adding? Happy to give it a go.

I see this is kind of supported for complex types. Is it preferable to just convert scalar fields to vector fields (via indexing) in the kernel?
I don't see any easy way of converting a n,m,3 field to a n,m vector3 field but I might be missing something?

Sorry for late reply. And yes, this can be helpful but I didn't do it because I didn't need this exact feature in my dogfooding.

However, for Tube, I have FieldManager, which you can use to do even more complicated optimizations.

If you want, you can write a simple and public subclass of FieldManager that creates vector and matrix fields. And I think it can be helpful.

As for Tin and EmptyTin, they are intended to be a thinnest layer and the field they received is created and managed by the programmer, so it's the responsibility of the programmer to decide how fields are created.