ubermag / oommfc

OOMMF calculator.
http://ubermag.github.io
BSD 3-Clause "New" or "Revised" License
48 stars 17 forks source link

Spatially uniform DMI and subregions #54

Closed lang-m closed 3 years ago

lang-m commented 3 years ago

Specifying the value of D for DMI with a real number produces an error when subregions are defined for the mesh.

Example:

lang-m commented 3 years ago

As a workaround specifying D with a dictionary, e.g. mm.DMI(D={'default': ..., 'fixed1': ...}, ...) is working.

At least one of the subregions must be specified explicitly in the dictionary. D={'default': ...} produces this error: Error thrown from inside "Oxs_ExtCreateAndRegister" --- Incomplete or incorrect initialization --- Oxs_Ext initialization error in construction of Oxs_DMI_T:dmi --- Oxs_Ext ERROR in object Oxs_DMI_T:dmi: Empty parameter list for key "D"

lang-m commented 3 years ago

The region "main" used for real D: https://github.com/ubermag/oommfc/blob/7265ef839073d9aaf3ff103fcd1cfff489b986c4/oommfc/scripts/energy.py#L189-L195 is only specified when the mesh has no subregions: https://github.com/ubermag/oommfc/blob/7265ef839073d9aaf3ff103fcd1cfff489b986c4/oommfc/scripts/mesh.py#L21-L25