Beispiel #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)
Beispiel #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)
Beispiel #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
Beispiel #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
Beispiel #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)
Beispiel #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)
Beispiel #7
0
 def evaluate_for_shape(self):
     return pybamm.evaluate_for_shape_using_domain(self.domain, typ="matrix")