Skip to content

Commit

Permalink
fix: Use python for arithmetic in Makefile
Browse files Browse the repository at this point in the history
Shell doesn't understand scientific notation and POSIX arithmetic is
extremely brittle.
  • Loading branch information
adigitoleo committed Mar 26, 2024
1 parent bb9396c commit 2c92244
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/fluidity/corner2d/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ OUT_DIR := _out
# Initial geometry options (in units of metres), passed to `pydrex-mesh`.
WIDTH := 1e6
DEPTH := 2e5
HALF_WIDTH := $(shell python3 -c 'print($(WIDTH)/2)')
HALF_DEPTH := $(shell python3 -c 'print($(DEPTH)/2)')
RESOLUTION_HI := 1e2
RESOLUTION_LO := 1e4
# Initial conditions, used to parametrise velocity fields and spawn particles.
Expand Down

0 comments on commit 2c92244

Please sign in to comment.