include math_eigen.h, remove it from .gitignore
This commit is contained in:
@ -428,11 +428,11 @@ Eigensolver functions
|
|||||||
|
|
||||||
The ``MathEigen`` sub-namespace of the ``LAMMPS_NS`` namespace contains
|
The ``MathEigen`` sub-namespace of the ``LAMMPS_NS`` namespace contains
|
||||||
functions and classes for eigensolvers. Currently only the
|
functions and classes for eigensolvers. Currently only the
|
||||||
:cpp:func:`jacobi3 function <MathEigen::jacobi3(double const *const *mat, double *eval, double **evec)>`
|
:cpp:func:`jacobi3 function <MathEigen::jacobi3>` is used in various
|
||||||
is used in various places in LAMMPS. That function is built on top
|
places in LAMMPS. That function is built on top of a group of more
|
||||||
of a group of more generic eigensolvers that are maintained in the
|
generic eigensolvers that are maintained in the ``math_eigen_impl.h``
|
||||||
``math_eigen_impl.h`` header file. This header contains the implementation
|
header file. This header contains the implementation of three template
|
||||||
of three template classes:
|
classes:
|
||||||
|
|
||||||
#. "Jacobi" calculates all of the eigenvalues and eigenvectors
|
#. "Jacobi" calculates all of the eigenvalues and eigenvectors
|
||||||
of a dense, symmetric, real matrix.
|
of a dense, symmetric, real matrix.
|
||||||
|
|||||||
1
src/.gitignore
vendored
1
src/.gitignore
vendored
@ -33,7 +33,6 @@
|
|||||||
/pair_kim.h
|
/pair_kim.h
|
||||||
|
|
||||||
/superpose3d.h
|
/superpose3d.h
|
||||||
/math_eigen.h
|
|
||||||
|
|
||||||
/kokkos.cpp
|
/kokkos.cpp
|
||||||
/kokkos.h
|
/kokkos.h
|
||||||
|
|||||||
40
src/math_eigen.h
Normal file
40
src/math_eigen.h
Normal 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
|
||||||
Reference in New Issue
Block a user