#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
""" Converting MED file format in memory to a the Case file format (Ensight).
A new file with the same base name and the .case extension is created with its depencies (.geo ...).
"""
""" Converting MED file format in memory to a the Case file format (Ensight).
A new file with the same base name and the .case extension is created with its depencies (.geo ...).
"""
assert(isinstance(status,bool))
self.__export_groups=status
pass
assert(isinstance(status,bool))
self.__export_groups=status
pass
def write(self,fileName):
""" Write into the specified fileName series the result """
def write(self,fileName):
""" Write into the specified fileName series the result """
self._real_written_file_name.append(realWrittenCaseFileNameForCurMesh)
pass
return self._real_written_file_name
self._real_written_file_name.append(realWrittenCaseFileNameForCurMesh)
pass
return self._real_written_file_name
assert(isinstance(mdm,MEDFileUMesh))
ms2=[[mdm.getMeshAtLevel(lev) for lev in mdm.getNonEmptyLevels()[:1]]]
if self.__export_groups:
assert(isinstance(mdm,MEDFileUMesh))
ms2=[[mdm.getMeshAtLevel(lev) for lev in mdm.getNonEmptyLevels()[:1]]]
if self.__export_groups:
ms3=[]
for lev in mdm.getGrpNonEmptyLevels(grpnm)[:1]:
m=mdm.getGroup(lev,grpnm) ; m.zipCoords()
ms3=[]
for lev in mdm.getGrpNonEmptyLevels(grpnm)[:1]:
m=mdm.getGroup(lev,grpnm) ; m.zipCoords()
a=np.memmap(f,dtype='byte',mode='w+',offset=0,shape=(sz,)) ; a.flush() # truncate to set the size of the file
mm=mmap.mmap(f.fileno(),offset=0,length=0)
mm.write(self.__str80("C Binary"))
a=np.memmap(f,dtype='byte',mode='w+',offset=0,shape=(sz,)) ; a.flush() # truncate to set the size of the file
mm=mmap.mmap(f.fileno(),offset=0,length=0)
mm.write(self.__str80("C Binary"))
mm.write(self.__str80("Conversion using CaseWriter class"))
mm.write(self.__str80("node id off"))
mm.write(self.__str80("element id off"))
mm.write(self.__str80("Conversion using CaseWriter class"))
mm.write(self.__str80("node id off"))
mm.write(self.__str80("element id off"))