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