include math_eigen.h, remove it from .gitignore

This commit is contained in:
Axel Kohlmeyer 2020-09-16 14:12:14 -04:00
parent 0931cdd109
commit bd542efa52
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
3 changed files with 45 additions and 6 deletions

View File

@ -428,11 +428,11 @@ Eigensolver functions
The ``MathEigen`` sub-namespace of the ``LAMMPS_NS`` namespace contains
functions and classes for eigensolvers. Currently only the
:cpp:func:`jacobi3 function <MathEigen::jacobi3(double const *const *mat, double *eval, double **evec)>`
is used in various places in LAMMPS. That function is built on top
of a group of more generic eigensolvers that are maintained in the
``math_eigen_impl.h`` header file. This header contains the implementation
of three template classes:
:cpp:func:`jacobi3 function <MathEigen::jacobi3>` is used in various
places in LAMMPS. That function is built on top of a group of more
generic eigensolvers that are maintained in the ``math_eigen_impl.h``
header file. This header contains the implementation of three template
classes:
#. "Jacobi" calculates all of the eigenvalues and eigenvectors
of a dense, symmetric, real matrix.

1
src/.gitignore vendored
View File

@ -33,7 +33,6 @@
/pair_kim.h
/superpose3d.h
/math_eigen.h
/kokkos.cpp
/kokkos.h

40
src/math_eigen.h Normal file
View File

@ -0,0 +1,40 @@
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, 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. (Some of the code in this file is also
available using a more premissive license. See below for details.)
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
Contributing authors: Yuya Kurebayashi (Tohoku University, Lanczos algorithm)
Andrew Jewett (Scripps Research, Jacobi algorithm)
------------------------------------------------------------------------- */
#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]);
}
#endif //#ifndef LMP_MATH_EIGEN_H