Skip to content

Commit

Permalink
Merge 1f21636 into b549587
Browse files Browse the repository at this point in the history
  • Loading branch information
GPMueller committed Jan 21, 2021
2 parents b549587 + 1f21636 commit 6a41088
Show file tree
Hide file tree
Showing 38 changed files with 5,129 additions and 4,744 deletions.
40 changes: 21 additions & 19 deletions core/CMake/Spirit_Version.hpp.in
@@ -1,33 +1,35 @@
#pragma once
#ifndef UTILITY_VERSION_H
#define UTILITY_VERSION_H
#ifndef SPIRIT_UTILITY_VERSION_HPP
#define SPIRIT_UTILITY_VERSION_HPP

#include <string>

namespace Utility
{
const int version_major = ${META_VERSION_MAJOR};
const int version_minor = ${META_VERSION_MINOR};
const int version_patch = ${META_VERSION_PATCH};

const std::string version = "${META_VERSION}";
const std::string version_revision = "${META_VERSION_REVISION}";
const std::string version_full = "${META_VERSION} (${META_VERSION_REVISION})";
const int version_major = ${META_VERSION_MAJOR};
const int version_minor = ${META_VERSION_MINOR};
const int version_patch = ${META_VERSION_PATCH};

const std::string compiler = "${META_COMPILER}";
const std::string compiler_version = "${META_COMPILER_VERSION}";
const std::string compiler_full = "${META_COMPILER_FULL}";
const std::string version = "${META_VERSION}";
const std::string version_revision = "${META_VERSION_REVISION}";
const std::string version_full = "${META_VERSION} (${META_VERSION_REVISION})";

const std::string scalartype = "${SPIRIT_SCALAR_TYPE}";
const std::string compiler = "${META_COMPILER}";
const std::string compiler_version = "${META_COMPILER_VERSION}";
const std::string compiler_full = "${META_COMPILER_FULL}";

const std::string pinning = "${SPIRIT_ENABLE_PINNING}";
const std::string defects = "${SPIRIT_ENABLE_DEFECTS}";
const std::string scalartype = "${SPIRIT_SCALAR_TYPE}";

const std::string cuda = "${SPIRIT_USE_CUDA}";
const std::string openmp = "${SPIRIT_USE_OPENMP}";
const std::string threads = "${SPIRIT_USE_THREADS}";
const std::string pinning = "${SPIRIT_ENABLE_PINNING}";
const std::string defects = "${SPIRIT_ENABLE_DEFECTS}";

const std::string fftw = "${SPIRIT_USE_FFTW}";
}
const std::string cuda = "${SPIRIT_USE_CUDA}";
const std::string openmp = "${SPIRIT_USE_OPENMP}";
const std::string threads = "${SPIRIT_USE_THREADS}";

const std::string fftw = "${SPIRIT_USE_FFTW}";

} // namespace Utility

#endif
12 changes: 6 additions & 6 deletions core/include/data/Geometry.hpp
Expand Up @@ -12,17 +12,17 @@ namespace Data
{

// TODO: replace that type with Eigen!
typedef struct
struct vector3_t
{
double x, y, z;
} vector3_t;
typedef struct
};
struct vector2_t
{
double x, y;
} vector2_t;
};

typedef std::array<int, 4> tetrahedron_t;
typedef std::array<int, 3> triangle_t;
using tetrahedron_t = std::array<int, 4>;
using triangle_t = std::array<int, 3>;

enum class BravaisLatticeType
{
Expand Down
3 changes: 2 additions & 1 deletion core/include/data/Parameters_Method.hpp
Expand Up @@ -40,5 +40,6 @@ struct Parameters_Method
IO::VF_FileFormat output_vf_filetype = IO::VF_FileFormat::OVF_TEXT;
};

}
} // namespace Data

#endif
45 changes: 24 additions & 21 deletions core/include/data/Parameters_Method_EMA.hpp
@@ -1,30 +1,33 @@
#pragma once
#ifndef DATA_PARAMETERS_METHOD_EMA_H
#define DATA_PARAMETERS_METHOD_EMA_H
#ifndef SPIRIT_DATA_PARAMETERS_METHOD_EMA_HPP
#define SPIRIT_DATA_PARAMETERS_METHOD_EMA_HPP

#include <data/Parameters_Method.hpp>

namespace Data
{
// EMA_Parameters contains all EMA information about the spin system
struct Parameters_Method_EMA : public Parameters_Method
{
int n_modes = 10;
int n_mode_follow = 0;
scalar frequency = 0.02;
scalar amplitude = 1;
bool snapshot = false;

// ----------------- Output --------------
// Energy output settings
bool output_energy_step = false;
bool output_energy_archive = false;
bool output_energy_spin_resolved = false;
bool output_energy_divide_by_nspins = true;
// EMA_Parameters contains all EMA information about the spin system
struct Parameters_Method_EMA : Parameters_Method
{
int n_modes = 10;
int n_mode_follow = 0;
scalar frequency = 0.02;
scalar amplitude = 1;
bool snapshot = false;

// ----------------- Output --------------
// Energy output settings
bool output_energy_step = false;
bool output_energy_archive = false;
bool output_energy_spin_resolved = false;
bool output_energy_divide_by_nspins = true;

// Spin configurations output settings
bool output_configuration_step = false;
bool output_configuration_archive = false;
};

} // namespace Data

// Spin configurations output settings
bool output_configuration_step = false;
bool output_configuration_archive = false;
};
}
#endif
71 changes: 37 additions & 34 deletions core/include/data/Parameters_Method_GNEB.hpp
@@ -1,43 +1,46 @@
#pragma once
#ifndef DATA_PARAMETERS_METHOD_GNEB_H
#define DATA_PARAMETERS_METHOD_GNEB_H
#ifndef SPIRIT_DATA_PARAMETERS_METHOD_GNEB_HPP
#define SPIRIT_DATA_PARAMETERS_METHOD_GNEB_HPP

