NanoMagMC  v0.2
Monte Carlo Simulation Software for Atomistic Models of Magnetic Materials
state.hpp
Go to the documentation of this file.
1 #ifndef _STATE
2 #define _STATE
3 
4 #include "param_read.hpp"
5 #include "field_type.hpp"
6 #include "thermodynamics.hpp"
7 #include "shape.hpp"
8 
9 #include <string.h>
10 #include <vector>
11 
12 class state
13 {
14 private:
15  double beta, k_b;
16  xt::xtensorf<double, xt::xshape<4>> H;
17  int num, snum, s4num, h_ind, edgesize;
18  char s_code;
22 
23 public:
24  state(){}
25  state(stateOptions opt);
26  state(const state& other);
27  ~state();
29  void copy_points(const state& other);
30  void init_points(stateOptions opt);
31  void equil(int iter);
32  std::vector<double> magnetisation();
33  std::vector<double> submag(int subnumber);
34  std::vector<double> sub4mag();
35  double energy();
36  std::vector<double> tcharge();
37  int num_spins();
38  int get_size() {return edgesize;}
39  int sub_num(int subnumber);
40  int sub4_num();
41  void init_lattice();
42  void change_temp(double T);
43  void change_field(double Hin);
44  state& operator=(const state& other);
45  void print_latt();
46  void ptf(std::string fname, std::string arrname);
47  void add_to_av(particle::field::field_type& other_field);
48  void change_v1(int protocol, double v1);
49  void change_v2(int protocol, double v2);
50  void send_latt_data(int dest_rank);
51  void recv_latt_data(int src_rank);
52 };
53 
54 #endif
void change_v1(int protocol, double v1)
state()
Definition: state.hpp:24
std::vector< double > tcharge()
particle::field::field_type get_field()
Definition: state.hpp:28
std::vector< double > sub4mag()
int sub4_num()
int sub_num(int subnumber)
Base class for fields.
Definition: field_type.hpp:14
void init_lattice()
Base class for particle shapes.
Definition: shape.hpp:11
void change_field(double Hin)
int get_size()
Definition: state.hpp:38
void recv_latt_data(int src_rank)
void send_latt_data(int dest_rank)
double energy()
void change_temp(double T)
void init_points(stateOptions opt)
void equil(int iter)
void add_to_av(particle::field::field_type &other_field)
Definition: state.hpp:12
void print_latt()
Definition: param_read.hpp:6
void change_v2(int protocol, double v2)
void ptf(std::string fname, std::string arrname)
Definition: thermodynamics.hpp:10
std::vector< double > submag(int subnumber)
std::vector< double > magnetisation()
void copy_points(const state &other)
state & operator=(const state &other)
int num_spins()