def validValue(self, value): if type(value) is types.StringType: try: fn = profilefunction.ProfileFunctionXT(value) return True except: return False return isinstance(value, profilefunction.ProfileFunctionXT)
if config.dimension() == 2: tipstr = "A function of x, y, nx, ny, i, s, alpha, and/or t." else: tipstr = "A function of x, y, z, ny, ny, nz, and/or i." registeredclass.Registration( "Continuum Profile", ProfileXT, ContinuumProfileXT, ordering=2, params=[ profilefunction.ProfileFunctionXTParameter( "function", value=profilefunction.ProfileFunctionXT("0.0"), tip=tipstr) ], tip="Boundary condition is arbitrary function of position and time.", discussion=xmlmenudump.loadFile( 'DISCUSSIONS/engine/reg/continuumprofilext.xml')) #=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=# class ContinuumProfileXTd(ProfileXTd, _ContinuumProfileXTd): pass if config.dimension() == 2: profargs = "x, y, nx, ny, i, s, alpha, and/or t"
def get_value(self): debug.mainthreadTest() return profilefunction.ProfileFunctionXT(self.gtk.get_text().lstrip())