Skip to content
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

readme usage example is missing code #67

Closed
sfladi opened this issue Jun 13, 2024 · 1 comment
Closed

readme usage example is missing code #67

sfladi opened this issue Jun 13, 2024 · 1 comment

Comments

@sfladi
Copy link

sfladi commented Jun 13, 2024

The function write_background_mesh() in the README.md is missing code to write background_mesh and mtr_content to the mentioned .b.node- , .b.ele- and .b.mtr-files

tetgen/README.rst

Lines 193 to 204 in c3cb5fd

def write_background_mesh(background_mesh, out_stem):
"""Write a background mesh to a file.
This writes the mesh in tetgen format (X.b.node, X.b.ele) and a X.b.mtr file
containing the target size for each node in the background mesh.
"""
mtr_content = [f"{background_mesh.n_points} 1"]
target_size = background_mesh.point_data["target_size"]
for i in range(background_mesh.n_points):
mtr_content.append(f"{target_size[i]:.8f}")
write_background_mesh(bg_mesh, 'bgmesh.b')

@akaszynski
Copy link
Member

Resolved in #69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants