📄 potentialbase.h
字号:
#ifndef potentialbaseH
#define potentialbaseH
#include "../davidson/defaulttd.h"
#include "../davidson/gridparam.h"
class PotentialBase
{
protected:
//potential type
ntyp typV;
private:
//saves values of the potential into files (1D, 2D, 3D)
void SaveCor1D(const GridParam &, ofstream &) const;
void SaveCor2D(const GridParam &, ofstream &) const; void SaveCor3D(const GridParam &, ofstream &) const;
public:
//default constructor of PotentialBase class
PotentialBase():typV(-1){};
//saves values of potential to file
void SaveToFiles(char *,const GridParam &) const;
/* returns the auxiliary identifier of the potential type
(value of the data member TypV which must be set in the derived class
constructor) */
ntyp GetTypV() const;
//Step function (returns 1 for x>=0, in other case returns 0)
ntyp Theta(const ftyp &) const;
//returns V(x)
virtual ftyp operator()(const ftyp &) const=0;
//returns V(x,y)
virtual ftyp operator()(const ftyp &, const ftyp &) const=0;
//returns V(x,y,z)
virtual ftyp operator()(const ftyp &, const ftyp &, const ftyp &) const=0;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -