Verified Commit f2254436 authored by Tobias WEBER's avatar Tobias WEBER
Browse files

cleanups

parent cf126442
...@@ -14,7 +14,9 @@ strip_bins = 1 ...@@ -14,7 +14,9 @@ strip_bins = 1
# setup # setup
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
ifneq ($(mingw_build), 1) ifneq ($(mingw_build), 1)
CXX = g++ ifeq ("$(CXX)", "")
CXX = g++
endif
SYSINCS = -I/usr/local/include \ SYSINCS = -I/usr/local/include \
-I/usr/include/lapacke -I/usr/local/opt/lapack/include \ -I/usr/include/lapacke -I/usr/local/opt/lapack/include \
......
This is the code for the Takin MnSi plugin module and its helper tools, This is the code for the Takin MnSi plugin module and its helper tools.
by T. Weber, 2016-2020. It calculates the dispersion and the dynamical It calculates the dispersion and the dynamical structure factor for the
structure factor for the helimagnetic, the field-polarised, and the helimagnetic, the field-polarised, and the skyrmion phase of MnSi.
skyrmion phase of MnSi.
The ext/ directory contains the source code of the external libraries on The ext/ directory contains the source code of the external libraries on
which this code depends. which this code depends.
......
...@@ -26,6 +26,9 @@ template<class t_real = double> constexpr t_real g_kh_A_29K = 0.039; ...@@ -26,6 +26,9 @@ template<class t_real = double> constexpr t_real g_kh_A_29K = 0.039;
template<class t_real = double> constexpr t_real g_kh_rlu_29K = g_kh_A_29K<t_real> / (t_real(2.)*g_pi<t_real> / g_a<t_real>); template<class t_real = double> constexpr t_real g_kh_rlu_29K = g_kh_A_29K<t_real> / (t_real(2.)*g_pi<t_real> / g_a<t_real>);
/**
* helix pitch in inverse angstroms
*/
template<class t_real = double> template<class t_real = double>
constexpr t_real g_kh_A(t_real T) constexpr t_real g_kh_A(t_real T)
{ {
...@@ -42,6 +45,9 @@ constexpr t_real g_kh_A(t_real T) ...@@ -42,6 +45,9 @@ constexpr t_real g_kh_A(t_real T)
} }
/**
* helix pitch in rlu
*/
template<class t_real = double> template<class t_real = double>
constexpr t_real g_kh_rlu(t_real T) constexpr t_real g_kh_rlu(t_real T)
{ {
...@@ -49,6 +55,37 @@ constexpr t_real g_kh_rlu(t_real T) ...@@ -49,6 +55,37 @@ constexpr t_real g_kh_rlu(t_real T)
} }
/**
* get upper critical field
* - theoretical values calculated with "heli.dat_Bc2.gpl" script generated by heliphase.cpp
* - experimental values from A. Bauer, 2015
*/
template<class t_real=double>
t_real get_bc2(t_real T, bool use_theo_units=1)
{
if(use_theo_units)
{
const t_real amp = 1.62567; // scaling
const t_real ex = 0.46491; // critical exponent
if(T >= 0.) return 0.;
return amp * std::pow(-T, ex);
}
else
{
t_real p1[] = { 5.63617388e-01, 5.52570801e-02, 2.20736277e+01, 7.39287474e-02, -5.32767610e-04 };
t_real p2[] = { 0.07075453, -0.08217821, 30.00000534, 9.19469462, 0.38951838 };
const t_real *p = (T<=20 ? p1 : p2);
t_real Tc = p[2];
t_real tau = (Tc-T) / Tc;
if(T >= Tc) return 0.;
return p[0]*std::pow(tau, p[1]) * (1. + p[3]*std::pow(tau, p[4]));
}
}
#define G_CHI g_chi<t_real> #define G_CHI g_chi<t_real>
#define G_HOC g_hoc<t_real> #define G_HOC g_hoc<t_real>
#define G_G g_g<t_real> #define G_G g_g<t_real>
......
...@@ -172,38 +172,6 @@ const typename t_arr::value_type& get_virt_comp(const t_arr& arr, int ORGSIZE, i ...@@ -172,38 +172,6 @@ const typename t_arr::value_type& get_virt_comp(const t_arr& arr, int ORGSIZE, i
} }
/**
* get upper critical field
* - theoretical values calculated with "heli.dat_Bc2.gpl" script generated by heliphase.cpp
* - experimental values from A. Bauer, 2015
*/
template<class t_real=double>
t_real get_bc2(t_real T, bool use_theo_units=1)
{
if(use_theo_units)
{
const t_real amp = 1.62567; // scaling
const t_real ex = 0.46491; // critical exponent
if(T >= 0.) return 0.;
return amp * std::pow(-T, ex);
}
else
{
t_real p1[] = { 5.63617388e-01, 5.52570801e-02, 2.20736277e+01, 7.39287474e-02, -5.32767610e-04 };
t_real p2[] = { 0.07075453, -0.08217821, 30.00000534, 9.19469462, 0.38951838 };
const t_real *p = (T<=20 ? p1 : p2);
t_real Tc = p[2];
t_real tau = (Tc-T) / Tc;
if(T >= Tc) return 0.;
return p[0]*std::pow(tau, p[1]) * (1. + p[3]*std::pow(tau, p[4]));
}
}
/** /**
* get chiral basis vectors * get chiral basis vectors
*/ */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment