ergo
xcmat_nan_inf_test.cc File Reference

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[])
 

Detailed Description

Tests that the DFT XC matrix construction does not result in "nan" or "inf" values.

Function Documentation

◆ compare_matrices()

static bool compare_matrices ( char  mat_name,
const real computed,
const long double *  ref,
int  sz,
ergo_real  eps 
)
static

◆ main()

int main ( int  argc,
char *  argv[] 
)

References test_small_many().

◆ test_functional()

static int test_functional ( const IntegralInfo ii,
const char *  funcName 
)
static

References test_small(), and Dft::GridParams::TURBO.

Referenced by test_small_many().

◆ test_small()

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

◆ test_small_many()

static int test_small_many ( )
static

References test_functional().

Referenced by main().

◆ value_seems_like_nan_or_inf()

static bool value_seems_like_nan_or_inf ( ergo_real  x)
static

Referenced by compare_matrices(), and test_small().