I have a .stl file and i want to use it for sample the interior of geometry. From the example STL Geometry: Blood Flow in Intracranial Aneurysm i understand that if i use a geometry to sample it only on the boundary i can write:
inlet = Tessellation.from_stl( "my_inlet.stl", airtight=False )
Indeed if i want to print this geometry i can use:
sample = inlet.sample_boundary(1000) var_to_polyvtk(sample, "inlet")
And i have this warning (even if i use the file contained in aneurysm example):
/modulus/modulus/geometry/tessellation.py:90: RuntimeWarning: divide by zero encountered in true_divide np.full(x.shape, triangle_areas[index] / x.shape)
But the problems begin when i want to use a geometry for sampling points on the interior (and for example adding constraint to them). In fact from the link i learn that in this case you must set
airtight=True, and have a .stl file with a watertight geometry.
So i created a .stl file with this characteristic and try to do like the boundary geometry:
interior = Tessellation.from_stl( "interior.stl", airtight=True ) sample = interior.sample_interior(1000) var_to_polyvtk(sample, "interior")
Running this piece of code results in the following error (even if i use the file
aneurysm_closed.stl from the directory of aneurysm example):
terminate called after throwing an instance of 'std::runtime_error' what(): the provided PTX was compiled with an unsupported toolchain. Aborted (core dumped)
If this can help in finding the solution running
aneurysm.py results in the same errors just explained.
Ps. i’m not worried about the warning received when i use the
sample_boundary method because this warning doesn’t causes the program to fail, but i’m worried about the interior of the geometry that is extremely necessary in my case and the error causes the program to fail.
Thanks for your help.