ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include "source_pw/module_pwdft/radial_proj.h"
#include <gtest/gtest.h>
#include <algorithm>
#include <numeric>
#include <fftw3.h>
#include <random>
Macros | |
#define | DOUBLETHRESHOLD 1e-15 |
Functions | |
TEST (RadialProjectionTest, BuildBackwardMapTest) | |
TEST (RadialProjectionTest, BuildForwardMapTest) | |
TEST (RadialProjectionTest, MaskfunctionGenerationTest) | |
TEST (RadialProjectionTest, BuildSbtTabCorrectnessTest) | |
TEST (RadialProjectionTest, BuildSbtTabStabilityTest) | |
int | main () |
#define DOUBLETHRESHOLD 1e-15 |
int main | ( | ) |
TEST | ( | RadialProjectionTest | , |
BuildBackwardMapTest | |||
) |
a backward map will index irow to (it, iproj, m). For the above example, it is actually the first atom type has two projectors, the first projector has l = 0, the second has l = 1. The former will have only one channel, the second will have 3. The second atom type has 4 projectors...
Therefore, it is expected there are 1+3+1+3+5+7+1+3+5 = 29 rows in total.
TEST | ( | RadialProjectionTest | , |
BuildForwardMapTest | |||
) |
TEST | ( | RadialProjectionTest | , |
BuildSbtTabCorrectnessTest | |||
) |
The following Python code is used to generate the reference data from scipy.integrate import simps import numpy as np
r = np.arange(0, 2.01, 0.01) mask = np.array(mask) omega = 1
val = simps(mask*r**2, x=r) * np.sqrt(4*np.pi) print(val/np.sqrt(omega))
TEST | ( | RadialProjectionTest | , |
BuildSbtTabStabilityTest | |||
) |
TEST | ( | RadialProjectionTest | , |
MaskfunctionGenerationTest | |||
) |