Ignore:
Timestamp:
Jun 9, 2016, 4:53:48 PM (9 years ago)
Author:
Frederik Heber <heber@…>
Children:
c95253
Parents:
95e8da
git-author:
Frederik Heber <heber@…> (05/26/16 14:33:32)
git-committer:
Frederik Heber <heber@…> (06/09/16 16:53:48)
Message:

Extracted getDomainGrid from ExportGraph_ToJobs as static fct.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/Exporters/ExportGraph_ToJobs.cpp

    r95e8da r94dacd  
    6868{}
    6969
     70SamplingGridProperties ExportGraph_ToJobs::getDomainGrid(
     71    const int _level)
     72{
     73  double domain_begin[NDIM] = { 0., 0., 0. };
     74  RealSpaceMatrix M = World::getInstance().getDomain().getM();
     75  M *= 1./AtomicLengthToAngstroem;  // scale to atomic length units
     76  const double size = std::max( std::max(M.at(0,0), M.at(1,1)), M.at(2,2));
     77  double domain_end[NDIM] = { size, size, size };
     78  SamplingGridProperties grid(domain_begin, domain_end, _level);
     79  return grid;
     80}
     81
    7082bool ExportGraph_ToJobs::operator()()
    7183{
     
    7789
    7890  // gather info about the domain
    79   double begin[NDIM] = { 0., 0., 0. };
    80   RealSpaceMatrix M = World::getInstance().getDomain().getM();
    81   M *= 1./AtomicLengthToAngstroem;  // scale to atomic length units
    82   const double size = std::max( std::max(M.at(0,0), M.at(1,1)), M.at(2,2));
    83   double end[NDIM] = { size, size, size };
     91  const SamplingGridProperties grid(getDomainGrid(level));
    8492  const ParserTypes jobtype =
    8593      FormatParserStorage::getInstance().getTypeFromName("mpqc");
     
    99107      FragmentJob::ptr testJob(
    100108#ifdef HAVE_JOBMARKET
    101           new MPQCJob(JobId::IllegalJob, output.str(), begin, end, level)
     109          new MPQCJob(JobId::IllegalJob, output.str(), grid.begin, grid.end, level)
    102110#else
    103111          new MPQCCommandJob(output.str(), JobId::IllegalJob)
Note: See TracChangeset for help on using the changeset viewer.