diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d920f48f..7ca644bf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,6 +25,10 @@ jobs: - { python: "3.11", os: "windows-latest", session: "tests" } - { python: "3.10", os: "windows-latest", session: "tests" } - { python: "3.9", os: "windows-latest", session: "tests" } + - { python: "3.12", os: "macos-latest", session: "tests" } + - { python: "3.11", os: "macos-latest", session: "tests" } + - { python: "3.10", os: "macos-latest", session: "tests" } + - { python: "3.9", os: "macos-latest", session: "tests" } - { python: "3.12", os: "macos-13", session: "tests" } - { python: "3.11", os: "macos-13", session: "tests" } - { python: "3.10", os: "macos-13", session: "tests" } diff --git a/docs/installation.rst b/docs/installation.rst index 3c573d96..80894e1b 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -10,7 +10,7 @@ Installing ``concreteproperties`` --------------------------------- ``concreteproperties`` uses `shapely `_ to prepare -the cross-section geometry and `triangle `_ to +the cross-section geometry and `CyTriangle `_ to efficiently generate a conforming triangular mesh. `sectionproperties `_ is used to generate concrete geometries, while `numpy `_ and diff --git a/poetry.lock b/poetry.lock index 77559281..4bbe1fd2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -642,6 +642,35 @@ files = [ docs = ["ipython", "matplotlib", "numpydoc", "sphinx"] tests = ["pytest", "pytest-cov", "pytest-xdist"] +[[package]] +name = "cytriangle" +version = "1.0.2" +description = "Object-oriented Cython wrapper of Shewchuk's Triangle Library" +optional = false +python-versions = ">=3.9" +files = [ + {file = "cytriangle-1.0.2-cp310-cp310-macosx_13_0_x86_64.whl", hash = "sha256:0b751c94fce353b0162ddbf2e875c19d9a6e82226fb9e63d4cca714c8240629b"}, + {file = "cytriangle-1.0.2-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:54add33c5177619f7840f78f7b3b5255f19c17bacf1f9ecc0e905545f555f28f"}, + {file = "cytriangle-1.0.2-cp310-cp310-manylinux_2_35_x86_64.whl", hash = "sha256:6ac8f1f4bc9c17cc71fc7478482123bfaad879ee741fda3e6ee73e419f3e3b83"}, + {file = "cytriangle-1.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:d7e5642608afa8ced82dab6dfc75483362d34f29f1df12cdd5bf5a823be8dadd"}, + {file = "cytriangle-1.0.2-cp311-cp311-macosx_13_0_x86_64.whl", hash = "sha256:bdffbac38131f4de461987e497a5d84b13f9e5aa8074b1a913f89a23d9722678"}, + {file = "cytriangle-1.0.2-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:50834beb6268de13df0a5c9559f96c4f15c3ddf4ec5b83352d2460be0ebb2199"}, + {file = "cytriangle-1.0.2-cp311-cp311-manylinux_2_35_x86_64.whl", hash = "sha256:60267c8125b69553cbfb943137c4e819bd26c7e70fc450a4158296e0fd65ee26"}, + {file = "cytriangle-1.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:763b630d10b59f58fba64b5aed2a8c6234eb26fd35cc51a656523c06bde09a30"}, + {file = "cytriangle-1.0.2-cp312-cp312-macosx_13_0_x86_64.whl", hash = "sha256:6656e9ae6420d84116bb46502a3a141fcaa9ae0cc9116b55721bcea8c67fc32c"}, + {file = "cytriangle-1.0.2-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:636e0ca8391a98a2299c2a288b892870fe8465b56c3183f855b28ec621aca54a"}, + {file = "cytriangle-1.0.2-cp312-cp312-manylinux_2_35_x86_64.whl", hash = "sha256:f8422eb2fac4100a12a291948cd4e41d709dd2b3945b4d170a96388f0b709dae"}, + {file = "cytriangle-1.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:f117df69490941cfecaa00d7493d5720d04024b65175d65dd8b6de290195e012"}, + {file = "cytriangle-1.0.2-cp39-cp39-macosx_13_0_x86_64.whl", hash = "sha256:e49f523de3bc5a3213c7086e0ec3dc028b7dfd4c2faf230eafefb6ec77b67385"}, + {file = "cytriangle-1.0.2-cp39-cp39-macosx_14_0_arm64.whl", hash = "sha256:49fb8999dd62306abaa1162cc67a6617e1ba62305d12294a52de34c4442a8e17"}, + {file = "cytriangle-1.0.2-cp39-cp39-manylinux_2_35_x86_64.whl", hash = "sha256:0a646e695c8da484704a0ed0f52b2adee84f2f237f8767931fbc1f375d4a1137"}, + {file = "cytriangle-1.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:e8197e55a26f3213d9faf75e8929401cbe1924c44bddee0aa4bb64d7598a15bc"}, + {file = "cytriangle-1.0.2.tar.gz", hash = "sha256:2af9b6bae26c3b36375db56dd66c7c4775f3d5606cc4d78900599b089594e89c"}, +] + +[package.dependencies] +numpy = ">=1.25.2,<2.0.0" + [[package]] name = "darglint" version = "1.8.1" @@ -3066,30 +3095,30 @@ test = ["array-api-strict", "asv", "gmpy2", "hypothesis (>=6.30)", "mpmath", "po [[package]] name = "sectionproperties" -version = "3.2.2" +version = "3.3.0" description = "A python package for the analysis of arbitrary cross-sections using the finite element method." optional = false python-versions = "<3.13,>=3.9.0" files = [ - {file = "sectionproperties-3.2.2-py3-none-any.whl", hash = "sha256:03ddb9652eb24a24cf42844dd69745efa4be7d2aa88e254dad8c104e9732ec14"}, - {file = "sectionproperties-3.2.2.tar.gz", hash = "sha256:deb0710e112323f8f8f3eb51a23ca2bac37a37c243f435946ab4af8023e7617c"}, + {file = "sectionproperties-3.3.0-py3-none-any.whl", hash = "sha256:986199d534d833c19f71695e125abcd21abda016a07566ee91ffb61b2ccf3363"}, + {file = "sectionproperties-3.3.0.tar.gz", hash = "sha256:7ebcfe40970accbbabe89e84f7b8fd965271e26c2989073756464c5cbb3b45e6"}, ] [package.dependencies] click = ">=8.1.7,<9.0.0" +cytriangle = ">=1.0.1,<2.0.0" matplotlib = ">=3.8.3,<4.0.0" more-itertools = ">=10.2.0,<11.0.0" numpy = ">=1.26.4,<2.0.0" rich = ">=13.7.1,<14.0.0" scipy = ">=1.12.0,<2.0.0" shapely = ">=2.0.3,<3.0.0" -triangle = ">=20230923,<20230924" [package.extras] dxf = ["cad-to-shapely (>=0.3.1,<0.4.0)"] numba = ["numba (>=0.59.0,<0.60.0)"] pardiso = ["intel-openmp (==2023.2.0)", "mkl (==2023.2.0)", "pypardiso (>=0.4.5,<0.5.0)", "tbb (==2021.10.0)"] -rhino = ["rhino-shapley-interop (>=0.0.4,<0.0.5)", "rhino3dm (==8.6.0)"] +rhino = ["rhino-shapley-interop (>=0.0.4,<0.0.5)", "rhino3dm (==8.6.1)"] [[package]] name = "send2trash" @@ -3573,51 +3602,6 @@ files = [ docs = ["myst-parser", "pydata-sphinx-theme", "sphinx"] test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0,<8.2)", "pytest-mock", "pytest-mypy-testing"] -[[package]] -name = "triangle" -version = "20230923" -description = "Python binding to the triangle library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "triangle-20230923-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9b73207eaaeab23f3ca4c70ceb6b759e8dff729501b21c12d8ea1d972fecb5e7"}, - {file = "triangle-20230923-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0a4ec064dbd6b35eb14a552e4435d3e17330f93c3caaebee0ef37b1c60ed13e4"}, - {file = "triangle-20230923-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3dcf9881b88c9c192c59f911e75808f64dc71506d3dda3423fd3ff99a4eaa9ae"}, - {file = "triangle-20230923-cp310-cp310-win32.whl", hash = "sha256:c8148839b8e082fa0691c6be651bb2e351357b103754b79216cb3a06cd98e137"}, - {file = "triangle-20230923-cp310-cp310-win_amd64.whl", hash = "sha256:adcab59db17aaa6f1ff70a1b82952c7ac0342070a4cc39d4fe5f574fc71cfd5b"}, - {file = "triangle-20230923-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:58c3f1e4c4ed3105dd33f885313200514669cc36b43a9a36101d0c286d2433fc"}, - {file = "triangle-20230923-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4baec5494bcba194b8c1d435382254bf394dc01f591bed452a8b8bd086b74845"}, - {file = "triangle-20230923-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4aae0afb29d286456d9c494f7d7c668994b59ac15026eeeb07ec7e2fbb348ac3"}, - {file = "triangle-20230923-cp311-cp311-win32.whl", hash = "sha256:aa5018fd5b87d0b798a933d54466bfebc5bb23efa59a59398b198ed19d22cc94"}, - {file = "triangle-20230923-cp311-cp311-win_amd64.whl", hash = "sha256:f6a5270fb5ff4a48abe6a752420e438b05d087bda98ca807498f4ab720aee096"}, - {file = "triangle-20230923-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:19dca27055bd9097d2704fce6874ddadd786453e7fb58fa52a7fad9b2c0ccf78"}, - {file = "triangle-20230923-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17a61ccd56620ed88c651e73b694c174a8532072618229df6366726c877bb2f0"}, - {file = "triangle-20230923-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6b3f149a8535ee1c4ca502150214c9d215690f8f3003d5b0cb971cf04497c96d"}, - {file = "triangle-20230923-cp312-cp312-win32.whl", hash = "sha256:356dc18d627baa67536bb47c164e30eb5755d7ec2a99a7c87ed997dbd60c96c0"}, - {file = "triangle-20230923-cp312-cp312-win_amd64.whl", hash = "sha256:f083b4c2a1a11cf89835910a5c93b2c50f94b8ca68af425e9372215ec8e22252"}, - {file = "triangle-20230923-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:1209da51f034d4b4fd73f3fafaaebb4d19a4c113e58cdf7b8e5b51af5887fa30"}, - {file = "triangle-20230923-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14e70116168e4658bb1bf19d91ebbe4bb9fb15a9ee82f0efdd9a7abd35a2005a"}, - {file = "triangle-20230923-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0253dc5005751489b6ea8e93034e6e3d028a080f605f5398b0c9b85d55218ca7"}, - {file = "triangle-20230923-cp37-cp37m-win32.whl", hash = "sha256:c9f04a1963d91cbf7729629fe535851eff13850eca3590a5d8a0d633a5044376"}, - {file = "triangle-20230923-cp37-cp37m-win_amd64.whl", hash = "sha256:a40c7348a4c40f2c2a5feb54c2cc89a82c48d9bc41dfc03c8f88f44f4b230af8"}, - {file = "triangle-20230923-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9251e15e7811d00d4166d0368c62d603c284e04925cd3138caa4743dac8f61a4"}, - {file = "triangle-20230923-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:542cc693ea6b02d933a3594950e1eaf9c7f175a317c56e30bac4ca6356ef7db0"}, - {file = "triangle-20230923-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:234ce3c9e9cb9c7be92de6022bafbe6173c064085cdbf9e9a7ea751665ab8a16"}, - {file = "triangle-20230923-cp38-cp38-win32.whl", hash = "sha256:e3718560534b3b903e77fbc8fdf371429ae4703537392d989307ff2a9f077a45"}, - {file = "triangle-20230923-cp38-cp38-win_amd64.whl", hash = "sha256:8ea964906da3dd93d3ba952ef18c10e2ec2f46bedf05d7a8024d99f425504bc4"}, - {file = "triangle-20230923-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:393d0e88c860523fc5a0383332882d1e9de4161dab80e78fc49898974173f407"}, - {file = "triangle-20230923-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8fa4906c211b2181b9191239af315079f3211de8eed4715fd1df43376571c77"}, - {file = "triangle-20230923-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2abf798207d52e9144c03c0191dd48b6cc64e2b32424f08afea7243a4f41a9c0"}, - {file = "triangle-20230923-cp39-cp39-win32.whl", hash = "sha256:6ec882cc57a161616971c9e7c07c000e5f43e0e60f975e38bd88d477cec377ec"}, - {file = "triangle-20230923-cp39-cp39-win_amd64.whl", hash = "sha256:177a47d7fbe4ba2318fdbf766c19a0b290d285ca069c33e17014f0056a2abe58"}, -] - -[package.dependencies] -numpy = "*" - -[package.extras] -test = ["pytest"] - [[package]] name = "types-python-dateutil" version = "2.9.0.20240316" @@ -3960,4 +3944,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more [metadata] lock-version = "2.0" python-versions = ">=3.9.0,<3.13" -content-hash = "965c0a716051db9e9290ea1f0eeb7ca53ebe2bdec0600838e7d742607fa765b1" +content-hash = "a490fbf90c028b1e5de4f599cd570b8779ad0b75b7038ad1fec3483a6988b96b" diff --git a/pyproject.toml b/pyproject.toml index c2ebfcf1..a7b47e77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,11 +50,11 @@ numpy = "^1.26.4" scipy = "^1.12.0" matplotlib = "^3.8.3" shapely = "^2.0.3" -triangle = "^20230923" +cytriangle = "^1.0.2" rich = "^13.7.1" click = "^8.1.7" more-itertools = "^10.2.0" -sectionproperties = "^3.2.2" +sectionproperties = "^3.3.0" [tool.poetry.dev-dependencies] black = "^24.2.0" diff --git a/src/concreteproperties/analysis_section.py b/src/concreteproperties/analysis_section.py index 72dce359..f206dc4c 100644 --- a/src/concreteproperties/analysis_section.py +++ b/src/concreteproperties/analysis_section.py @@ -6,8 +6,8 @@ from math import isinf from typing import TYPE_CHECKING +import cytriangle as triangle import numpy as np -import triangle from matplotlib.colors import ListedColormap import concreteproperties.utils as utils