Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/config.cpp

    r36166d r35b698  
    1919#include "info.hpp"
    2020#include "lists.hpp"
    21 #include "verbose.hpp"
    2221#include "log.hpp"
    2322#include "molecule.hpp"
     23#include "memoryallocator.hpp"
    2424#include "molecule.hpp"
    2525#include "periodentafel.hpp"
    2626#include "ThermoStatContainer.hpp"
    2727#include "World.hpp"
    28 #include "Matrix.hpp"
    29 #include "Box.hpp"
    3028
    3129/************************************* Functions for class config ***************************/
     
    681679  // Unit cell and magnetic field
    682680  ParseForParameter(verbose,FileBuffer, "BoxLength", 0, 3, 3, lower_trigrid, BoxLength, 1, critical); /* Lattice->RealBasis */
    683   double * cell_size = new double[6];
     681  double * const cell_size = World::getInstance().getDomain();
    684682  cell_size[0] = BoxLength[0];
    685683  cell_size[1] = BoxLength[3];
     
    688686  cell_size[4] = BoxLength[7];
    689687  cell_size[5] = BoxLength[8];
    690   World::getInstance().setDomain(cell_size);
    691   delete cell_size;
    692688  //if (1) fprintf(stderr,"\n");
    693689
     
    887883
    888884  ParseForParameter(verbose,file, "BoxLength", 0, 3, 3, lower_trigrid, BoxLength, 1, critical); /* Lattice->RealBasis */
    889   double * cell_size = new double[6];
     885  double * const cell_size = World::getInstance().getDomain();
    890886  cell_size[0] = BoxLength[0];
    891887  cell_size[1] = BoxLength[3];
     
    894890  cell_size[4] = BoxLength[7];
    895891  cell_size[5] = BoxLength[8];
    896   World::getInstance().setDomain(cell_size);
    897   delete[] cell_size;
    898892  if (1) fprintf(stderr,"\n");
    899893  config::DoPerturbation = 0;
     
    10331027  // bring MaxTypes up to date
    10341028  mol->CountElements();
    1035   const Matrix &domain = World::getInstance().getDomain().getM();
     1029  const double * const cell_size = World::getInstance().getDomain();
    10361030  ofstream * const output = new ofstream(filename, ios::out);
    10371031  if (output != NULL) {
     
    11041098    *output << endl;
    11051099    *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;
    11091103    // FIXME
    11101104    *output << endl;
Note: See TracChangeset for help on using the changeset viewer.