Some of the energy terms (e.g. ZhangLi.u) can be defined with a scalar (dim=1) field. However, when writing the input for OOMMF the field is saved with extend_scalar=True (which repeats the single component three times). For ZhangLi.u OOMMF fails because it expects a scalar field but reads a vector field.
The relevant parts of the code:
|
if hasattr(evolver, "u"): |
|
umif, uname = oc.scripts.setup_scalar_parameter(evolver.u, "zl_u") |
|
def setup_scalar_parameter(parameter, name): |
|
if isinstance(parameter, df.Field): |
|
parameter.write(f"{name}.ovf", extend_scalar=True) |
@marijanbeg Is there any casy where we need extend_scalar=True in the input for OOMMF (because we start from a scalar field where OOMMF expects a vector field)?
Some of the energy terms (e.g.
ZhangLi.u) can be defined with a scalar (dim=1) field. However, when writing the input for OOMMF the field is saved withextend_scalar=True(which repeats the single component three times). ForZhangLi.uOOMMF fails because it expects a scalar field but reads a vector field.The relevant parts of the code:
oommfc/oommfc/scripts/evolver.py
Lines 24 to 25 in 547ece4
oommfc/oommfc/scripts/util.py
Lines 78 to 80 in 547ece4
@marijanbeg Is there any casy where we need
extend_scalar=Truein the input for OOMMF (because we start from a scalar field where OOMMF expects a vector field)?