File indexing completed on 2024-04-28 05:43:16

0001 /***************************************************************************
0002  *   Copyright (C) 2003-2004 by David Saxton                               *
0003  *   david@bluehaze.org                                                    *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  ***************************************************************************/
0010 
0011 #ifndef VCVS_H
0012 #define VCVS_H
0013 
0014 #include "element.h"
0015 
0016 /**
0017 Voltage source between nodes c2 and c3
0018 Controlling voltage between nodes c0 and c1
0019 @short Voltage Controlled Voltage  Source
0020 @author David Saxton
0021 */
0022 class VCVS : public Element
0023 {
0024 public:
0025     VCVS(const double gain);
0026     ~VCVS() override;
0027 
0028     Type type() const override
0029     {
0030         return Element_VCVS;
0031     }
0032     void setGain(const double g);
0033 
0034 protected:
0035     void updateCurrents() override;
0036     void add_initial_dc() override;
0037 
0038 private:
0039     double m_g; // Conductance
0040 };
0041 
0042 #endif