1 /*!
2  * \file   include/FSES/syevd3.hxx
3  * \brief
4  * \author Joachim Kopp/Thomas Helfer
5  * \date   02 janv. 2017
6  * \copyright Copyright (C) 2006-2018 CEA/DEN, EDF R&D. All rights
7  * reserved.
8  * This project is publicly released under either the GNU GPL Licence
9  * or the CECILL-A licence. A copy of thoses licences are delivered
10  * with the sources of TFEL. CEA or EDF may also distribute this
11  * project under specific licensing conditions.
12  *
13  * ----------------------------------------------------------------------------
14  * This file has been introduced in TFEL with the courtesy of Joachim Kopp.
15  *
16  * Original licence
17  *
18  * Numerical diagonalization of 3x3 matrcies
19  * Copyright (C) 2006  Joachim Kopp
20  *
21  * This library is free software; you can redistribute it and/or
22  * modify it under the terms of the GNU Lesser General Public
23  * License as published by the Free Software Foundation; either
24  * version 2.1 of the License, or (at your option) any later version.
25  *
26  * This library is distributed in the hope that it will be useful,
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29  * Lesser General Public License for more details.
30  *
31  * You should have received a copy of the GNU Lesser General Public
32  * License along with this library; if not, write to the Free Software
33  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
34  */
35 
36 #ifndef LIB_FSES_SYEVD3_HXX
37 #define LIB_FSES_SYEVD3_HXX
38 
39 namespace fses{
40 
41   // ----------------------------------------------------------------------------
42   // Calculates the eigenvalues and normalized eigenvectors of a symmetric 3x3
43   // matrix A using Cuppen's Divide & Conquer algorithm.
44   // The function accesses only the diagonal and upper triangular parts of A.
45   // The access is read-only.
46   // ----------------------------------------------------------------------------
47   // Parameters:
48   //   Q: Storage buffer for eigenvectors
49   //   w: Storage buffer for eigenvalues
50   //   A: The symmetric input matrix
51   // ----------------------------------------------------------------------------
52   // Return value:
53   //   0: Success
54   //  -1: Error
55   // ----------------------------------------------------------------------------
56   // Dependencies:
57   //   syev2(), slvsec3(), sytrd3()
58   // ----------------------------------------------------------------------------
59   template<typename MatrixType,typename VectorType,typename MatrixType2>
60   int syevd3(MatrixType&,VectorType&,const MatrixType2&);
61 
62 } // end of namespace fses
63 
64 #include"FSES/syevd3.ixx"
65 
66 #endif /* LIB_FSES_SYEVD3_HXX */
67