message: Core: updated cuda vectormath.
diff: #include <curand.h>
  #include <curand_kernel.h>
  +using namespace Utility;
  +
  // CUDA Version
  namespace Engine
  {
  @@ -237,7 +239,8 @@ namespace Engine
  /////////////////////////////////////////////////////////////////
  - void Build_Spins(vectorfield & spin_pos, const std::vector<Vector3> & basis_atoms, const std::vector<Vector3> & translation_vectors, const intfield & n_cells)
  + void Build_Spins(vectorfield & spin_pos, const std::vector<Vector3> & basis_atoms,
  + const std::vector<Vector3> & translation_vectors, const intfield & n_cells)
  {
  // Check for erronous input placing two spins on the same location
  int max_a = std::min(10, n_cells[0]);
  @@ -250,14 +253,17 @@ namespace Engine
  {
  for (int ka = -max_a; ka <= max_a; ++ka)
  {
  - for (int kb = -max_b; kb <= max_b; ++kb)
  + for (int k2 = -max_b; k2 <= max_b; ++k2)
  {
  - for (int kc = -max_c; kc <= max_c; ++kc)
  + for (int k3 = -max_c; k3 <= max_c; ++k3)
  {
  // Norm is zero if translated basis atom is at position of another basis atom
  sp = basis_atoms[i] - (basis_atoms[j]
  - + ka*translation_vectors[0] + kb*translation_vectors[1] + kc*translation_vectors[2]);
  - if ((i != j || ka != 0 || kb != 0 || kc != 0) && std::abs(sp[0]) < 1e-9 && std::abs(sp[1]) < 1e-9 && std::abs(sp[2]) < 1e-9)
  + + ka * translation_vectors[0] + k2 * translation_vectors[1] +
  + k3 * translation_vectors[2]);
  + if ( (i != j || ka != 0 || k2 != 0 || k3 != 0) &&
  + std::abs(sp[0]) < 1e-9 && std::abs(sp[1]) < 1e-9 &&
  + std::abs(sp[2]) < 1e-9 )
  {
  spirit_throw(Exception_Classifier::System_not_Initialized, Log_Level::Severe,
  "Unable to initialize Spin-System, since 2 spins occupy the same space.\nPlease check the config file!");
  @@ -277,8 +283,10 @@ namespace Engine
  for (j = 0; j < n_cells[1]; ++j) {
  for (i = 0; i < n_cells[0]; ++i) {
  for (s = 0; s < nos_basic; ++s) {
  - ispin = k*n_cells[1] * n_cells[0] * nos_basic + j*n_cells[0] * nos_basic + i*nos_basic + s;
  - build_array = i*translation_vectors[0] + j*translation_vectors[1] + k*translation_vectors[2];
  + ispin = k * n_cells[1] * n_cells[0] * nos_basic +
  + j * n_cells[0] * nos_basic + i * nos_basic + s;
  + build_array = i * translation_vectors[0] + j * translation_vectors[1] +
  + k * translation_vectors[2];
  // paste initial spin orientations across the lattice translations
  //spins[dim*nos + ispin] = spins[dim*nos + s];
  // calculate the spin positions
  @@ -288,7 +296,7 @@ namespace Engine
  }// endfor j
  }// endfor dim
  - };// end Build_Spins
  + }// end Build_Spins
  std::array<scalar, 3> Magnetization(const vectorfield & vf)
  