⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 material.h

📁 用monte carlo方法计算化学反应的代码Oxygen Ion Ordering
💻 H
字号:
//this defines the structure of our compound#ifndef MATERIAL_H#define MATERIAL_H#include <iostream>#include <vector> #include "printvector.h"#define top 0#define bottom 1#define left 2#define right 3#define front 4#define back 5class Material{ public:  Material();  ~Material();  Material& operator=(const Material &m);  void Init(vector< vector< vector <Material> > >  &lat,	    double &num_O);  int * get_address(const int &position);  double * get_address_E(const int &position);  void set_address(int *p,int pos);  void set_address(double *p,int pos);  void print_nodes();  void get_nodes(vector<int> &n);  void get_delta_E(vector<double> &n);  double get_delta_E(const int &n);  int  get_node(int node_num);  void set_nodes(const vector<int> &n);  void set_node(const int &n, const int &node_num);  void set_delta_E(const int &node, const double &value);  void set_xyz_val(const int &i,const int &j,const int &k);  double calc_E(const int &node,	      vector< vector< vector< Material> > > &lat);  void get_neighboors_of_node(const int &node, vector<int> &v,			      vector< vector< vector< Material> > > &lat);  void increment_crystal_E(const double &E);  double get_super_node_E(); private:  vector<int> pos_vec;  vector<double> delta_E;  int *p_pos_vec[3], endpoint;  double *p_delta_E[3], E_endpoint;  int x,y,z;  int size;  double E,J1;//this is the crystal Energy  };#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -