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