Public Member Functions | |
def | __init__ |
def | __str__ |
Public Attributes | |
theCount | |
theDensity | |
theDescription | |
theL0 | |
theMass | |
theName | |
theType | |
theVolume | |
theX0 |
Definition at line 6 of file twikiExport.py.
def twikiExport::Constituent::__init__ | ( | self, | |
line, | |||
predefinedMaterials | |||
) |
Definition at line 7 of file twikiExport.py.
00008 : 00009 if len(line.split('"')) < 5 or len(line.split('"')[4].split()) < 3: 00010 raise StandardError , "not a well formed Constituent: "+constString 00011 self.theDescription = line.split('"')[1] 00012 self.theName = line.split('"')[3] 00013 self.theCount = float(line.split('"')[4].split()[1]) 00014 self.theVolume = float(line.split('"')[4].split()[0]) * self.theCount 00015 self.theType = line.split('"')[4].split()[2] 00016 self.theDensity = float(predefinedMaterials[self.theName][2]) 00017 self.theX0 = float(predefinedMaterials[self.theName][3]) * self.theDensity 00018 self.theL0 = float(predefinedMaterials[self.theName][4]) * self.theDensity 00019 self.theMass = self.theVolume * self.theDensity # print "%s\tX0: %.3f\trho: %.3f\tX0': %.3f"%(self.theName, float(predefinedMaterials[self.theName][3]), float(predefinedMaterials[self.theName][2]), self.theX0)
def twikiExport::Constituent::__str__ | ( | self | ) |
Definition at line 20 of file twikiExport.py.
Definition at line 7 of file twikiExport.py.
Definition at line 7 of file twikiExport.py.
Definition at line 7 of file twikiExport.py.
Definition at line 7 of file twikiExport.py.
Definition at line 7 of file twikiExport.py.
Definition at line 7 of file twikiExport.py.
Definition at line 7 of file twikiExport.py.
Definition at line 7 of file twikiExport.py.
Definition at line 7 of file twikiExport.py.