commit 4e12789481a70d5f222312b833524be5d19963e2
parent 17369420c69ce6404c4e85804889cea5ad9824d0
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Fri, 5 Apr 2019 12:23:49 +0200
Improve readme, tweak figure, prepare Makefile for C
Diffstat:
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/1d_fd_simple_shear.jl b/1d_fd_simple_shear.jl
@@ -228,7 +228,7 @@ function implicit_1d_jacobian_poisson_solver(g, p, μ, Δz,
end
function plot_profile(z, v, label, filename)
- PyPlot.clf()
+ PyPlot.figure(figsize=[4,4])
PyPlot.plot(v, z, "+k")
PyPlot.xlabel(label)
PyPlot.ylabel("\$z\$ [m]")
@@ -242,7 +242,6 @@ init_μ(μ_wall, ϕ, ρ_s, G, z, P_wall) =
# Main
-PyPlot.clf()
for P_wall in P_wall_
diff --git a/Makefile b/Makefile
@@ -1,8 +1,12 @@
+CFLAGS=-g -std=c99 -pedantic -Wall
+LDFLAGS=-lm
JULIA=julia --banner=no --color=yes
-.PHONY: run
-run: 1d_fd_simple_shear.jl
+.PHONY: run-julia
+run-julia: 1d_fd_simple_shear.jl
echo "$<" | entr -s '$(JULIA) "$<"'
1d_fd_simple_shear.png: 1d_fd_simple_shear.jl
$(JULIA) $<
+
+1d_fd_simple_shear: 1d_fd_simple_shear.c arrays.c