Example #1
0
def saveSkeleton(menuitem, filename, mode, format, skeleton):
    skelcontext = skeletoncontext.skeletonContexts[skeleton]
    if format == datafile.ABAQUS:
        skeletonIO.writeABAQUSfromSkeleton(filename, mode.string(), skelcontext)
    else:
        dfile = datafile.writeDataFile(filename, mode.string(), format)
        microstructureIO.writeMicrostructure(dfile, skelcontext.getParent())
        skeletonIO.writeSkeleton(dfile, skelcontext)
        dfile.close()
Example #2
0
def saveSkeleton(menuitem, filename, mode, format, skeleton):
    skelcontext = skeletoncontext.skeletonContexts[skeleton]
    if format==datafile.ABAQUS:
        skeletonIO.writeABAQUSfromSkeleton(filename, mode.string(),
                                           skelcontext)
    else:
        dfile = datafile.writeDataFile(filename, mode.string(), format)
        microstructureIO.writeMicrostructure(dfile, skelcontext.getParent())
        skeletonIO.writeSkeleton(dfile, skelcontext)
        dfile.close()
Example #3
0
 def start(self, meshcontext, time, continuing):
     # ScheduledOutput.start() opens the file and resets 'rewound'.
     writeskel = self.destination.rewound or not continuing
     scheduledoutput.ScheduledOutput.start(self, meshcontext, time,
                                           continuing)
     if writeskel:
         skelcontext = meshcontext.getParent()
         mscontext = skelcontext.getParent()
         microstructureIO.writeMicrostructure(self.destination.dfile(),
                                              mscontext)
         skeletonIO.writeSkeleton(self.destination.dfile(), skelcontext)
         writeMesh(self.destination.dfile(), meshcontext,
                   includeFields=False)
Example #4
0
 def start(self, meshcontext, time, continuing):
     # ScheduledOutput.start() opens the file and resets 'rewound'.
     writeskel = self.destination.rewound or not continuing
     scheduledoutput.ScheduledOutput.start(self, meshcontext, time,
                                           continuing)
     if writeskel:
         skelcontext = meshcontext.getParent()
         mscontext = skelcontext.getParent()
         microstructureIO.writeMicrostructure(self.destination.dfile(),
                                              mscontext)
         skeletonIO.writeSkeleton(self.destination.dfile(), skelcontext)
         writeMesh(self.destination.dfile(), meshcontext,
                   includeFields=False)
Example #5
0
def saveMicrostructure(menuitem, filename, mode, format, microstructure):
    ms = ooflib.common.microstructure.microStructures[microstructure]
    dfile = datafile.writeDataFile(filename, mode.string(), format)
    microstructureIO.writeMicrostructure(dfile, ms)
    dfile.close()
Example #6
0
def saveMicrostructure(menuitem, filename, mode, format, microstructure):
    ms = ooflib.common.microstructure.microStructures[microstructure]
    dfile = datafile.writeDataFile(filename, mode.string(), format)
    microstructureIO.writeMicrostructure(dfile, ms)
    dfile.close()