[Fortran] 纯文本查看 复制代码
IF(SFLAG%IRECRD.GE.1000) THEN
CALL STATIS(c_loc(SFLAG))
TMPTM0 = SECNDS(0.0)
CALL FRMEM(c_loc(FLAG),c_loc(SFLAG))
WRITE (*,*) 'frmem has done!'
TMPTM = SECNDS(0.0)
DELTM = DELTM + (TMPTM - TMPTM0)
END IF
[C] 纯文本查看 复制代码
void statis(struct ssflag *SFLAG)
{
char str[80];
void output(struct incrmnt *pst, FILE *out);
FILE *out;
sprintf(str, "output\\statis%d.plt", SFLAG->nstep);
out=fopen(str,"w");
output(phead,out);
fclose(out);
return;
}
void output(struct incrmnt *pst, FILE *out)
{
static int i;
if(pst!=NULL)
{
fprintf(out,"%10d%14.2f%10d%10d\n",i++,pst->y[0],pst->js,pst->gross);
output(pst->lchild,out);
output(pst->rchild,out);
}
return;
}