-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_memory.jl
42 lines (34 loc) · 1.15 KB
/
test_memory.jl
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
PLOT = false
include("utils.jl")
using Printf
using DelimitedFiles
# ----------------------------------------------------------- #
# Constants and setup #
# ----------------------------------------------------------- #
LEVEL = 5
GRID_CONSTANT = 1
STENCIL = :five
# End of setup - you shouldn't need to change anything below this linie
info = Dict([
("LEVEL", LEVEL),
("GRID CONSTANT", GRID_CONSTANT),
("STENCIL", STENCIL),
])
print(format_info(info))
if STENCIL==:five
eigenmatrix_method = create_eigenmatrix
elseif STENCIL==:nine
eigenmatrix_method = create_eigenmatrix_high_order
else
throw(ArgumentError("stencil must be :nine or :five, got $(repr(STENCIL))"))
end
println(" .Creating fractal and grid")
grid, number_inside = get_populated_grid(level=LEVEL, grid_constant=GRID_CONSTANT)
println(" .Creating eigenmatrix")
inner_list, eigenmatrix = eigenmatrix_method(grid, number_inside)
size_info = Dict([
("Eigenmatrix dimensions", size(eigenmatrix)),
("Eigenmatrix sizeof", sizeof(eigenmatrix)),
("Eigenmatrix summarysize", Base.summarysize(eigenmatrix)),
])
print(format_info(size_info))