From: hackbard Date: Fri, 6 Jul 2007 13:59:41 +0000 (+0000) Subject: some fixes X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4af1d076a5e811d5c35832e7ea5f720554b295b;p=physik%2Fposic.git some fixes --- diff --git a/Makefile b/Makefile index ce40484..72904f5 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ POT_SRC=potentials/tersoff.c POT_SRC+=potentials/albe.c POT_SRC+= potentials/lennard_jones.c potentials/harmonic_oscillator.c -all: sic +all: sic fluctuation_calc sic: $(CC) $(CFLAGS) $(LDFLAGS) $(POT_SRC) $(SOURCE) sic.c -o sic diff --git a/fluctuation_calc.c b/fluctuation_calc.c index 210f382..0ef0920 100644 --- a/fluctuation_calc.c +++ b/fluctuation_calc.c @@ -100,10 +100,11 @@ int main(int argc,char **argv) { } } +printf(" count = %d\n",count); de2=e2/count-e*e/(count*count); printf("--> fluctuation [eV/atom]: %.20f\n",de2); if(argc==8) { - de2*=(np*np)*(EV*EV); + de2*=((np*np*EV*EV)); printf(" specific heat capacity (T=%f K) [J/(kg K)]:\n", t); printf(" nve: %f\n", diff --git a/sic.c b/sic.c index 30de328..5bdfeea 100644 --- a/sic.c +++ b/sic.c @@ -209,7 +209,7 @@ int main(int argc,char **argv) { albe_mult_complete_params(&ap); /* set (initial) dimensions of simulation volume */ -#ifdef ALBLE +#ifdef ALBE //set_dim(&md,8*ALBE_LC_SI,8*ALBE_LC_SI,8*ALBE_LC_SI,TRUE); //set_dim(&md,8*ALBE_LC_C,8*ALBE_LC_C,8*ALBE_LC_C,TRUE); set_dim(&md,8*ALBE_LC_SIC,8*ALBE_LC_SIC,8*ALBE_LC_SIC,TRUE); @@ -223,7 +223,7 @@ int main(int argc,char **argv) { set_pbc(&md,TRUE,TRUE,TRUE); /* create the lattice / place atoms */ -#ifdef ALBLE +#ifdef ALBE //create_lattice(&md,DIAMOND,ALBE_LC_SI,SI,M_SI, //create_lattice(&md,DIAMOND,ALBE_LC_C,C,M_C, #else @@ -303,7 +303,7 @@ int main(int argc,char **argv) { //set_pt_scale(&md,0,0,T_SCALE_BERENDSEN,100.0); //set_pt_scale(&md,P_SCALE_BERENDSEN,0.001, // T_SCALE_BERENDSEN,100.0); - //set_pt_scale(&md,0,0,T_SCALE_DIRECT,1.0); + //set_pt_scale(&md,0,0,T_SCALE_dIRECT,1.0); //set_pt_scale(&md,P_SCALE_BERENDSEN,0.001,0,0); /* initial thermal fluctuations of particles (in equilibrium) */ @@ -311,7 +311,7 @@ int main(int argc,char **argv) { /* create the simulation schedule */ /* initial configuration */ - moldyn_add_schedule(&md,1500,1.0); + moldyn_add_schedule(&md,10000,1.0); //moldyn_add_schedule(&md,1000,1.0); //moldyn_add_schedule(&md,1000,1.0); //moldyn_add_schedule(&md,1000,1.0); @@ -345,7 +345,7 @@ int main(int argc,char **argv) { * integration of newtons equations */ moldyn_integrate(&md); -#ifdef DEBUG +#ifdef dEBUG return 0; #endif