Ignore:
Timestamp:
Aug 7, 2010, 2:44:24 PM (15 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, 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:
458447
Parents:
5b4605
Message:

Shortened constructors [Meyers, "Effective C++" item 12]

  • also rearranged some initialization list (one per line).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/PcpParser.cpp

    r5b4605 r97b825  
    2424#include "Box.hpp"
    2525
     26
     27PcpParser::StructParallelization::StructParallelization() :
     28  ProcPEGamma(8),
     29  ProcPEPsi(1)
     30{}
     31
     32PcpParser::StructParallelization::~StructParallelization()
     33{}
     34
     35PcpParser::StructPaths::StructPaths() :
     36  databasepath(NULL),
     37  configname(NULL),
     38  mainname(NULL),
     39  defaultpath(NULL),
     40  pseudopotpath(NULL)
     41{}
     42
     43PcpParser::StructPaths::~StructPaths()
     44{}
     45
     46PcpParser::StructSwitches::StructSwitches() :
     47  DoConstrainedMD(0),
     48  DoOutVis(0),
     49  DoOutMes(1),
     50  DoOutNICS(0),
     51  DoOutOrbitals(0),
     52  DoOutCurrent(0),
     53  DoFullCurrent(0),
     54  DoPerturbation(0),
     55  DoWannier(0)
     56{}
     57
     58PcpParser::StructSwitches::~StructSwitches()
     59{}
     60
     61PcpParser::StructLocalizedOrbitals::StructLocalizedOrbitals() :
     62  CommonWannier(0),
     63  SawtoothStart(0.01),
     64  VectorPlane(0),
     65  VectorCut(0),
     66  UseAddGramSch(1),
     67  Seed(1),
     68  EpsWannier(1e-7)
     69{}
     70
     71PcpParser::StructLocalizedOrbitals::~StructLocalizedOrbitals()
     72{}
     73
     74PcpParser::StructStepCounts::StructStepCounts() :
     75  MaxMinStopStep(1),
     76  InitMaxMinStopStep(1),
     77  OutVisStep(10),
     78  OutSrcStep(5),
     79  MaxPsiStep(0),
     80  MaxOuterStep(0),
     81  MaxMinStep(100),
     82  RelEpsTotalEnergy(1e-07),
     83  RelEpsKineticEnergy(1e-05),
     84  MaxMinGapStopStep(0),
     85  MaxInitMinStep(100),
     86  InitRelEpsTotalEnergy(1e-05),
     87  InitRelEpsKineticEnergy(0.0001),
     88  InitMaxMinGapStopStep(0)
     89{}
     90
     91PcpParser::StructStepCounts::~StructStepCounts()
     92{}
     93
     94PcpParser::StructPlaneWaveSpecifics::StructPlaneWaveSpecifics() :
     95  PsiType(0),
     96  MaxPsiDouble(0),
     97  PsiMaxNoUp(0),
     98  PsiMaxNoDown(0),
     99  ECut(128),
     100  MaxLevel(5),
     101  RiemannTensor(0),
     102  LevRFactor(0),
     103  RiemannLevel(0),
     104  Lev0Factor(2),
     105  RTActualUse(0),
     106  AddPsis(0),
     107  RCut(20)
     108{}
     109
     110PcpParser::StructPlaneWaveSpecifics::~StructPlaneWaveSpecifics()
     111{}
     112
    26113/** Constructor of PcpParser.
    27114 *
    28115 */
    29 PcpParser::PcpParser()
    30 {
    31   Parallelization.ProcPEGamma = 8;
    32   Parallelization.ProcPEPsi = 1;
    33 
    34   Paths.databasepath = NULL;
    35   Paths.configname = NULL;
    36   Paths.mainname = NULL;
    37   Paths.defaultpath = NULL;
    38   Paths.pseudopotpath = NULL;
    39 
    40   Switches.DoConstrainedMD = 0;
    41   Switches.DoOutVis = 0;
    42   Switches.DoOutMes = 1;
    43   Switches.DoOutNICS = 0;
    44   Switches.DoOutOrbitals = 0;
    45   Switches.DoOutCurrent = 0;
    46   Switches.DoFullCurrent = 0;
    47   Switches.DoPerturbation = 0;
    48   Switches.DoWannier = 0;
    49 
    50   LocalizedOrbitals.CommonWannier = 0;
    51   LocalizedOrbitals.SawtoothStart = 0.01;
    52   LocalizedOrbitals.VectorPlane = 0;
    53   LocalizedOrbitals.VectorCut = 0;
    54   LocalizedOrbitals.UseAddGramSch = 1;
    55   LocalizedOrbitals.Seed = 1;
    56   LocalizedOrbitals.EpsWannier = 1e-7;
    57 
    58   StepCounts.MaxMinStopStep = 1;
    59   StepCounts.InitMaxMinStopStep = 1;
    60   StepCounts.OutVisStep = 10;
    61   StepCounts.OutSrcStep = 5;
    62   StepCounts.MaxPsiStep = 0;
    63   StepCounts.MaxOuterStep = 0;
    64   StepCounts.MaxMinStep = 100;
    65   StepCounts.RelEpsTotalEnergy = 1e-07;
    66   StepCounts.RelEpsKineticEnergy = 1e-05;
    67   StepCounts.MaxMinGapStopStep = 0;
    68   StepCounts.MaxInitMinStep = 100;
    69   StepCounts.InitRelEpsTotalEnergy = 1e-05;
    70   StepCounts.InitRelEpsKineticEnergy = 0.0001;
    71   StepCounts.InitMaxMinGapStopStep = 0;
    72 
    73   PlaneWaveSpecifics.PsiType = 0;
    74   PlaneWaveSpecifics.MaxPsiDouble = 0;
    75   PlaneWaveSpecifics.PsiMaxNoUp = 0;
    76   PlaneWaveSpecifics.PsiMaxNoDown = 0;
    77   PlaneWaveSpecifics.ECut = 128;
    78   PlaneWaveSpecifics.MaxLevel = 5;
    79   PlaneWaveSpecifics.RiemannTensor = 0;
    80   PlaneWaveSpecifics.LevRFactor = 0;
    81   PlaneWaveSpecifics.RiemannLevel = 0;
    82   PlaneWaveSpecifics.Lev0Factor = 2;
    83   PlaneWaveSpecifics.RTActualUse = 0;
    84   PlaneWaveSpecifics.AddPsis = 0;
    85   PlaneWaveSpecifics.RCut = 20;
    86   PlaneWaveSpecifics.PsiType = 0;
    87 
    88   FastParsing = false;
    89 
    90   Deltat = 0.01;
    91   IsAngstroem = 1;
    92   RelativeCoord = 0;
    93   StructOpt = 0;
    94   MaxTypes = 0;
    95 }
     116PcpParser::PcpParser() :
     117  FastParsing(false),
     118  Deltat(0.01),
     119  IsAngstroem(1),
     120  RelativeCoord(0),
     121  StructOpt(0),
     122  MaxTypes(0)
     123{}
    96124
    97125/** Destructor of PcpParser.
Note: See TracChangeset for help on using the changeset viewer.