Exemplo n.º 1
0
    def evaluate_for_shape(self):
        """
        See :meth:`pybamm.Symbol.evaluate_for_shape_using_domain()`
        """
        child_eval = self.children[0].evaluate_for_shape()
        vec = pybamm.evaluate_for_shape_using_domain(self.domain)

        return np.outer(child_eval, vec).reshape(-1, 1)
Exemplo n.º 2
0
 def _evaluate_for_shape(self):
     """
     Returns a vector of NaNs to represent the shape of a Broadcast.
     See :meth:`pybamm.Symbol.evaluate_for_shape_using_domain()`
     """
     child_eval = self.children[0].evaluate_for_shape()
     vec = pybamm.evaluate_for_shape_using_domain(self.domain)
     return np.outer(vec, child_eval).reshape(-1, 1)
Exemplo n.º 3
0
    def _evaluate_for_shape(self):
        """
        Returns a vector of NaNs to represent the shape of a Broadcast.
        See :meth:`pybamm.Symbol.evaluate_for_shape_using_domain()`
        """
        child_eval = self.children[0].evaluate_for_shape()
        vec = pybamm.evaluate_for_shape_using_domain(self.domain,
                                                     self.auxiliary_domains)

        return child_eval * vec
Exemplo n.º 4
0
    def evaluate_for_shape(self):
        """
        Returns a vector of NaNs to represent the shape of a Broadcast.
        See :meth:`pybamm.Symbol.evaluate_for_shape_using_domain()`
        """
        child_eval = self.children[0].evaluate_for_shape()
        vec = pybamm.evaluate_for_shape_using_domain(self.domain)

        if self.broadcast_type == "primary":
            return np.outer(child_eval, vec).reshape(-1, 1)
        elif self.broadcast_type == "full":
            return child_eval * vec
Exemplo n.º 5
0
 def _evaluate_for_shape(self):
     """ See :meth:`pybamm.Symbol.evaluate_for_shape_using_domain()` """
     return pybamm.evaluate_for_shape_using_domain(self.domain,
                                                   self.auxiliary_domains)
Exemplo n.º 6
0
 def evaluate_for_shape(self):
     """ See :meth:`pybamm.Symbol.evaluate_for_shape_using_domain()` """
     return pybamm.evaluate_for_shape_using_domain(self.domain)
Exemplo n.º 7
0
 def evaluate_for_shape(self):
     return pybamm.evaluate_for_shape_using_domain(self.domain, typ="matrix")