def getElementSet(self, preprocessor): '''Returns an XC set that contains all the elements with an assigned section.''' retvalName = '' for name in self.elementSetNames: retvalName += '|' + name retval = preprocessor.getSets.defSet(retvalName) sets = list() for name in self.elementSetNames: sets.append(preprocessor.getSets.getSet(name)) sUtils.append_sets(retval, sets) return retval
def getElementSet(self,preprocessor): '''Returns an XC set that contains all the elements with an assigned section.''' retvalName= '' for name in self.elementSetNames: retvalName+= '|'+name retval= preprocessor.getSets.defSet(retvalName) sets= list() for name in self.elementSetNames: sets.append(preprocessor.getSets.getSet(name)) sUtils.append_sets(retval,sets) return retval
feProblem = xc.FEProblem() preprocessor = feProblem.getPreprocessor points = preprocessor.getCad.getPoints pt1 = points.newPntIDPos3d(1, geom.Pos3d(0.0, 0.0, 0.0)) pt2 = points.newPntIDPos3d(2, geom.Pos3d(CooMax / 2, CooMax / 2, CooMax / 2)) pt3 = points.newPntIDPos3d(3, geom.Pos3d(CooMax, CooMax, CooMax)) s1 = preprocessor.getSets.defSet("S1") sUtils.append_points(s1, [pt1, pt2]) s2 = preprocessor.getSets.defSet("S2") sUtils.append_points(s2, [pt2, pt3]) s3 = preprocessor.getSets.defSet("S3") sUtils.append_sets(s3, [s1, s2]) sz = s3.getPoints.size #for p in pnts: # print codigo #print "sz= ", sz import os from miscUtils import LogMessages as lmsg fname = os.path.basename(__file__) if (sz == 3): print "test ", fname, ": ok." else: lmsg.error(fname + ' ERROR.')
# ***BOUNDARY CONDITIONS*** execfile(workingDirectory + 'bound_cond.py') # ***ACTIONS*** execfile(path_loads_def + 'loads_def.py') execfile(path_loads_def + 'loads_def_thermal_gradient_slab.py') if abutment.lower()[0] == 'y': execfile(path_loads_abutment + 'loads_def.py') setsTablPilas = [ riostrEstr1, riostrEstr2, losa, cartabInt, cartabExt, voladzInt, voladzExt, pilasBarlov ] if abutment.lower()[0] == 'y': allsets = setsTablPilas + setsEstribo else: allsets = setsTablPilas if pilasSotav: allsets.append(pilasSotav) for s in allsets: s.fillDownwards() if pile_found.lower()[0] == 'y': allsets.append(ties) allsets.append(struts) allsets.append(piles) overallSet = prep.getSets.defSet('overallSet') sets.append_sets(overallSet, allsets) overallSet.description = 'overall set'
feProblem= xc.FEProblem() preprocessor= feProblem.getPreprocessor points= preprocessor.getMultiBlockTopology.getPoints pt1= points.newPntIDPos3d(1,geom.Pos3d(0.0,0.0,0.0)) pt2= points.newPntIDPos3d(2,geom.Pos3d(CooMax/2,CooMax/2,CooMax/2)) pt3= points.newPntIDPos3d(3,geom.Pos3d(CooMax,CooMax,CooMax)) s1= preprocessor.getSets.defSet("S1") sUtils.append_points(s1,[pt1,pt2]) s2= preprocessor.getSets.defSet("S2") sUtils.append_points(s2,[pt2,pt3]) s3= preprocessor.getSets.defSet("S3") sUtils.append_sets(s3,[s1,s2]) sz= s3.getPoints.size #for p in pnts: # print codigo #print "sz= ", sz import os from miscUtils import LogMessages as lmsg fname= os.path.basename(__file__) if (sz==3): print "test ",fname,": ok." else: lmsg.error(fname+' ERROR.')