Changeset d067d45 for src/config.cpp


Ignore:
Timestamp:
Jul 23, 2009, 1:45:24 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, Candidate_v1.7.0, Candidate_v1.7.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
51c910
Parents:
ce5ac3 (diff), 437922 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Frederik Heber <heber@…> (07/23/09 12:34:47)
git-committer:
Frederik Heber <heber@…> (07/23/09 13:45:24)
Message:

Merge branch 'MultipleMolecules'

Conflicts:

molecuilder/src/analyzer.cpp
molecuilder/src/atom.cpp
molecuilder/src/boundary.cpp
molecuilder/src/boundary.hpp
molecuilder/src/builder.cpp
molecuilder/src/config.cpp
molecuilder/src/datacreator.hpp
molecuilder/src/helpers.cpp
molecuilder/src/joiner.cpp
molecuilder/src/moleculelist.cpp
molecuilder/src/molecules.cpp
molecuilder/src/molecules.hpp
molecuilder/src/parser.cpp
molecuilder/src/parser.hpp
molecuilder/src/vector.cpp
molecuilder/src/verbose.cpp

merges:

compilation fixes:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/config.cpp

    rce5ac3 rd067d45  
    11/** \file config.cpp
    2  * 
     2 *
    33 * Function implementations for the class config.
    4  * 
     4 *
    55 */
    66
     
    6565  UseAddGramSch=1;
    6666  Seed=1;
     67
    6768  MaxOuterStep=0;
    6869  Deltat=0.01;
     
    7374  MaxPsiStep=0;
    7475  EpsWannier=1e-7;
    75  
     76
    7677  MaxMinStep=100;
    7778  RelEpsTotalEnergy=1e-7;
     
    8485  InitMaxMinStopStep=1;
    8586  InitMaxMinGapStopStep=0;
    86  
     87
    8788  //BoxLength[NDIM*NDIM];
    88  
     89
    8990  ECut=128.;
    9091  MaxLevel=5;
     
    99100  PsiMaxNoDown=0;
    100101  AddPsis=0;
    101  
     102
    102103  RCut=20.;
    103104  StructOpt=0;
     
    199200 * for each entry of the config file structure.
    200201 */
    201 void config::Edit(molecule *mol)
     202void config::Edit()
    202203{
    203204  char choice;
    204  
     205
    205206  do {
    206207    cout << Verbose(0) << "===========EDIT CONFIGURATION============================" << endl;
     
    235236    cout << Verbose(0) << " g - Relative change in kinetic energy to stop min. iteration during initial level" << endl;
    236237    cout << Verbose(0) << " h - Check stop conditions every ..th step during min. iteration during initial level" << endl;
    237     cout << Verbose(0) << " j - six lower diagonal entries of matrix, defining the unit cell" << endl;
     238//    cout << Verbose(0) << " j - six lower diagonal entries of matrix, defining the unit cell" << endl;
    238239    cout << Verbose(0) << " k - Energy cutoff of plane wave basis in Hartree" << endl;
    239240    cout << Verbose(0) << " l - Maximum number of levels in multi-level-ansatz" << endl;
     
    255256    cout << Verbose(0) << "INPUT: ";
    256257    cin >> choice;
    257    
     258
    258259    switch (choice) {
    259260        case 'A': // mainname
     
    380381          cin >> config::InitMaxMinStopStep;
    381382          break;
    382        
    383         case 'j': // BoxLength
    384           cout << Verbose(0) << "enter lower triadiagonalo form of basis matrix" << endl << endl;
    385           for (int i=0;i<6;i++) {
    386             cout << Verbose(0) << "Cell size" << i << ": ";
    387             cin >> mol->cell_size[i];
    388           }
    389           break;
    390        
     383
     384//        case 'j': // BoxLength
     385//          cout << Verbose(0) << "enter lower triadiagonalo form of basis matrix" << endl << endl;
     386//          for (int i=0;i<6;i++) {
     387//            cout << Verbose(0) << "Cell size" << i << ": ";
     388//            cin >> mol->cell_size[i];
     389//          }
     390//          break;
     391
    391392        case 'k': // ECut
    392393          cout << Verbose(0) << "Old: " << config::ECut << "\t new: ";
     
    462463 * \param *periode pointer to a periodentafel class with all elements
    463464 * \param *mol pointer to molecule containing all atoms of the molecule
    464  * \return 0 - old syntax, 1 - new syntax, -1 - unknown syntax 
     465 * \return 0 - old syntax, 1 - new syntax, -1 - unknown syntax
    465466 */
    466467int config::TestSyntax(char *filename, periodentafel *periode, molecule *mol)
     
    468469  int test;
    469470  ifstream file(filename);
    470  
     471
    471472  // search file for keyword: ProcPEGamma (new syntax)
    472473  if (ParseForParameter(1,&file,"ProcPEGamma", 0, 1, 1, int_type, &test, 1, optional)) {
     
    539540 * \param *file input file stream being the opened config file
    540541 * \param *periode pointer to a periodentafel class with all elements
    541  * \param *mol pointer to molecule containing all atoms of the molecule 
     542 * \param *mol pointer to molecule containing all atoms of the molecule
    542543 */
    543544void config::Load(char *filename, periodentafel *periode, molecule *mol)
     
    550551  RetrieveConfigPathAndName(filename);
    551552  // ParseParameters
    552  
     553
    553554  /* Oeffne Hauptparameterdatei */
    554555  int di;
     
    595596    config::DoOutCurrent = 0;
    596597  if (config::DoOutCurrent < 0) config::DoOutCurrent = 0;
    597   if (config::DoOutCurrent > 1) config::DoOutCurrent = 1; 
     598  if (config::DoOutCurrent > 1) config::DoOutCurrent = 1;
    598599  ParseForParameter(verbose,file,"AddGramSch", 0, 1, 1, int_type, &(config::UseAddGramSch), 1, critical);
    599600  if (config::UseAddGramSch < 0) config::UseAddGramSch = 0;
     
    630631  if (!ParseForParameter(verbose,file,"EpsWannier", 0, 1, 1, double_type, &(config::EpsWannier), 1, optional))
    631632    config::EpsWannier = 1e-8;
    632  
     633
    633634  // stop conditions
    634635  //if (config::MaxOuterStep <= 0) config::MaxOuterStep = 1;
    635636  ParseForParameter(verbose,file,"MaxPsiStep", 0, 1, 1, int_type, &(config::MaxPsiStep), 1, critical);
    636637  if (config::MaxPsiStep <= 0) config::MaxPsiStep = 3;
    637  
     638
    638639  ParseForParameter(verbose,file,"MaxMinStep", 0, 1, 1, int_type, &(config::MaxMinStep), 1, critical);
    639640  ParseForParameter(verbose,file,"RelEpsTotalE", 0, 1, 1, double_type, &(config::RelEpsTotalEnergy), 1, critical);
     
    644645  if (config::MaxMinStopStep < 1) config::MaxMinStopStep = 1;
    645646  if (config::MaxMinGapStopStep < 1) config::MaxMinGapStopStep = 1;
    646  
     647
    647648  ParseForParameter(verbose,file,"MaxInitMinStep", 0, 1, 1, int_type, &(config::MaxInitMinStep), 1, critical);
    648649  ParseForParameter(verbose,file,"InitRelEpsTotalE", 0, 1, 1, double_type, &(config::InitRelEpsTotalEnergy), 1, critical);
     
    653654  if (config::InitMaxMinStopStep < 1) config::InitMaxMinStopStep = 1;
    654655  if (config::InitMaxMinGapStopStep < 1) config::InitMaxMinGapStopStep = 1;
    655  
     656
    656657  // Unit cell and magnetic field
    657658  ParseForParameter(verbose,file, "BoxLength", 0, 3, 3, lower_trigrid, BoxLength, 1, critical); /* Lattice->RealBasis */
     
    669670    config::DoFullCurrent = 0;
    670671  if (config::DoFullCurrent < 0) config::DoFullCurrent = 0;
    671   if (config::DoFullCurrent > 2) config::DoFullCurrent = 2; 
     672  if (config::DoFullCurrent > 2) config::DoFullCurrent = 2;
    672673  if (config::DoOutNICS < 0) config::DoOutNICS = 0;
    673   if (config::DoOutNICS > 2) config::DoOutNICS = 2; 
     674  if (config::DoOutNICS > 2) config::DoOutNICS = 2;
    674675  if (config::DoPerturbation == 0) {
    675676    config::DoFullCurrent = 0;
     
    688689  } else {
    689690    fprintf(stderr, "0 <= RiemanTensor < 2: 0 UseNotRT, 1 UseRT");
    690     exit(1); 
     691    exit(1);
    691692  }
    692693  switch (config::RiemannTensor) {
     
    705706      if (config::RiemannLevel < 2) {
    706707        config::RiemannLevel = 2;
    707       } 
     708      }
    708709      if (config::RiemannLevel > config::MaxLevel-1) {
    709710        config::RiemannLevel = config::MaxLevel-1;
     
    712713      if (config::LevRFactor < 2) {
    713714        config::LevRFactor = 2;
    714       } 
     715      }
    715716      config::Lev0Factor = 2;
    716717      config::RTActualUse = 2;
     
    722723  } else {
    723724    fprintf(stderr, "0 <= PsiType < 2: 0 UseSpinDouble, 1 UseSpinUpDown");
    724     exit(1); 
     725    exit(1);
    725726  }
    726727  switch (config::PsiType) {
     
    736737    break;
    737738  }
    738  
     739
    739740  // IonsInitRead
    740  
     741
    741742  ParseForParameter(verbose,file,"RCut", 0, 1, 1, double_type, &(config::RCut), 1, critical);
    742743  ParseForParameter(verbose,file,"IsAngstroem", 0, 1, 1, int_type, &(config::IsAngstroem), 1, critical);
     
    756757      ParseForParameter(verbose,file, name, 0, 2, 1, int_type, &Z, 1, critical);
    757758      elementhash[i] = periode->FindElement(Z);
    758       cout << Verbose(1) << i << ". Z = " << elementhash[i]->Z << " with " << No[i] << " ions." << endl; 
     759      cout << Verbose(1) << i << ". Z = " << elementhash[i]->Z << " with " << No[i] << " ions." << endl;
    759760    }
    760761    int repetition = 0; // which repeated keyword shall be read
    761  
     762
    762763    map<int, atom *> AtomList[config::MaxTypes];
    763764    if (!FastParsing) {
     
    778779            } else
    779780              neues = AtomList[i][j];
    780             status = (status && 
     781            status = (status &&
    781782                    ParseForParameter(verbose,file, keyword, 0, 1, 1, double_type, &neues->x.x[0], 1, (repetition == 0) ? critical : optional) &&
    782783                    ParseForParameter(verbose,file, keyword, 0, 2, 1, double_type, &neues->x.x[1], 1, (repetition == 0) ? critical : optional) &&
     
    784785                    ParseForParameter(verbose,file, keyword, 0, 4, 1, int_type, &neues->FixedIon, 1, (repetition == 0) ? critical : optional));
    785786            if (!status) break;
    786    
     787
    787788            // check size of vectors
    788789            if (mol->Trajectories[neues].R.size() <= (unsigned int)(repetition)) {
     
    792793              mol->Trajectories[neues].F.resize(repetition+10);
    793794            }
    794          
     795
    795796            // put into trajectories list
    796797            for (int d=0;d<NDIM;d++)
    797798              mol->Trajectories[neues].R.at(repetition).x[d] = neues->x.x[d];
    798            
     799
    799800            // parse velocities if present
    800801            if(!ParseForParameter(verbose,file, keyword, 0, 5, 1, double_type, &neues->v.x[0], 1,optional))
     
    806807            for (int d=0;d<NDIM;d++)
    807808              mol->Trajectories[neues].U.at(repetition).x[d] = neues->v.x[d];
    808      
     809
    809810            // parse forces if present
    810811            if(!ParseForParameter(verbose,file, keyword, 0, 8, 1, double_type, &value[0], 1,optional))
     
    816817            for (int d=0;d<NDIM;d++)
    817818              mol->Trajectories[neues].F.at(repetition).x[d] = value[d];
    818  
    819   //            cout << "Parsed position of step " << (repetition) << ": ("; 
     819
     820  //            cout << "Parsed position of step " << (repetition) << ": (";
    820821  //            for (int d=0;d<NDIM;d++)
    821822  //              cout << mol->Trajectories[neues].R.at(repetition).x[d] << " ";          // next step
     
    873874 * \param *file input file stream being the opened config file with old pcp syntax
    874875 * \param *periode pointer to a periodentafel class with all elements
    875  * \param *mol pointer to molecule containing all atoms of the molecule 
     876 * \param *mol pointer to molecule containing all atoms of the molecule
    876877 */
    877878void config::LoadOld(char *filename, periodentafel *periode, molecule *mol)
     
    884885  RetrieveConfigPathAndName(filename);
    885886  // ParseParameters
    886  
     887
    887888  /* Oeffne Hauptparameterdatei */
    888889  int l, i, di;
     
    894895  int Z, No, AtomNo, found;
    895896  int verbose = 0;
    896  
     897
    897898  /* Namen einlesen */
    898899
     
    926927  ParseForParameter(verbose,file,"ScaleTempStep", 0, 1, 1, int_type, &(config::ScaleTempStep), 1, optional);
    927928  config::EpsWannier = 1e-8;
    928  
     929
    929930  // stop conditions
    930931  //if (config::MaxOuterStep <= 0) config::MaxOuterStep = 1;
    931932  ParseForParameter(verbose,file,"MaxPsiStep", 0, 1, 1, int_type, &(config::MaxPsiStep), 1, critical);
    932933  if (config::MaxPsiStep <= 0) config::MaxPsiStep = 3;
    933  
     934
    934935  ParseForParameter(verbose,file,"MaxMinStep", 0, 1, 1, int_type, &(config::MaxMinStep), 1, critical);
    935936  ParseForParameter(verbose,file,"MaxMinStep", 0, 2, 1, double_type, &(config::RelEpsTotalEnergy), 1, critical);
     
    939940  if (config::MaxMinStopStep < 1) config::MaxMinStopStep = 1;
    940941  config::MaxMinGapStopStep = 1;
    941  
     942
    942943  ParseForParameter(verbose,file,"MaxInitMinStep", 0, 1, 1, int_type, &(config::MaxInitMinStep), 1, critical);
    943944  ParseForParameter(verbose,file,"MaxInitMinStep", 0, 2, 1, double_type, &(config::InitRelEpsTotalEnergy), 1, critical);
     
    970971  } else {
    971972    fprintf(stderr, "0 <= RiemanTensor < 2: 0 UseNotRT, 1 UseRT");
    972     exit(1); 
     973    exit(1);
    973974  }
    974975  switch (config::RiemannTensor) {
     
    987988      if (config::RiemannLevel < 2) {
    988989        config::RiemannLevel = 2;
    989       } 
     990      }
    990991      if (config::RiemannLevel > config::MaxLevel-1) {
    991992        config::RiemannLevel = config::MaxLevel-1;
     
    994995      if (config::LevRFactor < 2) {
    995996        config::LevRFactor = 2;
    996       } 
     997      }
    997998      config::Lev0Factor = 2;
    998999      config::RTActualUse = 2;
     
    10041005  } else {
    10051006    fprintf(stderr, "0 <= PsiType < 2: 0 UseSpinDouble, 1 UseSpinUpDown");
    1006     exit(1); 
     1007    exit(1);
    10071008  }
    10081009  switch (config::PsiType) {
     
    10181019    break;
    10191020  }
    1020  
     1021
    10211022  // IonsInitRead
    1022  
     1023
    10231024  ParseForParameter(verbose,file,"RCut", 0, 1, 1, double_type, &(config::RCut), 1, critical);
    10241025  ParseForParameter(verbose,file,"IsAngstroem", 0, 1, 1, int_type, &(config::IsAngstroem), 1, critical);
     
    10271028
    10281029  // Routine from builder.cpp
    1029  
    1030  
    1031   for (i=MAX_ELEMENTS;i--;) 
     1030
     1031
     1032  for (i=MAX_ELEMENTS;i--;)
    10321033    elementhash[i] = NULL;
    10331034  cout << Verbose(0) << "Parsing Ions ..." << endl;
     
    10401041    }
    10411042    if (found > 0) {
    1042       if (zeile.find("Ions_Data") == 0) 
     1043      if (zeile.find("Ions_Data") == 0)
    10431044        getline(*file,zeile,'\n'); // read next line and parse this one
    10441045      istringstream input(zeile);
     
    10691070      No++;
    10701071    }
    1071   }   
     1072  }
    10721073  file->close();
    10731074  delete(file);
     
    10771078 * \param *filename name of file
    10781079 * \param *periode pointer to a periodentafel class with all elements
    1079  * \param *mol pointer to molecule containing all atoms of the molecule 
     1080 * \param *mol pointer to molecule containing all atoms of the molecule
    10801081 */
    10811082bool config::Save(const char *filename, periodentafel *periode, molecule *mol) const
     
    12071208 * Note that this format cannot be parsed again.
    12081209 * \param *filename name of file (without ".in" suffix!)
    1209  * \param *mol pointer to molecule containing all atoms of the molecule 
     1210 * \param *mol pointer to molecule containing all atoms of the molecule
    12101211 */
    12111212bool config::SaveMPQC(const char *filename, molecule *mol) const
     
    12181219  ofstream *output = NULL;
    12191220  stringstream *fname = NULL;
    1220  
     1221
    12211222  // first without hessian
    12221223  fname = new stringstream;
     
    12271228  *output << "\tsavestate = no" << endl;
    12281229  *output << "\tdo_gradient = yes" << endl;
    1229   *output << "\tmole<CLHF>: (" << endl;
     1230  *output << "\tmole<MBPT2>: (" << endl;
    12301231  *output << "\t\tmaxiter = 200" << endl;
    12311232  *output << "\t\tbasis = $:basis" << endl;
    12321233  *output << "\t\tmolecule = $:molecule" << endl;
     1234  *output << "\t\treference<CLHF>: (" << endl;
     1235  *output << "\t\t\tbasis = $:basis" << endl;
     1236  *output << "\t\t\tmolecule = $:molecule" << endl;
     1237  *output << "\t\t)" << endl;
    12331238  *output << "\t)" << endl;
    12341239  *output << ")" << endl;
     
    13131318  delete(output);
    13141319  delete(fname);
    1315  
     1320
    13161321  return true;
    13171322};
     
    13251330 * \param file file to be parsed
    13261331 * \param name Name of value in file (at least 3 chars!)
    1327  * \param sequential 1 - do not reset file pointer to begin of file, 0 - set to beginning 
     1332 * \param sequential 1 - do not reset file pointer to begin of file, 0 - set to beginning
    13281333 *        (if file is sequentially parsed this can be way faster! However, beware of multiple values per line, as whole line is read -
    13291334 *         best approach: 0 0 0 1 (not resetted only on last value of line) - and of yth, which is now
     
    13451350  dummy1 = free_dummy = (char *) Malloc(256 * sizeof(char), "config::ParseForParameter: *free_dummy");
    13461351
    1347   //fprintf(stderr,"Parsing for %s\n",name); 
     1352  //fprintf(stderr,"Parsing for %s\n",name);
    13481353  if (repetition == 0)
    13491354    //Error(SomeError, "ParseForParameter(): argument repetition must not be 0!");
     
    13661371          file->clear();
    13671372          file->seekg(file_position, ios::beg);  // rewind to start position
    1368           Free((void **)&free_dummy, "config::ParseForParameter: *free_dummy");         
     1373          Free((void **)&free_dummy, "config::ParseForParameter: *free_dummy");
    13691374          return 0;
    13701375        }
     
    13721377      line++;
    13731378    } while (dummy != NULL && dummy1 != NULL && ((dummy1[0] == '#') || (dummy1[0] == '\0'))); // skip commentary and empty lines
    1374    
     1379
    13751380    // C++ getline removes newline at end, thus re-add
    13761381    if ((dummy1 != NULL) && (strchr(dummy1,'\n') == NULL)) {
     
    13981403        //fprintf(stderr,"Error: Cannot find tabs or spaces on line %i in search for %s\n", line, name);
    13991404        //Free((void **)&free_dummy);
    1400         //Error(FileOpenParams, NULL);     
     1405        //Error(FileOpenParams, NULL);
    14011406      } else {
    14021407        //fprintf(stderr,"found tab at %i\n",(char *)dummy-(char *)dummy1);
     
    14071412    if ((name == NULL) || (((dummy-dummy1 >= 3) && (strncmp(dummy1, name, strlen(name)) == 0)) && ((unsigned int)(dummy-dummy1) == strlen(name)))) {
    14081413      found++; // found the parameter!
    1409       //fprintf(stderr,"found %s at line %i between %i and %i\n", name, line, dummy1, dummy);   
    1410      
     1414      //fprintf(stderr,"found %s at line %i between %i and %i\n", name, line, dummy1, dummy);
     1415
    14111416      if (found == repetition) {
    14121417        for (i=0;i<xth;i++) { // i = rows
     
    14471452            dummy1[j+1] = '\0';
    14481453          }
    1449  
     1454
    14501455          int start = (type >= grid) ? 0 : yth-1 ;
    14511456          for (j=start;j<yth;j++) { // j = columns
     
    14701475                    //return 0;
    14711476                    exit(255);
    1472                     //Error(FileOpenParams, NULL);     
     1477                    //Error(FileOpenParams, NULL);
    14731478                  } else {
    14741479                    //if (!sequential)
     
    14851490                // found comment, skipping rest of line
    14861491                //if (verbose) fprintf(stderr,"Error: '#' at %i and still missing %i value(s) for parameter %s\n", line, yth-j, name);
    1487                 if (!sequential) { // here we need it! 
     1492                if (!sequential) { // here we need it!
    14881493                  file->seekg(file_position, ios::beg);  // rewind to start position
    14891494                }
     
    15001505                    //value += sizeof(int);
    15011506                  break;
    1502                 case(row_double): 
     1507                case(row_double):
    15031508                case(grid):
    15041509                case(lower_trigrid):
     
    15411546      }
    15421547    }
    1543   } 
     1548  }
    15441549  if ((type >= row_int) && (verbose)) fprintf(stderr,"\n");
    15451550  Free((void **)&free_dummy, "config::ParseForParameter: *free_dummy");
     
    15491554  }
    15501555  //fprintf(stderr, "End of Parsing\n\n");
    1551  
     1556
    15521557  return (found); // true if found, false if not
    15531558}
Note: See TracChangeset for help on using the changeset viewer.