MADNESS 0.10.1
testsuite.cc File Reference

The QA/test suite for Function. More...

#include <madness/mra/mra.h>
#include <unistd.h>
#include <cstdio>
#include <madness/constants.h>
#include <madness/mra/qmprop.h>
#include <madness/misc/ran.h>
Include dependency graph for testsuite.cc:

Classes

class  BinaryOp< resultT, L, R, opT, NDIM >
 Returns a new functor combining two functors via operation op(left,right). More...
class  DerivativeGaussian< T, NDIM >
class  Gaussian< T, NDIM >
class  GaussianPotential
 Computes the electrostatic potential due to a Gaussian charge distribution. More...
struct  lbcost< T, NDIM >
struct  myunaryop< T, NDIM >
struct  myunaryop_square< T, NDIM >
class  QMtest
struct  refop
struct  test_multiop< T, NDIM >

Namespaces

namespace  madness
 Namespace for all elements and tools of MADNESS.

Macros

#define CHECK(value, threshold, message)
#define END_TIMER(msg)
#define NO_GENTENSOR
#define START_TIMER   world.gop.fence(); ttt=wall_time(); sss=cpu_time()
#define TO_STRING(s)
#define TO_STRING2(s)

Functions

template<typename T>
T complexify (T c)
template<>
double_complex complexify< double_complex > (double_complex c)
template<>
float_complex complexify< float_complex > (float_complex c)
int main (int argc, char **argv)
template<typename T, typename L, typename R>
T product (L l, R r)
template<typename T, std::size_t NDIM>
Gaussian< T, NDIM > * RandomGaussian (const Tensor< double > cell, double expntmax=1e5)
 Makes a square-normalized Gaussian with random origin and exponent.
template<typename T, typename L, typename R>
T sum (L l, R r)
template<typename T, std::size_t NDIM>
int test_apply_push_1d (World &world)
template<typename T, std::size_t NDIM>
int test_basic (World &world)
template<typename T, std::size_t NDIM>
int test_conv (World &world)
 test the convergence of the MRA representation with respect to k and n
int test_coulomb (World &world)
template<typename T, std::size_t NDIM>
int test_diff (World &world)
template<typename T, std::size_t NDIM>
int test_io (World &world)
template<typename T, std::size_t NDIM>
int test_math (World &world)
template<typename T, std::size_t NDIM>
int test_op (World &world)
template<typename T, std::size_t NDIM>
int test_plot (World &world)
 this essentially tests the infinity norm
int test_qm (World &world)
bool madness::test_rnlij_rangelimited (const bool log_errors)
bool madness::test_rnlp (const bool log_errors)
bool madness::test_rnlp_rangelimited (const bool log_errors)
bool madness::test_rnlp_rangelimited_erf (const bool log_errors)

Variables

const double PI = 3.1415926535897932384
bool smalltest = false
double sss
double ttt

Detailed Description

The QA/test suite for Function.

Macro Definition Documentation

◆ CHECK

#define CHECK ( value,
threshold,
message )
Value:
do { \
if (world.rank() == 0) { \
bool status = std::abs(value) < threshold; \
const char* msgs[2] = {"FAILED","OK"}; \
std::printf("%20.20s :%5d :%30.30s : %10.2e < %10.2e : %s\n", (__FUNCTION__),(__LINE__),(message),(std::abs(value)),(threshold), (msgs[int(status)])); \
if (!status) ok = false; \
} \
} while (0)
const Future< void > Future< void >::value
Definition future.cc:44
static long abs(long a)
Definition tensor.h:214
std::string ok(const bool b)
Definition test6.cc:48
const char * status[2]
Definition testperiodic.cc:43

Referenced by test_basic(), test_coulomb(), test_diff(), test_io(), test_math(), test_op(), test_plot(), and test_qm().

◆ END_TIMER

#define END_TIMER ( msg)
Value:
ttt=wall_time()-ttt; sss=cpu_time()-sss; if (world.rank()==0) printf("timer: %20.20s %8.2fs %8.2fs\n", msg, sss, ttt)
static double ttt
Definition mcpfit.cc:57
static double sss
Definition mcpfit.cc:57
double wall_time()
Returns the wall time in seconds relative to an arbitrary origin.
Definition timers.cc:48
double cpu_time()
Definition test_list.cc:43

Referenced by test_coulomb(), test_diff(), and test_op().

◆ NO_GENTENSOR

#define NO_GENTENSOR

◆ START_TIMER

#define START_TIMER   world.gop.fence(); ttt=wall_time(); sss=cpu_time()

◆ TO_STRING

#define TO_STRING ( s)
Value:
#define TO_STRING2(s)
Definition test_be.cc:203

◆ TO_STRING2

#define TO_STRING2 ( s)
Value:
#s

Function Documentation

◆ complexify()

template<typename T>
T complexify ( T c)

◆ complexify< double_complex >()

References c.

◆ complexify< float_complex >()

References c.

◆ main()

◆ product()

template<typename T, typename L, typename R>
T product ( L l,
R r )
inline

References L, and R.

Referenced by test_math().

◆ RandomGaussian()

template<typename T, std::size_t NDIM>
Gaussian< T, NDIM > * RandomGaussian ( const Tensor< double > cell,
double expntmax = 1e5 )

◆ sum()

template<typename T, typename L, typename R>
T sum ( L l,
R r )
inline

◆ test_apply_push_1d()

◆ test_basic()

◆ test_conv()

◆ test_coulomb()

◆ test_diff()

◆ test_io()

◆ test_math()

◆ test_op()

◆ test_plot()

◆ test_qm()

Variable Documentation

◆ PI

const double PI = 3.1415926535897932384

◆ smalltest

bool smalltest = false

◆ sss

double sss

◆ ttt

double ttt