JULIA=julia --procs 1 --optimize=3 --math-mode=fast --color=yes
PREFIX=breakup
SCRIPT=breakup.jl

all: \
	$(PREFIX)_ensemble_sigma_t0005kPa.pdf \
	$(PREFIX)_ensemble_sigma_t0050kPa.pdf \
	$(PREFIX)_ensemble_sigma_t0500kPa.pdf


$(PREFIX)_ensemble_sigma_t0005kPa.pdf: $(SCRIPT)
	$(JULIA) $< --width=5e3  \
		--E=2e7 \
		--nu=0.285 \
		--gamma_n=0. --gamma_t=0. \
		--mu_s=0.4 --mu_d=0.4 \
		--r=5.00e2 \
		--tensile_strength=0005e3 \
		--rotating=true \
		--ocean_vel_fac=4e4 \
		--total_hours=12. \
		--nruns=1 \
		"$@"

$(PREFIX)_ensemble_sigma_t0050kPa.pdf: $(SCRIPT)
	$(JULIA) $< --width=5e3  \
		--E=2e7 \
		--nu=0.285 \
		--gamma_n=0. --gamma_t=0. \
		--mu_s=0.4 --mu_d=0.4 \
		--r=5.00e2 \
		--tensile_strength=0050e3 \
		--rotating=true \
		--ocean_vel_fac=4e4 \
		--total_hours=12. \
		--nruns=1 \
		"$@"

$(PREFIX)_ensemble_sigma_t0500kPa.pdf: $(SCRIPT)
	$(JULIA) $< --width=5e3  \
		--E=2e7 \
		--nu=0.285 \
		--gamma_n=0. --gamma_t=0. \
		--mu_s=0.4 --mu_d=0.4 \
		--r=5.00e2 \
		--tensile_strength=0500e3 \
		--rotating=true \
		--ocean_vel_fac=4e4 \
		--total_hours=12. \
		--nruns=1 \
		"$@"


.PHONY: clean
clean:
	$(RM) $(PREFIX)_*.run
	for f in $(PREFIX)_*.vts; do $(RM) $$f; done
	for f in $(PREFIX)_*.vtp; do $(RM) $$f; done
	for f in $(PREFIX)_*.vtu; do $(RM) $$f; done
	$(RM) $(PREFIX)_*.pdf
	$(RM) $(PREFIX)_*.txt
