Ignore:
Timestamp:
Apr 23, 2021, 8:31:23 PM (5 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
d40189
Parents:
26062f
git-author:
Frederik Heber <frederik.heber@…> (04/24/19 21:30:35)
git-committer:
Frederik Heber <frederik.heber@…> (04/23/21 20:31:23)
Message:

FIX: AnalyseFragmentationResultsAction ignored prefix mostly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp

    r26062f rcbbb6a  
    115115 */
    116116void printReceivedCycleResults(
    117     const FragmentationShortRangeResults &results)
     117    const FragmentationShortRangeResults &results,
     118    const std::string &_prefix)
    118119{
    119120  typedef boost::mpl::remove<
     
    126127  LOG(2, "DEBUG: Energy table with cycles is \n" << energyresult);
    127128  std::string filename;
    128   filename += FRAGMENTPREFIX + std::string("_CycleEnergy.dat");
     129  filename += _prefix + std::string("_CycleEnergy.dat");
    129130  writeToFile(filename, energyresult);
    130131}
     
    135136 */
    136137void printReceivedShortResultsPerIndex(
    137     const FragmentationShortRangeResults &results)
     138    const FragmentationShortRangeResults &results,
     139    const std::string &_prefix)
    138140{
    139141  // print tables  per keyset(without eigenvalues, they go extra)
     
    147149  LOG(2, "DEBUG: Indexed Energy table is \n" << energyresult);
    148150  std::string filename;
    149   filename += FRAGMENTPREFIX + std::string("_IndexedEnergy.dat");
     151  filename += _prefix + std::string("_IndexedEnergy.dat");
    150152  writeToFile(filename, energyresult);
    151153}
     
    156158 */
    157159void printReceivedShortResults(
    158     const FragmentationShortRangeResults &results)
     160    const FragmentationShortRangeResults &results,
     161    const std::string &_prefix)
    159162{
    160163  // print tables (without eigenvalues, they go extra)
     
    169172    LOG(1, "DEBUG: Energy table is \n" << energyresult);
    170173    std::string filename;
    171     filename += FRAGMENTPREFIX + std::string("_Energy.dat");
     174    filename += _prefix + std::string("_Energy.dat");
    172175    writeToFile(filename, energyresult);
    173176  }
     
    182185    LOG(2, "DEBUG: Eigenvalue table is \n" << eigenvalueresult);
    183186    std::string filename;
    184     filename += FRAGMENTPREFIX + std::string("_Eigenvalues.dat");
     187    filename += _prefix + std::string("_Eigenvalues.dat");
    185188    writeToFile(filename, eigenvalueresult);
    186189  }
     
    195198    LOG(2, "DEBUG: Eigenhistogram table is \n" << eigenhistogramresult);
    196199    std::string filename;
    197     filename += FRAGMENTPREFIX + std::string("_Eigenhistogram.dat");
     200    filename += _prefix + std::string("_Eigenhistogram.dat");
    198201    writeToFile(filename, eigenhistogramresult);
    199202  }
     
    208211    LOG(2, "DEBUG: Eigenvalue table is \n" << eigenvalueresult);
    209212    std::string filename;
    210     filename += FRAGMENTPREFIX + std::string("_Eigenvalues.dat");
     213    filename += _prefix + std::string("_Eigenvalues.dat");
    211214    writeToFile(filename, eigenvalueresult);
    212215  }
     
    218221    LOG(2, "DEBUG: Force table is \n" << forceresult);
    219222    std::string filename;
    220     filename += FRAGMENTPREFIX + std::string("_Forces.dat");
     223    filename += _prefix + std::string("_Forces.dat");
    221224    writeToFile(filename, forceresult);
    222225  }
     
    233236    LOG(2, "DEBUG: Times table is \n" << timesresult);
    234237    std::string filename;
    235     filename += FRAGMENTPREFIX + std::string("_Times.dat");
     238    filename += _prefix + std::string("_Times.dat");
    236239    writeToFile(filename, timesresult);
    237240  }
     
    245248 */
    246249void printReceivedFullResults(
    247     const FragmentationLongRangeResults &results)
     250    const FragmentationLongRangeResults &results,
     251    const std::string &_prefix)
    248252{
    249253  // print tables per keyset(without grids, they go extra)
     
    255259    LOG(2, "DEBUG: VMG table is \n" << gridresult);
    256260    std::string filename;
    257     filename += FRAGMENTPREFIX + std::string("_VMGEnergy.dat");
     261    filename += _prefix + std::string("_VMGEnergy.dat");
    258262    writeToFile(filename, gridresult);
    259263  }
     
    265269    LOG(2, "DEBUG: Force table is \n" << forceresult);
    266270    std::string filename;
    267     filename += FRAGMENTPREFIX + std::string("_VMGForces.dat");
     271    filename += _prefix + std::string("_VMGForces.dat");
    268272    writeToFile(filename, forceresult);
    269273  }
     
    275279    LOG(2, "DEBUG: LongRange table is \n" << gridresult);
    276280    std::string filename;
    277     filename += FRAGMENTPREFIX + std::string("_LongRangeEnergy.dat");
     281    filename += _prefix + std::string("_LongRangeEnergy.dat");
    278282    writeToFile(filename, gridresult);
    279283  }
     
    285289    LOG(2, "DEBUG: ForcesLongRange table is \n" << forceresult);
    286290    std::string filename;
    287     filename += FRAGMENTPREFIX + std::string("_LongRangeForces.dat");
     291    filename += _prefix + std::string("_LongRangeForces.dat");
    288292    writeToFile(filename, forceresult);
    289293  }
     
    511515    const KeySetsContainer &cycles,
    512516    const FragmentationShortRangeResults::edges_per_fragment_t &edges_per_fragment,
    513     const FragmentationShortRangeResults &shortrangeresults)
     517    const FragmentationShortRangeResults &shortrangeresults,
     518    const std::string &_prefix)
    514519{
    515520  // copy the shortrangeresults such that private MaxLevel is set in
     
    582587        localresults.Result_Force_fused.back();
    583588  }
    584   printReceivedCycleResults(cycleresults);
     589  printReceivedCycleResults(cycleresults, _prefix);
    585590}
    586591
     
    594599    const IndexedVectors::vector_t &forcevector = iter->second;
    595600    ASSERT( forcevector.size() == NDIM,
    596         "printReceivedShortResults() - obtained force vector has incorrect dimension.");
     601        "setForces() - obtained force vector has incorrect dimension.");
    597602    // note that mpqc calculates a gradient, hence force pointing into opposite direction
    598603    // we have to mind different units here: MPQC has a_o, while we may have angstroem
     
    633638      shortrangedata, keysets, forcekeysets, edges_per_fragment, ValueMask);
    634639  shortrangeresults(shortrangedata);
    635   printReceivedShortResults(shortrangeresults);
    636   printReceivedShortResultsPerIndex(shortrangeresults);
     640  printReceivedShortResults(shortrangeresults, params.prefix.get());
     641  printReceivedShortResultsPerIndex(shortrangeresults, params.prefix.get());
    637642  // add summed results to container
    638643  container.addShortRangeSummedResults(shortrangeresults.getSummedShortRangeResults());
     
    678683        cycles,
    679684        edges_per_fragment,
    680         shortrangeresults);
     685        shortrangeresults,
     686        params.prefix.get());
    681687  }
    682688
     
    751757          zero_globalgrid,
    752758          implicit_indices);
    753       printReceivedFullResults(longrangeresults);
     759      printReceivedFullResults(longrangeresults, params.prefix.get());
    754760    }
    755761
Note: See TracChangeset for help on using the changeset viewer.