Skip to content

Update references to CyTriangle #443

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/examples/geometry/advanced_geometry.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
"Here, the ``shapely`` representation may show as green, indicating a \"valid\" ``shapely`` geometry, or red as previous. This \n",
"uncertainty is due to floating point errors originating from the rotation, potentially causing these two polygons no longer share an edge.\n",
"\n",
"If we try to mesh this geometry, we may actually cause a crash with ``triangle``, the meshing tool used behind-the-scenes by ``sectionproperties``."
"If we try to mesh this geometry, we may actually cause a crash with ``CyTriangle``, the meshing tool used behind-the-scenes by ``sectionproperties``."
]
},
{
Expand Down Expand Up @@ -461,7 +461,7 @@
"source": [
"## Creating Nested Geometries\n",
"\n",
"This example demonstrates creating nested geometries using two different approaches. These approaches reflect the differences between how ``shapely`` (geometry pre-processor) \"perceives\" geometry, how ``triangle`` (meshing tool) \"perceives\" geometry, and how the modeller might adapt their input style depending on the situation.\n",
"This example demonstrates creating nested geometries using two different approaches. These approaches reflect the differences between how ``shapely`` (geometry pre-processor) \"perceives\" geometry, how ``CyTriangle`` (meshing tool) \"perceives\" geometry, and how the modeller might adapt their input style depending on the situation.\n",
"\n",
"The nested geometry we are trying to create consists of three concentric squares with a hole at it's centre.\n",
"\n",
Expand Down Expand Up @@ -490,7 +490,7 @@
"id": "42",
"metadata": {},
"source": [
"- ``triangle`` does not have a concept of \"z-ordering\" so there is only a single plane which may have regions of different materials (specified with control points). When a hole is created in the plane, it \"punches\" through \"all\" polygons in the plane."
"- ``CyTriangle`` does not have a concept of \"z-ordering\" so there is only a single plane which may have regions of different materials (specified with control points). When a hole is created in the plane, it \"punches\" through \"all\" polygons in the plane."
]
},
{
Expand Down Expand Up @@ -548,7 +548,7 @@
"id": "46",
"metadata": {},
"source": [
"To create the nested geometry using the ``triangle`` interface, the code would be as follows:"
"To create the nested geometry using the ``CyTriangle`` interface, the code would be as follows:"
]
},
{
Expand Down Expand Up @@ -623,7 +623,7 @@
"source": [
"Notice how the ``shapely`` representation shows the squares overlapping each other instead of the squares fitting into the \"hole below\".\n",
"\n",
"Is one of these methods better than the other? Not necessarily. The ``shapely`` approach is suitable for manually creating the geometry, whereas the ``triangle`` approach is suitable for reading in serialised data from a file, for example.\n",
"Is one of these methods better than the other? Not necessarily. The ``shapely`` approach is suitable for manually creating the geometry, whereas the ``CyTriangle`` approach is suitable for reading in serialised data from a file, for example.\n",
"\n",
"And, for either case, when the compound geometry is meshed, we see this:"
]
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Installing ``sectionproperties``
--------------------------------

``sectionproperties`` uses `shapely <https://github.com/shapely/shapely>`_ to prepare
the cross-section geometry and `triangle <https://github.com/drufat/triangle>`_ to
the cross-section geometry and `CyTriangle <https://github.com/m-clare/cytriangle>`_ to
efficiently generate a conforming triangular mesh.
`numpy <https://github.com/numpy/numpy>`_ and `scipy <https://github.com/scipy/scipy>`_
are used to aid finite element computations, while
Expand Down
4 changes: 2 additions & 2 deletions docs/user_guide/theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ Mesh Generation
---------------

The cross-section is meshed using quadratic superparametric triangular elements
(``Tri6``) using the `triangle library <https://github.com/drufat/triangle>`__ for
(``Tri6``) using the `CyTriangle library <https://github.com/m-clare/cytriangle>`__ for
Python. Superparametric quadratic elements are defined as having straight edges and
mid-nodes located at the mid-point between adjacent corner nodes. ``triangle``
mid-nodes located at the mid-point between adjacent corner nodes. ``CyTriangle``
implements `Triangle <https://www.cs.cmu.edu/~quake/triangle.html>`__, which is a two
dimensional quality mesh generator and Delaunay triangulator written by Jonathan
Shewchuk in C.
Expand Down
2 changes: 1 addition & 1 deletion src/sectionproperties/analysis/section.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Section:
material_groups (list[MaterialGroup]): List of
class:`~sectionproperties.pre.pre.MaterialGroup` objects, which contain the
finite elements and stress results (if applicable) for each defined material
mesh (dict[str, Any]): Finite element mesh generated by ``triangle``
mesh (dict[str, Any]): Finite element mesh generated by ``CyTriangle``
num_nodes (int): Number of nodes in the finite element mesh
elements (list[Tri6]): List of finite element objects describing the
cross-section mesh
Expand Down
4 changes: 2 additions & 2 deletions src/sectionproperties/pre/pre.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ def create_mesh(
) -> dict[str, list[list[float]] | list[list[int]]]:
"""Generates a triangular mesh.

Creates a quadratic triangular mesh using the triangle module, which utilises the
code ``Triangle``, by Jonathan Shewchuk.
Creates a quadratic triangular mesh using the ``CyTriangle`` module, which utilises
the code ``Triangle``, by Jonathan Shewchuk.

Args:
points: List of points (``x``, ``y``) defining the vertices of the cross-section
Expand Down
Loading