Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/config.cpp

    r49e1ae rb34306  
    1919#include "molecule.hpp"
    2020#include "periodentafel.hpp"
     21#include "World.hpp"
    2122
    2223/******************************** Functions for class ConfigFileBuffer **********************/
     
    499500//        case 'j': // BoxLength
    500501//          Log() << Verbose(0) << "enter lower triadiagonalo form of basis matrix" << endl << endl;
     502//          double * const cell_size = World::get()->cell_size;
    501503//          for (int i=0;i<6;i++) {
    502504//            Log() << Verbose(0) << "Cell size" << i << ": ";
    503 //            cin >> mol->cell_size[i];
     505//            cin >> cell_size[i];
    504506//          }
    505507//          break;
     
    689691  ParseForParameter(verbose,FileBuffer,"MaxTypes", 0, 1, 1, int_type, &(MaxTypes), 1, critical);
    690692  if (MaxTypes == 0) {
    691     eLog() << Verbose(0) << "There are no atoms according to MaxTypes in this config file." << endl;
    692     performCriticalExit();
     693    eLog() << Verbose(1) << "There are no atoms according to MaxTypes in this config file." << endl;
     694    //performCriticalExit();
    693695  } else {
    694696    // prescan number of ions per type
     
    965967  // Unit cell and magnetic field
    966968  ParseForParameter(verbose,FileBuffer, "BoxLength", 0, 3, 3, lower_trigrid, BoxLength, 1, critical); /* Lattice->RealBasis */
    967   mol->cell_size[0] = BoxLength[0];
    968   mol->cell_size[1] = BoxLength[3];
    969   mol->cell_size[2] = BoxLength[4];
    970   mol->cell_size[3] = BoxLength[6];
    971   mol->cell_size[4] = BoxLength[7];
    972   mol->cell_size[5] = BoxLength[8];
     969  double * const cell_size = World::get()->cell_size;
     970  cell_size[0] = BoxLength[0];
     971  cell_size[1] = BoxLength[3];
     972  cell_size[2] = BoxLength[4];
     973  cell_size[3] = BoxLength[6];
     974  cell_size[4] = BoxLength[7];
     975  cell_size[5] = BoxLength[8];
    973976  //if (1) fprintf(stderr,"\n");
    974977
     
    11691172
    11701173  ParseForParameter(verbose,file, "BoxLength", 0, 3, 3, lower_trigrid, BoxLength, 1, critical); /* Lattice->RealBasis */
    1171   mol->cell_size[0] = BoxLength[0];
    1172   mol->cell_size[1] = BoxLength[3];
    1173   mol->cell_size[2] = BoxLength[4];
    1174   mol->cell_size[3] = BoxLength[6];
    1175   mol->cell_size[4] = BoxLength[7];
    1176   mol->cell_size[5] = BoxLength[8];
     1174  double * const cell_size = World::get()->cell_size;
     1175  cell_size[0] = BoxLength[0];
     1176  cell_size[1] = BoxLength[3];
     1177  cell_size[2] = BoxLength[4];
     1178  cell_size[3] = BoxLength[6];
     1179  cell_size[4] = BoxLength[7];
     1180  cell_size[5] = BoxLength[8];
    11771181  if (1) fprintf(stderr,"\n");
    11781182  config::DoPerturbation = 0;
     
    13121316  // bring MaxTypes up to date
    13131317  mol->CountElements();
     1318  const double * const cell_size = World::get()->cell_size;
    13141319  ofstream * const output = new ofstream(filename, ios::out);
    13151320  if (output != NULL) {
     
    13821387    *output << endl;
    13831388    *output << "BoxLength\t\t\t# (Length of a unit cell)" << endl;
    1384     *output << mol->cell_size[0] << "\t" << endl;
    1385     *output << mol->cell_size[1] << "\t" << mol->cell_size[2] << "\t" << endl;
    1386     *output << mol->cell_size[3] << "\t" << mol->cell_size[4] << "\t" << mol->cell_size[5] << "\t" << endl;
     1389    *output << cell_size[0] << "\t" << endl;
     1390    *output << cell_size[1] << "\t" << cell_size[2] << "\t" << endl;
     1391    *output << cell_size[3] << "\t" << cell_size[4] << "\t" << cell_size[5] << "\t" << endl;
    13871392    // FIXME
    13881393    *output << endl;
Note: See TracChangeset for help on using the changeset viewer.