-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Dense infastructure * Dense versions of standard functions * Turn lambda into a function of one variable * Dense density matrix solver * Linting for a more consistent feel * Singular value decomposition * Separate singular values into a new module Avoids cyclic dependency * Example directions fixed * My theory is that the test has a race condition * Try reactivating just the diagonal check of the eigenvalues * Test vectors too * Reactivate SVD test * Dense FOE for reference purposes * Forgot to add files * Removed testing line * Apparantely, those default values cause trouble * Fix capitalization * Fix chemical potential calculation * Fix cmake * Fix typo * Merge with master - fix * Merge in partial electrons * Fix a bug where we checked an unallocated variable's properties * Increase optional parameters for eigenexa (#190) * TRS4 seems faster * Nvals option for serial * Set number of values for eigenexa * Fix for optional vectors * Forgot conjugate in test
- Loading branch information
1 parent
1605c9e
commit de6067f
Showing
78 changed files
with
3,770 additions
and
1,225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Find the EigenExa Module | ||
# Variables set: | ||
# - EigenExa_FOUND - system found EigenExa. | ||
# - EigenExa_LIBRARIES - the linker line for EigenExa. | ||
# - EigenExa_INCLUDE_DIRS - the path to EigenExa. | ||
|
||
# First we search for the libraries | ||
find_library(EigenExa_LIBRARIES EigenExa) | ||
find_path(EigenExa_INCLUDE_DIRS "eigen_libs_mod.mod") | ||
|
||
# Now check if that worked | ||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(EigenExa DEFAULT_MSG | ||
EigenExa_LIBRARIES EigenExa_INCLUDE_DIRS) | ||
mark_as_advanced(EigenExa_LIBRARIES EigenExa_INCLUDE_DIRS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef EIGENSOLVERS_ch | ||
#define EIGENSOLVERS_ch | ||
|
||
void EigenDecomposition_wrp(const int *ih_this, int *ih_eigenvectors, | ||
const int *nvals, int *ih_eigenvalues, | ||
const int *ih_solver_parameters); | ||
void EigenDecomposition_novec_wrp(const int *ih_this, int *ih_eigenvectors, | ||
const int *nvals, | ||
const int *ih_solver_parameters); | ||
void SingularValueDecompostion_wrp(const int *ih_this, int *ih_leftvectors, | ||
int *ih_rightvectors, int *ih_singularvalues, | ||
const int *ih_solver_parameters); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef DENSITYMATRIXSOLVERS_ch | ||
#define DENSITYMATRIXSOLVERS_ch | ||
|
||
void ComputeDenseFOE_wrp(const int *ih_Hamiltonian, | ||
const int *ih_InverseSquareRoot, const double *trace, | ||
int *ih_Density, const double *inv_temp_in, | ||
const double *energy_value_out, | ||
const double *chemical_potential_out, | ||
const int *ih_solver_parameters); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include "EigenSolvers.h" | ||
using namespace NTPoly; | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
extern "C" { | ||
#include "EigenSolvers_c.h" | ||
} | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
namespace NTPoly { | ||
//////////////////////////////////////////////////////////////////////////////// | ||
void EigenSolvers::EigenDecomposition( | ||
const Matrix_ps &matrix, Matrix_ps &eigenvalues, int nvals, | ||
Matrix_ps &eigenvectors, const SolverParameters &solver_parameters) { | ||
EigenDecomposition_wrp(GetIH(matrix), GetIH(eigenvalues), &nvals, | ||
GetIH(eigenvectors), GetIH(solver_parameters)); | ||
} | ||
//////////////////////////////////////////////////////////////////////////////// | ||
void EigenSolvers::EigenValues(const Matrix_ps &matrix, Matrix_ps &eigenvalues, | ||
int nvals, | ||
const SolverParameters &solver_parameters) { | ||
EigenDecomposition_novec_wrp(GetIH(matrix), GetIH(eigenvalues), &nvals, | ||
GetIH(solver_parameters)); | ||
} | ||
//////////////////////////////////////////////////////////////////////////////// | ||
void EigenSolvers::SingularValueDecomposition( | ||
const Matrix_ps &matrix, Matrix_ps &leftvectors, Matrix_ps &rightvectors, | ||
Matrix_ps &singularvalues, const SolverParameters &solver_parameters) { | ||
SingularValueDecompostion_wrp(GetIH(matrix), GetIH(leftvectors), | ||
GetIH(rightvectors), GetIH(singularvalues), | ||
GetIH(solver_parameters)); | ||
} | ||
} // namespace NTPoly |
Oops, something went wrong.