# -*- 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.#"""Xdmf tools"""importMuscat.Containers.ElementsDescriptionasEDXdmfName={}XdmfName[ED.Point_1]="Polyvertex"XdmfName[ED.Bar_2]="Polyline"XdmfName[ED.Triangle_3]="Triangle"XdmfName[ED.Quadrangle_4]="Quadrilateral"XdmfName[ED.Tetrahedron_4]="Tetrahedron"XdmfName[ED.Pyramid_5]="Pyramid"XdmfName[ED.Wedge_6]="Wedge"XdmfName[ED.Hexahedron_8]="Hexahedron"XdmfName[ED.Bar_3]="Edge_3"XdmfName[ED.Triangle_6]="Triangle_6"XdmfName[ED.Quadrangle_9]="Quadrilateral_9"XdmfName[ED.Quadrangle_8]="Quadrilateral_8"XdmfName[ED.Tetrahedron_10]="Tetrahedron_10"XdmfName[ED.Pyramid_13]="Pyramid_13"XdmfName[ED.Wedge_15]="Wedge_15"XdmfName[ED.Wedge_18]="Wedge_18"XdmfName[ED.Hexahedron_20]="Hexahedron_20"XdmfName[ED.Hexahedron_27]="Hexahedron_27"XdmfNumber={}XdmfNumber[ED.Point_1]=0x1XdmfNumber[ED.Bar_2]=0x2XdmfNumber[ED.Triangle_3]=0x4XdmfNumber[ED.Quadrangle_4]=0x5XdmfNumber[ED.Tetrahedron_4]=0x6XdmfNumber[ED.Pyramid_5]=0x7XdmfNumber[ED.Wedge_6]=0x8XdmfNumber[ED.Hexahedron_8]=0x9XdmfNumber[ED.Bar_3]=0x22XdmfNumber[ED.Triangle_6]=0x24XdmfNumber[ED.Quadrangle_9]=0x23XdmfNumber[ED.Quadrangle_8]=0x25XdmfNumber[ED.Tetrahedron_10]=0x26XdmfNumber[ED.Pyramid_13]=0x27XdmfNumber[ED.Wedge_15]=0x28XdmfNumber[ED.Wedge_18]=0x29XdmfNumber[ED.Hexahedron_20]=0x30XdmfNumber[ED.Hexahedron_27]=0x32XdmfNumberToEN={v:kfork,vinXdmfNumber.items()}XdmfNameToEN={v:kfork,vinXdmfName.items()}
[docs]classFieldNotFound(ValueError):"""Exception to treat Field Not found"""def__init__(self,value):self.value='Field "'+value+'" not found, Sorry!!'def__str__(self):returnrepr(self.value)# pragma: no cover
[docs]defHasHdf5Support():try:importh5pyreturnTrueexcept:# pragma: no coverreturnFalse