def addCell(self, cellType=0, cellAdh=0, length=3.5, **kwargs): cid = self.next_id() cs = CellState(cid) cs.length = length cs.cellType = cellType cs.cellAdh = cellAdh cs.idx = self.next_idx() self.idToIdx[cid] = cs.idx self.cellStates[cid] = cs if self.integ: self.integ.addCell(cs) self.reg.addCell(cs) if self.sig: self.sig.addCell(cs) self.phys.addCell(cs, **kwargs)
def addCell(self, cellType=0, cellAdh=0, length=3.5, **kwargs): cid = self.next_id() cs = CellState(cid) cs.length = length cs.cellType = cellType cs.cellAdh = cellAdh cs.idx = self.next_idx() self.idToIdx[cid] = cs.idx self.idxToId[cs.idx] = cid self.cellStates[cid] = cs if self.integ: self.integ.addCell(cs) self.reg.addCell(cs) if self.sig: self.sig.addCell(cs) self.phys.addCell(cs, **kwargs)