Example #1
0
 def __and__(self, other):
     if isinstance(other, Term):
         from fipy.terms.coupledBinaryTerm import _CoupledBinaryTerm
         return _CoupledBinaryTerm(self, other)
     elif other == 0:
         return self
     else:
         raise Exception("Can only couple Term objects.")
Example #2
0
 def __and__(self, other):
     if isinstance(other, Term):
         from fipy.terms.coupledBinaryTerm import _CoupledBinaryTerm
         return _CoupledBinaryTerm(self, other)
     elif other == 0:
         return self
     else:
         raise Exception, "Can only couple Term objects."