[nmag-users] error probing H_demag outside a magnetic material

25 views
Skip to first unread message

Alessandro Scarfato

unread,
Jul 9, 2009, 9:02:08 AM7/9/09
to nmag-...@lists.soton.ac.uk
Hi,

I tried to use the function "sim.probe_H_demag_siv" to probe the demagnetization field outside a magnetic material.

I found a test example called "example_mfm" and I tried to run the included "compute_mfm.py" script, but the script exits with an error.
I interrupted the script with the nmag.ipython() command and I get the following  error when I try to probe the H demag field outside the material, while everything works if  probe the H demag field inside the material.

>> In [26]: sim.probe_H_demag_siv([-11e-09,0,11e-9])
>> ---------------------------------------------------------------------------
>> exceptions.StandardError                             Traceback (most recent call last)
>>
>> /Users/ascar/Apps/nmag/simul/example_mfm/<ipython console> 
>>
>> /Users/ascar/Apps/nmag/nmag-0.1/nsim/interface/nmag/main.py in probe_H_demag_siv(self, pos, pos_unit, epsilon)
>>    2833         log.debug("get_H_demag: pos=%s %s -> %s simulation units" % (pos,pos_unit,pos_su))
>>    2834 
>> -> 2835         h_demag_su=ocaml.linalg_machine_bem_field_strength(\
>>    2836             epsilon,self._lam,"H_demag","v_H_demag","H_demag","BEM","v_phi1b",pos_su.tolist())
>>   2837 
>> 
>> StandardError: OCaml exception 'Failure: XXX TODO: get_potential() not implemented yet for parallel linalg_machine!' (linalg_machine_bem_field_strength)

Apparently reading the online manual it should work.
Did I have to set a specific flag during compilation? or it is not fully implemented yet?

regards,
a.

Thomas Fischbacher

unread,
Jul 9, 2009, 10:37:37 AM7/9/09
to Alessandro Scarfato, nmag-...@lists.soton.ac.uk

Alessandro Scarfato wrote:

> >> StandardError: OCaml exception 'Failure: XXX TODO: get_potential()
> not implemented yet for parallel linalg_machine!'
> (linalg_machine_bem_field_strength)
>
> Apparently reading the online manual it should work.
> Did I have to set a specific flag during compilation? or it is not fully
> implemented yet?

Rather the other way round: Until recently, the underlying nsim system
supported both parallel execution and a slightly more efficient
single-processor mode (that did not do some vector copying which becomes
pointless if there is only one computational node). Some time ago, we
axed the dedicated single-processor mode in order to reduce the
complexity of the codebase (so all simulations now use parallelizable
code - single-processor or not), but as probing the demagnetisation
field in the exterior region was supported for the parallel code, we
lost that capablilty in the transition, which has to be re-implemented.

It is on our (rather: my) to-do list, but the short term fix is to
downgrade to an earlier version of the nmag package which still supports
dedicated sequential mode. Sequential mode was removed in nsim revision
5451. Hence, probe_subfield_siv() should work for the exterior region
for versions before this. What installation method did you use?

--
best regards,
Thomas Fischbacher
t.fisc...@soton.ac.uk


ak8w07

unread,
Jul 9, 2009, 10:44:18 AM7/9/09
to Alessandro Scarfato, nmag-...@lists.soton.ac.uk
Hello Alessandro,

I am afraid you can not probe the demagnetisation field outside of the
magnetic regime,
since Nmag uses an algorithm, which only computes this field within the
magnetic body.
To my knowledge there is a relatively easy way to add this
functionality, but as you
already guessed in your email, this is not implemented yet.

Regards,

Andreas

Thomas Fischbacher

unread,
Jul 9, 2009, 10:52:20 AM7/9/09
to ak8w07, Alessandro Scarfato, nmag-...@lists.soton.ac.uk

Andreas Knittel wrote:

> I am afraid you can not probe the demagnetisation field outside of the
> magnetic regime,
> since Nmag uses an algorithm, which only computes this field within the
> magnetic body.
> To my knowledge there is a relatively easy way to add this
> functionality, but as you
> already guessed in your email, this is not implemented yet.

I should mention that Andreas joined our group somewhat recently, and
only after we had thrown out the sequential code, so he is not fully
aware of the details of this situation. If you go back to this package:

http://nmag.soton.ac.uk/debian/dists/stable/unofficial/binary-i386/nsim_0.1.5282_i386.deb

...then probing the exterior field will work (but you will lose some
improvements that have been made since).

As I said, fixing this is on my to-do list.

Reply all
Reply to author
Forward
0 new messages