kinnala / scikit-fem

Simple finite element assemblers
https://scikit-fem.readthedocs.io
BSD 3-Clause "New" or "Revised" License
470 stars 76 forks source link

use int32 everywhere #1135

Closed kinnala closed 1 month ago

kinnala commented 1 month ago

fixes #1118

before:

| Degrees-of-freedom | Assembly (s) | Linear solve (s) |
| --- | --- | --- |
| 64 | 0.00199 | 0.00079 |
| 125 | 0.00213 | 0.00066 |
| 216 | 0.00164 | 0.00038 |
| 512 | 0.00337 | 0.00098 |
| 1000 | 0.01388 | 0.00172 |
| 1728 | 0.01198 | 0.00383 |
| 4096 | 0.02862 | 0.02693 |
| 8000 | 0.05722 | 0.11475 |
| 15625 | 0.12736 | 0.56895 |
| 32768 | 0.26139 | 3.97938 |

after:

| Degrees-of-freedom | Assembly (s) | Linear solve (s) |
| --- | --- | --- |
| 64 | 0.00119 | 0.00043 |
| 125 | 0.00120 | 0.00035 |
| 216 | 0.00171 | 0.00041 |
| 512 | 0.00356 | 0.00073 |
| 1000 | 0.00649 | 0.00155 |
| 1728 | 0.01093 | 0.00371 |
| 4096 | 0.02744 | 0.02612 |
| 8000 | 0.05473 | 0.11019 |
| 15625 | 0.11120 | 0.55764 |
| 32768 | 0.24988 | 3.96758 |

For P2 assembly I noticed about 10% improvement in Basis creation and matrix assembly.

Plus the obvious savings in memory.