Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace eigensolver code in LAMMPS with math_eigen.h and updated docs #2347

Merged
merged 31 commits into from
Sep 17, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7f6fc8a
updated math_eigen.h and moved it into the main "src" directory
jewettaij Sep 4, 2020
57f82ab
updated all code in LAMMPS to use the open-source "math_eigen.h" inst…
jewettaij Sep 5, 2020
58fa72d
replaced all numerical recipes jacobi() code with code from "math_eig…
jewettaij Sep 5, 2020
4b66414
fixed a type error in math_eigen.h
jewettaij Sep 5, 2020
7cb774e
some corrections before rewriting the doxygen comments to comply with…
jewettaij Sep 5, 2020
4ad6d99
updated documentation files: "pg_developer.rst", "math_eigen.h", and …
jewettaij Sep 6, 2020
c16321e
purged greek characters from "pd_developer.rst"
jewettaij Sep 6, 2020
2ee2009
removed assert() statements from "superpose3d.h"
jewettaij Sep 6, 2020
b295222
changed the "trim_and_count_words()" function declaration in "utils.h…
jewettaij Sep 6, 2020
d97e8d8
fixed linker problems in "utils.h" and "utils.cpp"
jewettaij Sep 6, 2020
eb6f7f9
Merge branch 'master' into math_eigen
jewettaij Sep 6, 2020
fabf762
reverting to previous version of util.h and util.cpp
jewettaij Sep 6, 2020
a57a140
bug fix fix unit tests, improve doc readability, and to prevent accid…
jewettaij Sep 7, 2020
f329d56
updated pg_developer.rst
jewettaij Sep 7, 2020
6ade5dd
changed the default sorting options in "jacobi3()" to be more similar…
jewettaij Sep 9, 2020
56b1300
reverted the default behavior of "jacobi3()". By default it now sort…
jewettaij Sep 9, 2020
2ab0878
remreduced compile time by removing unnecessary instantiations from m…
jewettaij Sep 9, 2020
3bacf97
Merge branch 'master' into math_eigen
jewettaij Sep 9, 2020
ed14793
moved eigensolver documentation into pg_dev_utils.rst
jewettaij Sep 9, 2020
f599869
Merge branch 'master' into math_eigen
akohlmey Sep 16, 2020
48ad860
only do Zstd tests if it is enabled/found.
akohlmey Sep 16, 2020
981d60f
update rigid tests for new eigensolver
akohlmey Sep 16, 2020
f7a939d
update atom_style tester for new jacobi implementation
akohlmey Sep 16, 2020
10991ee
separate the MathEigen implementation into its own header file
akohlmey Sep 16, 2020
fd9e39b
update docs
akohlmey Sep 16, 2020
0931cdd
relax epsilon for rigid body integrators
akohlmey Sep 16, 2020
bd542ef
include math_eigen.h, remove it from .gitignore
akohlmey Sep 16, 2020
942ed3a
update copyright headers to match LAMMPS' conventions
akohlmey Sep 16, 2020
96f4178
add URLs to upstream projects for eigensolvers
akohlmey Sep 16, 2020
a8a9fb6
adapt unit test for Jacobi class
akohlmey Sep 16, 2020
b176cdf
remove trailing whitespace
akohlmey Sep 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
include math_eigen.h, remove it from .gitignore
  • Loading branch information
akohlmey committed Sep 16, 2020
commit bd542efa52002e7564ac46b249f679e020dbf617
10 changes: 5 additions & 5 deletions doc/src/pg_dev_utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
/pair_kim.h

/superpose3d.h
/math_eigen.h

/kokkos.cpp
/kokkos.h
Expand Down
40 changes: 40 additions & 0 deletions src/math_eigen.h
Original file line number Diff line number Diff line change
@@ -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