MADNESS 0.10.1
Functions | Variables
testfuns.cc File Reference
#include "testpc.h"
#include "madness/tensor/clapack_fortran.h"
#include "madness/world/madness_exception.h"
Include dependency graph for testfuns.cc:

Functions

double distancesq (double x, double y, double z, double x0, double y0, double z0)
 
double erfaroverr (double a, double r)
 
double exact_cosine (double x, double y, double z)
 
double exact_dipole (double x, double y, double z)
 
double exact_dipoleX (double x, double y, double z)
 
double exact_quadrupole (double x, double y, double z)
 
double exact_quadrupoleX (double x, double y, double z)
 
double exact_spheropole (double x, double y, double z)
 
double f_cosine (double x, double y, double z)
 
double f_dipole (double x, double y, double z)
 
double f_quadrupole (double x, double y, double z)
 
double f_spheropole (double x, double y, double z)
 
std::vector< double > fit (size_t m, size_t n, const std::vector< double > N, const std::vector< double > &f)
 
std::vector< double > linspace (double a, double b, size_t n, bool include_right_endpoint)
 
double opposing_field_potential (double x, double y, double z)
 
double periodic_sum (double x, double y, double z, double(*f)(double, double, double), const int N=50)
 
double periodic_sum_accelerated (double x, double y, double z, double(*f)(double, double, double), const size_t N=9, const size_t p=7)
 
std::vector< double > periodic_sum_partial (double x, double y, double z, double(*f)(double, double, double), const int N)
 
void set_test_case (int test_case)
 
std::vector< double > solve (size_t m, size_t n, const std::vector< double > &M, const std::vector< double > &f)
 
std::vector< double > tabulate (double(*f)(double, double, double), std::vector< double > x, std::vector< double > y, std::vector< double > z)
 

Variables

const double a = 100.0
 
const double b = 200.0
 
double(* exact )(double, double, double) = nullptr
 
double(* f )(double, double, double) = nullptr
 
const double offset = 0.1
 
const double wx = 1
 
const double wy = 2
 
const double wz = 3
 

Function Documentation

◆ distancesq()

double distancesq ( double  x,
double  y,
double  z,
double  x0,
double  y0,
double  z0 
)

◆ erfaroverr()

double erfaroverr ( double  a,
double  r 
)

References a, e(), and pi.

Referenced by exact_dipoleX(), exact_quadrupoleX(), and exact_spheropole().

◆ exact_cosine()

double exact_cosine ( double  x,
double  y,
double  z 
)

References f_cosine(), L, pi, wx, wy, and wz.

Referenced by set_test_case().

◆ exact_dipole()

double exact_dipole ( double  x,
double  y,
double  z 
)

◆ exact_dipoleX()

double exact_dipoleX ( double  x,
double  y,
double  z 
)

References b, distancesq(), erfaroverr(), offset, xshift, yshift, and zshift.

Referenced by exact_dipole().

◆ exact_quadrupole()

double exact_quadrupole ( double  x,
double  y,
double  z 
)

◆ exact_quadrupoleX()

double exact_quadrupoleX ( double  x,
double  y,
double  z 
)

References b, distancesq(), erfaroverr(), offset, xshift, yshift, and zshift.

Referenced by exact_quadrupole().

◆ exact_spheropole()

double exact_spheropole ( double  x,
double  y,
double  z 
)

References a, b, distancesq(), erfaroverr(), L, pi, xshift, yshift, and zshift.

Referenced by set_test_case().

◆ f_cosine()

double f_cosine ( double  x,
double  y,
double  z 
)

References L, pi, wx, wy, wz, xshift, yshift, and zshift.

Referenced by exact_cosine(), and set_test_case().

◆ f_dipole()

double f_dipole ( double  x,
double  y,
double  z 
)

References b, distancesq(), offset, pi, xshift, yshift, and zshift.

Referenced by set_test_case().

◆ f_quadrupole()

double f_quadrupole ( double  x,
double  y,
double  z 
)

References b, distancesq(), offset, pi, xshift, yshift, and zshift.

Referenced by set_test_case().

◆ f_spheropole()

double f_spheropole ( double  x,
double  y,
double  z 
)

References a, b, distancesq(), pi, xshift, yshift, and zshift.

Referenced by set_test_case().

◆ fit()

std::vector< double > fit ( size_t  m,
size_t  n,
const std::vector< double >  N,
const std::vector< double > &  f 
)

◆ linspace()

std::vector< double > linspace ( double  a,
double  b,
size_t  n,
bool  include_right_endpoint 
)

References a, b, h(), and v.

Referenced by main().

◆ opposing_field_potential()

double opposing_field_potential ( double  x,
double  y,
double  z 
)

References L, mu, offset, pi, and zshift.

Referenced by exact_dipole().

◆ periodic_sum()

double periodic_sum ( double  x,
double  y,
double  z,
double(*)(double, double, double)  f,
const int  N = 50 
)

References f, L, N, sum, and Z.

◆ periodic_sum_accelerated()

double periodic_sum_accelerated ( double  x,
double  y,
double  z,
double(*)(double, double, double)  f,
const size_t  N = 9,
const size_t  p = 7 
)

References c, f, fit(), N, p(), periodic_sum_partial(), and v.

Referenced by exact_dipole(), and exact_quadrupole().

◆ periodic_sum_partial()

std::vector< double > periodic_sum_partial ( double  x,
double  y,
double  z,
double(*)(double, double, double)  f,
const int  N 
)

References std::abs(), f, L, N, sum, and Z.

Referenced by periodic_sum_accelerated().

◆ set_test_case()

void set_test_case ( int  test_case)

◆ solve()

std::vector< double > solve ( size_t  m,
size_t  n,
const std::vector< double > &  M,
const std::vector< double > &  f 
)

References c, dgels_(), f, m, and MADNESS_ASSERT.

Referenced by fit().

◆ tabulate()

std::vector< double > tabulate ( double(*)(double, double, double)  f,
std::vector< double >  x,
std::vector< double >  y,
std::vector< double >  z 
)

References f, and k.

Variable Documentation

◆ a

const double a = 100.0

◆ b

const double b = 200.0

◆ exact

double(* exact) (double, double, double) ( double  ,
double  ,
double   
) = nullptr

◆ f

double(* f) (double, double, double) ( double  ,
double  ,
double   
) = nullptr

◆ offset

const double offset = 0.1

◆ wx

const double wx = 1

Referenced by exact_cosine(), and f_cosine().

◆ wy

const double wy = 2

Referenced by exact_cosine(), and f_cosine().

◆ wz

const double wz = 3

Referenced by exact_cosine(), and f_cosine().