#include <data/Parameters_Method_Solver.hpp>

#include <vector>
#include <random>
#include <vector>

namespace Data
{
// LLG_Parameters contains all LLG information about the spin system
struct Parameters_Method_GNEB : public Parameters_Method_Solver
{
// Strength of springs between images
scalar spring_constant = 1;

// The ratio of energy to reaction coordinate in the spring force
// 0 is Rx only, 1 is E only
scalar spring_force_ratio = 0;

// With which minimum norm per spin the path shortening force should be applied
scalar path_shortening_constant = 0;

// Number of Energy interpolations between Images
int n_E_interpolations = 10;

// Temperature [K]
scalar temperature = 0;
// Seed for RNG
int rng_seed = 2006;
// Mersenne twister PRNG
std::mt19937 prng = std::mt19937(rng_seed);

// ----------------- Output --------------
bool output_energies_step = false;
bool output_energies_divide_by_nspins = true;
bool output_energies_add_readability_lines = false;
bool output_energies_interpolated = false;
bool output_chain_step = false;
};
}

// LLG_Parameters contains all LLG information about the spin system
struct Parameters_Method_GNEB : Parameters_Method_Solver
{
// Strength of springs between images
scalar spring_constant = 1;

// The ratio of energy to reaction coordinate in the spring force
// 0 is Rx only, 1 is E only
scalar spring_force_ratio = 0;

// With which minimum norm per spin the path shortening force should be applied
scalar path_shortening_constant = 0;

// Number of Energy interpolations between Images
int n_E_interpolations = 10;

// Temperature [K]
scalar temperature = 0;
// Seed for RNG
int rng_seed = 2006;
// Mersenne twister PRNG
std::mt19937 prng = std::mt19937( rng_seed );

// ----------------- Output --------------
bool output_energies_step = false;
bool output_energies_divide_by_nspins = true;
bool output_energies_add_readability_lines = false;
bool output_energies_interpolated = false;
bool output_chain_step = false;
};

} // namespace Data

#endif
93 changes: 48 additions & 45 deletions core/include/data/Parameters_Method_LLG.hpp
@@ -1,54 +1,57 @@
#pragma once
#ifndef DATA_PARAMETERS_METHOD_LLG_H
#define DATA_PARAMETERS_METHOD_LLG_H
#ifndef SPIRIT_DATA_PARAMETERS_METHOD_LLG_HPP
#define SPIRIT_DATA_PARAMETERS_METHOD_LLG_HPP

#include <engine/Vectormath_Defines.hpp>
#include <data/Parameters_Method_Solver.hpp>
#include <engine/Vectormath_Defines.hpp>

#include <vector>
#include <random>
#include <vector>

namespace Data
{
// LLG_Parameters contains all LLG information about the spin system
struct Parameters_Method_LLG : public Parameters_Method_Solver
{
// Damping
scalar damping = 0.3;
scalar beta = 0;

// Seed for RNG
int rng_seed = 2006;
// Mersenne twister PRNG
std::mt19937 prng = std::mt19937(rng_seed);

// Temperature [K]
scalar temperature = 0;
// Temperature gradient [K]
Vector3 temperature_gradient_direction = Vector3{1, 0, 0};
scalar temperature_gradient_inclination = 0;

// - true: use gradient approximation for STT
// - false: use pinned monolayer approximation with current in z-direction
bool stt_use_gradient = true;
// Spin transfer torque parameter (prop to injected current density)
scalar stt_magnitude = 0;
// Spin current polarisation normal vector
Vector3 stt_polarisation_normal = Vector3{1, 0, 0};

// Do direct minimization instead of dynamics
bool direct_minimization = false;

// ----------------- Output --------------
// Energy output settings
bool output_energy_step = false;
bool output_energy_archive = false;
bool output_energy_spin_resolved = false;
bool output_energy_divide_by_nspins = true;
bool output_energy_add_readability_lines = false;
// Spin configurations output settings
bool output_configuration_step = false;
bool output_configuration_archive = false;
};
}

// LLG_Parameters contains all LLG information about the spin system
struct Parameters_Method_LLG : Parameters_Method_Solver
{
// Damping
scalar damping = 0.3;
scalar beta = 0;

// Seed for RNG
int rng_seed = 2006;
// Mersenne twister PRNG
std::mt19937 prng = std::mt19937( rng_seed );

// Temperature [K]
scalar temperature = 0;
// Temperature gradient [K]
Vector3 temperature_gradient_direction = Vector3{ 1, 0, 0 };
scalar temperature_gradient_inclination = 0;

// - true: use gradient approximation for STT
// - false: use pinned monolayer approximation with current in z-direction
bool stt_use_gradient = true;
// Spin transfer torque parameter (prop to injected current density)
scalar stt_magnitude = 0;
// Spin current polarisation normal vector
Vector3 stt_polarisation_normal = Vector3{ 1, 0, 0 };

// Do direct minimization instead of dynamics
bool direct_minimization = false;

// ----------------- Output --------------
// Energy output settings
bool output_energy_step = false;
bool output_energy_archive = false;
bool output_energy_spin_resolved = false;
bool output_energy_divide_by_nspins = true;
bool output_energy_add_readability_lines = false;
// Spin configurations output settings
bool output_configuration_step = false;
bool output_configuration_archive = false;
};

} // namespace Data

#endif

0 comments on commit 6a41088

Please sign in to comment.