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

Develop update #642

Draft
wants to merge 208 commits into
base: develop
Choose a base branch
from
Draft

Develop update #642

wants to merge 208 commits into from

Conversation

Puerling
Copy link

@Puerling Puerling commented Sep 6, 2024

Overview

  • Rework of the backend to follow the STL algorithms more closely.
  • Elimination of most code doubling that was necessary for the CUDA version. This now gets handled directly by the backend with a module that is inspired by the thrust implementation.
  • More extensible Hamiltonian by structuring the code in terms of interactions.
  • Unified interface for calculating local interactions based on the STL backend (closes Core: enable parallelisation over atoms instead of basis cells #420).
  • General TableParser to parse more tables than just the pair interaction one: cac53c6
  • General Biaxial Anisotropy interaction extending the uniaxial and cubic anisotropy terms: c171861
  • Updated packaged libraries for ImGUI build.
  • Reduced coupling of the IO to the Spin_System and Spin_System_Chain implementation.

Puerling and others added 30 commits September 11, 2023 16:49
… parameters were already reported as Warnings
cast vector size immediately to `unsigned int` which is the type needed
for the launch configuration. There is still an additional conversion to
CUDAs `dim3` vector-type, but its initializer uses `unsigned int`.
This improves readability of the function signature of the constructor.
The long term goal is modularizing the Hamiltonian in terms of all of
the energy contributions in order to reuse parts for the spin-lattice
Hamiltonian.
this structure is commonly used in the Hamiltonian classes to describe
the different energy contributions. I gave it a name to make these
occurrences more readable.
combine the implementations in `engine/Hamiltonian_Heisenberg.cpp` and
`engine/Hamiltonian_Heisenberg.cu` into one, avoiding the code
duplication that was present before. This commit should not change any
existing behaviour.
The `Hamiltonian_Heisenberg.cpp` file needs to know about the CUDA kernels
through a CUDA header.

I overlooked that the doubling of pairs also applies to the CUDA build,
not just to the OpenMP build.
…test_solvers to the end, because it takes the longest
The step is needed to prepare for modularity. The new interaction files
should all be created inside the `engine/interaction` subdirectory.
Lift the splitting of the Hamiltonian class into a `Hamiltonian_Heisenberg`
and a `Hamiltonian_Gaussian` in favor of a unified `Hamiltonian` class.
The `Gaussian` part will be reintroduced as an Interaction class that is
stored inside the new `Hamiltonian` class if needed. The code for this
implementation is already present, but the `Gaussian` functionality is
neutered in this commit.
Introduces the data structure for storing interactions. It is of type:
`std::vector<std::unique_ptr<Engine::Interaction::ABC>>`
This vector marks the `Hamiltonian` as the owner of the interactions and
necessitates the creation of constructors according to the rule of five.

For setting and getting the interactions a set of templated member
functions is used which can also be used at run time given the name of
the interaction.

The Gaussian interaction is not usable with this commit.
Reintroduces the effects of `Interaction::Gaussian` on the Hamiltonian.
The current mechanism isn't yet optimal, but designed to interoperate
with the old one. Later on the lookups should be replaced by loops and
the shape of `energy_contributions_per_spin` is fully determined by the
`interactions` vector.
note: There is currently no test for the Anisotropy with a Hamiltonian
that is initialized from a config file.
…olated_Energy_Contributions()

This simplification is enabled by the modularization of the Hamiltonian.
It makes the public accessors for the component indices obsolete.
@Puerling Puerling force-pushed the develop branch 2 times, most recently from 8257fa2 to f996f91 Compare September 6, 2024 17:35
Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.66%. Comparing base (1a57fc3) to head (3bd2690).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #642      +/-   ##
===========================================
+ Coverage    48.64%   52.66%   +4.02%     
===========================================
  Files           77      111      +34     
  Lines        13041    12960      -81     
===========================================
+ Hits          6344     6826     +482     
+ Misses        6697     6134     -563     

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

Successfully merging this pull request may close these issues.

2 participants