Datasets:

License:
NumFEM_Eval / 34.py
papakuku's picture
Upload 76 files
76cb30c verified
Raw History Blame Contribute Delete
374 Bytes
from numpy import empty, ndarray
def get_shape_line3(xi: ndarray) -> tuple[ndarray, ndarray]:
N = empty(3)
dNdxi = empty(shape=(1, 3))
N[0] = 0.5 * (1.0 - xi) - 0.5 * (1.0 - xi * xi)
N[1] = 1.0 - xi * xi
N[2] = 0.5 * (1.0 + xi) - 0.5 * (1.0 - xi * xi)
dNdxi[0, 0] = -0.5 + xi
dNdxi[0, 1] = -2.0 * xi
dNdxi[0, 2] = 0.5 + xi
return N, dNdxi