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