mirror of
https://github.com/triqs/dft_tools
synced 2024-11-04 21:23:53 +01:00
11d394fd5b
* moved the plovasp C++ code to c++/triqs_dft_tools/converters/vasp * added global header triqs_dft_tools/triqs_dft_tools.hpp * python dir based on single cmakelist file * registered C++ tests for plovasp * corrected imports for py3 tests for plovasp * corrected block order in sigma_from_file and srvo3_Gloc * exchanged ref files for sigma_from_file, srvo3_Gloc, SrVO3.ref.h5 * moved vasp converter bash scripts from dir shells to bin dir
36 lines
659 B
C++
36 lines
659 B
C++
|
|
#include "testing.hpp"
|
|
|
|
int main()
|
|
{
|
|
double e[4], en, ci_sum, ct, res[4];
|
|
int inds[4], inds_should[4];
|
|
int i, flag;
|
|
char mess[128];
|
|
|
|
e[0] = -1.5;
|
|
e[1] = -1.309017;
|
|
e[2] = -1.0;
|
|
e[3] = -0.5;
|
|
|
|
en = -0.55;
|
|
printf("\n Test case 2\n\n");
|
|
|
|
flag = dos_reorder(en, e, inds);
|
|
|
|
dos_corner_weights(en, e, inds, res);
|
|
dos_tet_weights(en, e, inds, &ct);
|
|
|
|
for(i = 0, ci_sum = 0.0; i < 4; i++)
|
|
{
|
|
printf(" res[%d] = %20.15lf\n", i, res[i]);
|
|
ci_sum += res[i];
|
|
}
|
|
|
|
printf(" Difference: %le\n", fabs(ci_sum - ct));
|
|
|
|
sprintf(mess, "Difference between 'ci_sum' and 'ct' is too large");
|
|
ASSERT(fabs(ci_sum - ct) < 1e-12, mess);
|
|
}
|
|
|