From: hackbard Date: Tue, 29 Apr 2008 18:55:34 +0000 (+0200) Subject: stupid unit mistake prelax dp X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=fcff5c32dd93b974117e82c6d3c92087f6a099dd;p=physik%2Fposic.git stupid unit mistake prelax dp --- diff --git a/mdrun.c b/mdrun.c index eff1ee5..d875822 100644 --- a/mdrun.c +++ b/mdrun.c @@ -332,7 +332,7 @@ int mdrun_parse_config(t_mdrun *mdrun) { csp.type|=CHSATTR_TCTRL; } if(!strncmp(word[i],"prelax",6)) { - csp.dp=atof(word[++i]); + csp.dp=atof(word[++i])*BAR; csp.type|=CHSATTR_PRELAX; } if(!strncmp(word[i],"trelax",6)) { @@ -451,8 +451,10 @@ int check_pressure(t_moldyn *moldyn,t_mdrun *mdrun) { double delta; - if(!(mdrun->sattr&SATTR_PRELAX)) + if(!(mdrun->sattr&SATTR_PRELAX)) { +printf("##### gleich raus!\n"); return TRUE; + } delta=moldyn->p_avg-moldyn->p_ref; @@ -462,6 +464,7 @@ int check_pressure(t_moldyn *moldyn,t_mdrun *mdrun) { if(delta>mdrun->dp) return FALSE; +printf("##### nach check raus (%f/%f)!\n",delta,mdrun->dp); return TRUE; } @@ -682,8 +685,8 @@ int mdrun_hook(void *ptr1,void *ptr2) { tau=mdrun->timestep; /* check whether relaxation steps are necessary */ - if(!((check_pressure(moldyn,mdrun)==FALSE)|\ - (check_temperature(moldyn,mdrun)==FALSE))) { + if((check_pressure(moldyn,mdrun)==TRUE)&\ + (check_temperature(moldyn,mdrun)==TRUE)) { /* be verbose */ stage_print("\n###########################\n");