-
Notifications
You must be signed in to change notification settings - Fork 90
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
Implement toFieldAligned and fromFieldAligned for Vector3D #1877
Conversation
Should we also add it for Also, you can drop the |
src/field/vector3d.cxx
Outdated
Vector3D result; | ||
result.setLocation(v.getLocation()); | ||
if (not v.covariant) { | ||
result.toContravariant(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably should have an emptyFrom
and zeroFrom
for vectors, like for fields.
These are null operations for the Field2D components of Vector2D, so they just return a copy.
We found a case where we needed
toFieldAligned()
andfromFieldAligned()
for aVector3D
, so implemented them.