Changeset 901d87
- 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:
- f61f61
- Parents:
- dba7b0
- git-author:
- Frederik Heber <heber@…> (02/21/12 13:27:44)
- git-committer:
- Frederik Heber <heber@…> (03/30/12 09:18:26)
- Location:
- src
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FillAction/FillRegularGridAction.cpp
rdba7b0 r901d87 26 26 #include "Filling/Cluster.hpp" 27 27 #include "Filling/Filler.hpp" 28 #include "Filling/Inserter/SimpleInserter.hpp" 28 29 #include "Filling/Mesh/CubeMesh.hpp" 29 30 #include "Filling/Predicates/IsInsideSurface_FillPredicate.hpp" … … 111 112 // fill 112 113 { 113 Filler *fillerFunction = new Filler(*mesh, Andpredicate); 114 SimpleInserter inserter; 115 Filler *fillerFunction = new Filler(*mesh, Andpredicate, inserter); 114 116 ClusterInterface::Cluster_impl cluster( new Cluster( filler->getAtomIds(), filler->getBoundingShape()) ); 115 117 CopyAtoms_withBonds copyMethod; -
src/Filling/Filler.cpp
rdba7b0 r901d87 35 35 #include "ClusterInterface.hpp" 36 36 #include "Descriptors/AtomIdDescriptor.hpp" 37 #include "Inserter/Inserter.hpp" 37 38 #include "LinearAlgebra/Vector.hpp" 38 39 #include "NodeTypes.hpp" … … 47 48 * remove_copy_if which works in this inverted way as desired. 48 49 * 49 * @param mesh Mesh with a NodeSet that fills its Shape 50 * @param predicate predicate construct to check at each Node 50 * @param _mesh Mesh with a NodeSet that fills its Shape 51 * @param _predicate predicate construct to check at each Node 52 * @param _inserter inserter which places the cloned cluster 51 53 */ 52 Filler::Filler(const Mesh &_mesh, const FillPredicate &_predicate ) :54 Filler::Filler(const Mesh &_mesh, const FillPredicate &_predicate, const Inserter &_inserter) : 53 55 mesh(_mesh), 54 predicate(!_predicate) 56 predicate(!_predicate), 57 inserter(_inserter) 55 58 {} 56 59 … … 100 103 // fill all other true nodes 101 104 std::for_each(iter , FillNodes.end(), 102 boost::bind(& ClusterInterface::clone, boost::cref(cluster), boost::ref(copyMethod), _1) );105 boost::bind(&Inserter::operator(), boost::cref(inserter), boost::ref(copyMethod), boost::cref(cluster), _1) ); 103 106 104 107 // move cluster to first node -
src/Filling/Filler.hpp
rdba7b0 r901d87 22 22 class CopyAtomsInterface; 23 23 class FillPredicate; 24 class Inserter; 24 25 class Mesh; 25 26 … … 31 32 { 32 33 public: 33 Filler(const Mesh &_mesh, const FillPredicate &_predicate );34 Filler(const Mesh &_mesh, const FillPredicate &_predicate, const Inserter &_inserter); 34 35 ~Filler(); 35 36 … … 41 42 //!> the predicate is evaluted whether a Node in the NodeSet of mesh is filled or not 42 43 const FillPredicate predicate; 43 44 //!> Inserter function to allow for some changes when placing the cluster at the node 45 const Inserter &inserter; 44 46 }; 45 47 -
src/Filling/Makefile.am
rdba7b0 r901d87 8 8 Filling/Filler.cpp \ 9 9 Filling/Generators/NodeGenerator.cpp \ 10 Filling/Inserter/SimpleInserter.cpp \ 10 11 Filling/Predicates/AnyFillPredicate.cpp \ 11 12 Filling/Predicates/FillPredicate.cpp \ … … 22 23 Filling/Filler.hpp \ 23 24 Filling/Generators/NodeGenerator.hpp \ 25 Filling/Inserter/Inserter.hpp \ 26 Filling/Inserter/SimpleInserter.hpp \ 24 27 Filling/NodeTypes.hpp \ 25 28 Filling/Predicates/AnyFillPredicate.hpp \ -
src/Filling/unittests/FillerUnitTest.cpp
rdba7b0 r901d87 30 30 #include "Filling/Cluster.hpp" 31 31 #include "Filling/Filler.hpp" 32 #include "Filling/Inserter/SimpleInserter.hpp" 32 33 #include "Filling/Mesh/Mesh.hpp" 33 34 #include "Filling/Predicates/FillPredicate.hpp" … … 70 71 predicate = new FillPredicate(AlwaysFillPredicate()); 71 72 mesh = new MeshStub(); 73 inserter = new SimpleInserter(); 72 74 CPPUNIT_ASSERT_EQUAL( (size_t)5, mesh->getNodes().size() ); 73 filler = new Filler(*mesh, *predicate );75 filler = new Filler(*mesh, *predicate, *inserter); 74 76 s = new Shape(Sphere( Vector(0.,0.,0.05), 0.1)); 75 77 … … 100 102 delete mesh; 101 103 delete predicate; 104 delete inserter; 102 105 103 106 World::purgeInstance(); -
src/Filling/unittests/FillerUnitTest.hpp
rdba7b0 r901d87 25 25 class Filler; 26 26 class FillPredicate; 27 class Inserter; 27 28 class Mesh; 28 29 class Shape; … … 46 47 FillPredicate *predicate; 47 48 Mesh *mesh; 49 Inserter *inserter; 48 50 Filler *filler; 49 51 atom * _atom;
Note:
See TracChangeset
for help on using the changeset viewer.