projects
/
physik
/
posic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
basic integration method and functions added
[physik/posic.git]
/
posic.c
diff --git
a/posic.c
b/posic.c
index
79654cd
..
04d9b7f
100644
(file)
--- a/
posic.c
+++ b/
posic.c
@@
-57,9
+57,6
@@
int main(int argc,char **argv) {
printf("setting thermal fluctuations\n");
thermal_init(si,&random,count,t);
printf("setting thermal fluctuations\n");
thermal_init(si,&random,count,t);
- /* visualize */
-
- visual_atoms(&vis,0.0,si,count);
/* check kinetic energy */
/* check kinetic energy */
@@
-78,8
+75,11
@@
int main(int argc,char **argv) {
md.force=force_lennard_jones;
md.cutoff_square=((LC_SI/4.0)*(LC_SI/4.0));
md.pot_params=&lj;
md.force=force_lennard_jones;
md.cutoff_square=((LC_SI/4.0)*(LC_SI/4.0));
md.pot_params=&lj;
- md.force=NULL;
+ md.integrate=velocity_verlet;
+ md.time_steps=RUNS;
+ md.tau=TAU;
md.status=0;
md.status=0;
+ md.visual=&vis;
lj.sigma6=3.0/16.0*LC_SI*LC_SI;
help=lj.sigma6*lj.sigma6;
lj.sigma6=3.0/16.0*LC_SI*LC_SI;
help=lj.sigma6*lj.sigma6;
@@
-103,6
+103,14
@@
int main(int argc,char **argv) {
* integration of newtons equations
*/
* integration of newtons equations
*/
+ /* visualize */
+ //visual_atoms(&vis,0.0,si,count);
+
+
+ moldyn_integrate(&md);
+
+ printf("total energy (after integration): %f\n",get_total_energy(&md));
+
/* close */
visual_tini(&vis);
/* close */
visual_tini(&vis);