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

0001 /***************************************************************************
0002  *   Copyright (C) 2005 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 OPAMP_H
0012 #define OPAMP_H
0013 
0014 #include <element.h>
0015 
0016 /**
0017 node 0: non-inverting input
0018 node 1: output
0019 node 2: inverting input
0020 @author David Saxton
0021 */
0022 class OpAmp : public Element
0023 {
0024 public:
0025     OpAmp();
0026     ~OpAmp() override;
0027 
0028     Type type() const override
0029     {
0030         return Element_OpAmp;
0031     }
0032 
0033 protected:
0034     void updateCurrents() override;
0035     void add_initial_dc() override;
0036 };
0037 
0038 #endif