o ¸GÇgGã@s*ddlZddlmZddd„Zdd„ZdS)éN)Ú TriangulationcCs´|durtdƒ‚tj |d¡}|jddkrUt t |dd…df¡|dd…dfdkB¡d}tj|dd…dd…ftj||dfdd…df||dd…fff}|  d ¡S) zå Split quad elements to triangles and append additional elements to element table This script can be made much faster by using vector operation instead of the for-loop; just append additional elements to the end. Nz(elnode should be a numpy array of (np,4)éÿÿÿÿéérééÚint) Ú ExceptionÚnpÚmaÚ masked_valuesÚshapeÚnonzeroÚisnanÚr_Úc_Úastype)ZelnodeZeid©rúF/lfs/h1/ops/prod/packages/stofs.v2.1.16/ush/stofs_3d_atl/pysh/utils.pyÚ split_quadss6H rcCs$| ¡t|ƒkr |d8}t|||ƒS)Nr)ÚmaxÚlenr)ÚlonÚlatÚtrisrrrÚ triangulations r)N)Únumpyr Úmatplotlib.trirrrrrrrÚs