Logo Search packages:      
Sourcecode: ktechlab version File versions  Download package

void Capacitance::updateCurrents (  )  [protected, virtual]

Call this function to tell the element to calculate the current flowing *into* it's cnodes *from* the element. You can get the currents with m_cnodeI. Child class must implement this function.

Implements Element.

Definition at line 39 of file capacitance.cpp.

References Element::b_status, and Element::m_cnodeI.

{
      if (!b_status) return;
      const double r_i = (p_cnode[0]->v-p_cnode[1]->v)*g_eq_old;
      m_cnodeI[0] = -i_eq_old-r_i;
      m_cnodeI[1] = -m_cnodeI[0];
}


Generated by  Doxygen 1.6.0   Back to index