# -*- coding: utf-8 -*-## This file is subject to the terms and conditions defined in# file 'LICENSE.txt', which is part of this source code package.#"""Abaqus tools"""importosimportMuscat.Containers.ElementsDescriptionasEDfromMuscat.Helpers.IO.WhichimportWhichInpNameToMuscat={}InpNameToMuscat["S3"]=ED.Triangle_3InpNameToMuscat["CONN3D2"]=ED.Bar_2InpNameToMuscat["T2D2"]=ED.Bar_2InpNameToMuscat["CPS4R"]=ED.Quadrangle_4InpNameToMuscat["C3D4"]=ED.Tetrahedron_4InpNameToMuscat["C3D8"]=ED.Hexahedron_8InpNameToMuscat["C3D8R"]=ED.Hexahedron_8InpNameToMuscat["C3D8I"]=ED.Hexahedron_8InpNameToMuscat["C3D10"]=ED.Tetrahedron_10InpNameToMuscat["C3D10M"]=ED.Tetrahedron_10InpNameToMuscat["C3D20"]=ED.Hexahedron_20InpNameToMuscat["C3D6"]=ED.Wedge_6InpNameToMuscat["T3D2"]=ED.Bar_2InpNameToMuscat["CPS3"]=ED.Triangle_3InpNameToMuscat["STRI3"]=ED.Triangle_3InpNameToMuscat["CPS3"]=ED.Triangle_3InpNameToMuscat["CPS4"]=ED.Quadrangle_4InpNameToMuscat["CPS6"]=ED.Triangle_6InpNameToMuscat["CPS8"]=ED.Quadrangle_8permutation={}# permutation[ ED.Tetrahedron_4] = [0, 1, 3, 2]# the first element in the InpNameToMuscat dict is keptMuscatElementTypeToInpName={}fork,vinInpNameToMuscat.items():ifkinMuscatElementTypeToInpName:# pragma: no covercontinueMuscatElementTypeToInpName[v]=kdefaultAbaqusExecName="abaqus"
[docs]defGetAbaqusExec():"""Return the abaqus executable binary Returns ------- Union[str,None] the name of the executable for Abaqus, or None if not found """abaqusExec=os.environ.get("ABAQUS_EXEC",defaultAbaqusExecName)returnWhich(abaqusExec)