From 99d05f50a59536eea15256ce06477d14c5b92af1 Mon Sep 17 00:00:00 2001 From: Malik Date: Tue, 13 Feb 2024 13:53:12 -0700 Subject: [PATCH 1/2] fix spelling --- .codespell-ignore-words | 3 +++ .codespellrc | 3 +++ README.md | 6 +++--- bird/meshing/_mesh_tools.py | 10 +++++----- 4 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 .codespell-ignore-words create mode 100644 .codespellrc diff --git a/.codespell-ignore-words b/.codespell-ignore-words new file mode 100644 index 00000000..42d9b5cf --- /dev/null +++ b/.codespell-ignore-words @@ -0,0 +1,3 @@ +nd +inh +lastR diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000..d06c5471 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,3 @@ +[codespell] +skip = .git,OFsolvers,build,__pycache__,data_conditional_mean,Figures,assets +ignore-words = .codespell-ignore-words diff --git a/README.md b/README.md index 17474491..c5823e88 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ python applications/write_stir_tank_mesh.py -i $inp -o $out Generates a blockMeshDict -Then activate openFoam environement (tested with OpenFoam9) and mesh with +Then activate openFoam environment (tested with OpenFoam9) and mesh with ```bash blockMesh -dict system/blockMeshDict @@ -73,7 +73,7 @@ optional arguments: ``` -### Block cyclindrical meshing +### Block cylindrical meshing Generates `blockMeshDict` in `system` @@ -85,7 +85,7 @@ mesh_temp=bird/meshing/block_cyl_mesh_templates/sideSparger python applications/write_block_cyl_mesh.py -i $mesh_temp/input.json -t $mesh_temp/topology.json -o $caseFolder/system ``` -Then activate openFoam environement (tested with OpenFoam9) and mesh with +Then activate openFoam environment (tested with OpenFoam9) and mesh with ```bash cd $caseFolder diff --git a/bird/meshing/_mesh_tools.py b/bird/meshing/_mesh_tools.py index 1be2ac86..61618b2f 100644 --- a/bird/meshing/_mesh_tools.py +++ b/bird/meshing/_mesh_tools.py @@ -351,12 +351,12 @@ def radialCoarsening( # "ERROR: cannot smooth radial transition without grading list" # ) - # Length = R[lastR] - R[lastR - 1] - # deltaE = ((R[lastR - 1] - R[lastR - 2])) / NR[lastR - 1] - # gradR[lastR] = 1 / ( - # bissection(Length / deltaE, stretch_fun, NR[lastR]) + # Length = R[last_R] - R[last_R - 1] + # deltaE = ((R[last_R - 1] - R[last_R - 2])) / NR[last_R - 1] + # gradR[last_R] = 1 / ( + # bissection(Length / deltaE, stretch_fun, NR[last_R]) # ) - # if (gradR[lastR] > 2 or gradR[lastR] < 0.5) and abs( + # if (gradR[last_R] > 2 or gradR[last_R] < 0.5) and abs( # ratio - 1 # ) <= 1e-12: # print( From 62da68e54104deb638dd4df5a290579634dfbf06 Mon Sep 17 00:00:00 2001 From: Malik Date: Tue, 13 Feb 2024 13:58:17 -0700 Subject: [PATCH 2/2] enable codespell in ci --- .github/linters/formatting.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/linters/formatting.sh b/.github/linters/formatting.sh index 624df4d5..ef284b74 100644 --- a/.github/linters/formatting.sh +++ b/.github/linters/formatting.sh @@ -11,7 +11,8 @@ format () { black --line-length 79 --target-version 'py310' --include '\.pyi?$' $1 isort --profile 'black' --multi-line 3 --trailing-comma --force-grid-wrap 0 --line-length 79 --use-parentheses $1 - fi; + fi; + codespell $1 }