ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include "source_base/module_grid/radial.h"
#include "gtest/gtest.h"
#include <cmath>
#include <functional>
#include <mpi.h>
Typedefs | |
using | Func_t = std::function< double(double)> |
Functions | |
double | quadrature (const Func_t &f, int n, double *r, double *w) |
TEST (RadialTest, Baker) | |
TEST (RadialTest, Murray) | |
TEST (RadialTest, Treutler) | |
TEST (RadialTest, Mura) | |
int | main (int argc, char **argv) |
Variables | |
const double | pi = std::acos(-1.0) |
std::vector< std::pair< Func_t, double > > | test_func_ref |
using Func_t = std::function<double(double)> |
int main | ( | int | argc, |
char ** | argv | ||
) |
double quadrature | ( | const Func_t & | f, |
int | n, | ||
double * | r, | ||
double * | w | ||
) |
TEST | ( | RadialTest | , |
Baker | |||
) |
TEST | ( | RadialTest | , |
Mura | |||
) |
TEST | ( | RadialTest | , |
Murray | |||
) |
TEST | ( | RadialTest | , |
Treutler | |||
) |
const double pi = std::acos(-1.0) |
This test briefly checks various radial quadrature schemes by comparing their numerical results with analytical values on a few simple functions.
The number of grid points and scaling factor are not carefully selected and the test is not exhaustive. It is just a sanity check.
std::vector<std::pair<Func_t, double> > test_func_ref |