Esempio n. 1
0
    def __init__(self, bcValue, options=Options(), **kw):
        # Define the default options
        default_options = Options(**{
            constants().Name: Names().VoltageClamp,
            constants().BcValue: bcValue
        })

        # Merge the default options and the user generated options
        whole_options = default_options << options

        super(VoltageClamp, self).__init__(whole_options, **kw)
Esempio n. 2
0
    def __init__(self, options=Options(), **kw):

        # Define the default options
        default_options = Options(**{
            constants().Name: Names().SealedEnd,
            constants().BcValue: 0.0
        })

        # Merge the default options and the user generated options
        whole_options = default_options << options

        super(SealedEnd, self).__init__(whole_options, **kw)
Esempio n. 3
0
    def __init__(self, options=Options(), **kw):
        # Define the default options
        default_options = Options(
            **{
                constants().Name: Names().Neumann,
                constants().BcValue: 1.0,
                constants().BcType: constants().Neumann
            })

        # Merge the default options and the user generated options
        whole_options = default_options << options

        super(Neumann, self).__init__(whole_options, **kw)
Esempio n. 4
0
    def __setattr__(self, attributeName, value):

        if attributeName == constants().BcValue and value != 0.0:
            error_message = "The Sealed-End Boundary Condition \
                            can't have the value modified. By definition \
                            the value is 0 (zero)"

            raise AttributeError(error_message)
        else:
            super(SealedEnd, self).__setattr__(attributeName, value)