Beispiel #1
0
 def validValue(self, value):
     if type(value) is types.StringType:
         try:
             fn = profilefunction.ProfileFunctionX(value)
             return True
         except:
             return False
     return isinstance(value, profilefunction.ProfileFunctionX)
Beispiel #2
0
#=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=#

if config.dimension() == 2:
    tipstr = "A function of x, y, nx, ny, i, s, and/or alpha."
else:
    tipstr = "A function of x, y, z, nx, ny, nz, and/or i."

registeredclass.Registration(
    "Continuum Profile",
    ProfileX,
    ContinuumProfile,
    ordering=2,
    params=[
        profilefunction.ProfileFunctionXParameter(
            "function",
            value=profilefunction.ProfileFunctionX("0.0"),
            tip=tipstr)
    ],
    tip="Boundary condition is an arbitrary function of position.",
    discussion=xmlmenudump.loadFile(
        'DISCUSSIONS/engine/reg/continuumprofilex.xml'))

#=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=##=--=#


class ContinuumProfileXT(ProfileXT, _ContinuumProfileXT):
    pass


if config.dimension() == 2:
    tipstr = "A function of x, y, nx, ny, i, s, alpha, and/or t."
Beispiel #3
0
 def get_value(self):
     debug.mainthreadTest()
     return profilefunction.ProfileFunctionX(self.gtk.get_text().lstrip())