Skip to content

feat: update conductionpath #1147

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

wenfengye
Copy link
Member

@wenfengye wenfengye commented Jun 18, 2025

add the ability to update coordinates of conductionpath by providing deformed relying surface.
This permits to generate conductio sytem before running zeropressure.

@github-actions github-actions bot added enhancement General improvements to existing features tests Related with improvements of the test suite labels Jun 18, 2025
@wenfengye wenfengye marked this pull request as ready for review July 16, 2025 12:37
@wenfengye wenfengye requested a review from a team as a code owner July 16, 2025 12:37
Returns
-------
ConductionPath | None
The updated conduction path if successful, None otherwise.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The updated conduction path if successful, None otherwise.
Updated conduction path if successful, None otherwise.

We omit a leading article (An, A, The) in brief descriptions so the first word is an important one.

segment = []
for i, j in zip(ids[0:-1], ids[1:]):
for tri in triangles:
if i in tri and j in tri:
segment.append(tri)
break
break # keep only one triangle per line is enough
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
break # keep only one triangle per line is enough
break # keeping only one triangle per line is enough

)
return path, surf

# keep global point ids as a necessary property for the surface mesh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# keep global point ids as a necessary property for the surface mesh
# keep global point IDs as a necessary property for the surface mesh

assert np.allclose(cp.mesh.points[0], np.array([0, 2, 0]))
assert np.allclose(cp.mesh.points[1], np.array([0.6, 0.6, 0]))


def test_create_path_on_surface_center():
"""Test conductionbeams can be initialized correctly on a pyvista sphere with 3 keypoints."""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""Test conductionbeams can be initialized correctly on a pyvista sphere with 3 keypoints."""
"""Test that conduction beams can be initialized correctly on a PyVista sphere with three keypoints."""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General improvements to existing features tests Related with improvements of the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants