Пример #1
0
    def __init__(self, faces, value):
        """
        Creates a `FixedFlux` object.

        :Parameters:
            - `faces`: A `list` or `tuple` of `Face` objects to which this condition applies.
            - `value`: The value to impose.

        """
        BoundaryCondition.__init__(self, faces, value)
        ## The extra index [self.faces.value] makes self.contribution the same length as self.adjacentCellIDs
        self.contribution = (self.value * self.faces.mesh._faceAreas)[self.faces.value]
Пример #2
0
 def __init__(self, faces, value):
     """
     Parameters
     ----------
     faces : :obj:`~fipy.variables.faceVariable.FaceVariable` of :obj:`bool`
         Mask of faces where this condition applies.
     value : float
         Value to impose.
     """
     BoundaryCondition.__init__(self, faces, value)
     ## The extra index [self.faces.value] makes self.contribution the same length as self.adjacentCellIDs
     self.contribution = (self.value * self.faces.mesh._faceAreas)[self.faces.value]
Пример #3
0
    def __init__(self,faces,value):
        """
        Creates a `FixedFlux` object.

        :Parameters:
            - `faces`: A `list` or `tuple` of `Face` objects to which this condition applies.
            - `value`: The value to impose.

        """
        BoundaryCondition.__init__(self,faces,value)
        ## The extra index [self.faces.value] makes self.contribution the same length as self.adjacentCellIDs
        self.contribution = (self.value * self.faces.mesh._faceAreas)[self.faces.value]
    def __init__(self, faces, value, order):
        """
        Creates an `NthOrderBoundaryCondition`.

        :Parameters:
          - `faces`: A `list` or `tuple` of `Face` objects to which this condition applies.
          - `value`: The value to impose.
          - `order`: The order of the boundary condition. An `order` of `0`
            corresponds to a `FixedValue` and an `order` of `1` corresponds to
            a `FixedFlux`. Even and odd orders behave like `FixedValue` and `FixedFlux` objects,
            respectively, but apply to higher order terms.

          
        """
        self.order = order
        self.derivative = {}
        BoundaryCondition.__init__(self,faces,value)
    def __init__(self, faces, value, order):
        """
        Creates an `NthOrderBoundaryCondition`.

        :Parameters:
          - `faces`: A `list` or `tuple` of `Face` objects to which this condition applies.
          - `value`: The value to impose.
          - `order`: The order of the boundary condition. An `order` of `0`
            corresponds to a `FixedValue` and an `order` of `1` corresponds to
            a `FixedFlux`. Even and odd orders behave like `FixedValue` and `FixedFlux` objects,
            respectively, but apply to higher order terms.

          
        """
        self.order = order
        self.derivative = {}
        BoundaryCondition.__init__(self,faces,value)
Пример #6
0
    def __init__(self, faces, value, order):
        """
        Creates an `NthOrderBoundaryCondition`.

        Parameters
        ----------
        faces : :obj:`~fipy.variables.faceVariable.FaceVariable` of :obj:`bool`
            Mask of faces where this condition applies.
        value : float
            Value to impose.
        order : int
            Order of the boundary condition. An `order` of `0`
            corresponds to a `FixedValue` and an `order` of `1` corresponds to
            a `FixedFlux`. Even and odd orders behave like `FixedValue` and `FixedFlux` objects,
            respectively, but apply to higher order terms.
        """
        self.order = order
        self.derivative = {}
        BoundaryCondition.__init__(self, faces, value)