Changeset 8b9c43
- Timestamp:
- Apr 6, 2011, 1:50:41 PM (14 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:
- 783e88
- Parents:
- a700c4
- git-author:
- Frederik Heber <heber@…> (04/01/11 20:27:13)
- git-committer:
- Frederik Heber <heber@…> (04/06/11 13:50:41)
- Location:
- src
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Exceptions/Makefile.am
ra700c4 r8b9c43 15 15 NotOnSurfaceException.cpp \ 16 16 ShapeException.cpp \ 17 FormulaStringParseException.cpp \ 18 ZeroVectorException.cpp 17 FormulaStringParseException.cpp 19 18 20 19 … … 26 25 MissingValueException.hpp \ 27 26 NotOnSurfaceException.hpp \ 28 FormulaStringParseException.hpp \ 29 ZeroVectorException.hpp 27 FormulaStringParseException.hpp 30 28 31 29 -
src/LinearAlgebra/Exceptions.hpp
ra700c4 r8b9c43 18 18 19 19 class MatrixContent; 20 class Vector; 20 21 21 22 struct LinearAlgebraException : virtual std::exception, virtual boost::exception { }; … … 29 30 /** Exception information for LinearAlgebraException: matrix. 30 31 */ 31 typedef boost::error_info<struct tag_LinearAlgebraMatrix, const MatrixContent* const> LinearAlgebraMatrixContent; 32 typedef boost::error_info<struct tag_LinearAlgebraMatrixContent, const MatrixContent* const> LinearAlgebraMatrixContent; 33 34 /** Exception information for LinearAlgebraException: vector. 35 */ 36 typedef boost::error_info<struct tag_LinearAlgebraVector, const Vector* const> LinearAlgebraVector; 32 37 33 38 /** ============================ Specific exceptions ====================== */ … … 41 46 struct NotInvertibleException : virtual LinearAlgebraException { }; 42 47 48 /** Exception thrown when a vector with only zero components is invalidly encountered. 49 */ 50 struct ZeroVectorException : virtual LinearAlgebraException { }; 51 43 52 #endif /* EXCEPTIONS_HPP_ */ -
src/LinearAlgebra/Plane.cpp
ra700c4 r8b9c43 29 29 #include "Exceptions/MultipleSolutionsException.hpp" 30 30 #include "LinearAlgebra/defs.hpp" 31 #include "LinearAlgebra/Exceptions.hpp" 31 32 #include "LinearAlgebra/fast_functions.hpp" 32 33 #include "LinearAlgebra/Line.hpp" … … 68 69 Vector x1 = y1; 69 70 Vector x2 = y2; 70 if ((fabs(x1.Norm()) <= LINALG_MYEPSILON()) || (fabs(x2.Norm()) <= LINALG_MYEPSILON())) { 71 throw ZeroVectorException(__FILE__,__LINE__); 72 } 73 71 if ((fabs(x1.Norm()) <= LINALG_MYEPSILON())) { 72 throw ZeroVectorException() << LinearAlgebraVector(&x1); 73 } 74 if ((fabs(x2.Norm()) <= LINALG_MYEPSILON())) { 75 throw ZeroVectorException() << LinearAlgebraVector(&x2); 76 } 74 77 if((fabs(x1.Angle(x2)) <= LINALG_MYEPSILON())) { 75 78 throw LinearDependenceException(__FILE__,__LINE__); … … 93 96 { 94 97 if(normalVector->IsZero()) 95 throw ZeroVectorException( __FILE__,__LINE__);98 throw ZeroVectorException() << LinearAlgebraVector(&(*normalVector)); 96 99 double factor = 1/normalVector->Norm(); 97 100 // normalize the plane parameters … … 104 107 { 105 108 if(normalVector->IsZero()){ 106 throw ZeroVectorException( __FILE__,__LINE__);109 throw ZeroVectorException() << LinearAlgebraVector(&(*normalVector)); 107 110 } 108 111 normalVector->Normalize(); -
src/LinearAlgebra/Plane.hpp
ra700c4 r8b9c43 18 18 #include <vector> 19 19 #include <iosfwd> 20 21 #include "LinearAlgebra/Exceptions.hpp" 20 22 #include "LinearAlgebra/Space.hpp" 21 23 #include "Exceptions/LinearDependenceException.hpp" 22 #include "Exceptions/ZeroVectorException.hpp"23 24 24 25 class Vector; -
src/LinearAlgebra/unittests/PlaneUnitTest.cpp
ra700c4 r8b9c43 26 26 27 27 #include "LinearAlgebra/defs.hpp" 28 #include "LinearAlgebra/Exceptions.hpp" 28 29 #include "LinearAlgebra/Line.hpp" 29 30 #include "LinearAlgebra/Vector.hpp"
Note:
See TracChangeset
for help on using the changeset viewer.