|
7 | 7 |
|
8 | 8 | from __future__ import annotations |
9 | 9 |
|
| 10 | +import warnings |
10 | 11 | from dataclasses import dataclass, field |
11 | 12 | from functools import lru_cache |
12 | 13 | from typing import TYPE_CHECKING |
13 | 14 |
|
14 | 15 | import numpy as np |
15 | 16 | from numba import njit |
| 17 | +from numba.core.errors import NumbaPerformanceWarning |
16 | 18 |
|
17 | 19 |
|
18 | 20 | if TYPE_CHECKING: |
@@ -632,17 +634,19 @@ def element_stress( |
632 | 634 | * (b.dot(phi_shear) - nu / 2 * np.array([h1, h2])) |
633 | 635 | ) |
634 | 636 |
|
635 | | - # extrapolate results to nodes |
636 | | - sig_zz_mxx = extrapolate_to_nodes(w=sig_zz_mxx_gp) |
637 | | - sig_zz_myy = extrapolate_to_nodes(w=sig_zz_myy_gp) |
638 | | - sig_zz_m11 = extrapolate_to_nodes(w=sig_zz_m11_gp) |
639 | | - sig_zz_m22 = extrapolate_to_nodes(w=sig_zz_m22_gp) |
640 | | - sig_zx_mzz = extrapolate_to_nodes(w=sig_zxy_mzz_gp[:, 0]) |
641 | | - sig_zy_mzz = extrapolate_to_nodes(w=sig_zxy_mzz_gp[:, 1]) |
642 | | - sig_zx_vx = extrapolate_to_nodes(w=sig_zxy_vx_gp[:, 0]) |
643 | | - sig_zy_vx = extrapolate_to_nodes(w=sig_zxy_vx_gp[:, 1]) |
644 | | - sig_zx_vy = extrapolate_to_nodes(w=sig_zxy_vy_gp[:, 0]) |
645 | | - sig_zy_vy = extrapolate_to_nodes(w=sig_zxy_vy_gp[:, 1]) |
| 637 | + # extrapolate results to nodes, ignore numba warnings about performance |
| 638 | + with warnings.catch_warnings(): |
| 639 | + warnings.simplefilter("ignore", category=NumbaPerformanceWarning) |
| 640 | + sig_zz_mxx = extrapolate_to_nodes(w=sig_zz_mxx_gp) |
| 641 | + sig_zz_myy = extrapolate_to_nodes(w=sig_zz_myy_gp) |
| 642 | + sig_zz_m11 = extrapolate_to_nodes(w=sig_zz_m11_gp) |
| 643 | + sig_zz_m22 = extrapolate_to_nodes(w=sig_zz_m22_gp) |
| 644 | + sig_zx_mzz = extrapolate_to_nodes(w=sig_zxy_mzz_gp[:, 0]) |
| 645 | + sig_zy_mzz = extrapolate_to_nodes(w=sig_zxy_mzz_gp[:, 1]) |
| 646 | + sig_zx_vx = extrapolate_to_nodes(w=sig_zxy_vx_gp[:, 0]) |
| 647 | + sig_zy_vx = extrapolate_to_nodes(w=sig_zxy_vx_gp[:, 1]) |
| 648 | + sig_zx_vy = extrapolate_to_nodes(w=sig_zxy_vy_gp[:, 0]) |
| 649 | + sig_zy_vy = extrapolate_to_nodes(w=sig_zxy_vy_gp[:, 1]) |
646 | 650 |
|
647 | 651 | return ( |
648 | 652 | sig_zz_n, |
|
0 commit comments