Changeset 68abe5 for src/Filling
- Timestamp:
- Mar 30, 2012, 9:18:26 AM (13 years ago)
- 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:
- e32fa6
- Parents:
- f61f61
- git-author:
- Frederik Heber <heber@…> (02/21/12 14:27:21)
- git-committer:
- Frederik Heber <heber@…> (03/30/12 09:18:26)
- Location:
- src/Filling
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Filling/Filler.cpp
rf61f61 r68abe5 70 70 * @param copyMethod functor that knows how to copy atoms. 71 71 * @param cluster set of atomic ids contained in a specific Shape to fill each Node with 72 * @return true - at least one node has been filled, false - no node filled 72 73 */ 73 voidFiller::operator()(74 bool Filler::operator()( 74 75 CopyAtomsInterface ©Method, 75 76 ClusterInterface::Cluster_impl cluster) const … … 79 80 std::for_each( nodes.begin(), nodes.end(), output << boost::lambda::_1 << " "); 80 81 LOG(3, "DEBUG: Listing nodes to check: " << output.str()); 81 if (nodes.size() == 0) { 82 ASSERT(false, 83 "Filler::operator() - Mesh contains no nodes."); 84 return; 85 } 82 if (nodes.size() == 0) 83 return false; 86 84 NodeSet FillNodes(nodes.size(), zeroVec); 87 85 … … 93 91 if (FillNodes.size() == 0) { 94 92 ELOG(2, "For none of the nodes did the predicate return true."); 95 return ;93 return false; 96 94 } else { 97 95 LOG(1, "INFO: " << FillNodes.size() << " out of " << nodes.size() << " returned true from predicate."); … … 105 103 boost::bind(&Inserter::operator(), boost::cref(inserter), boost::ref(copyMethod), boost::cref(cluster), _1) ); 106 104 105 // give statment whether at least \a cluster was placed 106 if ( FillNodes.size() != 0) 107 return true; 108 else 109 return false; 110 107 111 // move cluster to first node 108 112 cluster->translate(*FillNodes.begin()); -
src/Filling/Filler.hpp
rf61f61 r68abe5 35 35 ~Filler(); 36 36 37 voidoperator()(CopyAtomsInterface ©Method, ClusterInterface::Cluster_impl cluster) const;37 bool operator()(CopyAtomsInterface ©Method, ClusterInterface::Cluster_impl cluster) const; 38 38 39 39 private: -
src/Filling/Inserter/Inserter.cpp
rf61f61 r68abe5 46 46 {} 47 47 48 voidInserter::operator()(CopyAtomsInterface ©Method, ClusterInterface::Cluster_impl cluster, const Vector &offset) const48 bool Inserter::operator()(CopyAtomsInterface ©Method, ClusterInterface::Cluster_impl cluster, const Vector &offset) const 49 49 { 50 50 return impl->operator()(copyMethod, cluster, offset); -
src/Filling/Inserter/Inserter.hpp
rf61f61 r68abe5 38 38 Inserter(impl_ptr); 39 39 ~Inserter(); 40 voidoperator()(CopyAtomsInterface ©Method, ClusterInterface::Cluster_impl cluster, const Vector &offset) const;40 bool operator()(CopyAtomsInterface ©Method, ClusterInterface::Cluster_impl cluster, const Vector &offset) const; 41 41 42 42 protected: -
src/Filling/Inserter/InserterBase.hpp
rf61f61 r68abe5 29 29 virtual ~InserterBase() {} 30 30 31 virtual voidoperator()(CopyAtomsInterface ©Method, ClusterInterface::Cluster_impl cluster, const Vector &offset) const = 0;31 virtual bool operator()(CopyAtomsInterface ©Method, ClusterInterface::Cluster_impl cluster, const Vector &offset) const = 0; 32 32 33 33 }; -
src/Filling/Inserter/SimpleInserter.cpp
rf61f61 r68abe5 41 41 * @param copyMethod functor for copying atoms 42 42 * @param offset 43 * @return always true 43 44 */ 44 voidSimpleInserter::operator()(CopyAtomsInterface ©Method, ClusterInterface::Cluster_impl cluster, const Vector &offset) const45 bool SimpleInserter::operator()(CopyAtomsInterface ©Method, ClusterInterface::Cluster_impl cluster, const Vector &offset) const 45 46 { 46 cluster->clone(copyMethod, offset); 47 ClusterInterface::Cluster_impl newcluster(cluster->clone(copyMethod, offset)); 48 49 return (newcluster != NULL); 47 50 } -
src/Filling/Inserter/SimpleInserter.hpp
rf61f61 r68abe5 26 26 ~SimpleInserter(); 27 27 28 voidoperator()(CopyAtomsInterface ©Method, ClusterInterface::Cluster_impl cluster, const Vector &offset) const;28 bool operator()(CopyAtomsInterface ©Method, ClusterInterface::Cluster_impl cluster, const Vector &offset) const; 29 29 }; 30 30
Note:
See TracChangeset
for help on using the changeset viewer.