Ignore:
Timestamp:
Feb 15, 2013, 5:09:58 PM (12 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:
313f83
Parents:
c0e8fb
git-author:
Frederik Heber <heber@…> (01/31/13 13:25:31)
git-committer:
Frederik Heber <heber@…> (02/15/13 17:09:58)
Message:

Refactored copy routine out of AddOntoWindow().

  • this is preparatory for preparing a shrinking and copying into a smaller window functionalities.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Jobs/Grid/SamplingGrid.hpp

    rc0e8fb rfb3485  
    1414#endif
    1515
     16#include <boost/function.hpp>
    1617#include <iosfwd>
    1718#include <vector>
     
    265266      const double prefactor);
    266267
     268  /** Enum to help in addWindowOntoWindow() decide which iterator needs to be
     269   * advanced.
     270   */
     271  enum LargerWindow {
     272    thiswindow,
     273    otherwindow
     274  };
     275
     276  /** Helper function to copy one (larger) window into a (smaller) window.
     277   *
     278   * \note Why do we need the extra \a choice? We need to know which window
     279   * tuples is associated with which sampled values that are constrained by
     280   * one of them being constant, hence the source values
     281   *
     282   * \param wbegin start of larger window
     283   * \param wend end of larger window
     284   * \param other_wbegin start of smaller window
     285   * \param other_wend end of smaller window
     286   * \param sampled_grid larger set of sampled values
     287   * \param other_sampled_grid smaller set of sampled values
     288   * \param op operation to perform with the two elements
     289   * \param choice indicates which is the larger window
     290   */
     291  void addWindowOntoWindow(
     292      const double wbegin[3],
     293      const double wend[3],
     294      const double other_wbegin[3],
     295      const double other_wend[3],
     296      sampledvalues_t &sampled_grid,
     297      const sampledvalues_t &other_sampled_grid,
     298      boost::function<void (double &, const double &)> op,
     299      enum LargerWindow choice);
     300
    267301  /** Helper function that contains all the logic of how to superpose two
    268302   * grids.
Note: See TracChangeset for help on using the changeset viewer.