Field normalization in fieldOp
DeSanz opened this issue · 1 comments
Hello,
I am trying to use fieldOP (customfield.go) to get a unit vector in the direction of some of the fields in the system (like B_exch or B_demag) but there seems to be no way of doing it using the available methods in customfield.go (Add, Dot, Div, etc...). Does this functionality exists somewhere already that I have missed?
If not, could you help me with adding some function to allow this? e.g. the sqrt() of a float64 so that I can do something like B_exch_norm = Div(B_exch, Sqrt(Dot(B_exch, B_exch))). I have looked through the code to search where I could add this but I don't see a clear way.
Many thanks in advance
Dedalo
This functionality did not exist until now (see commit 31c4714).
Thank you for the suggestion!