ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include "../math_integral.h"
#include "gtest/gtest.h"
#include <math.h>
#include <fstream>
#include <iostream>
#include "source_base/constants.h"
Classes | |
class | SimpsonIntegralSinx |
class | SimpsonIntegralITF |
class | SimpsonIntegralExp |
Macros | |
#define | doublethreshold 1e-12 |
Functions | |
void | sinspace (double start, double end, const int nums, double *xv, double *h) |
TEST_F (SimpsonIntegralSinx, Constructor) | |
TEST_F (SimpsonIntegralSinx, SimpsonIntegralRab) | |
TEST_F (SimpsonIntegralSinx, SimpsonIntegralDr) | |
TEST_F (SimpsonIntegralSinx, SimpsonIntegral0toall) | |
TEST_F (SimpsonIntegralSinx, SimpsonIntegralAlltoinf) | |
TEST_F (SimpsonIntegralSinx, UniformGridOdd) | |
TEST_F (SimpsonIntegralSinx, UniformGridEven) | |
TEST_F (SimpsonIntegralSinx, LogGridOdd) | |
TEST_F (SimpsonIntegralSinx, LogGridEven) | |
TEST_F (SimpsonIntegralSinx, FourPoints) | |
TEST_F (SimpsonIntegralSinx, ThreePoints) | |
TEST_F (SimpsonIntegralITF, UniformGridOdd) | |
TEST_F (SimpsonIntegralITF, SinGridOdd) | |
TEST_F (SimpsonIntegralExp, UniformGridOdd) | |
TEST_F (SimpsonIntegralExp, SinGridOdd) | |
#define doublethreshold 1e-12 |
void sinspace | ( | double | start, |
double | end, | ||
const int | nums, | ||
double * | xv, | ||
double * | h | ||
) |
Tested functions:
TEST_F | ( | SimpsonIntegralExp | , |
SinGridOdd | |||
) |
TEST_F | ( | SimpsonIntegralExp | , |
UniformGridOdd | |||
) |
TEST_F | ( | SimpsonIntegralITF | , |
SinGridOdd | |||
) |
TEST_F | ( | SimpsonIntegralITF | , |
UniformGridOdd | |||
) |
TEST_F | ( | SimpsonIntegralSinx | , |
Constructor | |||
) |
TEST_F | ( | SimpsonIntegralSinx | , |
FourPoints | |||
) |
This test checks whether "simpson" yields the exact integral for a cubic polynomial sampled by four points. This case is handled by Simpson's 3/8 rule and should be exact.
TEST_F | ( | SimpsonIntegralSinx | , |
LogGridEven | |||
) |
TEST_F | ( | SimpsonIntegralSinx | , |
LogGridOdd | |||
) |
TEST_F | ( | SimpsonIntegralSinx | , |
SimpsonIntegral0toall | |||
) |
TEST_F | ( | SimpsonIntegralSinx | , |
SimpsonIntegralAlltoinf | |||
) |
TEST_F | ( | SimpsonIntegralSinx | , |
SimpsonIntegralDr | |||
) |
TEST_F | ( | SimpsonIntegralSinx | , |
SimpsonIntegralRab | |||
) |
TEST_F | ( | SimpsonIntegralSinx | , |
ThreePoints | |||
) |
This test checks whether "simpson" yields the exact integral for a quadratic polynomial sampled by three points.
TEST_F | ( | SimpsonIntegralSinx | , |
UniformGridEven | |||
) |
TEST_F | ( | SimpsonIntegralSinx | , |
UniformGridOdd | |||
) |