IGA knotvectors

asked 2023-10-25 09:11:25 +0100

dozius gravatar image

Hi all, I have a code for IGA written in python/numpy and I am considering to convert it to Sagemath, in order to take advantage of its computational & plotting capabilities. My concerns are about performance. I have seen some benchmarks dealing with "typical" calculations, and Sagemath is definitely faster. However, when it comes to a specialized application, additional questions rise, e.g. selecting the most appropriate classes for my objects.

For example, in my current implementation, I have a class for knotvectors which stores the knot-indices and the knot-values (among other things). A naive approach is to have a class with two arrays, namely "index" and "value". What would be a more efficient way to store this info?

I have checked the documentation, and found various classes.. Unfortunately, there is no mention on performance. e.g. Would a "Family" or an "EnumeratedSet" object perform faster than storing in two arrays?

Converting the whole code, just to find out that the Sagemath approach performs slower, would be a tremendous waste of time. Any thoughts are wellcome!

edit retag flag offensive close merge delete

Comments

What is IGA ? No need to convert anything, just use your existing code inside sagemath, which is just python.

FrédéricC gravatar imageFrédéricC ( 2023-10-25 11:03:59 +0100 )edit

Pairs 'index', 'value' are best stored in Python's dict() object.

Max Alekseyev gravatar imageMax Alekseyev ( 2023-10-25 12:51:52 +0100 )edit