MADNESS  0.10.1
Classes | Namespaces | Macros | Functions | Variables
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

 madness
 File holds all helper structures necessary for the CC_Operator and CC2 class.
 

Macros

#define CHECK(value, threshold, message)
 
#define END_TIMER(msg)   ttt=wall_time()-ttt; sss=cpu_time()-sss; if (world.rank()==0) printf("timer: %20.20s %8.2fs %8.2fs\n", msg, sss, ttt)
 
#define NO_GENTENSOR
 
#define START_TIMER   world.gop.fence(); ttt=wall_time(); sss=cpu_time()
 
#define TO_STRING(s)   TO_STRING2(s)
 
#define TO_STRING2(s)   #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. More...
 
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 More...
 
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 More...
 
int test_qm (World &world)
 
bool madness::test_rnlp ()
 

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)
static long abs(long a)
Definition: tensor.h:218
std::string ok(const bool b)
Definition: test6.cc:43
const char * status[2]
Definition: testperiodic.cc:43

◆ END_TIMER

#define END_TIMER (   msg)    ttt=wall_time()-ttt; sss=cpu_time()-sss; if (world.rank()==0) printf("timer: %20.20s %8.2fs %8.2fs\n", msg, sss, ttt)

◆ 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)    TO_STRING2(s)

◆ TO_STRING2

#define TO_STRING2 (   s)    #s

Function Documentation

◆ complexify()

template<typename T >
T complexify ( T  c)

References c.

◆ complexify< double_complex >()

References c.

◆ complexify< float_complex >()

References c.

◆ main()

int main ( int  argc,
char **  argv 
)

◆ product()

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

References T().

◆ RandomGaussian()

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.

References lo, NDIM, PI, pow(), madness::RandomValue< double >(), and T().

◆ sum()

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

References T().

◆ test_apply_push_1d()

template<typename T , std::size_t NDIM>
int test_apply_push_1d ( World world)

◆ test_basic()

template<typename T , std::size_t NDIM>
int test_basic ( World world)

◆ test_conv()

template<typename T , std::size_t NDIM>
int test_conv ( World world)

◆ test_coulomb()

int test_coulomb ( World world)

◆ test_diff()

template<typename T , std::size_t NDIM>
int test_diff ( World world)

◆ test_io()

template<typename T , std::size_t NDIM>
int test_io ( World world)

◆ test_math()

template<typename T , std::size_t NDIM>
int test_math ( World world)

◆ test_op()

template<typename T , std::size_t NDIM>
int test_op ( World world)

◆ test_plot()

template<typename T , std::size_t NDIM>
int test_plot ( World world)

◆ test_qm()

int test_qm ( World world)

Variable Documentation

◆ PI

const double PI = 3.1415926535897932384

◆ smalltest

bool smalltest = false

Referenced by main(), and test_conv().

◆ sss

double sss

◆ ttt

double ttt