Closed ufsowa closed 5 years ago
It is assumed that faked atoms have type -1
Things to change are: site.cpp get_atom()
lattice.cpp check_site_belonging_to_sim_area <-- THIS is important place bool lattice :: check_site_belonging_to_region(site *A){
void lattice::sim_atoms_list_init() if(atom >= 0) - no faked atoms will be added to sim_atom_list
There is also atom_list with all atoms. We want to have that if faked atom then (1) no faked interaction at all (energy neighbours) (2) no faked atoms in neighbours (jumps) (3) no faked atom in sim_atom_listand atom_list.
void lattice :: sites_zone_init(int typ, double rmin, double rmax, site atom_list, vector <site> &atom_neigh)
void lattice :: jumps_shell_init(){
When reading structure from file, first read all atoms then do initialization of neighs. It is ok.
Currently the lattice is set up on the base of structure.in and then file is read After that simulation is initialized
Structure is initialized correctly. There is a problem with executing algorithm/energy calculation SGCMC change type to -1 and that leads to [-1] corruption.
Change needed in: unsigned int lattice :: get_atom_typ_numbers() mc.cpp void sgcmc(l new_typ=sample->get_atom_type(typ)
DIRECT fails too, No type change. There is a problem ni pot.get_energy
Fix savings to care about type < 0 Need to handle this situation in other way
Very usefull tool in case of segmentation fault: dynamic analysis http://valgrind.org/docs/manual/quick-start.html#quick-start.intro static analysis: https://stackoverflow.com/questions/3718998/fixing-segmentation-faults-in-c
Added check for types and fixed savings.
TODO:
I. Tests
(0) Fix save_Natoms to exlcude faked form file. Keep it only in global. (1) load structure from file a: pic (SGCMC) b: diff (KMC) (2) add single faked atom and check observability (3) Do simulations in 2D with faked atoms and without it
II. Remove/modify printouts for atoms <0. IN some cases should be error, in other only printouts.
All done. Remaining is: (3) Do simulations in 2D with faked atoms and without it
DONE.
SGCMC also works.
KMC under test. Done and works
Add atoms to simulate different shapes of the surfaces