Dear Ilya,
thank you for picking up on this. The information was indeed inconsistent (to say the least).
I am a bit confused by your last statement that "If you use nmeshmirror without the macro geometry (or if the image cells have gaps), then there is no periodic exchange.”
Let me start by saying that the whole statement above was wrong (or at least based on memories of a previous design of the macro geometry interface). So it is best not to try to understand what I was trying to say ;). I will address your queries below as well as possible, though.
So what will happen if one makes new mesh from ordinary one using nmeshmirror command (say: nmeshmirror orig.nmesh 1e-6 1e-6 1,0,-1 periodic.nmesh) and starts simulation with no image cells (periodic_bc=None) ? Will this new mesh (periodic.nmesh) be treated as ordinary one (i.e. information about periodic nodes will be ignored)?
Interesting question. I would have thought that it should ignore the periodic nodes, but a quick test I ran just this morning suggests that the periodic points in the mesh are sufficient to create a periodic exchange interaction. I didn’t have time to explore further, but the one dataset I had to look at suggests that the above is true. So we learn: if we don’t want periodic exchange, it is best not to have periodic points in the mesh. (If you want to use nmeshmirror for some reason and don’t like the periodic points, you can manually edit the text-based mesh file and remove the last data set which encodes the periodic points.)
If others have more information on this, please do report it.
In my opinion if so then it contradicts this post
https://groups.google.com/forum/#!topic/nmag-users/E2pOBk1wtF4 . For example this statement "Therefore, the actual shape of the mesh or spacing of the periodic copies does not matter in the way the exchange energy is computed. " should be wrong should not it? Furthermore Shin-liang Chin suggests that "If you space the primary cell by L + dL with dL > 0, you can circumvent the problem: exchange will work as before..." .
Thanks for checking this. I was wrong: it is not the closeness of the points that matters. (This was the case in an earlier design.)
I have put some examples together for those that are deeply interested (at
https://bitbucket.org/fangohr/nmag-example-macrogeometry), with a summary document most easily viewed at
http://nbviewer.ipython.org/urls/bitbucket.org/fangohr/nmag-example-macrogeometry/raw/tip/manual-example/summary.ipynb
I’ll believe this addresses your questions below. I also insert brief comments below:
Is there a way to take periodicity of exchange interaction into account without regard for demagnetization field produced by sample shape (i. e. using no image cells)?
If you keep lattice_points = [] (i.e. empty list), or include only [0.0, 0.0, 0.0.], then the demag field of the primary simulation cell is computed (but no image cells). Both lead to the same behaviour, as the [0,0,0] entry is added automatically if the list is empty.
If you do not want to consider the demag field, you need to add the do_demag=False switch in the simulation constructor (see example
https://bitbucket.org/fangohr/nmag-example-macrogeometry/src/tip/manual-example/probe_demag-no-demag.py).
Finally what will happen if one writes script like this:
lattice_points = []
lattice_points.append([0.0,0.0,0.0])
pbc = nmag.SetLatticePoints(vectorlist=lattice_points, scalefactor=SI(1e-9,'m'))
sim = nmag.Simulation(periodic_bc=pbc.structure)
Here periodic_bc != None but there are no image cells (if primary cell is centred).
As you say, periodic exchange and ‘normal’ demag.
The new case study at
https://bitbucket.org/fangohr/nmag-example-macrogeometry may still leave some questions open - if people want to contribute with further examples and documentation, this would of course be welcome (ideally via pull requests).
Best wishes,
Hans
Sincerely,
Ilya Dubitskiy
Department of Nuclear Physics Methods of Research
Faculty of Physics
Saint-Petersburg State University
Address: Petrodvorets, Ulyanovskaya str., 1,
Saint-Petersburg, Russia, 198504
site:
http://nsp.phys.spbu.ru/index.php/en/
2015-04-04 23:12 GMT+03:00 Fangohr H. <
H.FA...@soton.ac.uk<mailto:
H.FA...@soton.ac.uk>>:
Dear Shengda,