-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.txt
28 lines (21 loc) · 877 Bytes
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Problem #2:
to compile the program, run
gcc -std=c99 -lm -o 3D 3D.c nrutil.c nrutil.h fgausselim.c
In the loop with n running up to nsteps, both
FTCS and Crank-Nicolson are implemented; comment
one out to run the other. Crank-Nicolson is NOT
implemented with a sparse matrix and thus takes
forever to run with gaussian elimination;
FTCS is more sprightly.
Problem #3:
- code sets Gaussian initial condition
- code has direchlet and/or periodic boundary conditions
- code has "source term"
Problem #5:
Using Crank-Nicolson the way it is implemented currently took
58750 ms for a 20x20x20 tensor; this was sufficiently bad
performance that I did not test further.
Please see included graph for FTCS running time. X axis is
"problem size" n=nx=ny=nz. Y axis is in milliseconds. 1000x
1000x1000 actually got killed; it timed out, so I wasn't
able to record a time for it.