| 查看: 365 | 回复: 0 | |||
| 当前主题已经存档。 | |||
jwf633木虫 (正式写手)
|
[交流]
请大家帮忙看看,我程序中的龙格-库塔方法对吗?
|
||
|
公式见附件: 程序主要代码如下: for(k=0;k extract1(i,j,xtemp); //pick out X[k][j] at site(i,j) to xtemp[k]; //caculate the k1[S] for all species at site(i,j) f(sigma[k],rou[k],kc,xtemp,k1); //caculate X[k][j]+k1[k]*tao/2 increase(tao,k1,xtemp); //caculate K2 for species k at site(i,j) f(sigma[k],rou[k],kc,xtemp,k2); //caculate X[k][j]+k2[k][j]*tao/2 increase(tao,k2,xtemp); //caculate k3 for species k at site(i,j) f(sigma[k],rou[k],kc,xtemp,k3); //caculate X[k][j]+k3[k][j]*tao increase(2*tao,k3,xtemp); //caculate K4[k][j] for species k at site(i,j) f(sigma[k],rou[k],kc,xtemp,k4); XX[k][j]=X[k][j]+tao*((k1[k]+2*k2[k]+2*k3[k]+k4[k])/6+PXX[k][j]); } void f(float sg,float r, float k[S][S],float x[S],float kk[S]) { int i,j; float temp1,temp2; for(i=0;i temp1=0; temp2=0; kk=(-1)*sg*x; for(j=0;j temp1=1-temp1; for(j=0;j temp2+=k[j]*x[j]; temp2+=r; kk+=temp1*temp2*x; } } [ Last edited by csfn on 2008-12-29 at 20:08 ] |
» 猜你喜欢
请问有评职称,把科研教学业绩算分排序的高校吗
已经有4人回复
孩子确诊有中度注意力缺陷
已经有12人回复
2025冷门绝学什么时候出结果
已经有3人回复
天津工业大学郑柳春团队欢迎化学化工、高分子化学或有机合成方向的博士生和硕士生加入
已经有4人回复
康复大学泰山学者周祺惠团队招收博士研究生
已经有6人回复
AI论文写作工具:是科研加速器还是学术作弊器?
已经有3人回复
2026博士申请-功能高分子,水凝胶方向
已经有6人回复
论文投稿,期刊推荐
已经有4人回复
硕士和导师闹得不愉快
已经有13人回复
请问2026国家基金面上项目会启动申2停1吗
已经有5人回复














回复此楼