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

Feature ddi fix lattice constant #495

Merged

Conversation

MSallermann
Copy link
Member

DDI:

  • added second mu_s scaling to DDI gradient -> is now correctly calculated as the force experienced by the spins (before it was the effective field)
  • the distance between spins is now correctly scaled with the lattice constant
  • made the DDI unit test more general (mu_s != 1, lattice_constant != 1 and non-normalized bravais-vectors)

Geometry (maybe discuss if this makes sense):

  • geometry->cell_atoms is now not longer scaled with the lattice_constant in the constructor of the geometry class.
    This makes the behaviour of the bravais vectors and basis vectors more uniform. This only changes how a distance is calculated within the code and nothing for the user!
    Before it was:
    dist = lattice_constant * ( da * bravais_vector[0] + ... ) + cell_atoms[i]
    now it is:
    dist = lattice_constant * ( da * bravais_vector[0] + ... + cell_atoms[i] )

Other:

  • fixed a small error in the calculation of the topological charge where the position of the first basis atom was calculated wrongly (would not have mattered 99.9% of the time because it should always lie at the lattice site)

M. Sallermann added 4 commits January 25, 2019 13:12
- Added lattice constant scaling of bravais_vectors back to FFT_Dipole and Gradient_Direct
- added a lattice_constant of 2.77 instead of 1.0
- Fixed DDI Gradients by addin mu_s scaling
@codecov
Copy link

codecov bot commented Feb 21, 2019

Codecov Report

Merging #495 into develop will decrease coverage by 0.07%.
The diff coverage is 72.09%.

@@             Coverage Diff             @@
##           develop     #495      +/-   ##
===========================================
- Coverage    51.51%   51.43%   -0.08%     
===========================================
  Files           82       82              
  Lines         9473     9454      -19     
===========================================
- Hits          4880     4863      -17     
+ Misses        4593     4591       -2

@coveralls
Copy link

coveralls commented Feb 21, 2019

Coverage Status

Coverage decreased (-0.1%) to 84.454% when pulling e8d408b on MSallermann:feature_ddi_fix_lattice_constant into d06f4af on spirit-code:develop.

MSallermann added 5 commits March 19, 2019 14:29
- fixed a typo that caused compiling errors in cuda version
- so that it is no longer scaled by the lattice constant
- therefore changed DDI calculation and generate positions
- use arbitrary not normalized bravais vectors
- cu_write_fft_spin_input had a typo in its arguments
@MSallermann MSallermann force-pushed the feature_ddi_fix_lattice_constant branch from 371b3fd to d8db09c Compare March 19, 2019 13:35
The cell_atoms and bravais_vectors are now both in units of the lattice_constant, meaning that several calculations had to be updated appropriately.
The cell_atoms are now relative to the Bravais vectors, making it easier to re-generate a Geometry when changing parameters through the API.
Where it makes sense, the relative positions were replaced by the absolute positions in order to avoid potential confusion.
Also removed the quite redundant Geometry_Get_Translation_Vectors function.
Also made whitespace changes in all edited files.
@GPMueller
Copy link
Member

Please test the CUDA version once more after my changes and let me know if everything works as expected.

GPMueller and others added 3 commits March 19, 2019 22:44
The orthogonality between bravais vectors was not checked correctly.
    - test_physics provides more information
    - changed timestep in solvers.cfg to 1e-3
- for the triangulation of the basis cell + next translations the corners of the parallelogram are now stretched outward from the center
- avoids cases where the basis atoms lie on the boundary of the convex hull
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

Successfully merging this pull request may close these issues.

3 participants