ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
math_bspline.h
Go to the documentation of this file.
1#ifndef MATH_BSPLINE_H
2#define MATH_BSPLINE_H
3
4namespace ModuleBase
5{
6
35{
36 private:
37 int norder; // the order of bezier base; norder >= 0
38 double Dx; // Dx: the interval of control node
39 double xi; // xi: the starting point
40 double *bezier; // bezier[n] = Bk[n]
41
42 public:
43 Bspline();
44 ~Bspline();
45
46 void init(int norderin, double Dxin, double xiin);
47
48 // Get the result of i-th bezier base functions for different input x+xi+n*Dx.
49 // x should be in [0,Dx]
50 // n-th result is stored in bezier[n];
51 void getbspline(double x);
52
53 // get the element of bezier
54 double bezier_ele(int n);
55};
56} // namespace ModuleBase
57#endif
A class to treat Cardinal B-spline interpolation.
Definition math_bspline.h:35
double * bezier
Definition math_bspline.h:40
void init(int norderin, double Dxin, double xiin)
Definition math_bspline.cpp:21
~Bspline()
Definition math_bspline.cpp:16
double bezier_ele(int n)
Definition math_bspline.cpp:37
Bspline()
Definition math_bspline.cpp:9
double xi
Definition math_bspline.h:39
void getbspline(double x)
Definition math_bspline.cpp:42
double Dx
Definition math_bspline.h:38
int norder
Definition math_bspline.h:37
Definition array_pool.h:6