示例#1
0
 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)
示例#2
0
文件: profile.py 项目: santiama/OOF3D

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"
示例#3
0
 def get_value(self):
     debug.mainthreadTest()
     return profilefunction.ProfileFunctionXT(self.gtk.get_text().lstrip())