Changeset fff733


Ignore:
Timestamp:
Mar 1, 2011, 10:16:38 AM (14 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:
fa60dd
Parents:
e34254
git-author:
Frederik Heber <heber@…> (02/18/11 21:47:30)
git-committer:
Frederik Heber <heber@…> (03/01/11 10:16:38)
Message:

Fixed PointCloud implementation in class Tesselation.

  • removed virtual keywords in class Tesselation definition.
  • implemented GetMaxId().
  • GetCenter() different to interface PointCloud had parameter ostream, removed.
Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/PointCloud.hpp

    re34254 rfff733  
    2828  virtual ~PointCloud();
    2929
    30   virtual const char * const GetName() const { return "unknown"; };
    31   virtual Vector *GetCenter() const { return NULL; };
    32   virtual TesselPoint *GetPoint() const { return NULL; };
    33   virtual int GetMaxId() const { return 0; };
    34   virtual void GoToNext() const {};
    35   virtual void GoToFirst() const {};
    36   virtual bool IsEmpty() const { return true; };
    37   virtual bool IsEnd() const { return true; };
     30  virtual const char * const GetName() const=0;
     31  virtual Vector *GetCenter() const=0;
     32  virtual TesselPoint *GetPoint() const=0;
     33  virtual int GetMaxId() const=0;
     34  virtual void GoToNext() const=0;
     35  virtual void GoToFirst() const=0;
     36  virtual bool IsEmpty() const=0;
     37  virtual bool IsEnd() const=0;
    3838};
    3939
  • src/tesselation.cpp

    re34254 rfff733  
    9898}
    9999
     100const char * const Tesselation::GetName() const
     101{
     102  return "unknown";
     103}
     104
    100105/** PointCloud implementation of GetCenter
    101106 * Uses PointsOnBoundary and STL stuff.
    102107 */
    103 Vector * Tesselation::GetCenter(ofstream *out) const
     108Vector * Tesselation::GetCenter() const
    104109{
    105110  Info FunctionInfo(__func__);
     
    124129}
    125130;
     131
     132int Tesselation::GetMaxId() const
     133{
     134  int max_id = 0;
     135  for (PointMap::const_iterator iter = PointsOnBoundary.begin();
     136      iter != PointsOnBoundary.end();
     137      ++iter) {
     138    if ((iter->second)->node->nr > max_id)
     139      (iter->second)->node->nr = max_id;
     140  }
     141  return max_id;
     142}
    126143
    127144/** PointCloud implementation of GoToNext.
  • src/tesselation.hpp

    re34254 rfff733  
    153153    const_iterator end() const { return PointsOnBoundary.end(); }
    154154    // PointCloud implementation for PointsOnBoundary
    155     virtual Vector *GetCenter(ofstream *out) const;
    156     virtual TesselPoint *GetPoint() const;
    157     virtual void GoToNext() const;
    158     virtual void GoToFirst() const;
    159     virtual bool IsEmpty() const;
    160     virtual bool IsEnd() const;
     155    const char * const GetName() const;
     156    Vector *GetCenter() const;
     157    TesselPoint *GetPoint() const;
     158    int GetMaxId() const;
     159    void GoToNext() const;
     160    void GoToFirst() const;
     161    bool IsEmpty() const;
     162    bool IsEnd() const;
    161163
    162164    class BoundaryPointSet *BPS[2];
Note: See TracChangeset for help on using the changeset viewer.