NanoMagMC  v0.2
Monte Carlo Simulation Software for Atomistic Models of Magnetic Materials
shape.hpp
Go to the documentation of this file.
1 #ifndef _SHAPE
2 #define _SHAPE
3 
4 #include <vector>
5 
6 namespace particle { namespace shape
7 {
11  class shape_type
12  {
13  public:
28  virtual bool check(std::vector<int> Is, int l_size){return false;}
32  virtual double get_r0(){return 0;}
36  virtual double get_beta(){return 0;}
40  virtual double get_a(){return 0;}
44  virtual double get_b(){return 0;}
48  virtual double get_c(){return 0;}
49  };
50 
54  class shape_2d: public shape_type
55  {
56  public:
71  virtual bool check(std::vector<int> Is, int l_size){return true;}
72  };
73 
77  class shape_3d: public shape_type
78  {
79  public:
94  virtual bool check(std::vector<int> Is, int l_size){return true;}
95  };
96 
100  class weibull: public shape_type
101  {
102  private:
103  double r0;
104  double beta;
105  double a[3];
106  public:
110  weibull(){r0 = 0; beta = 0; a[0] = 1; a[1] = 1; a[2] = 1;}
114  weibull(shape_type& other);
122  weibull(double rin, double bin);
132  weibull(double betain, double ain, double bin, double cin);
143  bool check(std::vector<int> Is, int l_size);
147  weibull& operator=(shape_type& other);
151  double get_r0(){return r0;}
155  double get_beta(){return beta;}
159  double get_a(){return a[0];}
163  double get_b(){return a[1];}
167  double get_c(){return a[2];}
168  };
169 
173  class square: public shape_2d
174  {
175  public:
179  square(){}
184  };
185 
189  class cube: public shape_3d
190  {
191  public:
195  cube(){}
199  ~cube(){}
200  };
201 
205  class sh_cluster: public shape_3d
206  {
207  public:
216  };
217 }}
218 
219 #endif
Cubic paritcle.
Definition: shape.hpp:189
virtual bool check(std::vector< int > Is, int l_size)
Check whether a certain position falls within the particle.
Definition: shape.hpp:94
~shape_type()
Default destructor.
Definition: shape.hpp:21
double get_c()
Returns the z-axis radius of a weibull particle.
Definition: shape.hpp:167
shape_type()
Default constructor.
Definition: shape.hpp:17
virtual double get_beta()
Returns the disorder parameter of a weibull particle.
Definition: shape.hpp:36
Definition: field_type.hpp:10
double get_beta()
Returns the disorder parameter of a weibull particle.
Definition: shape.hpp:155
virtual double get_r0()
Returns the characteristic size of a weibull particle.
Definition: shape.hpp:32
~shape_3d()
Default destructor.
Definition: shape.hpp:87
double get_a()
Returns the x-axis radius of a weibull particle.
Definition: shape.hpp:159
~weibull()
Default destructor.
Definition: shape.hpp:136
Weibull disordered circle/sphere particle.
Definition: shape.hpp:100
virtual double get_b()
Returns the y-axis radius of a weibull particle.
Definition: shape.hpp:44
virtual bool check(std::vector< int > Is, int l_size)
Check whether a certain position falls within the particle.
Definition: shape.hpp:71
Base class for particle shapes.
Definition: shape.hpp:11
~sh_cluster()
Default destructor.
Definition: shape.hpp:215
sh_cluster()
Default constructor.
Definition: shape.hpp:211
3D particle shapes.
Definition: shape.hpp:77
virtual bool check(std::vector< int > Is, int l_size)
Check whether a certain position falls within the particle.
Definition: shape.hpp:28
double get_r0()
Returns the characteristic size of a weibull particle.
Definition: shape.hpp:151
weibull()
Default constructor.
Definition: shape.hpp:110
~square()
Default destructor.
Definition: shape.hpp:183
cube()
Default constructor.
Definition: shape.hpp:195
Particle cluster (depreciated)
Definition: shape.hpp:205
shape_3d()
Default constructor.
Definition: shape.hpp:83
~cube()
Default destructor.
Definition: shape.hpp:199
virtual double get_a()
Returns the x-axis radius of a weibull particle.
Definition: shape.hpp:40
shape_2d()
Default constructor.
Definition: shape.hpp:60
2D particle shapes.
Definition: shape.hpp:54
square()
Default constructor.
Definition: shape.hpp:179
~shape_2d()
Default destructor.
Definition: shape.hpp:64
double get_b()
Returns the y-axis radius of a weibull particle.
Definition: shape.hpp:163
Square particle.
Definition: shape.hpp:173
virtual double get_c()
Returns the z-axis radius of a weibull particle.
Definition: shape.hpp:48