Skip to content
Open

LSF #102

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions BCCFe.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#number of materials
material:num-materials=1

#properties for material 1
material[1]:material-name=Fe
material[1]:atomic-spin-moment=2.86 !muB
material[1]:damping-constant=0.1
#material[1]:uniaxial-anisotropy-constant=-1.552e-23
material[1]:lsf-second-order-coefficient=-7.78421e-20
material[1]:lsf-fourth-order-coefficient=3.04207e-20
material[1]:lsf-sixth-order-coefficient=9.64078e-21
material[1]:unit-cell-category=1
#material[1]:exchange-matrix[1]=3.583616e-20
material[1]:exchange-matrix[1]=3e-21
#material[1]:uniaxial-anisotropy-constant=0

#properties for material 2
#material[2]:material-name=Pt
#material[2]:lsf-second-order-coefficient=4.60446e-21
#material[2]:lsf-fourth-order-coefficient=0
#material[2]:lsf-sixth-order-coefficient=0
#material[2]:atomic-spin-moment=0.36 !muB
#material[2]:damping-constant=0.1
#material[2]:uniaxial-anisotropy-constant=2.2832e-22
#material[2]:unit-cell-category=2
#material[2]:exchange-matrix[1]=8.64576e-21
#material[2]:non-magnetic=remove
19 changes: 0 additions & 19 deletions Co.mat

This file was deleted.

56 changes: 56 additions & 0 deletions L10FePt.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#number of materials
material:num-materials=2

#properties for material 1
material[1]:material-name=Fe
material[1]:material-element=Fe
material[1]:atomic-spin-moment=2.86 !muB
material[1]:damping-constant=0.1
material[1]:uniaxial-anisotropy-constant=-1.552e-23
material[1]:unit-cell-category=1
material[1]:lsf-second-order-coefficient=-7.91306e-20
material[1]:lsf-fourth-order-coefficient=3.03004e-20
material[1]:lsf-sixth-order-coefficient=1.14331e-20
material[1]:exchange-matrix[1]=5.8e-21,5.8e-21,5.8e-21
material[1]:exchange-matrix[2]=1e-21,1e-21,1e-21
#material[1]:exchange-matrix[1]=3e-21
#material[1]:uniaxial-anisotropy-constant=0
material[1]:minimum-height=0.0
material[1]:maximum-height=1.0


#properties for material 2
material[2]:material-name=Pt
material[2]:material-element=Pt
material[2]:lsf-second-order-coefficient=4.5512e-21
material[2]:lsf-fourth-order-coefficient=0
material[2]:lsf-sixth-order-coefficient=0
material[2]:atomic-spin-moment=0.36 !muB
material[2]:damping-constant=0.1
material[2]:uniaxial-anisotropy-constant=2.2832e-22
material[2]:unit-cell-category=2
material[2]:exchange-matrix[1]=1e-21,1e-21,1e-21
material[2]:exchange-matrix[2]=8.64576e-23,8.64576e-23,8.64576e-23
#material[2]:non-magnetic=remove
material[2]:minimum-height=0.0
material[2]:maximum-height=1.0


#original lsf coeffs
#material[1]:lsf-second-order-coefficient=-7.05579e-20
#material[1]:lsf-fourth-order-coefficient=2.40874e-20
#material[1]:lsf-sixth-order-coefficient=8.1087e-21

#material[2]:lsf-second-order-coefficient=4.60446e-21
#material[2]:lsf-fourth-order-coefficient=0
#material[2]:lsf-sixth-order-coefficient=0


#adjusted lsf coeffs
#material[1]:lsf-second-order-coefficient=-7.91306e-20
#material[1]:lsf-fourth-order-coefficient=3.03004e-20
#material[1]:lsf-sixth-order-coefficient=1.14331e-20

#material[2]:lsf-second-order-coefficient=4.5512e-21
#material[2]:lsf-fourth-order-coefficient=0
#material[2]:lsf-sixth-order-coefficient=0
90 changes: 90 additions & 0 deletions L10FePt.ucf
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#unit cell size
3.861 3.861 3.788
#unit cell vectors
1.0 0.0 0.0
0.0 1.0 0.0
0.0 0.0 1.0
#atoms number of atoms, number of materials; id cx cy cz mat cat hcat
4 2
0 0.0 0.0 0.0 0 0 0
1 0.5 0.5 0.0 0 0 0
2 0.5 0.0 0.5 1 1 1
3 0.0 0.5 0.5 1 1 1
#num. interactions type
76 isotropic
0 0 1 0 0 0 2.61696e-21
1 0 1 -1 0 0 2.61696e-21
2 0 1 -1 -1 0 2.61696e-21
3 0 1 0 -1 0 2.61696e-21
4 0 1 0 0 1 9.4176e-22
5 0 1 -1 0 1 9.4176e-22
6 0 1 -1 -1 1 9.4176e-22
7 0 1 0 -1 1 9.4176e-22
8 0 1 0 0 -1 9.4176e-22
9 0 1 -1 0 -1 9.4176e-22
10 0 1 -1 -1 -1 9.4176e-22
11 0 1 0 -1 -1 9.4176e-22
12 1 0 0 0 0 2.61696e-21
13 1 0 1 0 0 2.61696e-21
14 1 0 1 1 0 2.61696e-21
15 1 0 0 1 0 2.61696e-21
16 1 0 0 0 1 9.4176e-22
17 1 0 1 0 1 9.4176e-22
18 1 0 1 1 1 9.4176e-22
19 1 0 0 1 1 9.4176e-22
20 1 0 0 0 -1 9.4176e-22
21 1 0 1 0 -1 9.4176e-22
22 1 0 1 1 -1 9.4176e-22
23 1 0 0 1 -1 9.4176e-22
24 0 0 1 0 0 2.18448e-21
25 0 0 -1 0 0 2.18448e-21
26 0 0 0 1 0 2.18448e-21
27 0 0 0 -1 0 2.18448e-21
28 0 0 0 0 1 2.8192e-22
29 0 0 0 0 -1 2.8192e-22
30 0 2 0 0 0 1.06656e-21
31 0 2 -1 0 0 1.06656e-21
32 0 2 0 0 -1 1.06656e-21
33 0 2 -1 0 -1 1.06656e-21
34 2 0 0 0 0 1.06656e-21
35 2 0 1 0 0 1.06656e-21
36 2 0 1 0 1 1.06656e-21
37 2 0 0 0 1 1.06656e-21
38 0 3 0 0 0 1.06656e-21
39 0 3 0 -1 0 1.06656e-21
40 0 3 0 0 -1 1.06656e-21
41 0 3 0 -1 -1 1.06656e-21
42 3 0 0 0 0 1.06656e-21
43 3 0 0 1 0 1.06656e-21
44 3 0 0 0 1 1.06656e-21
45 3 0 0 1 1 1.06656e-21
46 1 2 0 0 0 1.06656e-21
47 1 2 0 1 0 1.06656e-21
48 1 2 0 0 -1 1.06656e-21
49 1 2 0 1 -1 1.06656e-21
50 2 1 0 0 0 1.06656e-21
51 2 1 0 -1 0 1.06656e-21
52 2 1 0 0 1 1.06656e-21
53 2 1 0 -1 1 1.06656e-21
54 1 3 0 0 0 1.06656e-21
55 1 3 1 0 0 1.06656e-21
56 1 3 0 0 -1 1.06656e-21
57 1 3 1 0 -1 1.06656e-21
58 3 1 0 0 0 1.06656e-21
59 3 1 -1 0 0 1.06656e-21
60 3 1 0 0 1 1.06656e-21
61 3 1 -1 0 1 1.06656e-21
62 2 3 0 0 0 2.832e-23
63 2 3 1 0 0 2.832e-23
64 2 3 1 -1 0 2.832e-23
65 2 3 0 -1 0 2.832e-23
66 3 2 0 0 0 2.832e-23
67 3 2 -1 0 0 2.832e-23
68 3 2 -1 1 0 2.832e-23
69 3 2 0 1 0 2.832e-23
70 0 0 -1 0 0 2.18448e-21
71 0 0 1 0 0 2.18448e-21
72 0 0 0 -1 0 2.18448e-21
73 0 0 0 1 0 2.18448e-21
74 0 0 0 0 -1 2.8192e-22
75 0 0 0 0 1 2.8192e-22
28 changes: 28 additions & 0 deletions Pt.mat
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#number of materials
material:num-materials=1

#properties for material 1
#material[1]:material-name=Fe
#material[1]:atomic-spin-moment=2.86 !muB
#material[1]:damping-constant=0.1
#material[1]:uniaxial-anisotropy-constant=-1.552e-23
#material[1]:lsf-second-order-coefficient=-7.78421e-20
#material[1]:lsf-fourth-order-coefficient=3.04207e-20
#material[1]:lsf-sixth-order-coefficient=9.64078e-21
#material[1]:unit-cell-category=1
#material[1]:exchange-matrix[1]=3.583616e-20
#material[1]:exchange-matrix[1]=3e-21
#material[1]:uniaxial-anisotropy-constant=0

