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

Upper envelope crashing (maybe only at low resolutions?) #143

Open
sgsellan opened this issue Aug 11, 2024 · 0 comments
Open

Upper envelope crashing (maybe only at low resolutions?) #143

sgsellan opened this issue Aug 11, 2024 · 0 comments

Comments

@sgsellan
Copy link
Owner

This crashes, and it shouldn't. My current thinking is that the low resolution means there are labels that cause empty regions (e.g., labels with no associated tets). For example, I up-ed the resolution to 10, and that seems to run without issue.

import gpytoolbox, time
import numpy as np
 
labels = 4
resolution = 5
v, t = gpytoolbox.regular_cube_mesh(resolution)
w = np.zeros((v.shape[0],labels))
for i in range(labels):
    p = np.random.rand(3)
    print( "Center: ", p )
    for j in range(v.shape[0]):
        w[j,i] = -np.linalg.norm( v[j] - p )
 
print("Number of nodes: ", v.shape[0])
print("Number of labels: ", w.shape[1])
time_0 = time.time()
u, g, l = gpytoolbox.upper_envelope(v,t,w)
time_1 = time.time()
print("UE time: ", time_1-time_0)
print("Output tets: " , g.shape[0] )
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

1 participant