Changeset 8b9c43


Ignore:
Timestamp:
Apr 6, 2011, 1:50:41 PM (14 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:
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)
Message:

Removed Exceptions/ZeroVectorException.

Location:
src
Files:
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • src/Exceptions/Makefile.am

    ra700c4 r8b9c43  
    1515  NotOnSurfaceException.cpp \
    1616  ShapeException.cpp \
    17   FormulaStringParseException.cpp \
    18   ZeroVectorException.cpp
     17  FormulaStringParseException.cpp
    1918       
    2019                                 
     
    2625  MissingValueException.hpp \
    2726  NotOnSurfaceException.hpp \
    28   FormulaStringParseException.hpp \
    29   ZeroVectorException.hpp
     27  FormulaStringParseException.hpp
    3028
    3129
  • src/LinearAlgebra/Exceptions.hpp

    ra700c4 r8b9c43  
    1818
    1919class MatrixContent;
     20class Vector;
    2021
    2122struct LinearAlgebraException : virtual std::exception, virtual boost::exception { };
     
    2930/** Exception information for LinearAlgebraException: matrix.
    3031 */
    31 typedef boost::error_info<struct tag_LinearAlgebraMatrix, const MatrixContent* const> LinearAlgebraMatrixContent;
     32typedef boost::error_info<struct tag_LinearAlgebraMatrixContent, const MatrixContent* const> LinearAlgebraMatrixContent;
     33
     34/** Exception information for LinearAlgebraException: vector.
     35 */
     36typedef boost::error_info<struct tag_LinearAlgebraVector, const Vector* const> LinearAlgebraVector;
    3237
    3338/** ============================ Specific exceptions ====================== */
     
    4146struct NotInvertibleException : virtual LinearAlgebraException { };
    4247
     48/** Exception thrown when a vector with only zero components is invalidly encountered.
     49 */
     50struct ZeroVectorException : virtual LinearAlgebraException { };
     51
    4352#endif /* EXCEPTIONS_HPP_ */
  • src/LinearAlgebra/Plane.cpp

    ra700c4 r8b9c43  
    2929#include "Exceptions/MultipleSolutionsException.hpp"
    3030#include "LinearAlgebra/defs.hpp"
     31#include "LinearAlgebra/Exceptions.hpp"
    3132#include "LinearAlgebra/fast_functions.hpp"
    3233#include "LinearAlgebra/Line.hpp"
     
    6869  Vector x1 = y1;
    6970  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  }
    7477  if((fabs(x1.Angle(x2)) <= LINALG_MYEPSILON())) {
    7578    throw LinearDependenceException(__FILE__,__LINE__);
     
    9396{
    9497  if(normalVector->IsZero())
    95     throw ZeroVectorException(__FILE__,__LINE__);
     98    throw ZeroVectorException() << LinearAlgebraVector(&(*normalVector));
    9699  double factor = 1/normalVector->Norm();
    97100  // normalize the plane parameters
     
    104107{
    105108  if(normalVector->IsZero()){
    106     throw ZeroVectorException(__FILE__,__LINE__);
     109    throw ZeroVectorException() << LinearAlgebraVector(&(*normalVector));
    107110  }
    108111  normalVector->Normalize();
  • src/LinearAlgebra/Plane.hpp

    ra700c4 r8b9c43  
    1818#include <vector>
    1919#include <iosfwd>
     20
     21#include "LinearAlgebra/Exceptions.hpp"
    2022#include "LinearAlgebra/Space.hpp"
    2123#include "Exceptions/LinearDependenceException.hpp"
    22 #include "Exceptions/ZeroVectorException.hpp"
    2324
    2425class Vector;
  • src/LinearAlgebra/unittests/PlaneUnitTest.cpp

    ra700c4 r8b9c43  
    2626
    2727#include "LinearAlgebra/defs.hpp"
     28#include "LinearAlgebra/Exceptions.hpp"
    2829#include "LinearAlgebra/Line.hpp"
    2930#include "LinearAlgebra/Vector.hpp"
Note: See TracChangeset for help on using the changeset viewer.