#properties for material 2
material[1]:material-name=Pt
material[1]:lsf-second-order-coefficient=4.5512e-21
material[1]:lsf-fourth-order-coefficient=0
material[1]:lsf-sixth-order-coefficient=0
material[1]:atomic-spin-moment=0.36 !muB
material[1]:damping-constant=0.1
#material[1]:uniaxial-anisotropy-constant=2.2832e-22
#material[2]:unit-cell-category=2
#material[1]:exchange-matrix[1]=2.832e-23
#material[1]:exchange-matrix[1]=3e-21
#material[2]:non-magnetic=remove
39 changes: 39 additions & 0 deletions hdr/LSF.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#ifndef LSF_H_
#define LSF_H_
/// Header file for LLG namespace
namespace LSF_arrays{

//==========================================================
// Namespace to store persistant LSF integration arrays
//==========================================================

extern std::vector <double> x_lsf_array;
extern std::vector <double> y_lsf_array;
extern std::vector <double> z_lsf_array;

extern std::vector <double> x_euler_array;
extern std::vector <double> y_euler_array;
extern std::vector <double> z_euler_array;

extern std::vector <double> x_heun_array;
extern std::vector <double> y_heun_array;
extern std::vector <double> z_heun_array;

extern std::vector <double> x_spin_storage_array;
extern std::vector <double> y_spin_storage_array;
extern std::vector <double> z_spin_storage_array;

extern std::vector <double> x_initial_spin_array;
extern std::vector <double> y_initial_spin_array;
extern std::vector <double> z_initial_spin_array;

extern bool LSF_set;

extern std::vector <double> mod_S;

extern std::vector <double> tx;
extern std::vector <double> ty;
extern std::vector <double> tz;

}
#endif /*LSF_H_*/
16 changes: 16 additions & 0 deletions hdr/lsf_mc.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Program headers
#ifndef LSF_MC_H_
#define LSF_MC_H_

namespace montecarlo{

// Declare spin vectors
extern std::vector<double> mod_S;

extern bool mc_set;

extern void mcinit();

}
#endif /*LSF_MC_H_*/

13 changes: 10 additions & 3 deletions hdr/montecarlo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ namespace montecarlo{
bool match_material_parameter(std::string const word, std::string const value, std::string const unit, int const line, int const super_index, const int sub_index);

//---------------------------------------------------------------------------
// Function to perform one monte carlo, constrained monte carlo, or hybrid
// cmc-mc step, respectively
// Function to perform one monte carlo, constrained monte carlo, hybrid
// cmc-mc or lsf-mc step respectively
//---------------------------------------------------------------------------
void mc_step(std::vector<double> &x_spin_array, std::vector<double> &y_spin_array, std::vector<double> &z_spin_array, int num_atoms, std::vector<int> &type_array);
int cmc_step();
int cmc_mc_step();
void cmc_mc_step_mask();
void mc_step_parallel(std::vector<double> &x_spin_array, std::vector<double> &y_spin_array, std::vector<double> &z_spin_array, std::vector<int> &type_array);

int lsf_mc_step();
void lsf_mc_step_parallel(std::vector<double> &x_spin_array, std::vector<double> &y_spin_array, std::vector<double> &z_spin_array, std::vector<int> &type_array);

//---------------------------------------------------------------------------
// Provide access to CMCinit and CMCMCinit for cmc_anisotropy and
// hybrid_cmc programs respectively
Expand All @@ -58,13 +60,16 @@ namespace montecarlo{
void CMCMCinit();
void mc_parallel_init(std::vector<double> &x, std::vector<double> &y, std::vector<double> &z,
double min_dim[3], double max_dim[3]);
void lsf_mc_parallel_init(std::vector<double> &x, std::vector<double> &y, std::vector<double> &z,
double min_dim[3], double max_dim[3]);

void initialise_masked_cmc_mc(const int num_sets, // number of sets of constrained and unconstrained atoms
const std::vector<int>& mask, // unique ID for N sets of atoms with different constraints
const std::vector<bool>& constrained, // flag to indicate if atom set with mask index is constrained
const std::vector<double>& constraints); // list of 2N vectors listing constraint angles theta and phi

extern bool mc_parallel_initialized;
extern bool lsf_mc_parallel_initialized;

//---------------------------------------------------------------------------
// Function to perform monte carlo preconditioning
Expand Down Expand Up @@ -150,6 +155,8 @@ namespace montecarlo{

} //end of cmc namespace

extern bool mc_set;

} // end of montecarlo namespace

#endif //MONTECARLO_H_
Loading