Skip to content

Commit

Permalink
#858 add vectordot and state_vectordot to api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjrobins committed Mar 14, 2020
1 parent 06ccfe8 commit b341616
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions docs/source/expression_tree/state_vector.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ State Vector

.. autoclass:: pybamm.StateVector
:members:

.. autoclass:: pybamm.StateVectorDot
:members:
4 changes: 4 additions & 0 deletions docs/source/expression_tree/variable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ Variable
.. autoclass:: pybamm.Variable
:members:

.. autoclass:: pybamm.VariableDot
:members:

.. autoclass:: pybamm.ExternalVariable
:members:

8 changes: 4 additions & 4 deletions pybamm/expression_tree/symbol.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,10 @@ def diff(self, variable):
elif any(variable.id == x.id for x in self.pre_order()):
return self._diff(variable)
elif variable.id == pybamm.t.id and \
any(
isinstance(x, (pybamm.VariableBase, pybamm.StateVectorBase))
for x in self.pre_order()
):
any(
isinstance(x, (pybamm.VariableBase, pybamm.StateVectorBase))
for x in self.pre_order()
):
return self._diff(variable)
else:
return pybamm.Scalar(0)
Expand Down

0 comments on commit b341616

Please sign in to comment.