Exemplo n.º 1
0
 def faceDivz(self):
     """
     Construct divergence operator in the z component
     (face-stg to cell-centres).
     """
     if getattr(self, "_faceDivz", None) is None:
         D3 = Utils.kron3(Utils.ddx(self.nCz), Utils.speye(self.nCy), Utils.speye(self.nCx))
         S = self.r(self.area, "F", "Fz", "V")
         V = self.vol
         self._faceDivz = Utils.sdiag(1 / V) * D3 * Utils.sdiag(S)
     return self._faceDivz
Exemplo n.º 2
0
 def faceDivz(self):
     """
     Construct divergence operator in the z component
     (face-stg to cell-centres).
     """
     if getattr(self, '_faceDivz', None) is None:
         D3 = Utils.kron3(Utils.ddx(self.nCz), Utils.speye(self.nCy),
                          Utils.speye(self.nCx))
         S = self.r(self.area, 'F', 'Fz', 'V')
         V = self.vol
         self._faceDivz = Utils.sdiag(1/V)*D3*Utils.sdiag(S)
     return self._faceDivz
Exemplo n.º 3
0
 def faceDivy(self):
     """
     Construct divergence operator in the y component
     (face-stg to cell-centres).
     """
     raise NotImplementedError("Wrapping the Utils.ddx is not yet " "implemented.")
     if getattr(self, "_faceDivy", None) is None:
         # TODO: this needs to wrap to join up faces which are
         # connected in the cylinder
         D2 = Utils.kron3(Utils.speye(self.nCz), Utils.ddx(self.nCy), Utils.speye(self.nCx))
         S = self.r(self.area, "F", "Fy", "V")
         V = self.vol
         self._faceDivy = Utils.sdiag(1 / V) * D2 * Utils.sdiag(S)
     return self._faceDivy
Exemplo n.º 4
0
 def faceDivy(self):
     """
     Construct divergence operator in the y component
     (face-stg to cell-centres).
     """
     raise NotImplementedError('Wrapping the Utils.ddx is not yet '
                               'implemented.')
     if getattr(self, '_faceDivy', None) is None:
         # TODO: this needs to wrap to join up faces which are
         # connected in the cylinder
         D2 = Utils.kron3(Utils.speye(self.nCz), Utils.ddx(self.nCy),
                         Utils.speye(self.nCx))
         S = self.r(self.area, 'F', 'Fy', 'V')
         V = self.vol
         self._faceDivy = Utils.sdiag(1/V)*D2*Utils.sdiag(S)
     return self._faceDivy