Tests that the DFT XC matrix construction does not result in "nan" or "inf" values. More...
#include <stdio.h>
#include <unistd.h>
#include <memory>
#include <limits>
#include "integrals_1el_potential.h"
#include "integrals_2el.h"
#include "memorymanag.h"
#include "grid_reader.h"
#include "dft_common.h"
#include "xc_matrix.h"
Functions | |
static bool | value_seems_like_nan_or_inf (ergo_real x) |
static bool | compare_matrices (char mat_name, const real *computed, const long double *ref, int sz, ergo_real eps) |
static int | test_small (const IntegralInfo &ii, const char *functional, const Dft::GridParams::RadialScheme &gridScheme, const char *gridSchemeName, const int *charges, const real(*coords)[3], const long double(*XCRef)[2]) |
static int | test_functional (const IntegralInfo &ii, const char *funcName) |
static int | test_small_many () |
int | main (int argc, char *argv[]) |
Tests that the DFT XC matrix construction does not result in "nan" or "inf" values.
static bool compare_matrices | ( | char | mat_name, | |
const real * | computed, | |||
const long double * | ref, | |||
int | sz, | |||
ergo_real | eps | |||
) | [static] |
References template_blas_fabs(), and value_seems_like_nan_or_inf().
int main | ( | int | argc, | |
char * | argv[] | |||
) |
References test_small_many().
static int test_functional | ( | const IntegralInfo & | ii, | |
const char * | funcName | |||
) | [static] |
References test_small(), and Dft::GridParams::TURBO.
Referenced by test_small_many().
static int test_small | ( | const IntegralInfo & | ii, | |
const char * | functional, | |||
const Dft::GridParams::RadialScheme & | gridScheme, | |||
const char * | gridSchemeName, | |||
const int * | charges, | |||
const real(*) | coords[3], | |||
const long double(*) | XCRef[2] | |||
) | [static] |
References Molecule::addAtom(), BasisInfoStruct::addBasisfuncsForMolecule(), compare_matrices(), dft_get_uxc_mt(), dft_get_xc_mt(), dft_init(), dft_setfunc(), ergo_free(), ergo_new, ERGO_SPREFIX, grid_free_files(), grid_set_tmpdir(), Functional_::is_gga, BasisInfoStruct::noOfBasisFuncs, Dft::GridParams::radialGridScheme, selected_func, template_blas_fabs(), and value_seems_like_nan_or_inf().
Referenced by test_functional().
static int test_small_many | ( | ) | [static] |
References test_functional().
Referenced by main().
static bool value_seems_like_nan_or_inf | ( | ergo_real | x | ) | [static] |
Referenced by compare_matrices(), and test_small().