コード例 #1
0
   def copyCommonData(self):

      SLFn = SELAFIN('')
      #   Meta data
      SLFn.TITLE = self.slf.TITLE
      SLFn.file = self.slf.file
      SLFn.IPARAM = self.slf.IPARAM
      #   Time
      SLFn.DATETIME = self.slf.DATETIME
      SLFn.tags = self.slf.tags
      #   Variables
      SLFn.NBV1 = self.slf.NBV1
      SLFn.VARNAMES = self.slf.VARNAMES
      SLFn.VARUNITS = self.slf.VARUNITS
      SLFn.NBV2 = self.slf.NBV2
      SLFn.CLDNAMES = self.slf.CLDNAMES
      SLFn.CLDUNITS = self.slf.CLDUNITS
      SLFn.NVAR = self.slf.NVAR
      SLFn.VARINDEX = range(self.slf.NVAR)
      #   Unchanged numbers
      SLFn.NPLAN = self.slf.NPLAN
      SLFn.NDP2 = self.slf.NDP2
      SLFn.NDP3 = self.slf.NDP3

      return SLFn
コード例 #2
0
ファイル: partitioning.py プロジェクト: nicogodet/PostTelemac
    def copyCommonData(self):

        SLFn = SELAFIN("")
        #   Meta data
        SLFn.TITLE = self.slf.TITLE
        SLFn.file = self.slf.file
        SLFn.IPARAM = self.slf.IPARAM
        #   Time
        SLFn.DATETIME = self.slf.DATETIME
        SLFn.tags = self.slf.tags
        #   Variables
        SLFn.NBV1 = self.slf.NBV1
        SLFn.VARNAMES = self.slf.VARNAMES
        SLFn.VARUNITS = self.slf.VARUNITS
        SLFn.NBV2 = self.slf.NBV2
        SLFn.CLDNAMES = self.slf.CLDNAMES
        SLFn.CLDUNITS = self.slf.CLDUNITS
        SLFn.NVAR = self.slf.NVAR
        SLFn.VARINDEX = range(self.slf.NVAR)
        #   Unchanged numbers
        SLFn.NPLAN = self.slf.NPLAN
        SLFn.NDP2 = self.slf.NDP2
        SLFn.NDP3 = self.slf.NDP3

        return SLFn
コード例 #3
0
junkIPOB = junkIPOB.astype(np.int16)
slf2d.IPOB2 = np.hstack((b, junkIPOB))
slf2d.IPOB3 = slf2d.IPOB2

#print '     +> Set SELAFIN IKLE'
slf2d.IKLE2 = ikle
slf2d.IKLE3 = ikle

#print '     +> Set SELAFIN times and cores'
# these two lists are empty after constructor is instantiated
slf2d.tags['cores'].append(0)
slf2d.tags['times'].append(0)

#slf2d.tags = { 'times':[0] } # time (sec)
#slf2d.DATETIME = sel.DATETIME
slf2d.DATETIME = [2015, 1, 1, 1, 1, 1]
#slf2d.tags = { 'cores':[long(0)] } # time frame

#print '     +> Write SELAFIN headers'
slf2d.fole.update({'hook': open(slf_file, 'w')})
slf2d.fole.update({'name': 'Converted from gmsh by pputils'})
slf2d.fole.update({'endian': ">"})  # big endian
slf2d.fole.update({'float': ('f', 4)})  # single precision

slf2d.appendHeaderSLF()
slf2d.appendCoreTimeSLF(0)
slf2d.appendCoreVarsSLF([z])

# to write the *.cli file

# to create the *.cli output file
コード例 #4
0
ファイル: gmsh2slf.py プロジェクト: pprodano/pputils
junkIPOB = junkIPOB.astype(np.int16)
slf2d.IPOB2 = np.hstack((b,junkIPOB))
slf2d.IPOB3 = slf2d.IPOB2

#print '     +> Set SELAFIN IKLE'
slf2d.IKLE2 = ikle
slf2d.IKLE3 = ikle

#print '     +> Set SELAFIN times and cores'
# these two lists are empty after constructor is instantiated
slf2d.tags['cores'].append(0)
slf2d.tags['times'].append(0)

#slf2d.tags = { 'times':[0] } # time (sec)
#slf2d.DATETIME = sel.DATETIME
slf2d.DATETIME = [2015, 1, 1, 1, 1, 1]
#slf2d.tags = { 'cores':[long(0)] } # time frame 

#print '     +> Write SELAFIN headers'
slf2d.fole.update({ 'hook': open(slf_file,'w') })
slf2d.fole.update({ 'name': 'Converted from gmsh by pputils' })
slf2d.fole.update({ 'endian': ">" })     # big endian
slf2d.fole.update({ 'float': ('f',4) })  # single precision

slf2d.appendHeaderSLF()
slf2d.appendCoreTimeSLF(0) 
slf2d.appendCoreVarsSLF([z])

# to write the *.cli file

# to create the *.cli output file