def _collect_eq_from_region(self, model, eRegion, dim, blockNumber, tFuncName): # equation = copy(model.equations[eRegion.equationNumber]) eParam = Params() eSystem = model.equations[eRegion.equationNumber].copy() eParam.equation = eSystem eParam.equationNumber = eRegion.equationNumber eParam.eRegion = eRegion eParam.dim = dim eParam.blockNumber = blockNumber eParam.funcName = tFuncName.substitute( blockNumber=blockNumber, equationNumber=eRegion.equationNumber) eParam.default = False eParam.parsedValues = self._get_eq_cpp(eSystem, eParam) eParam.original = [e.sent for e in eSystem.eqs] logger.debug("parsedValues") logger.debug(eParam.parsedValues) logger.debug('blockNumber eqReg=%s' % str(blockNumber)) return (eParam)
def _collect_eq_default(self, model, block, dim, blockNumber, tFuncName): # model.equations is a list of equation systems # equation = copy(model.equations[block.defaultEquation]) eSystem = model.equations[block.defaultEquation].copy() eParam = Params() eParam.equation = eSystem eParam.equationNumber = block.defaultEquation eParam.eRegion = None eParam.dim = dim eParam.blockNumber = blockNumber eParam.funcName = tFuncName.substitute( blockNumber=blockNumber, equationNumber=block.defaultEquation) eParam.default = True eParam.parsedValues = self._get_eq_cpp(eSystem, eParam) eParam.original = [e.sent for e in eSystem.eqs] logger.debug("parsedValues") logger.debug(eParam.parsedValues) logger.debug('blockNumber revSp=%s' % str(blockNumber)) return (eParam)