def __init__(self, cmd=None, process_count=None): self.process_count = process_count if cmd: self.cmd = [cmd] else: self.cmd = [cfg.get_femag()] if not sys.platform.startswith('linux'): self.cmd.append('-m')
def __init__(self, workdir, cmd, magnetizingCurves, magnets): self.workdir = workdir if cmd: self.cmd = cmd else: self.cmd = cfg.get_femag() if magnetizingCurves: if isinstance(magnetizingCurves, femagtools.mcv.MagnetizingCurve): self.magnetizingCurves = magnetizingCurves else: self.magnetizingCurves = femagtools.mcv.MagnetizingCurve( magnetizingCurves) else: self.magnetizingCurves = [] if magnets: if isinstance(magnets, femagtools.Magnet): self.magnets = magnets else: self.magnets = femagtools.Magnet(magnets) else: self.magnets = []