Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How best to use Vector or Matrix fields? #10

Closed
oliver-batchelor opened this issue May 23, 2022 · 1 comment
Closed

How best to use Vector or Matrix fields? #10

oliver-batchelor opened this issue May 23, 2022 · 1 comment

Comments

@oliver-batchelor
Copy link

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?

@ifsheldon
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants