MCPcopy Create free account
hub / github.com/algorithm-archivists/algorithm-archive / main

Function main

contents/verlet_integration/code/c/verlet.c:45–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45int main() {
46 double time, vel;
47
48 verlet(&time, 5.0, -10, 0.01);
49 printf("[#]\nTime for Verlet integration is:\n");
50 printf("%lf\n", time);
51
52 stormer_verlet(&time, &vel, 5.0, -10, 0.01);
53 printf("[#]\nTime for Stormer Verlet integration is:\n");
54 printf("%lf\n", time);
55 printf("[#]\nVelocity for Stormer Verlet integration is:\n");
56 printf("%lf\n", vel);
57
58 velocity_verlet(&time, &vel, 5.0, -10, 0.01);
59 printf("[#]\nTime for velocity Verlet integration is:\n");
60 printf("%lf\n", time);
61 printf("[#]\nVelocity for Stormer Verlet integration is:\n");
62 printf("%lf\n", vel);
63
64 return 0;
65}

Callers

nothing calls this directly

Calls 3

verletFunction · 0.70
stormer_verletFunction · 0.70
velocity_verletFunction · 0.70

Tested by

no test coverage detected