def WriteElems(name, condtype, projectname, domaintype): section = '' if (string.count(condtype, 'p') >= 1): section = section + ElemSection(name, 'point') if (string.count(condtype, 'l') >= 1): section = section + ElemSection(name, 'line') if (string.count(condtype, 's') >= 1): section = section + ElemSection(name, 'surface') if (string.count(condtype, 'v') >= 1): section = section + ElemSection(name, 'volume') if domaintype == 'Fluid': basicfunctions.addtofile('011_' + projectname + '.fluid.elem.bas', section) if domaintype == 'Structure': basicfunctions.addtofile('021_' + projectname + '.structure.elem.bas', section)
def WriteScalarBC(name, condtype, projectname, domaintype): section = '' setadd = 'Set' if (string.count(condtype, 'v') >= 1): section = section + CondSetCond(name, 'volume', setadd, domaintype) setadd = 'Add' if (string.count(condtype, 's') >= 1): section = section + CondSetCond(name, 'surface', setadd, domaintype) setadd = 'Add' if (string.count(condtype, 'l') >= 1): section = section + CondSetCond(name, 'line', setadd, domaintype) setadd = 'Add' if (string.count(condtype, 'p') >= 1): section = section + CondSetCond(name, 'point', setadd, domaintype) setadd = 'Add' if setadd == 'Add': section = section + CondScalarSection(name) if domaintype == 'Fluid': basicfunctions.addtofile('012_' + projectname + '.fluid.cond.bas', section) if domaintype == 'Structure': basicfunctions.addtofile('022_' + projectname + '.structure.cond.bas', section)