📄 shoot.cpp
字号:
#include "nr.h"
extern int nvar;
extern DP x1,x2;
int kmax,kount;
DP dxsav;
Vec_DP *xp_p;
Mat_DP *yp_p;
void derivs(const DP x, Vec_I_DP &y, Vec_O_DP &dydx);
void load(const DP x1, Vec_I_DP &v, Vec_O_DP &y);
void score(const DP xf, Vec_I_DP &y, Vec_O_DP &f);
void NR::shoot(Vec_I_DP &v, Vec_O_DP &f)
{
const DP EPS=1.0e-14;
int nbad,nok;
DP h1,hmin=0.0;
Vec_DP y(nvar);
kmax=0;
h1=(x2-x1)/100.0;
load(x1,v,y);
odeint(y,x1,x2,EPS,h1,hmin,nok,nbad,derivs,rkqs);
score(x2,y,f);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -