Ignore:
Timestamp:
Sep 14, 2016, 6:42:52 PM (9 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_StructOpt_integration_tests, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, 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_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, GeometryObjects, Gui_displays_atomic_force_velocity, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, RotateToPrincipalAxisSystem_UndoRedo, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, Ubuntu_1604_changes, stable
Children:
e51f2c
Parents:
028790
git-author:
Frederik Heber <heber@…> (05/26/16 09:51:07)
git-committer:
Frederik Heber <heber@…> (09/14/16 18:42:52)
Message:

FIX: Replaced 3 by NDIM in SamplingGrid which avoids some confusion with numeric grid levels.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/Fragmentation/Summation/SetValues/SamplingGrid.hpp

    r028790 r5b1e5e  
    2020#include "boost/serialization/export.hpp"
    2121#include "boost/serialization/vector.hpp"
     22
     23#include "LinearAlgebra/defs.hpp"
    2224
    2325#include "Fragmentation/Summation/SetValues/SamplingGridProperties.hpp"
     
    5153   * \param _sampled_grid sample points
    5254   */
    53   SamplingGrid(const double _begin[3],
    54       const double _end[3],
     55  SamplingGrid(const double _begin[NDIM],
     56      const double _end[NDIM],
    5557      const int _level,
    5658      const sampledvalues_t &_sampled_grid);
     
    6466   * \param _level number of grid points in \f$2^{\mathrm{level}}\f$
    6567   */
    66   SamplingGrid(const double _begin[3],
    67       const double _end[3],
     68  SamplingGrid(const double _begin[NDIM],
     69      const double _end[NDIM],
    6870      const int _level);
    6971
     
    211213   * \param _end_window end of window
    212214   */
    213   void setWindow(const double _begin_window[3], const double _end_window[3]);
     215  void setWindow(const double _begin_window[NDIM], const double _end_window[NDIM]);
    214216
    215217  /** Helper function to convert begin_window and end_window that are w.r.t.
     
    255257   * \param _end end of window
    256258   */
    257   void setDomain(const double _begin[3], const double _end[3]);
     259  void setDomain(const double _begin[NDIM], const double _end[NDIM]);
    258260
    259261  /** Sets the size of the domain.
     
    264266   * \param _end end of domain
    265267   */
    266   void setDomainSize(const double _begin[3], const double _end[3]);
     268  void setDomainSize(const double _begin[NDIM], const double _end[NDIM]);
    267269
    268270  /** Extends the window while keeping the values.
     
    271273   * \param _end_window new end of window
    272274   */
    273   void extendWindow(const double _begin_window[3], const double _end_window[3]);
     275  void extendWindow(const double _begin_window[NDIM], const double _end_window[NDIM]);
    274276
    275277  /** Shrinks the window while keeping the values.
     
    278280   * \param _end_window new end of window
    279281   */
    280   void shrinkWindow(const double _begin_window[3], const double _end_window[3]);
     282  void shrinkWindow(const double _begin_window[NDIM], const double _end_window[NDIM]);
    281283
    282284  /** Adds another (smaller) window onto the one in this instance.
     
    290292   */
    291293  void addOntoWindow(
    292       const double _begin_window[3],
    293       const double _end_window[3],
     294      const double _begin_window[NDIM],
     295      const double _end_window[NDIM],
    294296      const sampledvalues_t &_sampled_grid,
    295297      const double prefactor);
     
    305307   */
    306308  void addIntoWindow(
    307       const double _begin_window[3],
    308       const double _end_window[3],
     309      const double _begin_window[NDIM],
     310      const double _end_window[NDIM],
    309311      const sampledvalues_t &_sampled_grid,
    310312      const double prefactor);
     
    334336   */
    335337  void addWindowOntoWindow(
    336       const double larger_wbegin[3],
    337       const double larger_wend[3],
    338       const double smaller_wbegin[3],
    339       const double smaller_wend[3],
     338      const double larger_wbegin[NDIM],
     339      const double larger_wend[NDIM],
     340      const double smaller_wbegin[NDIM],
     341      const double smaller_wend[NDIM],
    340342      sampledvalues_t &dest_sampled_grid,
    341343      const sampledvalues_t &source_sampled_grid,
     
    360362   * \param _end_window end of window
    361363   */
    362   void setWindowSize(const double _begin_window[3], const double _end_window[3]);
     364  void setWindowSize(const double _begin_window[NDIM], const double _end_window[NDIM]);
    363365
    364366public:
     
    370372
    371373  //!> start of the window relative to SamplingGridProperties::begin and SamplingGridProperties::size
    372   double begin_window[3];
     374  double begin_window[NDIM];
    373375  //!> end of the window relative to SamplingGridProperties::begin and SamplingGridProperties::size
    374   double end_window[3];
     376  double end_window[NDIM];
    375377
    376378private:
     
    384386    ar & boost::serialization::base_object<SamplingGridProperties>(*this);
    385387    ar & const_cast< sampledvalues_t &>(sampled_grid);
    386     for(size_t i=0;i<3;++i) {
     388    for(size_t i=0;i<NDIM;++i) {
    387389      ar & begin_window[i];
    388390      ar & end_window[i];
     
    391393
    392394  //!> static typedef to use in cstor when no initial values are given
    393   static const double zeroOffset[3];
     395  static const double zeroOffset[NDIM];
    394396};
    395397
Note: See TracChangeset for help on using the changeset viewer.