📄 pwell.cpp
字号:
#include "../davidson/pWell.h"
#include <math.h>
PotentialWell::PotentialWell(const ftyp &a, const ftyp &V0):
PotentialBase()
{
typV=1;
PotentialWell::a=a;
PotentialWell::V0=V0;
}
ftyp PotentialWell::operator()(const ftyp &x) const
{ return fabs(x)<=a?-V0:0;}ftyp PotentialWell::operator()(const ftyp &x, const ftyp &y) const{ return sqrt(x*x+y*y)<=a?-V0:0;}ftyp PotentialWell::operator()(const ftyp &x, const ftyp &y, const ftyp &z) const{ return sqrt(x*x+y*y+z*z)<=a?-V0:0;}
void PotentialWell::SetAV0(const ftyp &a, const ftyp &V0)
{ PotentialWell::a = a; PotentialWell::V0 = V0;}ftyp PotentialWell::GetV0() const{ return V0;}ftyp PotentialWell::GetA() const{ return a;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -