Skip to content
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

[Bug] Parameters with scalar field written as vector field #118

Open
lang-m opened this issue Nov 23, 2022 · 0 comments
Open

[Bug] Parameters with scalar field written as vector field #118

lang-m opened this issue Nov 23, 2022 · 0 comments

Comments

@lang-m
Copy link
Member

lang-m commented Nov 23, 2022

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant