ubermag / mumax3c

mumax3 calculator.
https://ubermag.github.io
BSD 3-Clause "New" or "Revised" License
22 stars 7 forks source link

Add feature to use more than one external field #49

Closed swapneelap closed 2 years ago

swapneelap commented 2 years ago

(Linux) Tests are failing because of the updated STT latex rep in micromagnetic model. I'll fix it soon.

samjrholt commented 2 years ago

@swapneelap is there a reason we cannot define two vector fields and one has to be a df.Field?

samjrholt commented 2 years ago

If this is a restriction of Mumax3 maybe we should automatically convert a vector to df.Field object in this case otherwise the user will end up having to do it each time.

swapneelap commented 2 years ago

@samjrholt This is another "special" feature of Mumax3. As much as I understand, one can define as many Bext.Add() but only one Bext =. Since the Add() method only takes slices (or for us ovf files), the additional Bext must be df.Field.

samjrholt commented 2 years ago

@samjrholt This is another "special" feature of Mumax3. As much as I understand, one can define as many Bext.Add() but only one Bext =. Since the Add() method only takes slices (or for us ovf files), the additional Bext must be df.Field.

I understand, in this case shall we deal with this behind the scenes and convert it to an ovf behind the sense rather than asking the user to do it? Should be relatively straight forward, I'm happy to make the edit if you like?

swapneelap commented 2 years ago

Sounds good to me. You can add the changes 👍.

samjrholt commented 2 years ago

@swapneelap I've added the functionality so please have a quick look and check that it works for you.

swapneelap commented 2 years ago

@swapneelap I've added the functionality so please have a quick look and check that it works for you.

Looks good to me. I will need to add a few tests.

samjrholt commented 2 years ago

@swapneelap what happens to the table if there are multiple Zeeman terms? Are do they have separate energy quantities or all just included in one?

swapneelap commented 2 years ago

Everything is included in one column.

lang-m commented 2 years ago

I think for OOMMF multiple Zeeman fields would have independent columns is the table (based on the unique field names). I think we should have the same here. We could probably use the term names as mm.energy (the Container subclass) will (should) ensure that term names are unique.

swapneelap commented 2 years ago

@lang-m I agree with you. The problem is I have not figured out a way in Mumax3 to output the individual energy contribution of the different Zeeman fields. I am inclined to believe that it is not possible. (atleast not in a simple way)

lang-m commented 2 years ago

@swapneelap Quite possible that they internally just collect all individual Zeeman terms and combine them into an effective external field and hence have only one "effective" output.