(self)
return self._f_d
Returns the forcing vector from 'lagranges_equations' method.
Returns the forcing vector from 'lagranges_equations' method.
Returns the forcing vector from lagranges_equations method .
def forcing(self):
        """ Returns the forcing vector from 'lagranges_equations' method. """

        if self.eom is None:
            raise ValueError('Need to compute the equations of motion first')

        qdd = self._qdoubledots
        qddzero = dict(zip(qdd, [0] * len(qdd)))

        if self.coneqs is not None:
            lam = self.lam_vec
            lamzero = dict(zip(lam, [0] * len(lam)))

            #The forcing terms from the eoms
            self._f_d = -((self.eom).subs(qddzero)).subs(lamzero)

        else:
            #The forcing terms from the eoms
            self._f_d = -(self.eom).subs(qddzero)

        return self._f_d
def forcing ( self ) : if self . eom is None : raise ValueError ( 'Need to compute the equations of motion first' ) qdd = self . _qdoubledots qddzero = dict ( zip ( qdd , [ 0 ] * len ( qdd ) ) ) if self . coneqs is not None : lam = self . lam_vec lamzero = dict ( zip ( lam , [ 0 ] * len ( lam ) ) ) #The forcing terms from the eoms self . _f_d = - ( ( self . eom ) . subs ( qddzero ) ) . subs ( lamzero ) else : #The forcing terms from the eoms self . _f_d = - ( self . eom ) . subs ( qddzero ) return self . _f_d