Changeset 69682a for ThirdParty/LinearAlgebra/src
- Timestamp:
- Mar 8, 2017, 9:46:36 PM (8 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_StructOpt_integration_tests, AutomationFragmentation_failures, 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_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_ChronosMutex, 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_IntegrationTest, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, PartialCharges_OrthogonalSummation, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, RotateToPrincipalAxisSystem_UndoRedo, StoppableMakroAction, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, Ubuntu_1604_changes, stable
- Children:
- ba1152
- Parents:
- 494d1f
- git-author:
- Frederik Heber <heber@…> (03/06/17 13:50:46)
- git-committer:
- Frederik Heber <heber@…> (03/08/17 21:46:36)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ThirdParty/LinearAlgebra/src/LinearAlgebra/Vector.cpp
r494d1f r69682a 634 634 } 635 635 636 637 // some comonly used vectors 638 const Vector zeroVec(0,0,0); 639 const Vector unitVec[NDIM]={Vector(1,0,0),Vector(0,1,0),Vector(0,0,1)}; 636 static VectorContent *& setUnitVectorContent(VectorContent *&_content, const size_t _axis) 637 { 638 _content->at(_axis) = 1.; 639 return _content; 640 } 641 642 // some commonly used vectors 643 VectorContent *VCs[4] = { 644 Memory::ignore(new VectorContent((size_t) NDIM)), 645 Memory::ignore(new VectorContent((size_t) NDIM)), 646 Memory::ignore(new VectorContent((size_t) NDIM)), 647 Memory::ignore(new VectorContent((size_t) NDIM)) 648 }; 649 650 const Vector zeroVec(VCs[0]); 651 const Vector unitVec[NDIM]={ 652 Vector(setUnitVectorContent(VCs[1],0)), 653 Vector(setUnitVectorContent(VCs[2],1)), 654 Vector(setUnitVectorContent(VCs[3],2)) 655 };
Note:
See TracChangeset
for help on using the changeset viewer.