Download 35.py from TestCaseGeneration/NumFEM_Eval: direct link, hf CLI and curl.
- Browser
- Download file 374 Bytes
-
https://huggingface.co/datasets/TestCaseGeneration/NumFEM_Eval/resolve/main/35.py
- Command line
-
hf download hf://datasets/TestCaseGeneration/NumFEM_Eval/35.py
-
curl -L -o 35.py https://huggingface.co/datasets/TestCaseGeneration/NumFEM_Eval/resolve/main/35.py
374 Bytes
| from numpy import empty, ndarray | |
| def get_shape_tria3(xi: ndarray) -> tuple[ndarray, ndarray]: | |
| N = empty(3) | |
| dNdxi = empty(shape=(2, 3)) | |
| xi = xi | |
| N[0] = 1.0 - xi[0] - xi[1] | |
| N[1] = xi[0] | |
| N[2] = xi[1] | |
| dNdxi[0, 0] = -1.0 | |
| dNdxi[0, 1] = 1.0 | |
| dNdxi[0, 2] = 0.0 | |
| dNdxi[1, 0] = -1.0 | |
| dNdxi[1, 1] = 0.0 | |
| dNdxi[1, 2] = 1.0 | |
| return N, dNdxi |