1 /* -*- c++ -*- ---------------------------------------------------------- 2 LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator 3 https://www.lammps.org/, Sandia National Laboratories 4 Steve Plimpton, sjplimp@sandia.gov 5 6 Copyright (2003) Sandia Corporation. Under the terms of Contract 7 DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains 8 certain rights in this software. This software is distributed under 9 the GNU General Public License. 10 11 See the README file in the top-level LAMMPS directory. 12 ------------------------------------------------------------------------- */ 13 14 #ifndef LMP_MATH_EIGEN_H 15 #define LMP_MATH_EIGEN_H 16 17 namespace MathEigen { 18 19 /** A specialized function which finds the eigenvalues and eigenvectors 20 * of a 3x3 matrix (in double ** format). 21 * 22 * \param mat the 3x3 matrix you wish to diagonalize 23 * \param eval store the eigenvalues here 24 * \param evec store the eigenvectors here... 25 * \return 0 if eigenvalue calculation converged, 1 if it failed */ 26 27 int jacobi3(double const *const *mat, double *eval, double **evec); 28 29 /** \overload */ 30 31 int jacobi3(double const mat[3][3], double *eval, double evec[3][3]); 32 33 } // namespace MathEigen 34 35 #endif //#ifndef LMP_MATH_EIGEN_H 36