X-Git-Url: http://git.treefish.org/~alex/phys/heatbath.git/blobdiff_plain/e3ebeafe796b180ecf26b7b5c8ac7281467b68db..c721fd42d0e3b23e8aa84d998bc8d97e5d8dfc2d:/sim.hpp?ds=inline diff --git a/sim.hpp b/sim.hpp new file mode 100644 index 0000000..e58c70d --- /dev/null +++ b/sim.hpp @@ -0,0 +1,46 @@ +#ifndef SIM_HPP +#define SIM_HPP + +#include + +#include "latlib/neigh.h" + +class sim : public o815::sim { +public: + struct siteconf { + int k[2][4]; + int l[2][4]; + }; + sim(o815 *_O815); + siteconf* conf; + int LSIZE4; + +private: + void _makeSweep(); + void _newParas(); + + gsl_rng* rangsl; + + neigh *nb; +}; + +sim::sim(o815 *_O815) : o815::sim( _O815, + sizeof(siteconf)* + (_O815->comargs.lsize[0]*_O815->comargs.lsize[0]*_O815->comargs.lsize[0]*_O815->comargs.lsize[1]) ) { + conf = (siteconf*)confMem; + LSIZE4 = _O815->comargs.lsize[0] * _O815->comargs.lsize[0] * _O815->comargs.lsize[0] * _O815->comargs.lsize[1]; + + rangsl = gsl_rng_alloc(gsl_rng_ranlxs0); + gsl_rng_set(rangsl, time(NULL)); + + nb = new neigh(4, _O815->comargs.lsize[0], _O815->comargs.lsize[0], _O815->comargs.lsize[0], _O815->comargs.lsize[1]); +} + +void sim::_makeSweep() { +} + +void sim::_newParas() { + /* reset variables */ +} + +#endif