Changes in src/config.cpp [36166d:35b698]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/config.cpp
r36166d r35b698 19 19 #include "info.hpp" 20 20 #include "lists.hpp" 21 #include "verbose.hpp"22 21 #include "log.hpp" 23 22 #include "molecule.hpp" 23 #include "memoryallocator.hpp" 24 24 #include "molecule.hpp" 25 25 #include "periodentafel.hpp" 26 26 #include "ThermoStatContainer.hpp" 27 27 #include "World.hpp" 28 #include "Matrix.hpp"29 #include "Box.hpp"30 28 31 29 /************************************* Functions for class config ***************************/ … … 681 679 // Unit cell and magnetic field 682 680 ParseForParameter(verbose,FileBuffer, "BoxLength", 0, 3, 3, lower_trigrid, BoxLength, 1, critical); /* Lattice->RealBasis */ 683 double * c ell_size = new double[6];681 double * const cell_size = World::getInstance().getDomain(); 684 682 cell_size[0] = BoxLength[0]; 685 683 cell_size[1] = BoxLength[3]; … … 688 686 cell_size[4] = BoxLength[7]; 689 687 cell_size[5] = BoxLength[8]; 690 World::getInstance().setDomain(cell_size);691 delete cell_size;692 688 //if (1) fprintf(stderr,"\n"); 693 689 … … 887 883 888 884 ParseForParameter(verbose,file, "BoxLength", 0, 3, 3, lower_trigrid, BoxLength, 1, critical); /* Lattice->RealBasis */ 889 double * c ell_size = new double[6];885 double * const cell_size = World::getInstance().getDomain(); 890 886 cell_size[0] = BoxLength[0]; 891 887 cell_size[1] = BoxLength[3]; … … 894 890 cell_size[4] = BoxLength[7]; 895 891 cell_size[5] = BoxLength[8]; 896 World::getInstance().setDomain(cell_size);897 delete[] cell_size;898 892 if (1) fprintf(stderr,"\n"); 899 893 config::DoPerturbation = 0; … … 1033 1027 // bring MaxTypes up to date 1034 1028 mol->CountElements(); 1035 const Matrix &domain = World::getInstance().getDomain().getM();1029 const double * const cell_size = World::getInstance().getDomain(); 1036 1030 ofstream * const output = new ofstream(filename, ios::out); 1037 1031 if (output != NULL) { … … 1104 1098 *output << endl; 1105 1099 *output << "BoxLength\t\t\t# (Length of a unit cell)" << endl; 1106 *output << domain.at(0,0)<< "\t" << endl;1107 *output << domain.at(1,0) << "\t" << domain.at(1,1)<< "\t" << endl;1108 *output << domain.at(2,0) << "\t" << domain.at(2,1) << "\t" << domain.at(2,2)<< "\t" << endl;1100 *output << cell_size[0] << "\t" << endl; 1101 *output << cell_size[1] << "\t" << cell_size[2] << "\t" << endl; 1102 *output << cell_size[3] << "\t" << cell_size[4] << "\t" << cell_size[5] << "\t" << endl; 1109 1103 // FIXME 1110 1104 *output << endl;
Note:
See TracChangeset
for help on using the changeset viewer.